ReactOS 0.4.16-dev-1946-g52006dd
main.c
Go to the documentation of this file.
1/*
2 * Copyright 2016 Michael Müller
3 * Copyright 2017 Andrey Gusev
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20#define COBJMACROS
21
22#include "ntstatus.h"
23#define WIN32_NO_STATUS
24#include "windows.h"
25#include "appmodel.h"
26#include "shlwapi.h"
27#include "perflib.h"
28#include "winternl.h"
29
30#include "wine/debug.h"
31#include "kernelbase.h"
32#include "wine/heap.h"
33#include "wine/list.h"
34
36
37
39
40/***********************************************************************
41 * DllMain
42 */
44{
46 {
53 }
54 return TRUE;
55}
56
57
58/***********************************************************************
59 * MulDiv (kernelbase.@)
60 */
62{
64
65 if (!c) return -1;
66
67 /* We want to deal with a positive divisor to simplify the logic. */
68 if (c < 0)
69 {
70 a = -a;
71 c = -c;
72 }
73
74 /* If the result is positive, we "add" to round. else, we subtract to round. */
75 if ((a < 0 && b < 0) || (a >= 0 && b >= 0))
76 ret = (((LONGLONG)a * b) + (c / 2)) / c;
77 else
78 ret = (((LONGLONG)a * b) - (c / 2)) / c;
79
80 if (ret > 2147483647 || ret < -2147483647) return -1;
81 return ret;
82}
83
84/***********************************************************************
85 * AppPolicyGetMediaFoundationCodecLoading (KERNELBASE.@)
86 */
87
89{
90 FIXME("%p, %p\n", token, policy);
91
92 if(policy)
93 *policy = AppPolicyMediaFoundationCodecLoading_All;
94
95 return ERROR_SUCCESS;
96}
97
98/***********************************************************************
99 * AppPolicyGetProcessTerminationMethod (KERNELBASE.@)
100 */
102{
103 FIXME("%p, %p\n", token, policy);
104
105 if(policy)
107
108 return ERROR_SUCCESS;
109}
110
111/***********************************************************************
112 * AppPolicyGetThreadInitializationType (KERNELBASE.@)
113 */
115{
116 FIXME("%p, %p\n", token, policy);
117
118 if(policy)
120
121 return ERROR_SUCCESS;
122}
123
124/***********************************************************************
125 * AppPolicyGetShowDeveloperDiagnostic (KERNELBASE.@)
126 */
128{
129 FIXME("%p, %p\n", token, policy);
130
131 if(policy)
133
134 return ERROR_SUCCESS;
135}
136
137/***********************************************************************
138 * AppPolicyGetWindowingModel (KERNELBASE.@)
139 */
141{
142 FIXME("%p, %p\n", token, policy);
143
144 if(policy)
146
147 return ERROR_SUCCESS;
148}
149
151{
154};
155
157{
158 struct list entry;
159 struct counterset_template *template;
161};
162
164{
168 unsigned int counterset_count;
169
171};
172
174{
175 return (struct perf_provider *)prov;
176}
177
178/***********************************************************************
179 * PerfCreateInstance (KERNELBASE.@)
180 */
181#ifdef __REACTOS__
183 const WCHAR *name, ULONG id )
184#else
186 const WCHAR *name, ULONG id )
187#endif
188{
190 struct counterset_template *template;
191 struct counterset_instance *inst;
192 unsigned int i;
193 ULONG size;
194
195 FIXME( "handle %p, guid %s, name %s, id %lu semi-stub.\n", handle, debugstr_guid(guid), debugstr_w(name), id );
196
197 if (!prov || !guid || !name)
198 {
200 return NULL;
201 }
202
203 for (i = 0; i < prov->counterset_count; ++i)
204 if (IsEqualGUID(guid, &prov->countersets[i]->counterset.CounterSetGuid)) break;
205
206 if (i == prov->counterset_count)
207 {
209 return NULL;
210 }
211
212 template = prov->countersets[i];
213
215 {
216 if (inst->template == template && inst->instance.InstanceId == id)
217 {
219 return NULL;
220 }
221 }
222
223 size = (sizeof(PERF_COUNTERSET_INSTANCE) + template->counterset.NumCounters * sizeof(UINT64)
224 + (lstrlenW( name ) + 1) * sizeof(WCHAR) + 7) & ~7;
225 inst = heap_alloc_zero( offsetof(struct counterset_instance, instance) + size );
226 if (!inst)
227 {
229 return NULL;
230 }
231
232 inst->template = template;
234 inst->instance.dwSize = size;
235 inst->instance.InstanceId = id;
237 + template->counterset.NumCounters * sizeof(UINT64);
238 inst->instance.InstanceNameSize = (lstrlenW( name ) + 1) * sizeof(WCHAR);
240 list_add_tail( &prov->instance_list, &inst->entry );
241
242 return &inst->instance;
243}
244
245/***********************************************************************
246 * PerfDeleteInstance (KERNELBASE.@)
247 */
249{
250 struct perf_provider *prov = perf_provider_from_handle( provider );
251 struct counterset_instance *inst;
252
253 TRACE( "provider %p, block %p.\n", provider, block );
254
255 if (!prov || !block) return ERROR_INVALID_PARAMETER;
256
258 list_remove( &inst->entry );
259 heap_free( inst );
260
261 return ERROR_SUCCESS;
262}
263
264/***********************************************************************
265 * PerfSetCounterSetInfo (KERNELBASE.@)
266 */
268{
270 struct counterset_template **new_array;
271 struct counterset_template *new;
272 unsigned int i;
273
274 FIXME( "handle %p, template %p, size %lu semi-stub.\n", handle, template, size );
275
276 if (!prov || !template) return ERROR_INVALID_PARAMETER;
277 if (!template->NumCounters) return ERROR_INVALID_PARAMETER;
278 if (size < sizeof(*template) || (size - (sizeof(*template))) / sizeof(PERF_COUNTER_INFO) < template->NumCounters)
280
281 for (i = 0; i < prov->counterset_count; ++i)
282 {
283 if (IsEqualGUID( &template->CounterSetGuid, &prov->countersets[i]->counterset.CounterSetGuid ))
285 }
286
287 size = offsetof( struct counterset_template, counter[template->NumCounters] );
288 if (!(new = heap_alloc( size ))) return ERROR_OUTOFMEMORY;
289
290 if (prov->counterset_count)
291 new_array = heap_realloc( prov->countersets, sizeof(*prov->countersets) * (prov->counterset_count + 1) );
292 else
293 new_array = heap_alloc( sizeof(*prov->countersets) );
294
295 if (!new_array)
296 {
297 heap_free( new );
298 return ERROR_OUTOFMEMORY;
299 }
300 memcpy( new, template, size );
301 for (i = 0; i < template->NumCounters; ++i)
302 new->counter[i].Offset = i * sizeof(UINT64);
303 new_array[prov->counterset_count++] = new;
304 prov->countersets = new_array;
305
306 return STATUS_SUCCESS;
307}
308
309/***********************************************************************
310 * PerfSetCounterRefValue (KERNELBASE.@)
311 */
313 ULONG counterid, void *address)
314{
315 struct perf_provider *prov = perf_provider_from_handle( provider );
316 struct counterset_template *template;
317 struct counterset_instance *inst;
318 unsigned int i;
319
320 FIXME( "provider %p, instance %p, counterid %lu, address %p semi-stub.\n",
321 provider, instance, counterid, address );
322
323 if (!prov || !instance || !address) return ERROR_INVALID_PARAMETER;
324
326 template = inst->template;
327
328 for (i = 0; i < template->counterset.NumCounters; ++i)
329 if (template->counter[i].CounterId == counterid) break;
330
331 if (i == template->counterset.NumCounters) return ERROR_NOT_FOUND;
332 *(void **)((BYTE *)&inst->instance + sizeof(PERF_COUNTERSET_INSTANCE) + template->counter[i].Offset) = address;
333
334 return STATUS_SUCCESS;
335}
336
337/***********************************************************************
338 * PerfStartProvider (KERNELBASE.@)
339 */
341{
343
344 FIXME( "guid %s, callback %p, provider %p semi-stub.\n", debugstr_guid(guid), callback, provider );
345
346 memset( &ctx, 0, sizeof(ctx) );
347 ctx.ContextSize = sizeof(ctx);
348 ctx.ControlCallback = callback;
349
350 return PerfStartProviderEx( guid, &ctx, provider );
351}
352
353/***********************************************************************
354 * PerfStartProviderEx (KERNELBASE.@)
355 */
357{
358 struct perf_provider *prov;
359
360 FIXME( "guid %s, context %p, provider %p semi-stub.\n", debugstr_guid(guid), context, provider );
361
362 if (!guid || !context || !provider) return ERROR_INVALID_PARAMETER;
363 if (context->ContextSize < sizeof(*context)) return ERROR_INVALID_PARAMETER;
364
365 if (context->MemAllocRoutine || context->MemFreeRoutine)
366 FIXME("Memory allocation routine is not supported.\n");
367
368 if (!(prov = heap_alloc_zero( sizeof(*prov) ))) return ERROR_OUTOFMEMORY;
369 list_init( &prov->instance_list );
370 memcpy( &prov->guid, guid, sizeof(prov->guid) );
371 prov->callback = context->ControlCallback;
372 *provider = prov;
373
374 return STATUS_SUCCESS;
375}
376
377/***********************************************************************
378 * PerfStopProvider (KERNELBASE.@)
379 */
381{
383 struct counterset_instance *inst, *next;
384 unsigned int i;
385
386 TRACE( "handle %p.\n", handle );
387
388 if (!list_empty( &prov->instance_list ))
389 WARN( "Stopping provider with active counter instances.\n" );
390
392 {
393 list_remove( &inst->entry );
394 heap_free( inst );
395 }
396
397 for (i = 0; i < prov->counterset_count; ++i)
398 heap_free( prov->countersets[i] );
399 heap_free( prov->countersets );
400 heap_free( prov );
401 return STATUS_SUCCESS;
402}
403
404/***********************************************************************
405 * QuirkIsEnabled (KERNELBASE.@)
406 */
408{
409 FIXME("(%p): stub\n", arg);
410 return FALSE;
411}
412
413/***********************************************************************
414 * QuirkIsEnabled3 (KERNELBASE.@)
415 */
416BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2)
417{
418 static int once;
419
420 if (!once++)
421 FIXME("(%p, %p) stub!\n", unk1, unk2);
422
423 return FALSE;
424}
425
427{
428 const QITAB *ptr;
429 IUnknown *unk;
430
431 TRACE("%p, %p, %s, %p\n", base, table, debugstr_guid(riid), obj);
432
433 if (!obj)
434 return E_POINTER;
435
436 for (ptr = table; ptr->piid; ++ptr)
437 {
438 TRACE("trying (offset %ld) %s\n", ptr->dwOffset, debugstr_guid(ptr->piid));
439 if (IsEqualIID(riid, ptr->piid))
440 {
441 unk = (IUnknown *)((BYTE *)base + ptr->dwOffset);
442 TRACE("matched, returning (%p)\n", unk);
443 *obj = unk;
444 IUnknown_AddRef(unk);
445 return S_OK;
446 }
447 }
448
450 {
451 unk = (IUnknown *)((BYTE *)base + table->dwOffset);
452 TRACE("returning first for IUnknown (%p)\n", unk);
453 *obj = unk;
454 IUnknown_AddRef(unk);
455 return S_OK;
456 }
457
458 WARN("Not found %s.\n", debugstr_guid(riid));
459 *obj = NULL;
460 return E_NOINTERFACE;
461}
462
464{
465 DWORD buflenW, convlen;
466 WCHAR *langbufW;
467 HRESULT hr;
468
469 TRACE("%p, %p, *%p: %ld\n", langbuf, buflen, buflen, buflen ? *buflen : -1);
470
471 if (!langbuf || !buflen || !*buflen)
472 return E_FAIL;
473
474 buflenW = *buflen;
475 langbufW = heap_alloc(sizeof(WCHAR) * buflenW);
476 hr = GetAcceptLanguagesW(langbufW, &buflenW);
477
478 if (hr == S_OK)
479 {
480 convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, -1, langbuf, *buflen, NULL, NULL);
481 convlen--; /* do not count the terminating 0 */
482 }
483 else /* copy partial string anyway */
484 {
485 convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, *buflen, langbuf, *buflen, NULL, NULL);
486 if (convlen < *buflen)
487 {
488 langbuf[convlen] = 0;
489 convlen--; /* do not count the terminating 0 */
490 }
491 else
492 {
493 convlen = *buflen;
494 }
495 }
496 *buflen = buflenW ? convlen : 0;
497
498 heap_free(langbufW);
499 return hr;
500}
501
503{
504 WCHAR buffer[6 /* MAX_RFC1766_NAME */];
506 INT i;
507
508 if (n)
509 {
511 if ((((i == LANG_ENGLISH) || (i == LANG_CHINESE) || (i == LANG_ARABIC)) &&
514
515 buffer[n - 1] = '-';
517 if (!i)
518 buffer[n - 1] = '\0';
519 }
520 else
521 i = 0;
522
524 return ((n + i) > len) ? E_INVALIDARG : S_OK;
525 }
526 return E_FAIL;
527}
528
530{
531 DWORD mystrlen, mytype;
532 WCHAR *mystr;
533 LCID mylcid;
534 HKEY mykey;
535 LONG lres;
536 DWORD len;
537
538 TRACE("%p, %p, *%p: %ld\n", langbuf, buflen, buflen, buflen ? *buflen : -1);
539
540 if (!langbuf || !buflen || !*buflen)
541 return E_FAIL;
542
543 mystrlen = (*buflen > 20) ? *buflen : 20 ;
544 len = mystrlen * sizeof(WCHAR);
545 mystr = heap_alloc(len);
546 mystr[0] = 0;
547 RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Internet Explorer\\International",
548 0, KEY_QUERY_VALUE, &mykey);
549 lres = RegQueryValueExW(mykey, L"AcceptLanguage", 0, &mytype, (PBYTE)mystr, &len);
550 RegCloseKey(mykey);
551 len = lstrlenW(mystr);
552
553 if (!lres && (*buflen > len))
554 {
555 lstrcpyW(langbuf, mystr);
556 *buflen = len;
557 heap_free(mystr);
558 return S_OK;
559 }
560
561 /* Did not find a value in the registry or the user buffer is too small */
562 mylcid = GetUserDefaultLCID();
563 lcid_to_rfc1766(mylcid, mystr, mystrlen);
564 len = lstrlenW(mystr);
565
566 memcpy(langbuf, mystr, min(*buflen, len + 1)*sizeof(WCHAR));
567 heap_free(mystr);
568
569 if (*buflen > len)
570 {
571 *buflen = len;
572 return S_OK;
573 }
574
575 *buflen = 0;
577}
unsigned long long UINT64
AppPolicyShowDeveloperDiagnostic
Definition: appmodel.h:27
@ AppPolicyShowDeveloperDiagnostic_ShowUI
Definition: appmodel.h:29
AppPolicyThreadInitializationType
Definition: appmodel.h:21
@ AppPolicyThreadInitializationType_None
Definition: appmodel.h:22
AppPolicyWindowingModel
Definition: appmodel.h:33
@ AppPolicyWindowingModel_ClassicDesktop
Definition: appmodel.h:36
AppPolicyProcessTerminationMethod
Definition: appmodel.h:15
@ AppPolicyProcessTerminationMethod_ExitProcess
Definition: appmodel.h:16
WINBASEAPI _Check_return_ _Out_ AppPolicyProcessTerminationMethod * policy
Definition: appmodel.h:73
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
static void * heap_realloc(void *mem, size_t len)
Definition: appwiz.h:71
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
static void list_remove(struct list_entry *entry)
Definition: list.h:90
static int list_empty(struct list_entry *head)
Definition: list.h:58
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
Definition: list.h:83
static void list_init(struct list_entry *head)
Definition: list.h:51
BOOL NTAPI DllMain(_In_ HINSTANCE hDll, _In_ ULONG dwReason, _In_opt_ PVOID pReserved)
Definition: main.c:33
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define RegCloseKey(hKey)
Definition: registry.h:49
Definition: list.h:37
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_FAIL
Definition: ddrawi.h:102
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define ERROR_SUCCESS
Definition: deptool.c:10
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HINSTANCE instance
Definition: main.c:40
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
static WCHAR reason[MAX_STRING_RESOURCE_LEN]
Definition: object.c:1904
int id
Definition: main.c:4927
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define CP_ACP
Definition: compat.h:109
#define SetLastError(x)
Definition: compat.h:752
#define GetCurrentProcess()
Definition: compat.h:759
#define IsWow64Process
Definition: compat.h:760
#define lstrcpyW
Definition: compat.h:749
#define WideCharToMultiByte
Definition: compat.h:111
#define lstrlenW
Definition: compat.h:750
PPEB Peb
Definition: dllmain.c:27
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
LCID WINAPI GetUserDefaultLCID(void)
Definition: locale.c:1216
INT WINAPI LCMapStringW(LCID lcid, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen)
Definition: locale.c:3808
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: locale.c:1675
void init_console(void)
Definition: console.c:2339
LCID lcid
Definition: locale.c:5656
LONG WINAPI AppPolicyGetWindowingModel(HANDLE token, AppPolicyWindowingModel *policy)
Definition: main.c:140
ULONG WINAPI PerfStopProvider(HANDLE handle)
Definition: main.c:380
HRESULT WINAPI QISearch(void *base, const QITAB *table, REFIID riid, void **obj)
Definition: main.c:426
ULONG WINAPI PerfDeleteInstance(HANDLE provider, PERF_COUNTERSET_INSTANCE *block)
Definition: main.c:248
LONG WINAPI AppPolicyGetShowDeveloperDiagnostic(HANDLE token, AppPolicyShowDeveloperDiagnostic *policy)
Definition: main.c:127
PERF_COUNTERSET_INSTANCE WINAPI * PerfCreateInstance(HANDLE handle, const GUID *guid, const WCHAR *name, ULONG id)
Definition: main.c:185
ULONG WINAPI PerfStartProvider(GUID *guid, PERFLIBREQUEST callback, HANDLE *provider)
Definition: main.c:340
ULONG WINAPI PerfSetCounterRefValue(HANDLE provider, PERF_COUNTERSET_INSTANCE *instance, ULONG counterid, void *address)
Definition: main.c:312
ULONG WINAPI PerfSetCounterSetInfo(HANDLE handle, PERF_COUNTERSET_INFO *template, ULONG size)
Definition: main.c:267
BOOL is_wow64
Definition: main.c:38
static struct perf_provider * perf_provider_from_handle(HANDLE prov)
Definition: main.c:173
LONG WINAPI AppPolicyGetThreadInitializationType(HANDLE token, AppPolicyThreadInitializationType *policy)
Definition: main.c:114
static HRESULT lcid_to_rfc1766(LCID lcid, WCHAR *rfc1766, INT len)
Definition: main.c:502
BOOL WINAPI QuirkIsEnabled(void *arg)
Definition: main.c:407
HRESULT WINAPI GetAcceptLanguagesW(WCHAR *langbuf, DWORD *buflen)
Definition: main.c:529
LONG WINAPI AppPolicyGetMediaFoundationCodecLoading(HANDLE token, AppPolicyMediaFoundationCodecLoading *policy)
Definition: main.c:88
LONG WINAPI AppPolicyGetProcessTerminationMethod(HANDLE token, AppPolicyProcessTerminationMethod *policy)
Definition: main.c:101
ULONG WINAPI PerfStartProviderEx(GUID *guid, PERF_PROVIDER_CONTEXT *context, HANDLE *provider)
Definition: main.c:356
HRESULT WINAPI GetAcceptLanguagesA(LPSTR langbuf, DWORD *buflen)
Definition: main.c:463
BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2)
Definition: main.c:416
GUID guid
Definition: version.c:147
const UINT template
Definition: action.c:7511
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
r reserved
Definition: btrfs.c:3006
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble n
Definition: glext.h:7729
GLuint address
Definition: glext.h:9393
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
const GLubyte * c
Definition: glext.h:8905
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
GLenum GLsizei len
Definition: glext.h:6722
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
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
Definition: glfuncs.h:248
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 token
Definition: glfuncs.h:210
REFIID riid
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define NtCurrentTeb
uint32_t entry
Definition: isohybrid.c:63
#define a
Definition: ke_i.h:78
#define c
Definition: ke_i.h:80
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
void init_global_data(void)
Definition: memory.c:931
void init_locale(HMODULE module)
Definition: locale.c:1911
void init_startup_info(RTL_USER_PROCESS_PARAMETERS *params)
Definition: process.c:1306
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
static PVOID ptr
Definition: dispmode.c:27
static HINSTANCE hinst
Definition: edit.c:551
static IPrintDialogCallback callback
Definition: printdlg.c:326
static DWORD unk1
Definition: cursoricon.c:1638
#define min(a, b)
Definition: monoChain.cc:55
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
#define KEY_QUERY_VALUE
Definition: nt_native.h:1019
#define LOCALE_USER_DEFAULT
BYTE * PBYTE
Definition: pedump.c:66
long LONG
Definition: pedump.c:60
ULONG(WINAPI * PERFLIBREQUEST)(ULONG, PVOID, ULONG)
Definition: perflib.h:28
struct _PERF_COUNTERSET_INSTANCE PERF_COUNTERSET_INSTANCE
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
static unsigned __int64 next
Definition: rand_nt.c:6
#define offsetof(TYPE, MEMBER)
#define SUBLANGID(l)
Definition: nls.h:17
#define LANG_ENGLISH
Definition: nls.h:52
#define SUBLANG_DEFAULT
Definition: nls.h:168
#define LANG_ARABIC
Definition: nls.h:29
#define LANG_CHINESE
Definition: nls.h:42
DWORD LCID
Definition: nls.h:13
#define PRIMARYLANGID(l)
Definition: nls.h:16
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:198
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
Definition: list.h:204
#define memset(x, y, z)
Definition: compat.h:39
#define STATUS_SUCCESS
Definition: shellext.h:65
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
Definition: shlwapi.h:139
PRTL_USER_PROCESS_PARAMETERS ProcessParameters
Definition: btrfs_drv.h:1913
Definition: http.c:7252
PERF_COUNTERSET_INSTANCE instance
Definition: main.c:160
struct counterset_template * template
Definition: main.c:159
struct list entry
Definition: main.c:158
PERF_COUNTERSET_INFO counterset
Definition: main.c:152
Definition: name.c:39
PERFLIBREQUEST callback
Definition: main.c:166
GUID guid
Definition: main.c:165
struct counterset_template ** countersets
Definition: main.c:167
unsigned int counterset_count
Definition: main.c:168
struct list instance_list
Definition: main.c:170
#define new(TYPE, numElems)
Definition: treelist.c:54
int64_t LONGLONG
Definition: typedefs.h:68
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define WINAPI
Definition: msvc.h:6
#define E_NOT_SUFFICIENT_BUFFER
Definition: winerror.h:3437
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_POINTER
Definition: winerror.h:3480
#define ERROR_NOT_FOUND
Definition: winerror.h:1014
#define LOCALE_SISO639LANGNAME
Definition: winnls.h:133
#define LCMAP_LOWERCASE
Definition: winnls.h:197
#define LOCALE_SISO3166CTRYNAME
Definition: winnls.h:134
#define HKEY_CURRENT_USER
Definition: winreg.h:11
static unsigned int block
Definition: xmlmemory.c:101
__wchar_t WCHAR
Definition: xmlstorage.h:180
char * LPSTR
Definition: xmlstorage.h:182
unsigned char BYTE
Definition: xxhash.c:193