Implemented GetModuleBaseName(AW), GetModuleFileNameEx(AW) and
GetModuleInformation.
This commit is contained in:
parent
2359b57574
commit
d93cb70558
|
@ -2,6 +2,7 @@
|
|||
* PSAPI library
|
||||
*
|
||||
* Copyright 1998 Patrik Stridvall
|
||||
* Copyright 2003 Eric Pouech
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
|
@ -23,32 +24,11 @@
|
|||
#include "winerror.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/debug.h"
|
||||
#include "tlhelp32.h"
|
||||
#include "winnls.h"
|
||||
#include "psapi.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(psapi);
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* get pid from hProcess (internal)
|
||||
*/
|
||||
static DWORD get_pid_from_process_handle(HANDLE hProcess)
|
||||
{
|
||||
DWORD ret = 0;
|
||||
|
||||
SERVER_START_REQ( get_process_info )
|
||||
{
|
||||
req->handle = hProcess;
|
||||
if ( !wine_server_call_err( req ) )
|
||||
ret = (DWORD)reply->pid;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* EmptyWorkingSet (PSAPI.@)
|
||||
*/
|
||||
|
@ -60,12 +40,11 @@ BOOL WINAPI EmptyWorkingSet(HANDLE hProcess)
|
|||
/***********************************************************************
|
||||
* EnumDeviceDrivers (PSAPI.@)
|
||||
*/
|
||||
BOOL WINAPI EnumDeviceDrivers(
|
||||
LPVOID *lpImageBase, DWORD cb, LPDWORD lpcbNeeded)
|
||||
BOOL WINAPI EnumDeviceDrivers(LPVOID *lpImageBase, DWORD cb, LPDWORD lpcbNeeded)
|
||||
{
|
||||
FIXME("(%p, %ld, %p): stub\n", lpImageBase, cb, lpcbNeeded);
|
||||
|
||||
if(lpcbNeeded)
|
||||
if (lpcbNeeded)
|
||||
*lpcbNeeded = 0;
|
||||
|
||||
return TRUE;
|
||||
|
@ -77,45 +56,59 @@ BOOL WINAPI EnumDeviceDrivers(
|
|||
*/
|
||||
BOOL WINAPI EnumProcesses(DWORD *lpidProcess, DWORD cb, DWORD *lpcbNeeded)
|
||||
{
|
||||
PROCESSENTRY32 pe;
|
||||
HANDLE hSnapshot;
|
||||
BOOL res;
|
||||
DWORD count;
|
||||
DWORD countMax;
|
||||
DWORD pid;
|
||||
int ret;
|
||||
|
||||
FIXME("(%p, %ld, %p)\n", lpidProcess,cb, lpcbNeeded);
|
||||
TRACE("(%p, %ld, %p)\n", lpidProcess,cb, lpcbNeeded);
|
||||
|
||||
if ( lpidProcess == NULL )
|
||||
cb = 0;
|
||||
if ( lpcbNeeded != NULL )
|
||||
*lpcbNeeded = 0;
|
||||
|
||||
hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);
|
||||
if ( hSnapshot == INVALID_HANDLE_VALUE )
|
||||
SERVER_START_REQ( create_snapshot )
|
||||
{
|
||||
req->flags = SNAP_PROCESS;
|
||||
req->inherit = FALSE;
|
||||
req->pid = 0;
|
||||
wine_server_call_err( req );
|
||||
hSnapshot = reply->handle;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
if ( hSnapshot == 0 )
|
||||
{
|
||||
FIXME("cannot create snapshot\n");
|
||||
return FALSE;
|
||||
}
|
||||
count = 0;
|
||||
countMax = cb / sizeof(DWORD);
|
||||
while (1)
|
||||
for (;;)
|
||||
{
|
||||
ZeroMemory( &pe, sizeof(PROCESSENTRY32) );
|
||||
pe.dwSize = sizeof(PROCESSENTRY32);
|
||||
res = (count == 0) ? Process32First( hSnapshot, &pe ) : Process32Next( hSnapshot, &pe );
|
||||
if ( !res )
|
||||
break;
|
||||
TRACE("process 0x%08lx\n",(long)pe.th32ProcessID);
|
||||
SERVER_START_REQ( next_process )
|
||||
{
|
||||
req->handle = hSnapshot;
|
||||
req->reset = (count == 0);
|
||||
wine_server_set_reply( req, NULL, 0);
|
||||
if ((ret = !wine_server_call_err( req )))
|
||||
pid = reply->pid;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
if (!ret) break;
|
||||
TRACE("process 0x%08lx\n", pid);
|
||||
if ( count < countMax )
|
||||
lpidProcess[count] = pe.th32ProcessID;
|
||||
count ++;
|
||||
lpidProcess[count] = pid;
|
||||
count++;
|
||||
}
|
||||
CloseHandle( hSnapshot );
|
||||
|
||||
if ( lpcbNeeded != NULL )
|
||||
*lpcbNeeded = sizeof(DWORD) * count;
|
||||
|
||||
TRACE("return %lu processes\n",count);
|
||||
TRACE("return %lu processes\n", count);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -123,17 +116,17 @@ BOOL WINAPI EnumProcesses(DWORD *lpidProcess, DWORD cb, DWORD *lpcbNeeded)
|
|||
/***********************************************************************
|
||||
* EnumProcessModules (PSAPI.@)
|
||||
*/
|
||||
BOOL WINAPI EnumProcessModules(
|
||||
HANDLE hProcess, HMODULE *lphModule, DWORD cb, LPDWORD lpcbNeeded)
|
||||
BOOL WINAPI EnumProcessModules(HANDLE hProcess, HMODULE *lphModule,
|
||||
DWORD cb, LPDWORD lpcbNeeded)
|
||||
{
|
||||
MODULEENTRY32 me;
|
||||
HANDLE hSnapshot;
|
||||
BOOL res;
|
||||
DWORD pid;
|
||||
DWORD count;
|
||||
DWORD countMax;
|
||||
int ret;
|
||||
HMODULE hModule;
|
||||
|
||||
FIXME("(hProcess=%p, %p, %ld, %p)\n",
|
||||
TRACE("(hProcess=%p, %p, %ld, %p)\n",
|
||||
hProcess, lphModule, cb, lpcbNeeded );
|
||||
|
||||
if ( lphModule == NULL )
|
||||
|
@ -141,39 +134,63 @@ BOOL WINAPI EnumProcessModules(
|
|||
if ( lpcbNeeded != NULL )
|
||||
*lpcbNeeded = 0;
|
||||
|
||||
pid = get_pid_from_process_handle(hProcess);
|
||||
SERVER_START_REQ( get_process_info )
|
||||
{
|
||||
req->handle = hProcess;
|
||||
if ( !wine_server_call_err( req ) )
|
||||
pid = (DWORD)reply->pid;
|
||||
else
|
||||
pid = 0;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
if ( pid == 0 )
|
||||
{
|
||||
FIXME("no pid for hProcess %p\n",hProcess);
|
||||
FIXME("no pid for hProcess %p\n" ,hProcess);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,pid);
|
||||
if ( hSnapshot == INVALID_HANDLE_VALUE )
|
||||
SERVER_START_REQ( create_snapshot )
|
||||
{
|
||||
req->flags = SNAP_MODULE;
|
||||
req->inherit = FALSE;
|
||||
req->pid = pid;
|
||||
wine_server_call_err( req );
|
||||
hSnapshot = reply->handle;
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
if ( hSnapshot == 0 )
|
||||
{
|
||||
FIXME("cannot create snapshot\n");
|
||||
return FALSE;
|
||||
}
|
||||
count = 0;
|
||||
countMax = cb / sizeof(HMODULE);
|
||||
while (1)
|
||||
for (;;)
|
||||
{
|
||||
ZeroMemory( &me, sizeof(MODULEENTRY32) );
|
||||
me.dwSize = sizeof(MODULEENTRY32);
|
||||
res = (count == 0) ? Module32First( hSnapshot, &me ) : Module32Next( hSnapshot, &me );
|
||||
if ( !res )
|
||||
break;
|
||||
TRACE("module 0x%08lx\n",(long)me.hModule);
|
||||
SERVER_START_REQ( next_module )
|
||||
{
|
||||
req->handle = hSnapshot;
|
||||
req->reset = (count == 0);
|
||||
wine_server_set_reply( req, NULL, 0 );
|
||||
if ((ret = !wine_server_call_err( req )))
|
||||
{
|
||||
hModule = (HMODULE)reply->base;
|
||||
}
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
if ( !ret ) break;
|
||||
TRACE("module 0x%p\n", hModule);
|
||||
if ( count < countMax )
|
||||
lphModule[count] = me.hModule;
|
||||
count ++;
|
||||
lphModule[count] = hModule;
|
||||
count++;
|
||||
}
|
||||
CloseHandle( hSnapshot );
|
||||
|
||||
if ( lpcbNeeded != NULL )
|
||||
*lpcbNeeded = sizeof(HMODULE) * count;
|
||||
|
||||
TRACE("return %lu modules\n",count);
|
||||
TRACE("return %lu modules\n", count);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -181,14 +198,13 @@ BOOL WINAPI EnumProcessModules(
|
|||
/***********************************************************************
|
||||
* GetDeviceDriverBaseNameA (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetDeviceDriverBaseNameA(
|
||||
LPVOID ImageBase, LPSTR lpBaseName, DWORD nSize)
|
||||
DWORD WINAPI GetDeviceDriverBaseNameA(LPVOID ImageBase, LPSTR lpBaseName,
|
||||
DWORD nSize)
|
||||
{
|
||||
FIXME("(%p, %s, %ld): stub\n",
|
||||
ImageBase, debugstr_a(lpBaseName), nSize
|
||||
);
|
||||
ImageBase, debugstr_a(lpBaseName), nSize);
|
||||
|
||||
if(lpBaseName && nSize)
|
||||
if (lpBaseName && nSize)
|
||||
lpBaseName[0] = '\0';
|
||||
|
||||
return 0;
|
||||
|
@ -197,14 +213,13 @@ DWORD WINAPI GetDeviceDriverBaseNameA(
|
|||
/***********************************************************************
|
||||
* GetDeviceDriverBaseNameW (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetDeviceDriverBaseNameW(
|
||||
LPVOID ImageBase, LPWSTR lpBaseName, DWORD nSize)
|
||||
DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID ImageBase, LPWSTR lpBaseName,
|
||||
DWORD nSize)
|
||||
{
|
||||
FIXME("(%p, %s, %ld): stub\n",
|
||||
ImageBase, debugstr_w(lpBaseName), nSize
|
||||
);
|
||||
ImageBase, debugstr_w(lpBaseName), nSize);
|
||||
|
||||
if(lpBaseName && nSize)
|
||||
if (lpBaseName && nSize)
|
||||
lpBaseName[0] = '\0';
|
||||
|
||||
return 0;
|
||||
|
@ -213,14 +228,13 @@ DWORD WINAPI GetDeviceDriverBaseNameW(
|
|||
/***********************************************************************
|
||||
* GetDeviceDriverFileNameA (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetDeviceDriverFileNameA(
|
||||
LPVOID ImageBase, LPSTR lpFilename, DWORD nSize)
|
||||
DWORD WINAPI GetDeviceDriverFileNameA(LPVOID ImageBase, LPSTR lpFilename,
|
||||
DWORD nSize)
|
||||
{
|
||||
FIXME("(%p, %s, %ld): stub\n",
|
||||
ImageBase, debugstr_a(lpFilename), nSize
|
||||
);
|
||||
ImageBase, debugstr_a(lpFilename), nSize);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
if (lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
|
||||
return 0;
|
||||
|
@ -229,14 +243,13 @@ DWORD WINAPI GetDeviceDriverFileNameA(
|
|||
/***********************************************************************
|
||||
* GetDeviceDriverFileNameW (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetDeviceDriverFileNameW(
|
||||
LPVOID ImageBase, LPWSTR lpFilename, DWORD nSize)
|
||||
DWORD WINAPI GetDeviceDriverFileNameW(LPVOID ImageBase, LPWSTR lpFilename,
|
||||
DWORD nSize)
|
||||
{
|
||||
FIXME("(%p, %s, %ld): stub\n",
|
||||
ImageBase, debugstr_w(lpFilename), nSize
|
||||
);
|
||||
ImageBase, debugstr_w(lpFilename), nSize);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
if (lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
|
||||
return 0;
|
||||
|
@ -245,14 +258,13 @@ DWORD WINAPI GetDeviceDriverFileNameW(
|
|||
/***********************************************************************
|
||||
* GetMappedFileNameA (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetMappedFileNameA(
|
||||
HANDLE hProcess, LPVOID lpv, LPSTR lpFilename, DWORD nSize)
|
||||
DWORD WINAPI GetMappedFileNameA(HANDLE hProcess, LPVOID lpv, LPSTR lpFilename,
|
||||
DWORD nSize)
|
||||
{
|
||||
FIXME("(hProcess=%p, %p, %s, %ld): stub\n",
|
||||
hProcess, lpv, debugstr_a(lpFilename), nSize
|
||||
);
|
||||
hProcess, lpv, debugstr_a(lpFilename), nSize);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
if (lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
|
||||
return 0;
|
||||
|
@ -261,14 +273,13 @@ DWORD WINAPI GetMappedFileNameA(
|
|||
/***********************************************************************
|
||||
* GetMappedFileNameW (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetMappedFileNameW(
|
||||
HANDLE hProcess, LPVOID lpv, LPWSTR lpFilename, DWORD nSize)
|
||||
DWORD WINAPI GetMappedFileNameW(HANDLE hProcess, LPVOID lpv, LPWSTR lpFilename,
|
||||
DWORD nSize)
|
||||
{
|
||||
FIXME("(hProcess=%p, %p, %s, %ld): stub\n",
|
||||
hProcess, lpv, debugstr_w(lpFilename), nSize
|
||||
);
|
||||
hProcess, lpv, debugstr_w(lpFilename), nSize);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
if (lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
|
||||
return 0;
|
||||
|
@ -277,83 +288,147 @@ DWORD WINAPI GetMappedFileNameW(
|
|||
/***********************************************************************
|
||||
* GetModuleBaseNameA (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetModuleBaseNameA(
|
||||
HANDLE hProcess, HMODULE hModule, LPSTR lpBaseName, DWORD nSize)
|
||||
DWORD WINAPI GetModuleBaseNameA(HANDLE hProcess, HMODULE hModule,
|
||||
LPSTR lpBaseName, DWORD nSize)
|
||||
{
|
||||
FIXME("(hProcess=%p, hModule=%p, %s, %ld): stub\n",
|
||||
hProcess, hModule, debugstr_a(lpBaseName), nSize
|
||||
);
|
||||
|
||||
if(lpBaseName && nSize)
|
||||
lpBaseName[0] = '\0';
|
||||
char tmp[MAX_PATH];
|
||||
char* ptr;
|
||||
|
||||
if (!GetModuleFileNameExA(hProcess, hModule, tmp, sizeof(tmp)))
|
||||
return 0;
|
||||
if ((ptr = strrchr(tmp, '\\')) != NULL) ptr++; else ptr = tmp;
|
||||
strncpy(lpBaseName, ptr, nSize);
|
||||
lpBaseName[nSize - 1] = '\0';
|
||||
return strlen(lpBaseName);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetModuleBaseNameW (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetModuleBaseNameW(
|
||||
HANDLE hProcess, HMODULE hModule, LPWSTR lpBaseName, DWORD nSize)
|
||||
DWORD WINAPI GetModuleBaseNameW(HANDLE hProcess, HMODULE hModule,
|
||||
LPWSTR lpBaseName, DWORD nSize)
|
||||
{
|
||||
FIXME("(hProcess=%p, hModule=%p, %s, %ld): stub\n",
|
||||
hProcess, hModule, debugstr_w(lpBaseName), nSize);
|
||||
char* ptr;
|
||||
DWORD len;
|
||||
|
||||
if(lpBaseName && nSize)
|
||||
TRACE("(hProcess=%p, hModule=%p, %p, %ld)\n",
|
||||
hProcess, hModule, lpBaseName, nSize);
|
||||
|
||||
if (!lpBaseName || !nSize) return 0;
|
||||
|
||||
ptr = HeapAlloc(GetProcessHeap(), 0, nSize / 2);
|
||||
if (!ptr) return 0;
|
||||
|
||||
len = GetModuleBaseNameA(hProcess, hModule, ptr, nSize / 2);
|
||||
if (len == 0)
|
||||
{
|
||||
lpBaseName[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!MultiByteToWideChar( CP_ACP, 0, ptr, -1, lpBaseName, nSize / 2 ))
|
||||
lpBaseName[nSize / 2 - 1] = 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return len;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetModuleFileNameExA (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetModuleFileNameExA(
|
||||
HANDLE hProcess, HMODULE hModule, LPSTR lpFilename, DWORD nSize)
|
||||
DWORD WINAPI GetModuleFileNameExA(HANDLE hProcess, HMODULE hModule,
|
||||
LPSTR lpFileName, DWORD nSize)
|
||||
{
|
||||
FIXME("(hProcess=%p,hModule=%p, %s, %ld): stub\n",
|
||||
hProcess, hModule, debugstr_a(lpFilename), nSize
|
||||
);
|
||||
DWORD len = 0;
|
||||
|
||||
if ( get_pid_from_process_handle(hProcess) == GetCurrentProcessId() )
|
||||
return GetModuleFileNameA( hModule, lpFilename, nSize );
|
||||
TRACE("(hProcess=%p, hModule=%p, %p, %ld)\n",
|
||||
hProcess, hModule, lpFileName, nSize);
|
||||
|
||||
if(lpFilename&&nSize)
|
||||
lpFilename[0]='\0';
|
||||
if (!lpFileName || !nSize) return 0;
|
||||
|
||||
return 0;
|
||||
if ( hProcess == GetCurrentProcess() )
|
||||
return GetModuleFileNameA( hModule, lpFileName, nSize );
|
||||
|
||||
lpFileName[0] = 0;
|
||||
|
||||
SERVER_START_REQ( get_dll_info )
|
||||
{
|
||||
req->handle = hProcess;
|
||||
req->base_address = (void*)hModule;
|
||||
wine_server_set_reply( req, lpFileName, nSize - 1);
|
||||
if (!wine_server_call_err( req ))
|
||||
{
|
||||
len = wine_server_reply_size(reply);
|
||||
lpFileName[len] = 0;
|
||||
}
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
TRACE("return %s (%lu)\n", lpFileName, len);
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetModuleFileNameExW (PSAPI.@)
|
||||
*/
|
||||
DWORD WINAPI GetModuleFileNameExW(
|
||||
HANDLE hProcess, HMODULE hModule, LPWSTR lpFilename, DWORD nSize)
|
||||
DWORD WINAPI GetModuleFileNameExW(HANDLE hProcess, HMODULE hModule,
|
||||
LPWSTR lpFileName, DWORD nSize)
|
||||
{
|
||||
FIXME("(hProcess=%p,hModule=%p, %s, %ld): stub\n",
|
||||
hProcess, hModule, debugstr_w(lpFilename), nSize
|
||||
);
|
||||
char* ptr;
|
||||
DWORD len;
|
||||
|
||||
if ( get_pid_from_process_handle(hProcess) == GetCurrentProcessId() )
|
||||
return GetModuleFileNameW( hModule, lpFilename, nSize );
|
||||
TRACE("(hProcess=%p,hModule=%p, %p, %ld)\n",
|
||||
hProcess, hModule, lpFileName, nSize);
|
||||
|
||||
if(lpFilename && nSize)
|
||||
lpFilename[0] = '\0';
|
||||
if (!lpFileName || !nSize) return 0;
|
||||
|
||||
return 0;
|
||||
if ( hProcess == GetCurrentProcess() )
|
||||
return GetModuleFileNameW( hModule, lpFileName, nSize );
|
||||
|
||||
ptr = HeapAlloc(GetProcessHeap(), 0, nSize / 2);
|
||||
if (!ptr) return 0;
|
||||
|
||||
len = GetModuleFileNameExA(hProcess, hModule, ptr, nSize / 2);
|
||||
if (len == 0)
|
||||
{
|
||||
lpFileName[0] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!MultiByteToWideChar( CP_ACP, 0, ptr, -1, lpFileName, nSize / 2 ))
|
||||
lpFileName[nSize / 2 - 1] = 0;
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* GetModuleInformation (PSAPI.@)
|
||||
*/
|
||||
BOOL WINAPI GetModuleInformation(
|
||||
HANDLE hProcess, HMODULE hModule, LPMODULEINFO lpmodinfo, DWORD cb)
|
||||
BOOL WINAPI GetModuleInformation(HANDLE hProcess, HMODULE hModule,
|
||||
LPMODULEINFO lpmodinfo, DWORD cb)
|
||||
{
|
||||
FIXME("(hProcess=%p, hModule=%p, %p, %ld): stub\n",
|
||||
hProcess, hModule, lpmodinfo, cb
|
||||
);
|
||||
BOOL ret = FALSE;
|
||||
|
||||
memset(lpmodinfo, 0, cb);
|
||||
TRACE("(hProcess=%p, hModule=%p, %p, %ld)\n",
|
||||
hProcess, hModule, lpmodinfo, cb);
|
||||
|
||||
if (cb < sizeof(MODULEINFO)) return FALSE;
|
||||
|
||||
SERVER_START_REQ( get_dll_info )
|
||||
{
|
||||
req->handle = hProcess;
|
||||
req->base_address = (void*)hModule;
|
||||
if (!wine_server_call_err( req ))
|
||||
{
|
||||
ret = TRUE;
|
||||
lpmodinfo->lpBaseOfDll = (void*)hModule;
|
||||
lpmodinfo->SizeOfImage = reply->size;
|
||||
lpmodinfo->EntryPoint = reply->entry_point;
|
||||
}
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -361,12 +436,11 @@ BOOL WINAPI GetModuleInformation(
|
|||
/***********************************************************************
|
||||
* GetProcessMemoryInfo (PSAPI.@)
|
||||
*/
|
||||
BOOL WINAPI GetProcessMemoryInfo(
|
||||
HANDLE Process, PPROCESS_MEMORY_COUNTERS ppsmemCounters, DWORD cb)
|
||||
BOOL WINAPI GetProcessMemoryInfo(HANDLE Process,
|
||||
PPROCESS_MEMORY_COUNTERS ppsmemCounters, DWORD cb)
|
||||
{
|
||||
FIXME("(hProcess=%p, %p, %ld): stub\n",
|
||||
Process, ppsmemCounters, cb
|
||||
);
|
||||
Process, ppsmemCounters, cb);
|
||||
|
||||
memset(ppsmemCounters, 0, cb);
|
||||
|
||||
|
@ -376,12 +450,11 @@ BOOL WINAPI GetProcessMemoryInfo(
|
|||
/***********************************************************************
|
||||
* GetWsChanges (PSAPI.@)
|
||||
*/
|
||||
BOOL WINAPI GetWsChanges(
|
||||
HANDLE hProcess, PPSAPI_WS_WATCH_INFORMATION lpWatchInfo, DWORD cb)
|
||||
BOOL WINAPI GetWsChanges(HANDLE hProcess,
|
||||
PPSAPI_WS_WATCH_INFORMATION lpWatchInfo, DWORD cb)
|
||||
{
|
||||
FIXME("(hProcess=%p, %p, %ld): stub\n",
|
||||
hProcess, lpWatchInfo, cb
|
||||
);
|
||||
hProcess, lpWatchInfo, cb);
|
||||
|
||||
memset(lpWatchInfo, 0, cb);
|
||||
|
||||
|
@ -408,7 +481,7 @@ BOOL WINAPI QueryWorkingSet(HANDLE hProcess, LPVOID pv, DWORD cb)
|
|||
{
|
||||
FIXME("(hProcess=%p, %p, %ld)\n", hProcess, pv, cb);
|
||||
|
||||
if(pv && cb)
|
||||
if (pv && cb)
|
||||
((DWORD *) pv)[0] = 0; /* Empty WorkingSet */
|
||||
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in New Issue