25#define NONAMELESSUNION
50 0, 0, { (
DWORD_PTR)(__FILE__
": pdh_handle_cs") }
79 case DLL_WINE_PREATTACH:
118#define PDH_MAGIC_COUNTER 0x50444831
139#define PDH_MAGIC_QUERY 0x50444830
156 if ((
query = heap_alloc_zero(
sizeof(
struct query) )))
182 {
'\\',
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',
'(',
'_',
'T',
'o',
't',
'a',
'l',
')',
183 '\\',
'%',
' ',
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',
' ',
'T',
'i',
'm',
'e',0};
185 {
'\\',
'P',
'r',
'o',
'c',
'e',
's',
's',
'o',
'r',0};
187 {
'\\',
'S',
'y',
's',
't',
'e',
'm',
'\\',
'S',
'y',
's',
't',
'e',
'm',
' ',
'U',
'p',
' ',
'T',
'i',
'm',
'e',0};
201#define TYPE_PROCESSOR_TIME \
202 (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_RATE | PERF_TIMER_100NS | PERF_DELTA_COUNTER | \
203 PERF_INVERSE_COUNTER | PERF_DISPLAY_PERCENT)
206 (PERF_SIZE_LARGE | PERF_TYPE_COUNTER | PERF_COUNTER_ELAPSED | PERF_OBJECT_TIMER | PERF_DISPLAY_SECONDS)
235 else p =
wcsrchr( fullpath,
'\\' ) + 1;
635 FIXME(
"%s, %p, %p: stub\n",
debugstr_a(szWildCardPath), mszExpandedPathList, pcchPathListLength);
644 FIXME(
"%s, %p, %p: stub\n",
debugstr_w(szWildCardPath), mszExpandedPathList, pcchPathListLength);
827 value->MultiCount = 1;
873 FIXME(
"remote machine not supported\n");
927 FIXME(
"remote machine not supported\n");
939 unsigned int required =
lstrlenW(
p ) + 1;
985 FIXME(
"log file data source not supported\n");
1113 FIXME(
"log file data source not supported\n");
1128 FIXME(
"log file data source not supported\n");
1149 memset( &eW, 0,
sizeof(eW) );
1191 static const WCHAR bslash[] = {
'\\',0};
1192 static const WCHAR fslash[] = {
'/',0};
1193 static const WCHAR lparen[] = {
'(',0};
1194 static const WCHAR rparen[] = {
')',0};
1195 static const WCHAR fmt[] = {
'#',
'%',
'u',0};
1205 if (!
e || !
e->szCounterName || !
e->szObjectName || !buflen)
1209 if (
e->szMachineName)
1217 if (
e->szInstanceName)
1220 if (
e->szParentInstance)
1247 FIXME(
"%s, %s, %s, %p, %p, %p, %p, %d, 0x%x: stub\n",
debugstr_a(szDataSource),
debugstr_a(szMachineName),
1248 debugstr_a(szObjectName), mszCounterList, pcchCounterListLength, mszInstanceList,
1249 pcchInstanceListLength, dwDetailLevel,
dwFlags);
1261 FIXME(
"%s, %s, %s, %p, %p, %p, %p, %d, 0x%x: stub\n",
debugstr_w(szDataSource),
debugstr_w(szMachineName),
1262 debugstr_w(szObjectName), mszCounterList, pcchCounterListLength, mszInstanceList,
1263 pcchInstanceListLength, dwDetailLevel,
dwFlags);
ULONGLONG WINAPI GetTickCount64(VOID)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static const WCHAR nameW[]
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
BOOL WINAPI GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
static HINSTANCE instance
#define DLL_PROCESS_ATTACH
#define DLL_PROCESS_DETACH
#define WideCharToMultiByte
#define MultiByteToWideChar
static const WCHAR version[]
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
VOID WINAPI ExitThread(IN DWORD uExitCode)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI SystemTimeToFileTime(IN CONST SYSTEMTIME *lpSystemTime, OUT LPFILETIME lpFileTime)
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
static const WCHAR sizeW[]
double pow(double x, double y)
GLuint GLuint GLsizei GLenum type
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLint GLsizei GLuint * counters
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint factor
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static const WCHAR sourceW[]
static IN DWORD IN LPVOID lpvReserved
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
static const WCHAR machineW[]
static const char machine[]
#define PDH_MAX_COUNTER_NAME
struct _PDH_COUNTER_INFO_W PDH_COUNTER_INFO_W
struct _PDH_COUNTER_INFO_A PDH_COUNTER_INFO_A
static WCHAR * pdh_strdup(const WCHAR *src)
static void collect_query_data(struct query *query)
PDH_STATUS WINAPI PdhCollectQueryDataEx(PDH_HQUERY handle, DWORD interval, HANDLE event)
PDH_STATUS WINAPI PdhGetLogFileTypeW(const WCHAR *log, DWORD *type)
PDH_STATUS WINAPI PdhExpandCounterPathW(LPCWSTR szWildCardPath, LPWSTR mszExpandedPathList, LPDWORD pcchPathListLength)
PDH_STATUS WINAPI PdhValidatePathExW(PDH_HLOG source, LPCWSTR path)
PDH_STATUS WINAPI PdhGetFormattedCounterValue(PDH_HCOUNTER handle, DWORD format, LPDWORD type, PPDH_FMT_COUNTERVALUE value)
static BOOL pdh_match_path(LPCWSTR fullpath, LPCWSTR path)
PDH_STATUS WINAPI PdhLookupPerfIndexByNameA(LPCSTR machine, LPCSTR name, LPDWORD index)
PDH_STATUS WINAPI PdhRemoveCounter(PDH_HCOUNTER handle)
PDH_STATUS WINAPI PdhGetCounterInfoA(PDH_HCOUNTER handle, BOOLEAN text, LPDWORD size, PPDH_COUNTER_INFO_A info)
PDH_STATUS WINAPI PdhAddEnglishCounterW(PDH_HQUERY query, LPCWSTR path, DWORD_PTR userdata, PDH_HCOUNTER *counter)
static void CALLBACK collect_uptime(struct counter *counter)
static struct counter * create_counter(void)
static WCHAR * pdh_strdup_aw(const char *src)
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
PDH_STATUS WINAPI PdhAddCounterA(PDH_HQUERY query, LPCSTR path, DWORD_PTR userdata, PDH_HCOUNTER *counter)
PDH_STATUS WINAPI PdhSetCounterScaleFactor(PDH_HCOUNTER handle, LONG factor)
static PDH_STATUS format_value(struct counter *counter, DWORD format, union value *raw1, union value *raw2, PDH_FMT_COUNTERVALUE *value)
PDH_STATUS WINAPI PdhGetCounterInfoW(PDH_HCOUNTER handle, BOOLEAN text, LPDWORD size, PPDH_COUNTER_INFO_W info)
PDH_STATUS WINAPI PdhCalculateCounterFromRawValue(PDH_HCOUNTER handle, DWORD format, PPDH_RAW_COUNTER raw1, PPDH_RAW_COUNTER raw2, PPDH_FMT_COUNTERVALUE value)
static CRITICAL_SECTION_DEBUG pdh_handle_cs_debug
PDH_STATUS WINAPI PdhExpandWildCardPathW(LPCWSTR szDataSource, LPCWSTR szWildCardPath, LPWSTR mszExpandedPathList, LPDWORD pcchPathListLength, DWORD dwFlags)
PDH_STATUS WINAPI PdhGetLogFileTypeA(const char *log, DWORD *type)
PDH_STATUS WINAPI PdhCollectQueryDataWithTime(PDH_HQUERY handle, LONGLONG *timestamp)
PDH_STATUS WINAPI PdhBindInputDataSourceA(PDH_HLOG *source, const char *filenamelist)
PDH_STATUS WINAPI PdhValidatePathA(LPCSTR path)
PDH_STATUS WINAPI PdhOpenQueryA(LPCSTR source, DWORD_PTR userdata, PDH_HQUERY *query)
PDH_STATUS WINAPI PdhEnumObjectItemsA(LPCSTR szDataSource, LPCSTR szMachineName, LPCSTR szObjectName, LPSTR mszCounterList, LPDWORD pcchCounterListLength, LPSTR mszInstanceList, LPDWORD pcchInstanceListLength, DWORD dwDetailLevel, DWORD dwFlags)
static void destroy_query(struct query *query)
PDH_STATUS WINAPI PdhMakeCounterPathA(PDH_COUNTER_PATH_ELEMENTS_A *e, LPSTR buffer, LPDWORD buflen, DWORD flags)
PDH_STATUS WINAPI PdhExpandWildCardPathA(LPCSTR szDataSource, LPCSTR szWildCardPath, LPSTR mszExpandedPathList, LPDWORD pcchPathListLength, DWORD dwFlags)
static PDH_STATUS validate_path(LPCWSTR path)
static const WCHAR path_uptime[]
#define TYPE_PROCESSOR_TIME
PDH_STATUS WINAPI PdhMakeCounterPathW(PDH_COUNTER_PATH_ELEMENTS_W *e, LPWSTR buffer, LPDWORD buflen, DWORD flags)
PDH_STATUS WINAPI PdhEnumObjectItemsW(LPCWSTR szDataSource, LPCWSTR szMachineName, LPCWSTR szObjectName, LPWSTR mszCounterList, LPDWORD pcchCounterListLength, LPWSTR mszInstanceList, LPDWORD pcchInstanceListLength, DWORD dwDetailLevel, DWORD dwFlags)
static const WCHAR path_processor[]
static CRITICAL_SECTION pdh_handle_cs
static const WCHAR path_processor_time[]
PDH_STATUS WINAPI PdhExpandCounterPathA(LPCSTR szWildCardPath, LPSTR mszExpandedPathList, LPDWORD pcchPathListLength)
PDH_STATUS WINAPI PdhGetDllVersion(LPDWORD version)
PDH_STATUS WINAPI PdhLookupPerfNameByIndexA(LPCSTR machine, DWORD index, LPSTR buffer, LPDWORD size)
PDH_STATUS WINAPI PdhValidatePathExA(PDH_HLOG source, LPCSTR path)
PDH_STATUS WINAPI PdhLookupPerfNameByIndexW(LPCWSTR machine, DWORD index, LPWSTR buffer, LPDWORD size)
#define PDH_MAGIC_COUNTER
static void destroy_counter(struct counter *counter)
PDH_STATUS WINAPI PdhLookupPerfIndexByNameW(LPCWSTR machine, LPCWSTR name, LPDWORD index)
PDH_STATUS WINAPI PdhVbAddCounter(PDH_HQUERY query, LPCSTR path, PDH_HCOUNTER *counter)
PDH_STATUS WINAPI PdhGetRawCounterValue(PDH_HCOUNTER handle, LPDWORD type, PPDH_RAW_COUNTER value)
PDH_STATUS WINAPI PdhGetCounterTimeBase(PDH_HCOUNTER handle, LONGLONG *base)
PDH_STATUS WINAPI PdhAddCounterW(PDH_HQUERY hquery, LPCWSTR path, DWORD_PTR userdata, PDH_HCOUNTER *hcounter)
PDH_STATUS WINAPI PdhOpenQueryW(LPCWSTR source, DWORD_PTR userdata, PDH_HQUERY *handle)
static void CALLBACK collect_processor_time(struct counter *counter)
PDH_STATUS WINAPI PdhSetDefaultRealTimeDataSource(DWORD source)
PDH_STATUS WINAPI PdhBindInputDataSourceW(PDH_HLOG *source, const WCHAR *filenamelist)
PDH_STATUS WINAPI PdhCollectQueryData(PDH_HQUERY handle)
PDH_STATUS WINAPI PdhAddEnglishCounterA(PDH_HQUERY query, LPCSTR path, DWORD_PTR userdata, PDH_HCOUNTER *counter)
PDH_STATUS WINAPI PdhValidatePathW(LPCWSTR path)
static const struct source counter_sources[]
static DWORD CALLBACK collect_query_thread(void *arg)
static struct query * create_query(void)
PDH_STATUS WINAPI PdhCloseQuery(PDH_HQUERY handle)
static BOOL is_local_machine(const WCHAR *name, DWORD len)
#define PDH_NOT_IMPLEMENTED
#define PDH_INVALID_HANDLE
#define PDH_CSTATUS_VALID_DATA
#define PDH_MEMORY_ALLOCATION_FAILURE
#define PDH_STRING_NOT_FOUND
#define PDH_CSTATUS_NO_MACHINE
#define PDH_INVALID_ARGUMENT
#define PDH_CSTATUS_BAD_COUNTERNAME
#define PDH_CSTATUS_NO_COUNTER
static unsigned __int64 next
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
#define LIST_FOR_EACH(cursor, list)
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
LIST_ENTRY ProcessLocksList
void(CALLBACK *collect)(struct counter *)
void(CALLBACK *collect)(struct counter *)
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
DWORD WINAPI GetLastError(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define MAX_COMPUTERNAME_LENGTH
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags