include: Add STORAGE_HOTPLUG_INFO structure.
[wine.git] / dlls / wow64 / struct32.h
blob2c4cf4f9e3ced24cc966bcc060a77eb731e3d2de
1 /*
2 * 32-bit version of ntdll structures
4 * Copyright 2021 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WOW64_STRUCT32_H
22 #define __WOW64_STRUCT32_H
24 typedef struct
26 ULONG Length;
27 ULONG RootDirectory;
28 ULONG ObjectName;
29 ULONG Attributes;
30 ULONG SecurityDescriptor;
31 ULONG SecurityQualityOfService;
32 } OBJECT_ATTRIBUTES32;
34 typedef struct
36 union
38 NTSTATUS Status;
39 ULONG Pointer;
41 ULONG Information;
42 } IO_STATUS_BLOCK32;
44 typedef struct
46 UNICODE_STRING32 Name;
47 } OBJECT_NAME_INFORMATION32;
49 typedef struct
51 UNICODE_STRING32 TypeName;
52 ULONG TotalNumberOfObjects;
53 ULONG TotalNumberOfHandles;
54 ULONG TotalPagedPoolUsage;
55 ULONG TotalNonPagedPoolUsage;
56 ULONG TotalNamePoolUsage;
57 ULONG TotalHandleTableUsage;
58 ULONG HighWaterNumberOfObjects;
59 ULONG HighWaterNumberOfHandles;
60 ULONG HighWaterPagedPoolUsage;
61 ULONG HighWaterNonPagedPoolUsage;
62 ULONG HighWaterNamePoolUsage;
63 ULONG HighWaterHandleTableUsage;
64 ULONG InvalidAttributes;
65 GENERIC_MAPPING GenericMapping;
66 ULONG ValidAccessMask;
67 BOOLEAN SecurityRequired;
68 BOOLEAN MaintainHandleCount;
69 UCHAR TypeIndex;
70 CHAR ReservedByte;
71 ULONG PoolType;
72 ULONG DefaultPagedPoolCharge;
73 ULONG DefaultNonPagedPoolCharge;
74 } OBJECT_TYPE_INFORMATION32;
76 typedef struct
78 CONTEXT_CHUNK All;
79 CONTEXT_CHUNK Legacy;
80 CONTEXT_CHUNK XState;
81 } CONTEXT_EX32;
83 typedef struct
85 UNICODE_STRING32 ObjectName;
86 UNICODE_STRING32 ObjectTypeName;
87 } DIRECTORY_BASIC_INFORMATION32;
89 typedef struct
91 ULONG CompletionPort;
92 ULONG CompletionKey;
93 } FILE_COMPLETION_INFORMATION32;
95 typedef struct
97 ULONG CompletionKey;
98 ULONG CompletionValue;
99 IO_STATUS_BLOCK32 IoStatusBlock;
100 } FILE_IO_COMPLETION_INFORMATION32;
102 typedef struct
104 union
106 BOOLEAN ReplaceIfExists;
107 ULONG Flags;
109 ULONG RootDirectory;
110 ULONG FileNameLength;
111 WCHAR FileName[1];
112 } FILE_RENAME_INFORMATION32;
114 typedef struct
116 ULONG Mask;
117 WORD Group;
118 WORD Reserved[3];
119 } GROUP_AFFINITY32;
121 typedef struct
123 DWORD NumberOfAssignedProcesses;
124 DWORD NumberOfProcessIdsInList;
125 ULONG ProcessIdList[1];
126 } JOBOBJECT_BASIC_PROCESS_ID_LIST32;
128 typedef struct
130 LARGE_INTEGER PerProcessUserTimeLimit;
131 LARGE_INTEGER PerJobUserTimeLimit;
132 DWORD LimitFlags;
133 ULONG MinimumWorkingSetSize;
134 ULONG MaximumWorkingSetSize;
135 DWORD ActiveProcessLimit;
136 ULONG Affinity;
137 DWORD PriorityClass;
138 DWORD SchedulingClass;
139 } JOBOBJECT_BASIC_LIMIT_INFORMATION32;
141 typedef struct
143 JOBOBJECT_BASIC_LIMIT_INFORMATION32 BasicLimitInformation;
144 IO_COUNTERS IoInfo;
145 ULONG ProcessMemoryLimit;
146 ULONG JobMemoryLimit;
147 ULONG PeakProcessMemoryUsed;
148 ULONG PeakJobMemoryUsed;
149 } JOBOBJECT_EXTENDED_LIMIT_INFORMATION32;
151 typedef struct
153 ULONG CompletionKey;
154 LONG CompletionPort;
155 } JOBOBJECT_ASSOCIATE_COMPLETION_PORT32;
157 typedef struct
159 ULONG BaseAddress;
160 ULONG AllocationBase;
161 DWORD AllocationProtect;
162 ULONG RegionSize;
163 DWORD State;
164 DWORD Protect;
165 DWORD Type;
166 } MEMORY_BASIC_INFORMATION32;
168 typedef struct
170 ULONG AllocationBase;
171 ULONG AllocationProtect;
172 ULONG RegionType;
173 ULONG RegionSize;
174 ULONG CommitSize;
175 ULONG PartitionId;
176 ULONG NodePreference;
177 } MEMORY_REGION_INFORMATION32;
179 typedef struct
181 UNICODE_STRING32 SectionFileName;
182 } MEMORY_SECTION_NAME32;
184 typedef union
186 ULONG Flags;
187 struct {
188 ULONG Valid : 1;
189 ULONG ShareCount : 3;
190 ULONG Win32Protection : 11;
191 ULONG Shared : 1;
192 ULONG Node : 6;
193 ULONG Locked : 1;
194 ULONG LargePage : 1;
196 } MEMORY_WORKING_SET_EX_BLOCK32;
198 typedef struct
200 ULONG VirtualAddress;
201 MEMORY_WORKING_SET_EX_BLOCK32 VirtualAttributes;
202 } MEMORY_WORKING_SET_EX_INFORMATION32;
204 typedef struct
206 ULONG ImageBase;
207 ULONG SizeOfImage;
208 union
210 ULONG ImageFlags;
211 struct
213 ULONG ImagePartialMap : 1;
214 ULONG ImageNotExecutable : 1;
215 ULONG ImageSigningLevel : 4;
216 ULONG Reserved : 26;
219 } MEMORY_IMAGE_INFORMATION32;
221 typedef struct
223 NTSTATUS ExitStatus;
224 ULONG PebBaseAddress;
225 ULONG AffinityMask;
226 LONG BasePriority;
227 ULONG UniqueProcessId;
228 ULONG InheritedFromUniqueProcessId;
229 } PROCESS_BASIC_INFORMATION32;
231 typedef struct
233 ULONG Version;
234 ULONG Reserved;
235 ULONG Callback;
236 } PROCESS_INSTRUMENTATION_CALLBACK_INFORMATION32;
238 typedef struct
240 ULONG ReserveSize;
241 ULONG ZeroBits;
242 ULONG StackBase;
243 } PROCESS_STACK_ALLOCATION_INFORMATION32;
245 typedef struct
247 ULONG PreferredNode;
248 ULONG Reserved0;
249 ULONG Reserved1;
250 ULONG Reserved2;
251 PROCESS_STACK_ALLOCATION_INFORMATION32 AllocInfo;
252 } PROCESS_STACK_ALLOCATION_INFORMATION_EX32;
254 typedef struct
256 ULONG Size;
257 PS_CREATE_STATE State;
258 union
260 struct
262 ULONG InitFlags;
263 ACCESS_MASK AdditionalFileAccess;
264 } InitState;
265 struct
267 ULONG FileHandle;
268 } FailSection;
269 struct
271 USHORT DllCharacteristics;
272 } ExeFormat;
273 struct
275 ULONG IFEOKey;
276 } ExeName;
277 struct
279 ULONG OutputFlags;
280 ULONG FileHandle;
281 ULONG SectionHandle;
282 ULONGLONG UserProcessParametersNative;
283 ULONG UserProcessParametersWow64;
284 ULONG CurrentParameterFlags;
285 ULONGLONG PebAddressNative;
286 ULONG PebAddressWow64;
287 ULONGLONG ManifestAddress;
288 ULONG ManifestSize;
289 } SuccessState;
291 } PS_CREATE_INFO32;
293 typedef struct
295 ULONG Attribute;
296 ULONG Size;
297 ULONG Value;
298 ULONG ReturnLength;
299 } PS_ATTRIBUTE32;
301 typedef struct
303 ULONG TotalLength;
304 PS_ATTRIBUTE32 Attributes[1];
305 } PS_ATTRIBUTE_LIST32;
307 typedef struct
309 ULONG Section;
310 ULONG MappedBaseAddress;
311 ULONG ImageBaseAddress;
312 ULONG ImageSize;
313 ULONG Flags;
314 USHORT LoadOrderIndex;
315 USHORT InitOrderIndex;
316 USHORT LoadCount;
317 USHORT NameOffset;
318 BYTE Name[MAXIMUM_FILENAME_LENGTH];
319 } RTL_PROCESS_MODULE_INFORMATION32;
321 typedef struct
323 ULONG ModulesCount;
324 RTL_PROCESS_MODULE_INFORMATION32 Modules[1];
325 } RTL_PROCESS_MODULES32;
327 typedef struct
329 USHORT NextOffset;
330 RTL_PROCESS_MODULE_INFORMATION32 BaseInfo;
331 ULONG ImageCheckSum;
332 ULONG TimeDateStamp;
333 ULONG DefaultBase;
334 } RTL_PROCESS_MODULE_INFORMATION_EX32;
336 typedef struct
338 ULONG BaseAddress;
339 ULONG Attributes;
340 LARGE_INTEGER Size;
341 } SECTION_BASIC_INFORMATION32;
343 typedef struct
345 ULONG TransferAddress;
346 ULONG ZeroBits;
347 ULONG MaximumStackSize;
348 ULONG CommittedStackSize;
349 ULONG SubSystemType;
350 USHORT MinorSubsystemVersion;
351 USHORT MajorSubsystemVersion;
352 USHORT MajorOperatingSystemVersion;
353 USHORT MinorOperatingSystemVersion;
354 USHORT ImageCharacteristics;
355 USHORT DllCharacteristics;
356 USHORT Machine;
357 BOOLEAN ImageContainsCode;
358 UCHAR ImageFlags;
359 ULONG LoaderFlags;
360 ULONG ImageFileSize;
361 ULONG CheckSum;
362 } SECTION_IMAGE_INFORMATION32;
364 typedef struct
366 ULONG Sid;
367 DWORD Attributes;
368 } SID_AND_ATTRIBUTES32;
370 typedef struct
372 ULONG DefaultDacl;
373 } TOKEN_DEFAULT_DACL32;
375 typedef struct
377 DWORD GroupCount;
378 SID_AND_ATTRIBUTES32 Groups[1];
379 } TOKEN_GROUPS32;
381 typedef struct
383 ULONG Owner;
384 } TOKEN_OWNER32;
386 typedef struct
388 ULONG PrimaryGroup;
389 } TOKEN_PRIMARY_GROUP32;
391 typedef struct
393 SID_AND_ATTRIBUTES32 User;
394 } TOKEN_USER32;
396 typedef struct
398 NTSTATUS ExitStatus;
399 ULONG TebBaseAddress;
400 CLIENT_ID32 ClientId;
401 ULONG AffinityMask;
402 LONG Priority;
403 LONG BasePriority;
404 } THREAD_BASIC_INFORMATION32;
406 typedef struct
408 UNICODE_STRING32 ThreadName;
409 } THREAD_NAME_INFORMATION32;
411 typedef struct
413 ULONG PeakVirtualSize;
414 ULONG VirtualSize;
415 ULONG PageFaultCount;
416 ULONG PeakWorkingSetSize;
417 ULONG WorkingSetSize;
418 ULONG QuotaPeakPagedPoolUsage;
419 ULONG QuotaPagedPoolUsage;
420 ULONG QuotaPeakNonPagedPoolUsage;
421 ULONG QuotaNonPagedPoolUsage;
422 ULONG PagefileUsage;
423 ULONG PeakPagefileUsage;
424 } VM_COUNTERS32;
426 typedef struct
428 ULONG PeakVirtualSize;
429 ULONG VirtualSize;
430 ULONG PageFaultCount;
431 ULONG PeakWorkingSetSize;
432 ULONG WorkingSetSize;
433 ULONG QuotaPeakPagedPoolUsage;
434 ULONG QuotaPagedPoolUsage;
435 ULONG QuotaPeakNonPagedPoolUsage;
436 ULONG QuotaNonPagedPoolUsage;
437 ULONG PagefileUsage;
438 ULONG PeakPagefileUsage;
439 ULONG PrivateUsage;
440 } VM_COUNTERS_EX32;
442 typedef struct
444 DBG_STATE NewState;
445 CLIENT_ID32 AppClientId;
446 union
448 struct
450 EXCEPTION_RECORD32 ExceptionRecord;
451 ULONG FirstChance;
452 } Exception;
453 struct
455 ULONG HandleToThread;
456 struct
458 ULONG SubSystemKey;
459 ULONG StartAddress;
460 } NewThread;
461 } CreateThread;
462 struct
464 ULONG HandleToProcess;
465 ULONG HandleToThread;
466 struct
468 ULONG SubSystemKey;
469 ULONG FileHandle;
470 ULONG BaseOfImage;
471 ULONG DebugInfoFileOffset;
472 ULONG DebugInfoSize;
473 struct
475 ULONG SubSystemKey;
476 ULONG StartAddress;
477 } InitialThread;
478 } NewProcess;
479 } CreateProcessInfo;
480 struct
482 NTSTATUS ExitStatus;
483 } ExitProcess, ExitThread;
484 struct
486 ULONG FileHandle;
487 ULONG BaseOfDll;
488 ULONG DebugInfoFileOffset;
489 ULONG DebugInfoSize;
490 ULONG NamePointer;
491 } LoadDll;
492 struct
494 ULONG BaseAddress;
495 } UnloadDll;
496 } StateInfo;
497 } DBGUI_WAIT_STATE_CHANGE32;
499 typedef struct
501 ULONG unknown;
502 ULONG KeMaximumIncrement;
503 ULONG PageSize;
504 ULONG MmNumberOfPhysicalPages;
505 ULONG MmLowestPhysicalPage;
506 ULONG MmHighestPhysicalPage;
507 ULONG AllocationGranularity;
508 ULONG LowestUserAddress;
509 ULONG HighestUserAddress;
510 ULONG ActiveProcessorsAffinityMask;
511 BYTE NumberOfProcessors;
512 } SYSTEM_BASIC_INFORMATION32;
514 typedef struct
516 ULONG CurrentSize;
517 ULONG PeakSize;
518 ULONG PageFaultCount;
519 ULONG MinimumWorkingSet;
520 ULONG MaximumWorkingSet;
521 ULONG CurrentSizeIncludingTransitionInPages;
522 ULONG PeakSizeIncludingTransitionInPages;
523 ULONG TransitionRePurposeCount;
524 ULONG Flags;
525 } SYSTEM_CACHE_INFORMATION32;
527 typedef struct
529 ULONG OwnerPid;
530 BYTE ObjectType;
531 BYTE HandleFlags;
532 USHORT HandleValue;
533 ULONG ObjectPointer;
534 ULONG AccessMask;
535 } SYSTEM_HANDLE_ENTRY32;
537 typedef struct
539 ULONG Count;
540 SYSTEM_HANDLE_ENTRY32 Handle[1];
541 } SYSTEM_HANDLE_INFORMATION32;
543 typedef struct
545 ULONG RegistryQuotaAllowed;
546 ULONG RegistryQuotaUsed;
547 ULONG Reserved1;
548 } SYSTEM_REGISTRY_QUOTA_INFORMATION32;
550 typedef struct
552 ULONG Object;
553 ULONG UniqueProcessId;
554 ULONG HandleValue;
555 ULONG GrantedAccess;
556 USHORT CreatorBackTraceIndex;
557 USHORT ObjectTypeIndex;
558 ULONG HandleAttributes;
559 ULONG Reserved;
560 } SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX32;
562 typedef struct
564 ULONG NumberOfHandles;
565 ULONG Reserved;
566 SYSTEM_HANDLE_TABLE_ENTRY_INFO_EX32 Handles[1];
567 } SYSTEM_HANDLE_INFORMATION_EX32;
569 typedef struct
571 ULONG ProcessorMask;
572 LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
573 union
575 struct
577 BYTE Flags;
578 } ProcessorCore;
579 struct
581 DWORD NodeNumber;
582 } NumaNode;
583 CACHE_DESCRIPTOR Cache;
584 ULONGLONG Reserved[2];
586 } SYSTEM_LOGICAL_PROCESSOR_INFORMATION32;
588 typedef struct
590 BYTE Flags;
591 BYTE EfficiencyClass;
592 BYTE Reserved[20];
593 WORD GroupCount;
594 GROUP_AFFINITY32 GroupMask[ANYSIZE_ARRAY];
595 } PROCESSOR_RELATIONSHIP32;
597 typedef struct
599 DWORD NodeNumber;
600 BYTE Reserved[20];
601 GROUP_AFFINITY32 GroupMask;
602 } NUMA_NODE_RELATIONSHIP32;
604 typedef struct
606 BYTE Level;
607 BYTE Associativity;
608 WORD LineSize;
609 DWORD CacheSize;
610 PROCESSOR_CACHE_TYPE Type;
611 BYTE Reserved[20];
612 GROUP_AFFINITY32 GroupMask;
613 } CACHE_RELATIONSHIP32;
615 typedef struct
617 BYTE MaximumProcessorCount;
618 BYTE ActiveProcessorCount;
619 BYTE Reserved[38];
620 ULONG ActiveProcessorMask;
621 } PROCESSOR_GROUP_INFO32;
623 typedef struct
625 WORD MaximumGroupCount;
626 WORD ActiveGroupCount;
627 BYTE Reserved[20];
628 PROCESSOR_GROUP_INFO32 GroupInfo[ANYSIZE_ARRAY];
629 } GROUP_RELATIONSHIP32;
631 typedef struct
633 LOGICAL_PROCESSOR_RELATIONSHIP Relationship;
634 DWORD Size;
635 union
637 PROCESSOR_RELATIONSHIP32 Processor;
638 NUMA_NODE_RELATIONSHIP32 NumaNode;
639 CACHE_RELATIONSHIP32 Cache;
640 GROUP_RELATIONSHIP32 Group;
642 } SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX32;
644 typedef struct
646 LARGE_INTEGER KernelTime;
647 LARGE_INTEGER UserTime;
648 LARGE_INTEGER CreateTime;
649 DWORD dwTickCount;
650 ULONG StartAddress;
651 CLIENT_ID32 ClientId;
652 DWORD dwCurrentPriority;
653 DWORD dwBasePriority;
654 DWORD dwContextSwitches;
655 DWORD dwThreadState;
656 DWORD dwWaitReason;
657 DWORD dwUnknown;
658 } SYSTEM_THREAD_INFORMATION32;
660 typedef struct
662 ULONG NextEntryOffset;
663 DWORD dwThreadCount;
664 LARGE_INTEGER WorkingSetPrivateSize;
665 ULONG HardFaultCount;
666 ULONG NumberOfThreadsHighWatermark;
667 ULONGLONG CycleTime;
668 LARGE_INTEGER CreationTime;
669 LARGE_INTEGER UserTime;
670 LARGE_INTEGER KernelTime;
671 UNICODE_STRING32 ProcessName;
672 DWORD dwBasePriority;
673 ULONG UniqueProcessId;
674 ULONG ParentProcessId;
675 ULONG HandleCount;
676 ULONG SessionId;
677 ULONG UniqueProcessKey;
678 VM_COUNTERS_EX32 vmCounters;
679 IO_COUNTERS ioCounters;
680 SYSTEM_THREAD_INFORMATION32 ti[1];
681 } SYSTEM_PROCESS_INFORMATION32;
683 typedef struct
685 SYSTEM_THREAD_INFORMATION32 ThreadInfo;
686 ULONG StackBase;
687 ULONG StackLimit;
688 ULONG Win32StartAddress;
689 ULONG TebBase;
690 ULONG Reserved2;
691 ULONG Reserved3;
692 ULONG Reserved4;
693 } SYSTEM_EXTENDED_THREAD_INFORMATION32;
695 typedef struct
697 ULONG VirtualAddress;
698 ULONG NumberOfBytes;
699 } MEMORY_RANGE_ENTRY32;
701 typedef struct
703 ULONG LowestStartingAddress;
704 ULONG HighestEndingAddress;
705 ULONG Alignment;
706 } MEM_ADDRESS_REQUIREMENTS32;
708 typedef struct DECLSPEC_ALIGN(8)
710 struct
712 DWORD64 Type : MEM_EXTENDED_PARAMETER_TYPE_BITS;
713 DWORD64 Reserved : 64 - MEM_EXTENDED_PARAMETER_TYPE_BITS;
715 union
717 DWORD64 ULong64;
718 ULONG Pointer;
719 ULONG Size;
720 ULONG Handle;
721 ULONG ULong;
723 } MEM_EXTENDED_PARAMETER32;
725 typedef struct
727 ULONG Token;
728 ULONG Thread;
729 } PROCESS_ACCESS_TOKEN32;
731 #endif /* __WOW64_STRUCT32_H */