1. export all psapi stubs

2. added missing psapi declarations to w32api

svn path=/trunk/; revision=11545
This commit is contained in:
Thomas Bluemel 2004-11-05 22:36:36 +00:00
parent e339d82c69
commit 2296e99d56
3 changed files with 119 additions and 29 deletions

View file

@ -1,19 +1,33 @@
/* $Id: stubs.c,v 1.7 2004/11/03 22:43:00 weiden Exp $ */
/* $Id: stubs.c,v 1.8 2004/11/05 22:36:36 weiden Exp $ */
#include "precomp.h"
#define NDEBUG
#include <debug.h>
#if 0
/*
* @unimplemented
*/
BOOL
STDCALL
EnumPageFiles(PENUM_PAGE_CALLBACKW pCallbackRoutine,
LPVOID lpContext)
EnumPageFilesA(PENUM_PAGE_FILE_CALLBACKA pCallbackRoutine,
LPVOID lpContext)
{
SetLastError(ERROR_INVALID_FUNCTION);
DPRINT1("PSAPI: EnumPageFilesA is UNIMPLEMENTED!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
BOOL
STDCALL
EnumPageFilesW(PENUM_PAGE_FILE_CALLBACKW pCallbackRoutine,
LPVOID lpContext)
{
DPRINT1("PSAPI: EnumPageFilesW is UNIMPLEMENTED!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@ -26,10 +40,10 @@ STDCALL
GetPerformanceInfo(PPERFORMANCE_INFORMATION pPerformanceInformation,
DWORD cb)
{
SetLastError(ERROR_INVALID_FUNCTION);
DPRINT1("PSAPI: GetPerformanceInfo is UNIMPLEMENTED!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
#endif
/*
@ -41,7 +55,8 @@ GetProcessMemoryInfo(HANDLE Process,
PPROCESS_MEMORY_COUNTERS ppsmemCounters,
DWORD cb)
{
SetLastError(ERROR_INVALID_FUNCTION);
DPRINT1("PSAPI: GetProcessMemoryInfo is UNIMPLEMENTED!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
@ -55,8 +70,39 @@ QueryWorkingSet(HANDLE hProcess,
PVOID pv,
DWORD cb)
{
SetLastError(ERROR_INVALID_FUNCTION);
DPRINT1("PSAPI: QueryWorkingSet is UNIMPLEMENTED!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*
* @unimplemented
*/
DWORD
STDCALL
GetProcessImageFileNameW(HANDLE hProcess,
LPWSTR lpImageFileName,
DWORD nSize)
{
DPRINT1("PSAPI: GetProcessImageFileNameW is UNIMPLEMENTED!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
DWORD
STDCALL
GetProcessImageFileNameA(HANDLE hProcess,
LPSTR lpImageFileName,
DWORD nSize)
{
DPRINT1("PSAPI: GetProcessImageFileNameA is UNIMPLEMENTED!\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/* EOF */

View file

@ -1,4 +1,4 @@
; $Id: psapi.def,v 1.4 2004/09/16 10:25:15 gvg Exp $
; $Id: psapi.def,v 1.5 2004/11/05 22:36:36 weiden Exp $
;
; THIS SOFTWARE IS NOT COPYRIGHTED
;
@ -8,22 +8,27 @@
LIBRARY PSAPI.DLL
EXPORTS
EmptyWorkingSet@4 @10
EnumDeviceDrivers@12 @2
EnumProcessModules@16 @3
EnumProcesses@12 @4
GetDeviceDriverBaseNameA@12 @5
GetDeviceDriverBaseNameW@12 @6
GetDeviceDriverFileNameA@12 @7
GetDeviceDriverFileNameW@12 @8
GetMappedFileNameA@16 @9
GetMappedFileNameW@16 @1
GetModuleBaseNameA@16 @11
GetModuleBaseNameW@16 @12
GetModuleFileNameExA@16 @13
GetModuleFileNameExW@16 @14
GetModuleInformation@16 @15
GetProcessMemoryInfo@12 @16
GetWsChanges@12 @17
InitializeProcessForWsWatch@4 @18
QueryWorkingSet@12 @19
EmptyWorkingSet@4 @1
EnumDeviceDrivers@12 @2
EnumPageFilesA@8 @3
EnumPageFilesW@8 @4
EnumProcessModules@16 @5
EnumProcesses@12 @6
GetDeviceDriverBaseNameA@12 @7
GetDeviceDriverBaseNameW@12 @8
GetDeviceDriverFileNameA@12 @9
GetDeviceDriverFileNameW@12 @10
GetMappedFileNameA@16 @11
GetMappedFileNameW@16 @12
GetModuleBaseNameA@16 @13
GetModuleBaseNameW@16 @14
GetModuleFileNameExA@16 @15
GetModuleFileNameExW@16 @16
GetModuleInformation@16 @17
GetPerformanceInfo@8 @18
GetProcessImageFileNameA@12 @19
GetProcessImageFileNameW@12 @20
GetProcessMemoryInfo@12 @21
GetWsChanges@12 @22
InitializeProcessForWsWatch@4 @23
QueryWorkingSet@12 @24

View file

@ -50,9 +50,39 @@ typedef struct _PROCESS_MEMORY_COUNTERS {
DWORD PeakPagefileUsage;
} PROCESS_MEMORY_COUNTERS,*PPROCESS_MEMORY_COUNTERS;
typedef struct _PERFORMACE_INFORMATION {
DWORD cb;
SIZE_T CommitTotal;
SIZE_T CommitLimit;
SIZE_T CommitPeak;
SIZE_T PhysicalTotal;
SIZE_T PhysicalAvailable;
SIZE_T SystemCache;
SIZE_T KernelTotal;
SIZE_T KernelPaged;
SIZE_T KernelNonpaged;
SIZE_T PageSize;
DWORD HandleCount;
DWORD ProcessCount;
DWORD ThreadCount;
} PERFORMANCE_INFORMATION, *PPERFORMANCE_INFORMATION;
typedef struct _ENUM_PAGE_FILE_INFORMATION {
DWORD cb;
DWORD Reserved;
SIZE_T TotalSize;
SIZE_T TotalInUse;
SIZE_T PeakUsage;
} ENUM_PAGE_FILE_INFORMATION, *PENUM_PAGE_FILE_INFORMATION;
typedef BOOL (*PENUM_PAGE_FILE_CALLBACKA)(LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCSTR);
typedef BOOL (*PENUM_PAGE_FILE_CALLBACKW)(LPVOID, PENUM_PAGE_FILE_INFORMATION, LPCWSTR);
/* Grouped by application,not in alphabetical order. */
BOOL WINAPI EnumProcesses(DWORD *,DWORD,DWORD *);
BOOL WINAPI EnumProcessModules(HANDLE,HMODULE *,DWORD,LPDWORD);
BOOL WINAPI EnumPageFilesA(PENUM_PAGE_FILE_CALLBACKA,LPVOID);
BOOL WINAPI EnumPageFilesW(PENUM_PAGE_FILE_CALLBACKW,LPVOID);
DWORD WINAPI GetModuleBaseNameA(HANDLE,HMODULE,LPSTR,DWORD);
DWORD WINAPI GetModuleBaseNameW(HANDLE,HMODULE,LPWSTR,DWORD);
DWORD WINAPI GetModuleFileNameExA(HANDLE,HMODULE,LPSTR,DWORD);
@ -70,21 +100,30 @@ DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID,LPWSTR,DWORD);
DWORD WINAPI GetDeviceDriverFileNameA(LPVOID,LPSTR,DWORD);
DWORD WINAPI GetDeviceDriverFileNameW(LPVOID,LPWSTR,DWORD);
BOOL WINAPI GetProcessMemoryInfo(HANDLE,PPROCESS_MEMORY_COUNTERS,DWORD);
BOOL WINAPI GetPerformanceInfo(PPERFORMANCE_INFORMATION,DWORD);
DWORD WINAPI GetProcessImageFileNameW(HANDLE,LPWSTR,DWORD);
DWORD WINAPI GetProcessImageFileNameA(HANDLE,LPSTR,DWORD);
#endif /* not RC_INVOKED */
#ifdef UNICODE
#define PENUM_PAGE_FILE_CALLBACK PENUM_PAGE_FILE_CALLBACKW
#define EnumPageFiles EnumPageFilesW
#define GetModuleBaseName GetModuleBaseNameW
#define GetModuleFileNameEx GetModuleFileNameExW
#define GetMappedFilenameEx GetMappedFilenameExW
#define GetDeviceDriverBaseName GetDeviceDriverBaseNameW
#define GetDeviceDriverFileName GetDeviceDriverFileNameW
#define GetProcessImageFileName GetProcessImageFileNameW
#else
#define PENUM_PAGE_FILE_CALLBACK PENUM_PAGE_FILE_CALLBACKA
#define EnumPageFiles EnumPageFilesA
#define GetModuleBaseName GetModuleBaseNameA
#define GetModuleFileNameEx GetModuleFileNameExA
#define GetMappedFilenameEx GetMappedFilenameExA
#define GetDeviceDriverBaseName GetDeviceDriverBaseNameA
#define GetDeviceDriverFileName GetDeviceDriverFileNameA
#define GetProcessImageFileName GetProcessImageFileNameA
#endif
#ifdef __cplusplus