ReactOS 0.4.15-dev-7674-gc0b4db1
sysinfo.c
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Win32 Base API
3 * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4 * PURPOSE: System Information Functions
5 * COPYRIGHT: Emanuele Aliberti
6 * Christoph von Wittich
7 * Thomas Weidenmueller
8 * Gunnar Andre Dalsnes
9 * Stanislav Motylkov (x86corez@gmail.com)
10 * Mark Jansen (mark.jansen@reactos.org)
11 * Copyright 2023 Ratin Gao <ratin@knsoft.org>
12 */
13
14/* INCLUDES *******************************************************************/
15
16#include <k32.h>
17
18#define NDEBUG
19#include <debug.h>
20
21#define PV_NT351 0x00030033
22
23/* PRIVATE FUNCTIONS **********************************************************/
24
25VOID
29 OUT LPSYSTEM_INFO SystemInfo)
30{
31 RtlZeroMemory(SystemInfo, sizeof (SYSTEM_INFO));
32 SystemInfo->wProcessorArchitecture = ProcInfo->ProcessorArchitecture;
33 SystemInfo->wReserved = 0;
34 SystemInfo->dwPageSize = BasicInfo->PageSize;
35 SystemInfo->lpMinimumApplicationAddress = (PVOID)BasicInfo->MinimumUserModeAddress;
36 SystemInfo->lpMaximumApplicationAddress = (PVOID)BasicInfo->MaximumUserModeAddress;
37 SystemInfo->dwActiveProcessorMask = BasicInfo->ActiveProcessorsAffinityMask;
38 SystemInfo->dwNumberOfProcessors = BasicInfo->NumberOfProcessors;
39 SystemInfo->wProcessorLevel = ProcInfo->ProcessorLevel;
40 SystemInfo->wProcessorRevision = ProcInfo->ProcessorRevision;
41 SystemInfo->dwAllocationGranularity = BasicInfo->AllocationGranularity;
42
43 switch (ProcInfo->ProcessorArchitecture)
44 {
46 switch (ProcInfo->ProcessorLevel)
47 {
48 case 3:
49 SystemInfo->dwProcessorType = PROCESSOR_INTEL_386;
50 break;
51 case 4:
52 SystemInfo->dwProcessorType = PROCESSOR_INTEL_486;
53 break;
54 default:
55 SystemInfo->dwProcessorType = PROCESSOR_INTEL_PENTIUM;
56 }
57 break;
58
60 SystemInfo->dwProcessorType = PROCESSOR_AMD_X8664;
61 break;
62
64 SystemInfo->dwProcessorType = PROCESSOR_INTEL_IA64;
65 break;
66
67 default:
68 SystemInfo->dwProcessorType = 0;
69 break;
70 }
71
73 {
74 SystemInfo->wProcessorLevel = 0;
75 SystemInfo->wProcessorRevision = 0;
76 }
77}
78
79static
80UINT
82 _In_ DWORD FirmwareTableProviderSignature,
84 _Out_writes_bytes_to_opt_(BufferSize, return) PVOID pFirmwareTableBuffer,
87{
88 SYSTEM_FIRMWARE_TABLE_INFORMATION* SysFirmwareInfo;
92
93 SysFirmwareInfo = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, TotalSize);
94 if (!SysFirmwareInfo)
95 {
97 return 0;
98 }
100 {
101 SysFirmwareInfo->ProviderSignature = FirmwareTableProviderSignature;
102 SysFirmwareInfo->TableID = FirmwareTableID;
103 SysFirmwareInfo->Action = Action;
104 SysFirmwareInfo->TableBufferLength = BufferSize;
105
107
109 Result = SysFirmwareInfo->TableBufferLength;
110
111 if (NT_SUCCESS(Status) && pFirmwareTableBuffer)
112 {
113 RtlCopyMemory(pFirmwareTableBuffer, SysFirmwareInfo->TableBuffer, SysFirmwareInfo->TableBufferLength);
114 }
115 }
117 {
118 RtlFreeHeap(RtlGetProcessHeap(), 0, SysFirmwareInfo);
119 }
120 _SEH2_END;
121
123 return Result;
124}
125
126/* PUBLIC FUNCTIONS ***********************************************************/
127
128/*
129 * @implemented
130 */
131SIZE_T
132WINAPI
134{
135 return SharedUserData->LargePageMinimum;
136}
137
138/*
139 * @implemented
140 */
141VOID
142WINAPI
144{
145 SYSTEM_BASIC_INFORMATION BasicInfo;
148
150 &BasicInfo,
151 sizeof(BasicInfo),
152 0);
153 if (!NT_SUCCESS(Status)) return;
154
156 &ProcInfo,
157 sizeof(ProcInfo),
158 0);
159 if (!NT_SUCCESS(Status)) return;
160
161 GetSystemInfoInternal(&BasicInfo, &ProcInfo, lpSystemInfo);
162}
163
164/*
165 * @implemented
166 */
167BOOL
168WINAPI
170{
171 if (ProcessorFeature >= PROCESSOR_FEATURE_MAX) return FALSE;
172 return ((BOOL)SharedUserData->ProcessorFeatures[ProcessorFeature]);
173}
174
175/*
176 * @implemented
177 */
178BOOL
179WINAPI
181 OUT PDWORD pdwQuotaUsed)
182{
186
188 &QuotaInfo,
189 sizeof(QuotaInfo),
190 &BytesWritten);
191 if (NT_SUCCESS(Status))
192 {
193 if (pdwQuotaAllowed) *pdwQuotaAllowed = QuotaInfo.RegistryQuotaAllowed;
194 if (pdwQuotaUsed) *pdwQuotaUsed = QuotaInfo.RegistryQuotaUsed;
195 return TRUE;
196 }
197
199 return FALSE;
200}
201
202/*
203 * @implemented
204 */
205VOID
206WINAPI
208{
209 SYSTEM_BASIC_INFORMATION BasicInfo;
212
213 Status = RtlGetNativeSystemInformation(SystemBasicInformation,
214 &BasicInfo,
215 sizeof(BasicInfo),
216 0);
217 if (!NT_SUCCESS(Status)) return;
218
219 Status = RtlGetNativeSystemInformation(SystemProcessorInformation,
220 &ProcInfo,
221 sizeof(ProcInfo),
222 0);
223 if (!NT_SUCCESS(Status)) return;
224
225 GetSystemInfoInternal(&BasicInfo, &ProcInfo, lpSystemInfo);
226}
227
228/*
229 * @implemented
230 */
231BOOL
232WINAPI
235{
237
238 if (!ReturnLength)
239 {
241 return FALSE;
242 }
243
245 Buffer,
248
249 /* Normalize the error to what Win32 expects */
251 if (!NT_SUCCESS(Status))
252 {
254 return FALSE;
255 }
256
257 return TRUE;
258}
259
260/*
261 * @implemented
262 */
263BOOL
264WINAPI
266{
269 ULONG PartialInfo[2]; // First two members of SYSTEM_NUMA_INFORMATION
270
271 /* Query partial NUMA info */
273 PartialInfo,
274 sizeof(PartialInfo),
275 &Length);
276 if (!NT_SUCCESS(Status))
277 {
279 return FALSE;
280 }
281
282 if (Length < sizeof(ULONG))
283 {
285 return FALSE;
286 }
287
288 /* First member of the struct is the highest node number */
289 *HighestNodeNumber = PartialInfo[0];
290 return TRUE;
291}
292
293/*
294 * @implemented
295 */
296BOOL
297WINAPI
299 OUT PULONGLONG ProcessorMask)
300{
302 SYSTEM_NUMA_INFORMATION NumaInformation;
304
305 /* Query NUMA information */
307 &NumaInformation,
308 sizeof(NumaInformation),
309 &Length);
310 if (!NT_SUCCESS(Status))
311 {
313 return FALSE;
314 }
315
316 /* Validate input node number */
317 if (Node > NumaInformation.HighestNodeNumber)
318 {
320 return FALSE;
321 }
322
323 /* Return mask for that node */
324 *ProcessorMask = NumaInformation.ActiveProcessorsAffinityMask[Node];
325 return TRUE;
326}
327
328/*
329 * @implemented
330 */
331BOOL
332WINAPI
335{
337 SYSTEM_NUMA_INFORMATION NumaInformation;
339 ULONG Node;
340 ULONGLONG Proc;
341
342 /* Can't handle processor number >= 32 */
344 {
345 *NodeNumber = -1;
347 return FALSE;
348 }
349
350 /* Query NUMA information */
352 &NumaInformation,
353 sizeof(NumaInformation),
354 &Length);
355 if (!NT_SUCCESS(Status))
356 {
357 *NodeNumber = -1;
359 return FALSE;
360 }
361
362 /* Find ourselves */
363 Node = 0;
364 Proc = 1ULL << Processor;
365 while ((Proc & NumaInformation.ActiveProcessorsAffinityMask[Node]) == 0ULL)
366 {
367 ++Node;
368 /* Out of options */
369 if (Node > NumaInformation.HighestNodeNumber)
370 {
371 *NodeNumber = -1;
373 return FALSE;
374 }
375 }
376
377 /* Return found node */
378 *NodeNumber = Node;
379 return TRUE;
380}
381
382/*
383 * @implemented
384 */
385BOOL
386WINAPI
388 OUT PULONGLONG AvailableBytes)
389{
391 SYSTEM_NUMA_INFORMATION NumaInformation;
393
394 /* Query NUMA information */
396 &NumaInformation,
397 sizeof(NumaInformation),
398 &Length);
399 if (!NT_SUCCESS(Status))
400 {
402 return FALSE;
403 }
404
405 /* Validate input node number */
406 if (Node > NumaInformation.HighestNodeNumber)
407 {
409 return FALSE;
410 }
411
412 /* Return available memory for that node */
413 *AvailableBytes = NumaInformation.AvailableMemory[Node];
414 return TRUE;
415}
416
417_Success_(return > 0)
418DWORD
419WINAPI
420GetFirmwareEnvironmentVariableExW(
422 _In_ LPCWSTR lpGuid,
425 _Out_opt_ PDWORD pdwAttribubutes)
426{
428 UNICODE_STRING VariableName, Namespace;
429 GUID VendorGuid;
431
432 /* Check input parameters and build NT strings */
433 if (!lpName || !lpGuid)
434 {
436 return 0;
437 }
438 RtlInitUnicodeString(&VariableName, lpName);
439 RtlInitUnicodeString(&Namespace, lpGuid);
440 Status = RtlGUIDFromString(&Namespace, &VendorGuid);
441 if (!NT_SUCCESS(Status))
442 {
444 return 0;
445 }
446
447 /* Query firmware system environment variable value */
448 Length = nSize;
450 &VendorGuid,
451 pBuffer,
452 &Length,
453 pdwAttribubutes);
454 if (!NT_SUCCESS(Status))
455 {
457 return 0;
458 }
459
460 return Length;
461}
462
463_Success_(return > 0)
464DWORD
465WINAPI
466GetFirmwareEnvironmentVariableExA(
468 _In_ LPCSTR lpGuid,
471 _Out_opt_ PDWORD pdwAttribubutes)
472{
475 UNICODE_STRING VariableName, Namespace;
476 ANSI_STRING AnsiVariableName, AnsiNamespace;
477
478 /* Check input parameters and build NT strings */
479 if (!lpName || !lpGuid)
480 {
482 return 0;
483 }
484 RtlInitString(&AnsiVariableName, lpName);
485 Status = RtlAnsiStringToUnicodeString(&VariableName, &AnsiVariableName, TRUE);
486 if (!NT_SUCCESS(Status))
487 {
489 return 0;
490 }
491 RtlInitString(&AnsiNamespace, lpGuid);
492 Status = RtlAnsiStringToUnicodeString(&Namespace, &AnsiNamespace, TRUE);
493 if (!NT_SUCCESS(Status))
494 {
495 RtlFreeUnicodeString(&VariableName);
497 return 0;
498 }
499
500 /* Call unicode version interface */
501 Length = GetFirmwareEnvironmentVariableExW(VariableName.Buffer,
502 Namespace.Buffer,
503 pBuffer,
504 nSize,
505 pdwAttribubutes);
506
507 /* Cleanup and return */
508 RtlFreeUnicodeString(&Namespace);
509 RtlFreeUnicodeString(&VariableName);
510 return Length;
511}
512
513_Success_(return > 0)
514DWORD
515WINAPI
516GetFirmwareEnvironmentVariableW(
518 _In_ LPCWSTR lpGuid,
521{
522 return GetFirmwareEnvironmentVariableExW(lpName, lpGuid, pBuffer, nSize, NULL);
523}
524
525_Success_(return > 0)
526DWORD
527WINAPI
528GetFirmwareEnvironmentVariableA(
530 _In_ LPCSTR lpGuid,
533{
534 return GetFirmwareEnvironmentVariableExA(lpName, lpGuid, pBuffer, nSize, NULL);
535}
536
537BOOL
538WINAPI
541 _In_ LPCWSTR lpGuid,
545{
547 UNICODE_STRING VariableName, Namespace;
548 GUID VendorGuid;
549
550 /* Check input parameters and build NT strings */
551 if (!lpName || !lpGuid)
552 {
554 return FALSE;
555 }
556 RtlInitUnicodeString(&VariableName, lpName);
557 RtlInitUnicodeString(&Namespace, lpGuid);
558 Status = RtlGUIDFromString(&Namespace, &VendorGuid);
559 if (!NT_SUCCESS(Status))
560 {
562 return FALSE;
563 }
564
565 /* Set firmware system environment variable value */
567 &VendorGuid,
568 pValue,
569 nSize,
571 if (!NT_SUCCESS(Status))
572 {
574 return FALSE;
575 }
576
577 return TRUE;
578}
579
580BOOL
581WINAPI
584 _In_ LPCSTR lpGuid,
588{
590 BOOL Result;
591 UNICODE_STRING VariableName, Namespace;
592 ANSI_STRING AnsiVariableName, AnsiNamespace;
593
594 /* Check input parameters and build NT strings */
595 if (!lpName || !lpGuid)
596 {
598 return FALSE;
599 }
600 RtlInitString(&AnsiVariableName, lpName);
601 Status = RtlAnsiStringToUnicodeString(&VariableName, &AnsiVariableName, TRUE);
602 if (!NT_SUCCESS(Status))
603 {
605 return FALSE;
606 }
607 RtlInitString(&AnsiNamespace, lpGuid);
608 Status = RtlAnsiStringToUnicodeString(&Namespace, &AnsiNamespace, TRUE);
609 if (!NT_SUCCESS(Status))
610 {
611 RtlFreeUnicodeString(&VariableName);
613 return FALSE;
614 }
615
616 /* Call unicode version interface */
618 Namespace.Buffer,
619 pValue,
620 nSize,
622
623 /* Cleanup and return */
624 RtlFreeUnicodeString(&Namespace);
625 RtlFreeUnicodeString(&VariableName);
626 return Result;
627}
628
629BOOL
630WINAPI
633 _In_ LPCWSTR lpGuid,
636{
638 lpGuid,
639 pValue,
640 nSize,
642}
643
644BOOL
645WINAPI
648 _In_ LPCSTR lpGuid,
651{
653 lpGuid,
654 pValue,
655 nSize,
657}
658
686UINT
687WINAPI
689 _In_ DWORD FirmwareTableProviderSignature,
690 _Out_writes_bytes_to_opt_(BufferSize, return) PVOID pFirmwareTableEnumBuffer,
692{
693 return BaseQuerySystemFirmware(FirmwareTableProviderSignature,
694 0,
695 pFirmwareTableEnumBuffer,
698}
699
734UINT
735WINAPI
737 _In_ DWORD FirmwareTableProviderSignature,
739 _Out_writes_bytes_to_opt_(BufferSize, return) PVOID pFirmwareTableBuffer,
741{
742 return BaseQuerySystemFirmware(FirmwareTableProviderSignature,
744 pFirmwareTableBuffer,
747}
748
749/*
750 * @unimplemented
751 */
752BOOL
753WINAPI
754GetSystemFileCacheSize(OUT PSIZE_T lpMinimumFileCacheSize,
755 OUT PSIZE_T lpMaximumFileCacheSize,
756 OUT PDWORD lpFlags)
757{
758 STUB;
759 return FALSE;
760}
761
762/*
763 * @unimplemented
764 */
765BOOL
766WINAPI
767SetSystemFileCacheSize(IN SIZE_T MinimumFileCacheSize,
768 IN SIZE_T MaximumFileCacheSize,
769 IN DWORD Flags)
770{
771 STUB;
772 return FALSE;
773}
774
775/*
776 * @unimplemented
777 */
778LONG
779WINAPI
781 BYTE *Buffer)
782{
783 STUB;
785}
unsigned int UINT32
ULONG ReturnedSize
_In_ ULONG FirmwareTableID
Definition: aux_klib.h:91
LONG NTSTATUS
Definition: precomp.h:26
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
Definition: heap.c:588
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:606
return
Definition: dirsup.c:529
Definition: bufpool.h:45
#define BufferSize
Definition: mmc.h:75
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
union node Node
Definition: types.h:1255
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define SetLastError(x)
Definition: compat.h:752
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
DWORD WINAPI GetProcessVersion(IN DWORD ProcessId)
Definition: proc.c:1760
BOOL WINAPI SetFirmwareEnvironmentVariableExA(_In_ LPCSTR lpName, _In_ LPCSTR lpGuid, _In_reads_bytes_opt_(nSize) PVOID pValue, _In_ DWORD nSize, _In_ DWORD dwAttributes)
Definition: sysinfo.c:582
BOOL WINAPI SetSystemFileCacheSize(IN SIZE_T MinimumFileCacheSize, IN SIZE_T MaximumFileCacheSize, IN DWORD Flags)
Definition: sysinfo.c:767
VOID WINAPI GetNativeSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:207
BOOL WINAPI GetNumaNodeProcessorMask(IN UCHAR Node, OUT PULONGLONG ProcessorMask)
Definition: sysinfo.c:298
BOOL WINAPI GetNumaProcessorNode(IN UCHAR Processor, OUT PUCHAR NodeNumber)
Definition: sysinfo.c:333
LONG WINAPI GetCurrentPackageId(UINT32 *BufferLength, BYTE *Buffer)
Definition: sysinfo.c:780
BOOL WINAPI GetSystemRegistryQuota(OUT PDWORD pdwQuotaAllowed, OUT PDWORD pdwQuotaUsed)
Definition: sysinfo.c:180
static UINT BaseQuerySystemFirmware(_In_ DWORD FirmwareTableProviderSignature, _In_ DWORD FirmwareTableID, _Out_writes_bytes_to_opt_(BufferSize, return) PVOID pFirmwareTableBuffer, _In_ DWORD BufferSize, _In_ SYSTEM_FIRMWARE_TABLE_ACTION Action)
Definition: sysinfo.c:81
BOOL WINAPI GetSystemFileCacheSize(OUT PSIZE_T lpMinimumFileCacheSize, OUT PSIZE_T lpMaximumFileCacheSize, OUT PDWORD lpFlags)
Definition: sysinfo.c:754
UINT WINAPI GetSystemFirmwareTable(_In_ DWORD FirmwareTableProviderSignature, _In_ DWORD FirmwareTableID, _Out_writes_bytes_to_opt_(BufferSize, return) PVOID pFirmwareTableBuffer, _In_ DWORD BufferSize)
Definition: sysinfo.c:736
BOOL WINAPI GetNumaAvailableMemoryNode(IN UCHAR Node, OUT PULONGLONG AvailableBytes)
Definition: sysinfo.c:387
BOOL WINAPI SetFirmwareEnvironmentVariableExW(_In_ LPCWSTR lpName, _In_ LPCWSTR lpGuid, _In_reads_bytes_opt_(nSize) PVOID pValue, _In_ DWORD nSize, _In_ DWORD dwAttributes)
Definition: sysinfo.c:539
#define PV_NT351
Definition: sysinfo.c:21
SIZE_T WINAPI GetLargePageMinimum(VOID)
Definition: sysinfo.c:133
BOOL WINAPI GetLogicalProcessorInformation(OUT PSYSTEM_LOGICAL_PROCESSOR_INFORMATION Buffer, IN OUT PDWORD ReturnLength)
Definition: sysinfo.c:233
VOID WINAPI GetSystemInfo(IN LPSYSTEM_INFO lpSystemInfo)
Definition: sysinfo.c:143
BOOL WINAPI SetFirmwareEnvironmentVariableA(_In_ LPCSTR lpName, _In_ LPCSTR lpGuid, _In_reads_bytes_opt_(nSize) PVOID pValue, _In_ DWORD nSize)
Definition: sysinfo.c:646
BOOL WINAPI SetFirmwareEnvironmentVariableW(_In_ LPCWSTR lpName, _In_ LPCWSTR lpGuid, _In_reads_bytes_opt_(nSize) PVOID pValue, _In_ DWORD nSize)
Definition: sysinfo.c:631
VOID WINAPI GetSystemInfoInternal(IN PSYSTEM_BASIC_INFORMATION BasicInfo, IN PSYSTEM_PROCESSOR_INFORMATION ProcInfo, OUT LPSYSTEM_INFO SystemInfo)
Definition: sysinfo.c:27
BOOL WINAPI IsProcessorFeaturePresent(IN DWORD ProcessorFeature)
Definition: sysinfo.c:169
UINT WINAPI EnumSystemFirmwareTables(_In_ DWORD FirmwareTableProviderSignature, _Out_writes_bytes_to_opt_(BufferSize, return) PVOID pFirmwareTableEnumBuffer, _In_ DWORD BufferSize)
Definition: sysinfo.c:688
BOOL WINAPI GetNumaHighestNodeNumber(OUT PULONG HighestNodeNumber)
Definition: sysinfo.c:265
IN CINT OUT PVOID IN ULONG OUT PULONG ReturnLength
Definition: dumpinfo.c:43
#define _SEH2_FINALLY
Definition: filesup.c:21
#define _SEH2_END
Definition: filesup.c:22
#define _SEH2_TRY
Definition: filesup.c:19
#define MAXIMUM_PROCESSORS
Definition: rwlock.h:5
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
@ SystemProcessorInformation
Definition: ntddk_ex.h:12
@ SystemBasicInformation
Definition: ntddk_ex.h:11
@ SystemRegistryQuotaInformation
Definition: ntddk_ex.h:48
PWCHAR pValue
Status
Definition: gdiplustypes.h:25
NTSYSAPI NTSTATUS WINAPI RtlGUIDFromString(PUNICODE_STRING, GUID *)
#define STUB
Definition: kernel32.h:27
#define ULL(a, b)
Definition: format_msg.c:27
#define _Out_opt_
Definition: ms_sal.h:346
#define _Success_(expr)
Definition: ms_sal.h:259
#define _Out_writes_bytes_to_opt_(size, count)
Definition: ms_sal.h:361
#define _In_
Definition: ms_sal.h:308
#define _In_reads_bytes_opt_(size)
Definition: ms_sal.h:322
unsigned int UINT
Definition: ndis.h:50
#define VARIABLE_ATTRIBUTE_NON_VOLATILE
Definition: extypes.h:1568
@ SystemFirmwareTableInformation
Definition: extypes.h:293
@ SystemLogicalProcessorInformation
Definition: extypes.h:290
@ SystemNumaProcessorMap
Definition: extypes.h:272
@ SystemNumaAvailableMemory
Definition: extypes.h:277
#define PROCESSOR_ARCHITECTURE_IA64
Definition: ketypes.h:111
#define PROCESSOR_ARCHITECTURE_AMD64
Definition: ketypes.h:114
#define PROCESSOR_ARCHITECTURE_INTEL
Definition: ketypes.h:105
NTSYSAPI VOID NTAPI RtlInitString(PSTRING DestinationString, PCSZ SourceString)
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
__GNU_EXTENSION typedef unsigned __int64 * PULONGLONG
Definition: ntbasedef.h:383
@ SystemFirmwareTable_Enumerate
@ SystemFirmwareTable_Get
enum _SYSTEM_FIRMWARE_TABLE_ACTION SYSTEM_FIRMWARE_TABLE_ACTION
struct _SYSTEM_FIRMWARE_TABLE_INFORMATION SYSTEM_FIRMWARE_TABLE_INFORMATION
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
NTSTATUS NTAPI NtSetSystemEnvironmentValueEx(_In_ PUNICODE_STRING VariableName, _In_ LPGUID VendorGuid, _In_reads_bytes_opt_(ValueLength) PVOID Value, _In_ ULONG ValueLength, _In_ ULONG Attributes)
Definition: sysinfo.c:580
NTSTATUS NTAPI NtQuerySystemEnvironmentValueEx(_In_ PUNICODE_STRING VariableName, _In_ LPGUID VendorGuid, _Out_opt_ PVOID Value, _Inout_ PULONG ReturnLength, _Out_opt_ PULONG Attributes)
Definition: sysinfo.c:567
DWORD * PDWORD
Definition: pedump.c:68
long LONG
Definition: pedump.c:60
PVOID pBuffer
DWORD BaseSetLastNTError(IN NTSTATUS Status)
Definition: reactos.cpp:166
#define SharedUserData
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
NTSYSAPI NTSTATUS NTAPI NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInfoClass, OUT PVOID SystemInfoBuffer, IN ULONG SystemInfoBufferSize, OUT PULONG BytesReturned OPTIONAL)
SYSTEM_FIRMWARE_TABLE_ACTION Action
ULONGLONG ActiveProcessorsAffinityMask[MAXIMUM_NUMA_NODES]
Definition: extypes.h:1408
ULONGLONG AvailableMemory[MAXIMUM_NUMA_NODES]
Definition: extypes.h:1409
ULONG_PTR * PSIZE_T
Definition: typedefs.h:80
uint32_t * PULONG
Definition: typedefs.h:59
void * PVOID
Definition: typedefs.h:50
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
#define OUT
Definition: typedefs.h:40
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
Definition: dlist.c:348
DWORD dwAttributes
Definition: vdmdbg.h:34
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3771
_In_ WDFIOTARGET _In_ _Strict_type_match_ WDF_IO_TARGET_SENT_IO_ACTION Action
Definition: wdfiotarget.h:510
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesWritten
Definition: wdfiotarget.h:960
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
_In_ LPCSTR lpName
Definition: winbase.h:2789
*nSize LPSTR _Inout_ LPDWORD nSize
Definition: winbase.h:2084
#define WINAPI
Definition: msvc.h:6
#define APPMODEL_ERROR_NO_PACKAGE
Definition: winerror.h:2337
#define PROCESSOR_INTEL_PENTIUM
Definition: winnt_old.h:425
#define PROCESSOR_INTEL_386
Definition: winnt_old.h:423
#define PROCESSOR_AMD_X8664
Definition: winnt_old.h:434
#define PROCESSOR_INTEL_IA64
Definition: winnt_old.h:428
#define PROCESSOR_INTEL_486
Definition: winnt_old.h:424
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_Out_ PUSHORT NodeNumber
Definition: iofuncs.h:2574
_In_ UCHAR Processor
Definition: kefuncs.h:670
#define PROCESSOR_FEATURE_MAX
const char * LPCSTR
Definition: xmlstorage.h:183
unsigned char UCHAR
Definition: xmlstorage.h:181
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193