include: Add MFTOPOLOGY_DXVA_MODE enum definition.
[wine.git] / include / minidumpapiset.h
blob2d13c6f6a67e282817008a5c84460a83b65051b4
1 /*
2 * Copyright 2022 Nikolay Sivov for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef __WINE_MINIDUMP_H
20 #define __WINE_MINIDUMP_H
22 #include <pshpack4.h>
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
28 #define MINIDUMP_SIGNATURE 0x504D444D /* 'MDMP' */
29 #define MINIDUMP_VERSION (42899)
31 typedef DWORD RVA;
32 typedef ULONG64 RVA64;
33 #define RVA_TO_ADDR(map,rva) ((void *)((ULONG_PTR)(map) + (rva)))
35 typedef enum _MINIDUMP_TYPE
37 MiniDumpNormal = 0x00000000,
38 MiniDumpWithDataSegs = 0x00000001,
39 MiniDumpWithFullMemory = 0x00000002,
40 MiniDumpWithHandleData = 0x00000004,
41 MiniDumpFilterMemory = 0x00000008,
42 MiniDumpScanMemory = 0x00000010,
43 MiniDumpWithUnloadedModules = 0x00000020,
44 MiniDumpWithIndirectlyReferencedMemory = 0x00000040,
45 MiniDumpFilterModulePaths = 0x00000080,
46 MiniDumpWithProcessThreadData = 0x00000100,
47 MiniDumpWithPrivateReadWriteMemory = 0x00000200,
48 MiniDumpWithoutOptionalData = 0x00000400,
49 MiniDumpWithFullMemoryInfo = 0x00000800,
50 MiniDumpWithThreadInfo = 0x00001000,
51 MiniDumpWithCodeSegs = 0x00002000,
53 MiniDumpWithoutAuxiliaryState = 0x00004000,
54 MiniDumpWithFullAuxiliaryState = 0x00008000,
55 MiniDumpWithPrivateWriteCopyMemory = 0x00010000,
56 MiniDumpIgnoreInaccessibleMemory = 0x00020000,
57 MiniDumpWithTokenInformation = 0x00040000,
58 MiniDumpWithModuleHeaders = 0x00080000,
59 MiniDumpFilterTriage = 0x00100000,
60 MiniDumpWithAvxXStateContext = 0x00200000,
61 MiniDumpWithIptTrace = 0x00400000,
62 MiniDumpValidTypeFlags = 0x007fffff,
63 } MINIDUMP_TYPE;
65 typedef enum _MINIDUMP_SECONDARY_FLAGS
67 MiniSecondaryWithoutPowerInfo = 0x00000001,
68 MiniSecondaryValidFlags = 0x00000001,
69 } MINIDUMP_SECONDARY_FLAGS;
71 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR
73 ULONG32 DataSize;
74 RVA Rva;
75 } MINIDUMP_LOCATION_DESCRIPTOR;
77 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64
79 ULONG64 DataSize;
80 RVA64 Rva;
81 } MINIDUMP_LOCATION_DESCRIPTOR64;
83 typedef struct _MINIDUMP_DIRECTORY
85 ULONG32 StreamType;
86 MINIDUMP_LOCATION_DESCRIPTOR Location;
87 } MINIDUMP_DIRECTORY, *PMINIDUMP_DIRECTORY;
89 typedef struct _MINIDUMP_EXCEPTION
91 ULONG32 ExceptionCode;
92 ULONG32 ExceptionFlags;
93 ULONG64 ExceptionRecord;
94 ULONG64 ExceptionAddress;
95 ULONG32 NumberParameters;
96 ULONG32 __unusedAlignment;
97 ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
98 } MINIDUMP_EXCEPTION, *PMINIDUMP_EXCEPTION;
100 typedef struct _MINIDUMP_EXCEPTION_INFORMATION
102 DWORD ThreadId;
103 PEXCEPTION_POINTERS ExceptionPointers;
104 BOOL ClientPointers;
105 } MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
107 typedef struct _MINIDUMP_EXCEPTION_INFORMATION64
109 DWORD ThreadId;
110 ULONG64 ExceptionRecord;
111 ULONG64 ContextRecord;
112 BOOL ClientPointers;
113 } MINIDUMP_EXCEPTION_INFORMATION64, *PMINIDUMP_EXCEPTION_INFORMATION64;
115 typedef struct MINIDUMP_EXCEPTION_STREAM
117 ULONG32 ThreadId;
118 ULONG32 __alignment;
119 MINIDUMP_EXCEPTION ExceptionRecord;
120 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
121 } MINIDUMP_EXCEPTION_STREAM, *PMINIDUMP_EXCEPTION_STREAM;
123 typedef struct _MINIDUMP_HEADER
125 ULONG32 Signature;
126 ULONG32 Version;
127 ULONG32 NumberOfStreams;
128 RVA StreamDirectoryRva;
129 ULONG32 CheckSum;
130 union
132 ULONG32 Reserved;
133 ULONG32 TimeDateStamp;
134 } DUMMYUNIONNAME;
135 ULONG64 Flags;
136 } MINIDUMP_HEADER, *PMINIDUMP_HEADER;
138 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR
140 ULONG64 StartOfMemoryRange;
141 MINIDUMP_LOCATION_DESCRIPTOR Memory;
142 } MINIDUMP_MEMORY_DESCRIPTOR, *PMINIDUMP_MEMORY_DESCRIPTOR;
144 typedef struct _MINIDUMP_MEMORY_LIST
146 ULONG32 NumberOfMemoryRanges;
147 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges[1]; /* FIXME: 0-sized array not supported */
148 } MINIDUMP_MEMORY_LIST, *PMINIDUMP_MEMORY_LIST;
150 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR64
152 ULONG64 StartOfMemoryRange;
153 ULONG64 DataSize;
154 } MINIDUMP_MEMORY_DESCRIPTOR64, *PMINIDUMP_MEMORY_DESCRIPTOR64;
156 typedef struct _MINIDUMP_MEMORY64_LIST
158 ULONG64 NumberOfMemoryRanges;
159 RVA64 BaseRva;
160 MINIDUMP_MEMORY_DESCRIPTOR64 MemoryRanges[1]; /* FIXME: 0-sized array not supported */
161 } MINIDUMP_MEMORY64_LIST, *PMINIDUMP_MEMORY64_LIST;
163 typedef struct _XSTATE_CONFIG_FEATURE_MSC_INFO
165 ULONG32 SizeOfInfo;
166 ULONG32 ContextSize;
167 ULONG64 EnabledFeatures;
168 XSTATE_FEATURE Features[MAXIMUM_XSTATE_FEATURES];
169 } XSTATE_CONFIG_FEATURE_MSC_INFO, *PXSTATE_CONFIG_FEATURE_MSC_INFO;
171 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001
172 #define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
173 #define MINIDUMP_MISC1_PROCESSOR_POWER_INFO 0x00000004
174 #define MINIDUMP_MISC3_PROCESS_INTEGRITY 0x00000010
175 #define MINIDUMP_MISC3_PROCESS_EXECUTE_FLAGS 0x00000020
176 #define MINIDUMP_MISC3_TIMEZONE 0x00000040
177 #define MINIDUMP_MISC3_PROTECTED_PROCESS 0x00000080
178 #define MINIDUMP_MISC4_BUILDSTRING 0x00000100
179 #define MINIDUMP_MISC5_PROCESS_COOKIE 0x00000200
181 typedef struct _MINIDUMP_MISC_INFO
183 ULONG32 SizeOfInfo;
184 ULONG32 Flags1;
185 ULONG32 ProcessId;
186 ULONG32 ProcessCreateTime;
187 ULONG32 ProcessUserTime;
188 ULONG32 ProcessKernelTime;
189 } MINIDUMP_MISC_INFO, *PMINIDUMP_MISC_INFO;
191 typedef struct _MINIDUMP_MISC_INFO_2
193 ULONG32 SizeOfInfo;
194 ULONG32 Flags1;
195 ULONG32 ProcessId;
196 ULONG32 ProcessCreateTime;
197 ULONG32 ProcessUserTime;
198 ULONG32 ProcessKernelTime;
199 ULONG32 ProcessorMaxMhz;
200 ULONG32 ProcessorCurrentMhz;
201 ULONG32 ProcessorMhzLimit;
202 ULONG32 ProcessorMaxIdleState;
203 ULONG32 ProcessorCurrentIdleState;
204 } MINIDUMP_MISC_INFO_2, *PMINIDUMP_MISC_INFO_2;
206 typedef struct _MINIDUMP_MISC_INFO_3
208 ULONG32 SizeOfInfo;
209 ULONG32 Flags1;
210 ULONG32 ProcessId;
211 ULONG32 ProcessCreateTime;
212 ULONG32 ProcessUserTime;
213 ULONG32 ProcessKernelTime;
214 ULONG32 ProcessorMaxMhz;
215 ULONG32 ProcessorCurrentMhz;
216 ULONG32 ProcessorMhzLimit;
217 ULONG32 ProcessorMaxIdleState;
218 ULONG32 ProcessorCurrentIdleState;
219 ULONG32 ProcessIntegrityLevel;
220 ULONG32 ProcessExecuteFlags;
221 ULONG32 ProtectedProcess;
222 ULONG32 TimeZoneId;
223 TIME_ZONE_INFORMATION TimeZone;
224 } MINIDUMP_MISC_INFO_3, *PMINIDUMP_MISC_INFO_3;
226 typedef struct _MINIDUMP_MISC_INFO_4
228 ULONG32 SizeOfInfo;
229 ULONG32 Flags1;
230 ULONG32 ProcessId;
231 ULONG32 ProcessCreateTime;
232 ULONG32 ProcessUserTime;
233 ULONG32 ProcessKernelTime;
234 ULONG32 ProcessorMaxMhz;
235 ULONG32 ProcessorCurrentMhz;
236 ULONG32 ProcessorMhzLimit;
237 ULONG32 ProcessorMaxIdleState;
238 ULONG32 ProcessorCurrentIdleState;
239 ULONG32 ProcessIntegrityLevel;
240 ULONG32 ProcessExecuteFlags;
241 ULONG32 ProtectedProcess;
242 ULONG32 TimeZoneId;
243 TIME_ZONE_INFORMATION TimeZone;
244 WCHAR BuildString[MAX_PATH];
245 WCHAR DbgBldStr[40];
246 } MINIDUMP_MISC_INFO_4, *PMINIDUMP_MISC_INFO_4;
248 typedef struct _MINIDUMP_MISC_INFO_5
250 ULONG32 SizeOfInfo;
251 ULONG32 Flags1;
252 ULONG32 ProcessId;
253 ULONG32 ProcessCreateTime;
254 ULONG32 ProcessUserTime;
255 ULONG32 ProcessKernelTime;
256 ULONG32 ProcessorMaxMhz;
257 ULONG32 ProcessorCurrentMhz;
258 ULONG32 ProcessorMhzLimit;
259 ULONG32 ProcessorMaxIdleState;
260 ULONG32 ProcessorCurrentIdleState;
261 ULONG32 ProcessIntegrityLevel;
262 ULONG32 ProcessExecuteFlags;
263 ULONG32 ProtectedProcess;
264 ULONG32 TimeZoneId;
265 TIME_ZONE_INFORMATION TimeZone;
266 WCHAR BuildString[MAX_PATH];
267 WCHAR DbgBldStr[40];
268 XSTATE_CONFIG_FEATURE_MSC_INFO XStateData;
269 ULONG32 ProcessCookie;
270 } MINIDUMP_MISC_INFO_5, *PMINIDUMP_MISC_INFO_5;
272 typedef struct _MINIDUMP_MODULE
274 ULONG64 BaseOfImage;
275 ULONG32 SizeOfImage;
276 ULONG32 CheckSum;
277 ULONG32 TimeDateStamp;
278 RVA ModuleNameRva;
279 VS_FIXEDFILEINFO VersionInfo;
280 MINIDUMP_LOCATION_DESCRIPTOR CvRecord;
281 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord;
282 ULONG64 Reserved0;
283 ULONG64 Reserved1;
284 } MINIDUMP_MODULE, *PMINIDUMP_MODULE;
286 typedef struct _MINIDUMP_MODULE_LIST
288 ULONG32 NumberOfModules;
289 MINIDUMP_MODULE Modules[1]; /* FIXME: 0-sized array not supported */
290 } MINIDUMP_MODULE_LIST, *PMINIDUMP_MODULE_LIST;
292 typedef struct _MINIDUMP_STRING
294 ULONG32 Length;
295 WCHAR Buffer[1]; /* FIXME: O-sized array not supported */
296 } MINIDUMP_STRING, *PMINIDUMP_STRING;
298 typedef union _CPU_INFORMATION
300 struct
302 ULONG32 VendorId[3];
303 ULONG32 VersionInformation;
304 ULONG32 FeatureInformation;
305 ULONG32 AMDExtendedCpuFeatures;
306 } X86CpuInfo;
307 struct
309 ULONG64 ProcessorFeatures[2];
310 } OtherCpuInfo;
311 } CPU_INFORMATION, *PCPU_INFORMATION;
313 typedef struct _MINIDUMP_SYSTEM_INFO
315 USHORT ProcessorArchitecture;
316 USHORT ProcessorLevel;
317 USHORT ProcessorRevision;
318 union
320 USHORT Reserved0;
321 struct
323 UCHAR NumberOfProcessors;
324 UCHAR ProductType;
325 } DUMMYSTRUCTNAME;
326 } DUMMYUNIONNAME;
328 ULONG32 MajorVersion;
329 ULONG32 MinorVersion;
330 ULONG32 BuildNumber;
331 ULONG32 PlatformId;
333 RVA CSDVersionRva;
334 union
336 ULONG32 Reserved1;
337 struct
339 USHORT SuiteMask;
340 USHORT Reserved2;
341 } DUMMYSTRUCTNAME;
342 } DUMMYUNIONNAME1;
343 CPU_INFORMATION Cpu;
344 } MINIDUMP_SYSTEM_INFO, *PMINIDUMP_SYSTEM_INFO;
346 typedef struct _MINIDUMP_THREAD
348 ULONG32 ThreadId;
349 ULONG32 SuspendCount;
350 ULONG32 PriorityClass;
351 ULONG32 Priority;
352 ULONG64 Teb;
353 MINIDUMP_MEMORY_DESCRIPTOR Stack;
354 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
355 } MINIDUMP_THREAD, *PMINIDUMP_THREAD;
357 typedef struct _MINIDUMP_THREAD_LIST
359 ULONG32 NumberOfThreads;
360 MINIDUMP_THREAD Threads[1]; /* FIXME: no support of 0 sized array */
361 } MINIDUMP_THREAD_LIST, *PMINIDUMP_THREAD_LIST;
363 typedef struct _MINIDUMP_USER_STREAM
365 ULONG32 Type;
366 ULONG BufferSize;
367 void *Buffer;
368 } MINIDUMP_USER_STREAM, *PMINIDUMP_USER_STREAM;
370 typedef struct _MINIDUMP_USER_STREAM_INFORMATION
372 ULONG32 UserStreamCount;
373 PMINIDUMP_USER_STREAM UserStreamArray;
374 } MINIDUMP_USER_STREAM_INFORMATION, *PMINIDUMP_USER_STREAM_INFORMATION;
376 typedef struct _MINIDUMP_HANDLE_DATA_STREAM
378 ULONG32 SizeOfHeader;
379 ULONG32 SizeOfDescriptor;
380 ULONG32 NumberOfDescriptors;
381 ULONG32 Reserved;
382 } MINIDUMP_HANDLE_DATA_STREAM, *PMINIDUMP_HANDLE_DATA_STREAM;
384 typedef struct _MINIDUMP_HANDLE_DESCRIPTOR
386 ULONG64 Handle;
387 RVA TypeNameRva;
388 RVA ObjectNameRva;
389 ULONG32 Attributes;
390 ULONG32 GrantedAccess;
391 ULONG32 HandleCount;
392 ULONG32 PointerCount;
393 } MINIDUMP_HANDLE_DESCRIPTOR, *PMINIDUMP_HANDLE_DESCRIPTOR;
395 typedef struct _MINIDUMP_HANDLE_DESCRIPTOR_2
397 ULONG64 Handle;
398 RVA TypeNameRva;
399 RVA ObjectNameRva;
400 ULONG32 Attributes;
401 ULONG32 GrantedAccess;
402 ULONG32 HandleCount;
403 ULONG32 PointerCount;
404 RVA ObjectInfoRva;
405 ULONG32 Reserved0;
406 } MINIDUMP_HANDLE_DESCRIPTOR_2, *PMINIDUMP_HANDLE_DESCRIPTOR_2;
408 typedef struct _MINIDUMP_THREAD_INFO
410 ULONG32 ThreadId;
411 ULONG32 DumpFlags;
412 ULONG32 DumpError;
413 ULONG32 ExitStatus;
414 ULONG64 CreateTime;
415 ULONG64 ExitTime;
416 ULONG64 KernelTime;
417 ULONG64 UserTime;
418 ULONG64 StartAddress;
419 ULONG64 Affinity;
420 } MINIDUMP_THREAD_INFO, *PMINIDUMP_THREAD_INFO;
422 typedef struct _MINIDUMP_THREAD_INFO_LIST
424 ULONG SizeOfHeader;
425 ULONG SizeOfEntry;
426 ULONG NumberOfEntries;
427 } MINIDUMP_THREAD_INFO_LIST, *PMINIDUMP_THREAD_INFO_LIST;
429 typedef struct _MINIDUMP_UNLOADED_MODULE
431 ULONG64 BaseOfImage;
432 ULONG32 SizeOfImage;
433 ULONG32 CheckSum;
434 ULONG32 TimeDateStamp;
435 RVA ModuleNameRva;
436 } MINIDUMP_UNLOADED_MODULE, *PMINIDUMP_UNLOADED_MODULE;
438 typedef struct _MINIDUMP_UNLOADED_MODULE_LIST
440 ULONG32 SizeOfHeader;
441 ULONG32 SizeOfEntry;
442 ULONG32 NumberOfEntries;
443 } MINIDUMP_UNLOADED_MODULE_LIST, *PMINIDUMP_UNLOADED_MODULE_LIST;
445 typedef struct _MINIDUMP_FUNCTION_TABLE_DESCRIPTOR
447 ULONG64 MinimumAddress;
448 ULONG64 MaximumAddress;
449 ULONG64 BaseAddress;
450 ULONG32 EntryCount;
451 ULONG32 SizeOfAlignPad;
452 } MINIDUMP_FUNCTION_TABLE_DESCRIPTOR, *PMINIDUMP_FUNCTION_TABLE_DESCRIPTOR;
454 typedef struct _MINIDUMP_FUNCTION_TABLE_STREAM
456 ULONG32 SizeOfHeader;
457 ULONG32 SizeOfDescriptor;
458 ULONG32 SizeOfNativeDescriptor;
459 ULONG32 SizeOfFunctionEntry;
460 ULONG32 NumberOfDescriptors;
461 ULONG32 SizeOfAlignPad;
462 } MINIDUMP_FUNCTION_TABLE_STREAM, *PMINIDUMP_FUNCTION_TABLE_STREAM;
464 typedef struct _MINIDUMP_MEMORY_INFO
466 ULONG64 BaseAddress;
467 ULONG64 AllocationBase;
468 ULONG32 AllocationProtect;
469 ULONG32 __alignment1;
470 ULONG64 RegionSize;
471 ULONG32 State;
472 ULONG32 Protect;
473 ULONG32 Type;
474 ULONG32 __alignment2;
475 } MINIDUMP_MEMORY_INFO, *PMINIDUMP_MEMORY_INFO;
477 typedef struct _MINIDUMP_MEMORY_INFO_LIST
479 ULONG SizeOfHeader;
480 ULONG SizeOfEntry;
481 ULONG64 NumberOfEntries;
482 } MINIDUMP_MEMORY_INFO_LIST, *PMINIDUMP_MEMORY_INFO_LIST;
484 typedef struct _MINIDUMP_THREAD_NAME
486 ULONG ThreadId;
487 RVA64 RvaOfThreadName;
488 } MINIDUMP_THREAD_NAME, *PMINIDUMP_THREAD_NAME;
490 typedef struct _MINIDUMP_THREAD_NAME_LIST
492 ULONG NumberOfThreadNames;
493 MINIDUMP_THREAD_NAME ThreadNames[1]; /* FIXME: 0-sized array not supported */
494 } MINIDUMP_THREAD_NAME_LIST, *PMINIDUMP_THREAD_NAME_LIST;
496 typedef struct _MINIDUMP_TOKEN_INFO_HEADER
498 ULONG32 TokenSize;
499 ULONG32 TokenId;
500 ULONG64 TokenHandle;
501 } MINIDUMP_TOKEN_INFO_HEADER, *PMINIDUMP_TOKEN_INFO_HEADER;
503 typedef struct _MINIDUMP_TOKEN_INFO_LIST
505 ULONG32 TokenListSize;
506 ULONG32 TokenListEntries;
507 ULONG32 ListHeaderSize;
508 ULONG32 ElementHeaderSize;
509 } MINIDUMP_TOKEN_INFO_LIST, *PMINIDUMP_TOKEN_INFO_LIST;
511 typedef struct _MINIDUMP_PROCESS_VM_COUNTERS_1
513 USHORT Revision;
514 ULONG PageFaultCount;
515 ULONG64 PeakWorkingSetSize;
516 ULONG64 WorkingSetSize;
517 ULONG64 QuotaPeakPagedPoolUsage;
518 ULONG64 QuotaPagedPoolUsage;
519 ULONG64 QuotaPeakNonPagedPoolUsage;
520 ULONG64 QuotaNonPagedPoolUsage;
521 ULONG64 PagefileUsage;
522 ULONG64 PeakPagefileUsage;
523 ULONG64 PrivateUsage;
524 } MINIDUMP_PROCESS_VM_COUNTERS_1, *PMINIDUMP_PROCESS_VM_COUNTERS_1;
526 #define MINIDUMP_PROCESS_VM_COUNTERS 0x0001
527 #define MINIDUMP_PROCESS_VM_COUNTERS_VIRTUALSIZE 0x0002
528 #define MINIDUMP_PROCESS_VM_COUNTERS_EX 0x0004
529 #define MINIDUMP_PROCESS_VM_COUNTERS_EX2 0x0008
530 #define MINIDUMP_PROCESS_VM_COUNTERS_JOB 0x0010
532 typedef struct _MINIDUMP_PROCESS_VM_COUNTERS_2
534 USHORT Revision;
535 USHORT Flags;
536 ULONG PageFaultCount;
537 ULONG64 PeakWorkingSetSize;
538 ULONG64 WorkingSetSize;
539 ULONG64 QuotaPeakPagedPoolUsage;
540 ULONG64 QuotaPagedPoolUsage;
541 ULONG64 QuotaPeakNonPagedPoolUsage;
542 ULONG64 QuotaNonPagedPoolUsage;
543 ULONG64 PagefileUsage;
544 ULONG64 PeakPagefileUsage;
545 ULONG64 PeakVirtualSize;
546 ULONG64 VirtualSize;
547 ULONG64 PrivateUsage;
548 ULONG64 PrivateWorkingSetSize;
549 ULONG64 SharedCommitUsage;
551 ULONG64 JobSharedCommitUsage;
552 ULONG64 JobPrivateCommitUsage;
553 ULONG64 JobPeakPrivateCommitUsage;
554 ULONG64 JobPrivateCommitLimit;
555 ULONG64 JobTotalCommitLimit;
556 } MINIDUMP_PROCESS_VM_COUNTERS_2, *PMINIDUMP_PROCESS_VM_COUNTERS_2;
558 typedef struct _MINIDUMP_SYSTEM_BASIC_INFORMATION
560 ULONG TimerResolution;
561 ULONG PageSize;
562 ULONG NumberOfPhysicalPages;
563 ULONG LowestPhysicalPageNumber;
564 ULONG HighestPhysicalPageNumber;
565 ULONG AllocationGranularity;
566 ULONG64 MinimumUserModeAddress;
567 ULONG64 MaximumUserModeAddress;
568 ULONG64 ActiveProcessorsAffinityMask;
569 ULONG NumberOfProcessors;
570 } MINIDUMP_SYSTEM_BASIC_INFORMATION, *PMINIDUMP_SYSTEM_BASIC_INFORMATION;
572 typedef struct _MINIDUMP_SYSTEM_FILECACHE_INFORMATION
574 ULONG64 CurrentSize;
575 ULONG64 PeakSize;
576 ULONG PageFaultCount;
577 ULONG64 MinimumWorkingSet;
578 ULONG64 MaximumWorkingSet;
579 ULONG64 CurrentSizeIncludingTransitionInPages;
580 ULONG64 PeakSizeIncludingTransitionInPages;
581 ULONG TransitionRePurposeCount;
582 ULONG Flags;
583 } MINIDUMP_SYSTEM_FILECACHE_INFORMATION, *PMINIDUMP_SYSTEM_FILECACHE_INFORMATION;
585 typedef struct _MINIDUMP_SYSTEM_BASIC_PERFORMANCE_INFORMATION
587 ULONG64 AvailablePages;
588 ULONG64 CommittedPages;
589 ULONG64 CommitLimit;
590 ULONG64 PeakCommitment;
591 } MINIDUMP_SYSTEM_BASIC_PERFORMANCE_INFORMATION, *PMINIDUMP_SYSTEM_BASIC_PERFORMANCE_INFORMATION;
593 typedef struct _MINIDUMP_SYSTEM_PERFORMANCE_INFORMATION {
594 ULONG64 IdleProcessTime;
595 ULONG64 IoReadTransferCount;
596 ULONG64 IoWriteTransferCount;
597 ULONG64 IoOtherTransferCount;
598 ULONG IoReadOperationCount;
599 ULONG IoWriteOperationCount;
600 ULONG IoOtherOperationCount;
601 ULONG AvailablePages;
602 ULONG CommittedPages;
603 ULONG CommitLimit;
604 ULONG PeakCommitment;
605 ULONG PageFaultCount;
606 ULONG CopyOnWriteCount;
607 ULONG TransitionCount;
608 ULONG CacheTransitionCount;
609 ULONG DemandZeroCount;
610 ULONG PageReadCount;
611 ULONG PageReadIoCount;
612 ULONG CacheReadCount;
613 ULONG CacheIoCount;
614 ULONG DirtyPagesWriteCount;
615 ULONG DirtyWriteIoCount;
616 ULONG MappedPagesWriteCount;
617 ULONG MappedWriteIoCount;
618 ULONG PagedPoolPages;
619 ULONG NonPagedPoolPages;
620 ULONG PagedPoolAllocs;
621 ULONG PagedPoolFrees;
622 ULONG NonPagedPoolAllocs;
623 ULONG NonPagedPoolFrees;
624 ULONG FreeSystemPtes;
625 ULONG ResidentSystemCodePage;
626 ULONG TotalSystemDriverPages;
627 ULONG TotalSystemCodePages;
628 ULONG NonPagedPoolLookasideHits;
629 ULONG PagedPoolLookasideHits;
630 ULONG AvailablePagedPoolPages;
631 ULONG ResidentSystemCachePage;
632 ULONG ResidentPagedPoolPage;
633 ULONG ResidentSystemDriverPage;
634 ULONG CcFastReadNoWait;
635 ULONG CcFastReadWait;
636 ULONG CcFastReadResourceMiss;
637 ULONG CcFastReadNotPossible;
638 ULONG CcFastMdlReadNoWait;
639 ULONG CcFastMdlReadWait;
640 ULONG CcFastMdlReadResourceMiss;
641 ULONG CcFastMdlReadNotPossible;
642 ULONG CcMapDataNoWait;
643 ULONG CcMapDataWait;
644 ULONG CcMapDataNoWaitMiss;
645 ULONG CcMapDataWaitMiss;
646 ULONG CcPinMappedDataCount;
647 ULONG CcPinReadNoWait;
648 ULONG CcPinReadWait;
649 ULONG CcPinReadNoWaitMiss;
650 ULONG CcPinReadWaitMiss;
651 ULONG CcCopyReadNoWait;
652 ULONG CcCopyReadWait;
653 ULONG CcCopyReadNoWaitMiss;
654 ULONG CcCopyReadWaitMiss;
655 ULONG CcMdlReadNoWait;
656 ULONG CcMdlReadWait;
657 ULONG CcMdlReadNoWaitMiss;
658 ULONG CcMdlReadWaitMiss;
659 ULONG CcReadAheadIos;
660 ULONG CcLazyWriteIos;
661 ULONG CcLazyWritePages;
662 ULONG CcDataFlushes;
663 ULONG CcDataPages;
664 ULONG ContextSwitches;
665 ULONG FirstLevelTbFills;
666 ULONG SecondLevelTbFills;
667 ULONG SystemCalls;
669 ULONG64 CcTotalDirtyPages;
670 ULONG64 CcDirtyPageThreshold;
672 LONG64 ResidentAvailablePages;
673 ULONG64 SharedCommittedPages;
674 } MINIDUMP_SYSTEM_PERFORMANCE_INFORMATION, *PMINIDUMP_SYSTEM_PERFORMANCE_INFORMATION;
676 #define MINIDUMP_SYSMEMINFO1_FILECACHE_TRANSITIONREPURPOSECOUNT_FLAGS 0x0001
677 #define MINIDUMP_SYSMEMINFO1_BASICPERF 0x0002
678 #define MINIDUMP_SYSMEMINFO1_PERF_CCTOTALDIRTYPAGES_CCDIRTYPAGETHRESHOLD 0x0004
679 #define MINIDUMP_SYSMEMINFO1_PERF_RESIDENTAVAILABLEPAGES_SHAREDCOMMITPAGES 0x0008
681 typedef struct _MINIDUMP_SYSTEM_MEMORY_INFO_1
683 USHORT Revision;
684 USHORT Flags;
686 MINIDUMP_SYSTEM_BASIC_INFORMATION BasicInfo;
687 MINIDUMP_SYSTEM_FILECACHE_INFORMATION FileCacheInfo;
688 MINIDUMP_SYSTEM_BASIC_PERFORMANCE_INFORMATION BasicPerfInfo;
689 MINIDUMP_SYSTEM_PERFORMANCE_INFORMATION PerfInfo;
690 } MINIDUMP_SYSTEM_MEMORY_INFO_1, *PMINIDUMP_SYSTEM_MEMORY_INFO_1;
692 typedef MINIDUMP_SYSTEM_MEMORY_INFO_1 MINIDUMP_SYSTEM_MEMORY_INFO_N;
693 typedef MINIDUMP_SYSTEM_MEMORY_INFO_N *PMINIDUMP_SYSTEM_MEMORY_INFO_N;
695 typedef enum _MINIDUMP_CALLBACK_TYPE
697 ModuleCallback,
698 ThreadCallback,
699 ThreadExCallback,
700 IncludeThreadCallback,
701 IncludeModuleCallback,
702 MemoryCallback,
703 CancelCallback,
704 WriteKernelMinidumpCallback,
705 KernelMinidumpStatusCallback,
706 RemoveMemoryCallback,
707 IncludeVmRegionCallback,
708 IoStartCallback,
709 IoWriteAllCallback,
710 IoFinishCallback,
711 ReadMemoryFailureCallback,
712 SecondaryFlagsCallback,
713 IsProcessSnapshotCallback,
714 VmStartCallback,
715 VmQueryCallback,
716 VmPreReadCallback,
717 VmPostReadCallback,
718 } MINIDUMP_CALLBACK_TYPE;
720 typedef struct _MINIDUMP_THREAD_CALLBACK
722 ULONG ThreadId;
723 HANDLE ThreadHandle;
724 #if defined(__aarch64__)
725 ULONG Pad;
726 #endif
727 CONTEXT Context;
728 ULONG SizeOfContext;
729 ULONG64 StackBase;
730 ULONG64 StackEnd;
731 } MINIDUMP_THREAD_CALLBACK, *PMINIDUMP_THREAD_CALLBACK;
733 typedef struct _MINIDUMP_THREAD_EX_CALLBACK
735 ULONG ThreadId;
736 HANDLE ThreadHandle;
737 #if defined(__aarch64__)
738 ULONG Pad;
739 #endif
740 CONTEXT Context;
741 ULONG SizeOfContext;
742 ULONG64 StackBase;
743 ULONG64 StackEnd;
744 ULONG64 BackingStoreBase;
745 ULONG64 BackingStoreEnd;
746 } MINIDUMP_THREAD_EX_CALLBACK, *PMINIDUMP_THREAD_EX_CALLBACK;
748 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK
750 ULONG ThreadId;
751 } MINIDUMP_INCLUDE_THREAD_CALLBACK, *PMINIDUMP_INCLUDE_THREAD_CALLBACK;
753 typedef enum _THREAD_WRITE_FLAGS
755 ThreadWriteThread = 0x0001,
756 ThreadWriteStack = 0x0002,
757 ThreadWriteContext = 0x0004,
758 ThreadWriteBackingStore = 0x0008,
759 ThreadWriteInstructionWindow = 0x0010,
760 ThreadWriteThreadData = 0x0020,
761 ThreadWriteThreadInfo = 0x0040
762 } THREAD_WRITE_FLAGS;
764 typedef struct _MINIDUMP_MODULE_CALLBACK
766 PWCHAR FullPath;
767 ULONG64 BaseOfImage;
768 ULONG SizeOfImage;
769 ULONG CheckSum;
770 ULONG TimeDateStamp;
771 VS_FIXEDFILEINFO VersionInfo;
772 PVOID CvRecord;
773 ULONG SizeOfCvRecord;
774 PVOID MiscRecord;
775 ULONG SizeOfMiscRecord;
776 } MINIDUMP_MODULE_CALLBACK, *PMINIDUMP_MODULE_CALLBACK;
778 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK
780 ULONG64 BaseOfImage;
781 } MINIDUMP_INCLUDE_MODULE_CALLBACK, *PMINIDUMP_INCLUDE_MODULE_CALLBACK;
783 typedef enum _MODULE_WRITE_FLAGS
785 ModuleWriteModule = 0x0001,
786 ModuleWriteDataSeg = 0x0002,
787 ModuleWriteMiscRecord = 0x0004,
788 ModuleWriteCvRecord = 0x0008,
789 ModuleReferencedByMemory = 0x0010,
790 ModuleWriteTlsData = 0x0020,
791 ModuleWriteCodeSegs = 0x0040,
792 } MODULE_WRITE_FLAGS;
794 typedef struct _MINIDUMP_IO_CALLBACK
796 HANDLE Handle;
797 ULONG64 Offset;
798 PVOID Buffer;
799 ULONG BufferBytes;
800 } MINIDUMP_IO_CALLBACK, *PMINIDUMP_IO_CALLBACK;
802 typedef struct _MINIDUMP_READ_MEMORY_FAILURE_CALLBACK
804 ULONG64 Offset;
805 ULONG Bytes;
806 HRESULT FailureStatus;
807 } MINIDUMP_READ_MEMORY_FAILURE_CALLBACK, *PMINIDUMP_READ_MEMORY_FAILURE_CALLBACK;
809 typedef struct _MINIDUMP_VM_QUERY_CALLBACK
811 ULONG64 Offset;
812 } MINIDUMP_VM_QUERY_CALLBACK, *PMINIDUMP_VM_QUERY_CALLBACK;
814 typedef struct _MINIDUMP_VM_PRE_READ_CALLBACK
816 ULONG64 Offset;
817 PVOID Buffer;
818 ULONG Size;
819 } MINIDUMP_VM_PRE_READ_CALLBACK, *PMINIDUMP_VM_PRE_READ_CALLBACK;
821 typedef struct _MINIDUMP_VM_POST_READ_CALLBACK
823 ULONG64 Offset;
824 PVOID Buffer;
825 ULONG Size;
826 ULONG Completed;
827 HRESULT Status;
828 } MINIDUMP_VM_POST_READ_CALLBACK, *PMINIDUMP_VM_POST_READ_CALLBACK;
830 typedef struct _MINIDUMP_CALLBACK_INPUT
832 ULONG ProcessId;
833 HANDLE ProcessHandle;
834 ULONG CallbackType;
835 union
837 HRESULT Status;
838 MINIDUMP_THREAD_CALLBACK Thread;
839 MINIDUMP_THREAD_EX_CALLBACK ThreadEx;
840 MINIDUMP_MODULE_CALLBACK Module;
841 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread;
842 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule;
843 MINIDUMP_IO_CALLBACK Io;
844 MINIDUMP_READ_MEMORY_FAILURE_CALLBACK ReadMemoryFailure;
845 ULONG SecondaryFlags;
846 MINIDUMP_VM_QUERY_CALLBACK VmQuery;
847 MINIDUMP_VM_PRE_READ_CALLBACK VmPreRead;
848 MINIDUMP_VM_POST_READ_CALLBACK VmPostRead;
850 } MINIDUMP_CALLBACK_INPUT, *PMINIDUMP_CALLBACK_INPUT;
852 typedef struct _MINIDUMP_CALLBACK_OUTPUT
854 union
856 ULONG ModuleWriteFlags;
857 ULONG ThreadWriteFlags;
858 ULONG SecondaryFlags;
859 struct
861 ULONG64 MemoryBase;
862 ULONG MemorySize;
864 struct
866 BOOL CheckCancel;
867 BOOL Cancel;
869 HANDLE Handle;
870 struct
872 MINIDUMP_MEMORY_INFO VmRegion;
873 BOOL Continue;
875 struct
877 HRESULT VmQueryStatus;
878 MINIDUMP_MEMORY_INFO VmQueryResult;
880 struct
882 HRESULT VmReadStatus;
883 ULONG VmReadBytesCompleted;
885 HRESULT Status;
887 } MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT;
889 typedef BOOL (WINAPI* MINIDUMP_CALLBACK_ROUTINE)(PVOID, const PMINIDUMP_CALLBACK_INPUT, PMINIDUMP_CALLBACK_OUTPUT);
891 typedef struct _MINIDUMP_CALLBACK_INFORMATION
893 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine;
894 void *CallbackParam;
895 } MINIDUMP_CALLBACK_INFORMATION, *PMINIDUMP_CALLBACK_INFORMATION;
897 typedef enum _MINIDUMP_STREAM_TYPE
899 UnusedStream = 0,
900 ReservedStream0 = 1,
901 ReservedStream1 = 2,
902 ThreadListStream = 3,
903 ModuleListStream = 4,
904 MemoryListStream = 5,
905 ExceptionStream = 6,
906 SystemInfoStream = 7,
907 ThreadExListStream = 8,
908 Memory64ListStream = 9,
909 CommentStreamA = 10,
910 CommentStreamW = 11,
911 HandleDataStream = 12,
912 FunctionTableStream = 13,
913 UnloadedModuleListStream = 14,
914 MiscInfoStream = 15,
915 MemoryInfoListStream = 16,
916 ThreadInfoListStream = 17,
917 HandleOperationListStream = 18,
918 TokenStream = 19,
919 JavaScriptDataStream = 20,
920 SystemMemoryInfoStream = 21,
921 ProcessVmCountersStream = 22,
922 IptTraceStream = 23,
923 ThreadNamesStream = 24,
925 LastReservedStream = 0xffff
926 } MINIDUMP_STREAM_TYPE;
928 BOOL WINAPI MiniDumpWriteDump(HANDLE process, DWORD pid, HANDLE hfile, MINIDUMP_TYPE dumptype,
929 PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
930 PMINIDUMP_CALLBACK_INFORMATION CallbackParam);
931 BOOL WINAPI MiniDumpReadDumpStream(PVOID base, ULONG index, PMINIDUMP_DIRECTORY *dir, void **streamptr,
932 ULONG *stream_size);
934 #ifdef __cplusplus
936 #endif
938 #include <poppack.h>
940 #endif /* __WINE_MINIDUMP_H */