ReactOS 0.4.16-dev-1408-gbc64f3a
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 */
182 const WCHAR *name, ULONG id )
183{
185 struct counterset_template *template;
186 struct counterset_instance *inst;
187 unsigned int i;
188 ULONG size;
189
190 FIXME( "handle %p, guid %s, name %s, id %lu semi-stub.\n", handle, debugstr_guid(guid), debugstr_w(name), id );
191
192 if (!prov || !guid || !name)
193 {
195 return NULL;
196 }
197
198 for (i = 0; i < prov->counterset_count; ++i)
199 if (IsEqualGUID(guid, &prov->countersets[i]->counterset.CounterSetGuid)) break;
200
201 if (i == prov->counterset_count)
202 {
204 return NULL;
205 }
206
207 template = prov->countersets[i];
208
210 {
211 if (inst->template == template && inst->instance.InstanceId == id)
212 {
214 return NULL;
215 }
216 }
217
218 size = (sizeof(PERF_COUNTERSET_INSTANCE) + template->counterset.NumCounters * sizeof(UINT64)
219 + (lstrlenW( name ) + 1) * sizeof(WCHAR) + 7) & ~7;
220 inst = heap_alloc_zero( offsetof(struct counterset_instance, instance) + size );
221 if (!inst)
222 {
224 return NULL;
225 }
226
227 inst->template = template;
229 inst->instance.dwSize = size;
230 inst->instance.InstanceId = id;
232 + template->counterset.NumCounters * sizeof(UINT64);
233 inst->instance.InstanceNameSize = (lstrlenW( name ) + 1) * sizeof(WCHAR);
235 list_add_tail( &prov->instance_list, &inst->entry );
236
237 return &inst->instance;
238}
239
240/***********************************************************************
241 * PerfDeleteInstance (KERNELBASE.@)
242 */
244{
245 struct perf_provider *prov = perf_provider_from_handle( provider );
246 struct counterset_instance *inst;
247
248 TRACE( "provider %p, block %p.\n", provider, block );
249
250 if (!prov || !block) return ERROR_INVALID_PARAMETER;
251
253 list_remove( &inst->entry );
254 heap_free( inst );
255
256 return ERROR_SUCCESS;
257}
258
259/***********************************************************************
260 * PerfSetCounterSetInfo (KERNELBASE.@)
261 */
263{
265 struct counterset_template **new_array;
266 struct counterset_template *new;
267 unsigned int i;
268
269 FIXME( "handle %p, template %p, size %lu semi-stub.\n", handle, template, size );
270
271 if (!prov || !template) return ERROR_INVALID_PARAMETER;
272 if (!template->NumCounters) return ERROR_INVALID_PARAMETER;
273 if (size < sizeof(*template) || (size - (sizeof(*template))) / sizeof(PERF_COUNTER_INFO) < template->NumCounters)
275
276 for (i = 0; i < prov->counterset_count; ++i)
277 {
278 if (IsEqualGUID( &template->CounterSetGuid, &prov->countersets[i]->counterset.CounterSetGuid ))
280 }
281
282 size = offsetof( struct counterset_template, counter[template->NumCounters] );
283 if (!(new = heap_alloc( size ))) return ERROR_OUTOFMEMORY;
284
285 if (prov->counterset_count)
286 new_array = heap_realloc( prov->countersets, sizeof(*prov->countersets) * (prov->counterset_count + 1) );
287 else
288 new_array = heap_alloc( sizeof(*prov->countersets) );
289
290 if (!new_array)
291 {
292 heap_free( new );
293 return ERROR_OUTOFMEMORY;
294 }
295 memcpy( new, template, size );
296 for (i = 0; i < template->NumCounters; ++i)
297 new->counter[i].Offset = i * sizeof(UINT64);
298 new_array[prov->counterset_count++] = new;
299 prov->countersets = new_array;
300
301 return STATUS_SUCCESS;
302}
303
304/***********************************************************************
305 * PerfSetCounterRefValue (KERNELBASE.@)
306 */
308 ULONG counterid, void *address)
309{
310 struct perf_provider *prov = perf_provider_from_handle( provider );
311 struct counterset_template *template;
312 struct counterset_instance *inst;
313 unsigned int i;
314
315 FIXME( "provider %p, instance %p, counterid %lu, address %p semi-stub.\n",
316 provider, instance, counterid, address );
317
318 if (!prov || !instance || !address) return ERROR_INVALID_PARAMETER;
319
321 template = inst->template;
322
323 for (i = 0; i < template->counterset.NumCounters; ++i)
324 if (template->counter[i].CounterId == counterid) break;
325
326 if (i == template->counterset.NumCounters) return ERROR_NOT_FOUND;
327 *(void **)((BYTE *)&inst->instance + sizeof(PERF_COUNTERSET_INSTANCE) + template->counter[i].Offset) = address;
328
329 return STATUS_SUCCESS;
330}
331
332/***********************************************************************
333 * PerfStartProvider (KERNELBASE.@)
334 */
336{
338
339 FIXME( "guid %s, callback %p, provider %p semi-stub.\n", debugstr_guid(guid), callback, provider );
340
341 memset( &ctx, 0, sizeof(ctx) );
342 ctx.ContextSize = sizeof(ctx);
343 ctx.ControlCallback = callback;
344
345 return PerfStartProviderEx( guid, &ctx, provider );
346}
347
348/***********************************************************************
349 * PerfStartProviderEx (KERNELBASE.@)
350 */
352{
353 struct perf_provider *prov;
354
355 FIXME( "guid %s, context %p, provider %p semi-stub.\n", debugstr_guid(guid), context, provider );
356
357 if (!guid || !context || !provider) return ERROR_INVALID_PARAMETER;
358 if (context->ContextSize < sizeof(*context)) return ERROR_INVALID_PARAMETER;
359
360 if (context->MemAllocRoutine || context->MemFreeRoutine)
361 FIXME("Memory allocation routine is not supported.\n");
362
363 if (!(prov = heap_alloc_zero( sizeof(*prov) ))) return ERROR_OUTOFMEMORY;
364 list_init( &prov->instance_list );
365 memcpy( &prov->guid, guid, sizeof(prov->guid) );
366 prov->callback = context->ControlCallback;
367 *provider = prov;
368
369 return STATUS_SUCCESS;
370}
371
372/***********************************************************************
373 * PerfStopProvider (KERNELBASE.@)
374 */
376{
378 struct counterset_instance *inst, *next;
379 unsigned int i;
380
381 TRACE( "handle %p.\n", handle );
382
383 if (!list_empty( &prov->instance_list ))
384 WARN( "Stopping provider with active counter instances.\n" );
385
387 {
388 list_remove( &inst->entry );
389 heap_free( inst );
390 }
391
392 for (i = 0; i < prov->counterset_count; ++i)
393 heap_free( prov->countersets[i] );
394 heap_free( prov->countersets );
395 heap_free( prov );
396 return STATUS_SUCCESS;
397}
398
399/***********************************************************************
400 * QuirkIsEnabled (KERNELBASE.@)
401 */
403{
404 FIXME("(%p): stub\n", arg);
405 return FALSE;
406}
407
408/***********************************************************************
409 * QuirkIsEnabled3 (KERNELBASE.@)
410 */
411BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2)
412{
413 static int once;
414
415 if (!once++)
416 FIXME("(%p, %p) stub!\n", unk1, unk2);
417
418 return FALSE;
419}
420
422{
423 const QITAB *ptr;
424 IUnknown *unk;
425
426 TRACE("%p, %p, %s, %p\n", base, table, debugstr_guid(riid), obj);
427
428 if (!obj)
429 return E_POINTER;
430
431 for (ptr = table; ptr->piid; ++ptr)
432 {
433 TRACE("trying (offset %ld) %s\n", ptr->dwOffset, debugstr_guid(ptr->piid));
434 if (IsEqualIID(riid, ptr->piid))
435 {
436 unk = (IUnknown *)((BYTE *)base + ptr->dwOffset);
437 TRACE("matched, returning (%p)\n", unk);
438 *obj = unk;
439 IUnknown_AddRef(unk);
440 return S_OK;
441 }
442 }
443
445 {
446 unk = (IUnknown *)((BYTE *)base + table->dwOffset);
447 TRACE("returning first for IUnknown (%p)\n", unk);
448 *obj = unk;
449 IUnknown_AddRef(unk);
450 return S_OK;
451 }
452
453 WARN("Not found %s.\n", debugstr_guid(riid));
454 *obj = NULL;
455 return E_NOINTERFACE;
456}
457
459{
460 DWORD buflenW, convlen;
461 WCHAR *langbufW;
462 HRESULT hr;
463
464 TRACE("%p, %p, *%p: %ld\n", langbuf, buflen, buflen, buflen ? *buflen : -1);
465
466 if (!langbuf || !buflen || !*buflen)
467 return E_FAIL;
468
469 buflenW = *buflen;
470 langbufW = heap_alloc(sizeof(WCHAR) * buflenW);
471 hr = GetAcceptLanguagesW(langbufW, &buflenW);
472
473 if (hr == S_OK)
474 {
475 convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, -1, langbuf, *buflen, NULL, NULL);
476 convlen--; /* do not count the terminating 0 */
477 }
478 else /* copy partial string anyway */
479 {
480 convlen = WideCharToMultiByte(CP_ACP, 0, langbufW, *buflen, langbuf, *buflen, NULL, NULL);
481 if (convlen < *buflen)
482 {
483 langbuf[convlen] = 0;
484 convlen--; /* do not count the terminating 0 */
485 }
486 else
487 {
488 convlen = *buflen;
489 }
490 }
491 *buflen = buflenW ? convlen : 0;
492
493 heap_free(langbufW);
494 return hr;
495}
496
498{
499 WCHAR buffer[6 /* MAX_RFC1766_NAME */];
501 INT i;
502
503 if (n)
504 {
506 if ((((i == LANG_ENGLISH) || (i == LANG_CHINESE) || (i == LANG_ARABIC)) &&
509
510 buffer[n - 1] = '-';
512 if (!i)
513 buffer[n - 1] = '\0';
514 }
515 else
516 i = 0;
517
519 return ((n + i) > len) ? E_INVALIDARG : S_OK;
520 }
521 return E_FAIL;
522}
523
525{
526 DWORD mystrlen, mytype;
527 WCHAR *mystr;
528 LCID mylcid;
529 HKEY mykey;
530 LONG lres;
531 DWORD len;
532
533 TRACE("%p, %p, *%p: %ld\n", langbuf, buflen, buflen, buflen ? *buflen : -1);
534
535 if (!langbuf || !buflen || !*buflen)
536 return E_FAIL;
537
538 mystrlen = (*buflen > 20) ? *buflen : 20 ;
539 len = mystrlen * sizeof(WCHAR);
540 mystr = heap_alloc(len);
541 mystr[0] = 0;
542 RegOpenKeyExW(HKEY_CURRENT_USER, L"Software\\Microsoft\\Internet Explorer\\International",
543 0, KEY_QUERY_VALUE, &mykey);
544 lres = RegQueryValueExW(mykey, L"AcceptLanguage", 0, &mytype, (PBYTE)mystr, &len);
545 RegCloseKey(mykey);
546 len = lstrlenW(mystr);
547
548 if (!lres && (*buflen > len))
549 {
550 lstrcpyW(langbuf, mystr);
551 *buflen = len;
552 heap_free(mystr);
553 return S_OK;
554 }
555
556 /* Did not find a value in the registry or the user buffer is too small */
557 mylcid = GetUserDefaultLCID();
558 lcid_to_rfc1766(mylcid, mystr, mystrlen);
559 len = lstrlenW(mystr);
560
561 memcpy(langbuf, mystr, min(*buflen, len + 1)*sizeof(WCHAR));
562 heap_free(mystr);
563
564 if (*buflen > len)
565 {
566 *buflen = len;
567 return S_OK;
568 }
569
570 *buflen = 0;
572}
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:47
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:375
HRESULT WINAPI QISearch(void *base, const QITAB *table, REFIID riid, void **obj)
Definition: main.c:421
ULONG WINAPI PerfDeleteInstance(HANDLE provider, PERF_COUNTERSET_INSTANCE *block)
Definition: main.c:243
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:181
ULONG WINAPI PerfStartProvider(GUID *guid, PERFLIBREQUEST callback, HANDLE *provider)
Definition: main.c:335
ULONG WINAPI PerfSetCounterRefValue(HANDLE provider, PERF_COUNTERSET_INSTANCE *instance, ULONG counterid, void *address)
Definition: main.c:307
ULONG WINAPI PerfSetCounterSetInfo(HANDLE handle, PERF_COUNTERSET_INFO *template, ULONG size)
Definition: main.c:262
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:497
BOOL WINAPI QuirkIsEnabled(void *arg)
Definition: main.c:402
HRESULT WINAPI GetAcceptLanguagesW(WCHAR *langbuf, DWORD *buflen)
Definition: main.c:524
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:351
HRESULT WINAPI GetAcceptLanguagesA(LPSTR langbuf, DWORD *buflen)
Definition: main.c:458
BOOL WINAPI QuirkIsEnabled3(void *unk1, void *unk2)
Definition: main.c:411
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:1016
#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
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:2345
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365
#define ERROR_NOT_FOUND
Definition: winerror.h:690
#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
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
unsigned char BYTE
Definition: xxhash.c:193