connectivity/com.nokia.tcf/native/TCFNative/Common/Headers/psapi.h
author Chad Peckham <chad.peckham@nokia.com>
Mon, 13 Sep 2010 13:17:04 -0500
changeset 1991 1c752f14a126
permissions -rw-r--r--
add Ed's changes to allow multiple Carbide instances to use same TCFServer
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1991
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
     1
/*
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
     2
	psapi.h - Include file for PSAPI.DLL APIs
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
     3
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
     4
	Written by Mumit Khan <khan@nanotech.wisc.edu>
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
     5
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
     6
	This file is part of a free library for the Win32 API.
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
     7
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
     8
	NOTE: This strictly does not belong in the Win32 API since it's
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
     9
	really part of Platform SDK. However,GDB needs it and we might
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    10
	as well provide it here.
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    11
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    12
	This library is distributed in the hope that it will be useful,
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    13
	but WITHOUT ANY WARRANTY; without even the implied warranty of
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    14
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    15
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    16
*/
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    17
#ifndef _PSAPI_H
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    18
#define _PSAPI_H
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    19
#if __GNUC__ >=3
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    20
#pragma GCC system_header
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    21
#endif
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    22
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    23
#ifdef __cplusplus
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    24
extern "C" {
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    25
#endif
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    26
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    27
#ifndef RC_INVOKED
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    28
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    29
typedef struct _MODULEINFO {
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    30
	LPVOID lpBaseOfDll;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    31
	DWORD SizeOfImage;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    32
	LPVOID EntryPoint;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    33
} MODULEINFO,*LPMODULEINFO;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    34
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    35
typedef struct _PSAPI_WS_WATCH_INFORMATION {
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    36
	LPVOID FaultingPc;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    37
	LPVOID FaultingVa;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    38
} PSAPI_WS_WATCH_INFORMATION,*PPSAPI_WS_WATCH_INFORMATION;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    39
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    40
typedef struct _PROCESS_MEMORY_COUNTERS {
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    41
	DWORD cb;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    42
	DWORD PageFaultCount;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    43
	DWORD PeakWorkingSetSize;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    44
	DWORD WorkingSetSize;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    45
	DWORD QuotaPeakPagedPoolUsage;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    46
	DWORD QuotaPagedPoolUsage;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    47
	DWORD QuotaPeakNonPagedPoolUsage;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    48
	DWORD QuotaNonPagedPoolUsage;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    49
	DWORD PagefileUsage;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    50
	DWORD PeakPagefileUsage;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    51
} PROCESS_MEMORY_COUNTERS,*PPROCESS_MEMORY_COUNTERS;
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    52
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    53
/* Grouped by application,not in alphabetical order. */
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    54
BOOL WINAPI EnumProcesses(DWORD *,DWORD,DWORD *);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    55
BOOL WINAPI EnumProcessModules(HANDLE,HMODULE *,DWORD,LPDWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    56
DWORD WINAPI GetModuleBaseNameA(HANDLE,HMODULE,LPSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    57
DWORD WINAPI GetModuleBaseNameW(HANDLE,HMODULE,LPWSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    58
DWORD WINAPI GetModuleFileNameExA(HANDLE,HMODULE,LPSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    59
DWORD WINAPI GetModuleFileNameExW(HANDLE,HMODULE,LPWSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    60
BOOL WINAPI GetModuleInformation(HANDLE,HMODULE,LPMODULEINFO,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    61
BOOL WINAPI EmptyWorkingSet(HANDLE);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    62
BOOL WINAPI QueryWorkingSet(HANDLE,PVOID,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    63
BOOL WINAPI InitializeProcessForWsWatch(HANDLE);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    64
BOOL WINAPI GetWsChanges(HANDLE,PPSAPI_WS_WATCH_INFORMATION,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    65
DWORD WINAPI GetMappedFileNameW(HANDLE,LPVOID,LPWSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    66
DWORD WINAPI GetMappedFileNameA(HANDLE,LPVOID,LPSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    67
BOOL WINAPI EnumDeviceDrivers(LPVOID *,DWORD,LPDWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    68
DWORD WINAPI GetDeviceDriverBaseNameA(LPVOID,LPSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    69
DWORD WINAPI GetDeviceDriverBaseNameW(LPVOID,LPWSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    70
DWORD WINAPI GetDeviceDriverFileNameA(LPVOID,LPSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    71
DWORD WINAPI GetDeviceDriverFileNameW(LPVOID,LPWSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    72
BOOL WINAPI GetProcessMemoryInfo(HANDLE,PPROCESS_MEMORY_COUNTERS,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    73
#if (_WIN32_WINNT >= 0x0501)
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    74
DWORD WINAPI GetProcessImageFileNameA(HANDLE,LPSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    75
DWORD WINAPI GetProcessImageFileNameW(HANDLE,LPWSTR,DWORD);
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    76
#endif
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    77
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    78
#endif /* not RC_INVOKED */
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    79
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    80
#ifdef UNICODE
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    81
#define GetModuleBaseName GetModuleBaseNameW
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    82
#define GetModuleFileNameEx GetModuleFileNameExW
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    83
#define GetMappedFileName GetMappedFileNameW
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    84
#define GetDeviceDriverBaseName GetDeviceDriverBaseNameW
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    85
#define GetDeviceDriverFileName GetDeviceDriverFileNameW
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    86
#if (_WIN32_WINNT >= 0x0501)
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    87
#define GetProcessImageFileName GetProcessImageFileNameW
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    88
#endif
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    89
#else
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    90
#define GetModuleBaseName GetModuleBaseNameA
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    91
#define GetModuleFileNameEx GetModuleFileNameExA
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    92
#define GetMappedFileName GetMappedFileNameA
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    93
#define GetDeviceDriverBaseName GetDeviceDriverBaseNameA
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    94
#define GetDeviceDriverFileName GetDeviceDriverFileNameA
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    95
#if (_WIN32_WINNT >= 0x0501)
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    96
#define GetProcessImageFileName GetProcessImageFileNameA
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    97
#endif
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    98
#endif
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
    99
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
   100
#ifdef __cplusplus
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
   101
}
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
   102
#endif
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
   103
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
   104
#endif /* _PSAPI_H */
1c752f14a126 add Ed's changes to allow multiple Carbide instances to use same TCFServer
Chad Peckham <chad.peckham@nokia.com>
parents:
diff changeset
   105