Open
Description
Hi,
Please consider the following improvements:
- If one does not use anything else but these definitions, NTSTATUS will be missing, you can just add:
#ifndef SW3_HEADER_H_
#define SW3_HEADER_H_
#include <windows.h>
#ifndef _NTDEF_
typedef _Return_type_success_(return >= 0) LONG NTSTATUS;
typedef NTSTATUS* PNTSTATUS;
#endif
- If one needs to use another definition set like phnt, the definitions will clash at compile time. My suggestion is to rename the structures/definitions with a prefix like:
typedef struct _SW3_SYSTEM_HANDLE
{
ULONG ProcessId;
BYTE ObjectTypeNumber;
BYTE Flags;
USHORT Handle;
PVOID Object;
ACCESS_MASK GrantedAccess;
} SW3_SYSTEM_HANDLE, *PSW3SYSTEM_HANDLE;
Same for functions (there is no reason we cannot name them as we wish):
EXTERN_C NTSTATUS Sw3NtCreateProcess(
OUT PHANDLE ProcessHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN HANDLE ParentProcess,
IN BOOLEAN InheritObjectTable,
IN HANDLE SectionHandle OPTIONAL,
IN HANDLE DebugPort OPTIONAL,
IN HANDLE ExceptionPort OPTIONAL);
This would prevent the "already defined" compiling issue. Perhaps add a flag like --custom-prefix
which would prefix the functions/structured/definitions as the user specifies.
- Instead of the current initial see, you might want to consider using xoshiro prng.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels
Activity