2018-10-12 23:14:15 +00:00
|
|
|
/*
|
|
|
|
* PROJECT: Global Flags utility
|
|
|
|
* LICENSE: GPL-2.0 (https://spdx.org/licenses/GPL-2.0)
|
|
|
|
* PURPOSE: Global Flags utility page heap options
|
|
|
|
* COPYRIGHT: Copyright 2017 Pierre Schweitzer (pierre@reactos.org)
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#include <stdarg.h>
|
|
|
|
#include <windef.h>
|
|
|
|
#include <winbase.h>
|
|
|
|
#include <winuser.h>
|
|
|
|
#include <winreg.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
2018-10-13 15:10:09 +00:00
|
|
|
#include <pstypes.h>
|
2018-10-12 23:14:15 +00:00
|
|
|
|
2018-10-13 15:10:09 +00:00
|
|
|
extern
|
|
|
|
const WCHAR ImageExecOptionsString[];
|
2018-10-12 23:14:15 +00:00
|
|
|
|
|
|
|
/* Option specific commandline parsing */
|
|
|
|
BOOL PageHeap_ParseCmdline(INT i, int argc, LPWSTR argv[]);
|
2018-10-13 15:11:51 +00:00
|
|
|
BOOL ImageFile_ParseCmdline(INT i, int argc, LPWSTR argv[]);
|
2018-10-12 23:14:15 +00:00
|
|
|
|
|
|
|
/* Execute parsed options */
|
|
|
|
INT PageHeap_Execute();
|
2018-10-13 15:11:51 +00:00
|
|
|
INT ImageFile_Execute();
|
2018-10-12 23:14:15 +00:00
|
|
|
|
|
|
|
/* Common functions */
|
2018-10-13 15:10:09 +00:00
|
|
|
DWORD ReadSZFlagsFromRegistry(HKEY SubKey, PWSTR Value);
|
|
|
|
BOOL OpenImageFileExecOptions(IN REGSAM SamDesired, IN OPTIONAL PCWSTR ImageName, OUT HKEY* Key);
|
2018-10-12 23:14:15 +00:00
|
|
|
|
2018-10-13 15:11:51 +00:00
|
|
|
#define DEST_REGISTRY 1
|
|
|
|
#define DEST_KERNEL 2
|
|
|
|
#define DEST_IMAGE 4
|
|
|
|
|
|
|
|
void PrintFlags(IN DWORD GlobalFlags, IN OPTIONAL WORD Dest);
|