1 /* 2 * PROJECT: Global Flags utility 3 * LICENSE: GPL-2.0 (https://spdx.org/licenses/GPL-2.0) 4 * PURPOSE: Global Flags utility page heap options 5 * COPYRIGHT: Copyright 2017 Pierre Schweitzer (pierre@reactos.org) 6 */ 7 8 #define WIN32_NO_STATUS 9 #include <stdarg.h> 10 #include <windef.h> 11 #include <winbase.h> 12 #include <winuser.h> 13 #include <winreg.h> 14 #include <stdio.h> 15 #include <stdlib.h> 16 #include <pstypes.h> 17 18 extern 19 const WCHAR ImageExecOptionsString[]; 20 21 /* Option specific commandline parsing */ 22 BOOL PageHeap_ParseCmdline(INT i, int argc, LPWSTR argv[]); 23 BOOL ImageFile_ParseCmdline(INT i, int argc, LPWSTR argv[]); 24 25 /* Execute parsed options */ 26 INT PageHeap_Execute(); 27 INT ImageFile_Execute(); 28 29 /* Common functions */ 30 DWORD ReadSZFlagsFromRegistry(HKEY SubKey, PWSTR Value); 31 BOOL OpenImageFileExecOptions(IN REGSAM SamDesired, IN OPTIONAL PCWSTR ImageName, OUT HKEY* Key); 32 33 #define DEST_REGISTRY 1 34 #define DEST_KERNEL 2 35 #define DEST_IMAGE 4 36 37 void PrintFlags(IN DWORD GlobalFlags, IN OPTIONAL WORD Dest); 38