Rebase against aa27dd07aa55301f3e23acf9f74daa0f465e7b6d

This commit is contained in:
Alistair Leslie-Hughes
2018-04-12 10:22:53 +10:00
parent f70daff195
commit 8853cef050
4 changed files with 40 additions and 51 deletions

View File

@@ -1,15 +1,15 @@
From 828665a6803984db12958dfe7e9c735c192ae257 Mon Sep 17 00:00:00 2001
From 159a7b00133485a0d6d89caac91b66996fbfb439 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 22 Jun 2014 19:04:38 +0200
Subject: wtsapi32: Partial implementation of WTSEnumerateProcessesW.
Subject: [PATCH] wtsapi32: Partial implementation of WTSEnumerateProcessesW.
---
dlls/wtsapi32/tests/wtsapi.c | 1 -
dlls/wtsapi32/wtsapi32.c | 82 ++++++++++++++++++++++++++++++++++++++----
2 files changed, 75 insertions(+), 8 deletions(-)
dlls/wtsapi32/tests/wtsapi.c | 1 -
dlls/wtsapi32/wtsapi32.c | 78 +++++++++++++++++++++++++++++++++++++++++---
2 files changed, 74 insertions(+), 5 deletions(-)
diff --git a/dlls/wtsapi32/tests/wtsapi.c b/dlls/wtsapi32/tests/wtsapi.c
index e8dced7..a317e5f 100644
index 341d9e6..648d7b9 100644
--- a/dlls/wtsapi32/tests/wtsapi.c
+++ b/dlls/wtsapi32/tests/wtsapi.c
@@ -85,7 +85,6 @@ static void test_WTSEnumerateProcessesW(void)
@@ -18,10 +18,10 @@ index e8dced7..a317e5f 100644
}
- todo_wine
ok(found || broken(!ret), "process name %s not found\n", wine_dbgstr_w(pname));
if (info) WTSFreeMemory(info);
WTSFreeMemory(info);
}
diff --git a/dlls/wtsapi32/wtsapi32.c b/dlls/wtsapi32/wtsapi32.c
index 79d5a7f..9457143 100644
index 5569502..ca13d2f 100644
--- a/dlls/wtsapi32/wtsapi32.c
+++ b/dlls/wtsapi32/wtsapi32.c
@@ -18,8 +18,11 @@
@@ -35,8 +35,8 @@ index 79d5a7f..9457143 100644
+#include "winternl.h"
#include "wtsapi32.h"
#include "wine/debug.h"
@@ -84,8 +87,13 @@ BOOL WINAPI WTSEnumerateProcessesA(HANDLE hServer, DWORD Reserved, DWORD Version
#include "wine/heap.h"
@@ -94,8 +97,13 @@ BOOL WINAPI WTSEnumerateProcessesA(HANDLE hServer, DWORD Reserved, DWORD Version
BOOL WINAPI WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version,
PWTS_PROCESS_INFOW* ppProcessInfo, DWORD* pCount)
{
@@ -52,7 +52,7 @@ index 79d5a7f..9457143 100644
if (!ppProcessInfo || !pCount || Reserved != 0 || Version != 1)
{
@@ -93,9 +101,71 @@ BOOL WINAPI WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version
@@ -103,9 +111,71 @@ BOOL WINAPI WTSEnumerateProcessesW(HANDLE hServer, DWORD Reserved, DWORD Version
return FALSE;
}
@@ -84,7 +84,7 @@ index 79d5a7f..9457143 100644
+ SetLastError(RtlNtStatusToDosError(status));
+ return FALSE;
+ }
+
+ spi = buf;
+ count = size = 0;
+ for (;;)
@@ -121,22 +121,11 @@ index 79d5a7f..9457143 100644
+ name += (spi->ProcessName.Length + sizeof(WCHAR))/sizeof(WCHAR);
+ spi = (SYSTEM_PROCESS_INFORMATION *)(((PCHAR)spi) + spi->NextEntryOffset);
+ }
+
+ HeapFree(GetProcessHeap(), 0, buf);
return TRUE;
}
@@ -159,9 +229,7 @@ BOOL WINAPI WTSEnumerateSessionsW(HANDLE hServer, DWORD Reserved, DWORD Version,
*/
void WINAPI WTSFreeMemory(PVOID pMemory)
{
- static int once;
-
- if (!once++) FIXME("Stub %p\n", pMemory);
+ HeapFree(GetProcessHeap(), 0, pMemory);
}
/************************************************************
--
1.7.9.5
1.9.1