Skip to content

Commit

Permalink
sync: merge systeminformer(winsiderss/systeminformer@928ad4e)
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroKaku committed Jan 11, 2025
1 parent 09c8de6 commit d953d69
Show file tree
Hide file tree
Showing 14 changed files with 5,047 additions and 507 deletions.
2 changes: 1 addition & 1 deletion Veil.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ struct IUnknown;

#endif // if defined(_KERNEL_MODE)


#include "Veil/Veil.System.Define.h"
#include "Veil/Veil.System.KernelCore.h"
#include "Veil/Veil.System.MemoryManager.h"
Expand All @@ -335,6 +334,7 @@ struct IUnknown;
#include "Veil/Veil.System.TransactionManager.h"
#include "Veil/Veil.System.VDM.h"
#include "Veil/Veil.System.Prefetcher.h"
#include "Veil/Veil.System.SMBios.h"
#include "Veil/Veil.System.WindowStation.h"
#include "Veil/Veil.System.UserManagerService.h"

Expand Down
4 changes: 2 additions & 2 deletions Veil/Veil.System.Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ NTSYSAPI
ULONG
__cdecl
DbgPrintReturnControlC(
_In_z_ _Printf_format_string_ PCSTR Format,
_In_z_ _Printf_format_string_ PCCH Format,
...
);

Expand Down Expand Up @@ -670,7 +670,7 @@ NTAPI
NtSetInformationDebugObject(
_In_ HANDLE DebugObjectHandle,
_In_ DEBUGOBJECTINFOCLASS DebugObjectInformationClass,
_In_ PVOID DebugInformation,
_In_reads_bytes_(DebugInformationLength) PVOID DebugInformation,
_In_ ULONG DebugInformationLength,
_Out_opt_ PULONG ReturnLength
);
Expand Down
18 changes: 16 additions & 2 deletions Veil/Veil.System.Define.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,24 @@ VEIL_BEGIN()
#define FIELD_SIZE(type, field) (sizeof(((type *)0)->field))
#endif

#undef STATIC_ASSERT
#define STATIC_ASSERT(expr, ...) static_assert((expr), __VA_ARGS__)

#ifndef STATIC_ASSERT
#define STATIC_ASSERT(expr) typedef char __static_assert_t[ (expr) ]
#if __cplusplus
#if _MSVC_LANG < 201402L
#undef STATIC_ASSERT
#define STATIC_ASSERT(expr, ...) typedef char __static_assert_t[ (expr) ]
#endif
#else
#if __STDC_VERSION__ < 201112L
#undef STATIC_ASSERT
#define STATIC_ASSERT(expr, ...) typedef char __static_assert_t[ (expr) ]
#endif
#endif

STATIC_ASSERT(__alignof(LARGE_INTEGER) == 8,
"Windows headers require the default packing option. Changing the packing can lead to memory corruption.");


typedef void* POINTER_32 PVOID32;
typedef int INT_PTR32;
Expand Down
25 changes: 12 additions & 13 deletions Veil/Veil.System.Etw.h
Original file line number Diff line number Diff line change
Expand Up @@ -5971,7 +5971,7 @@ typedef enum _ETWTRACECONTROLCODE
EtwWdiSemUpdate = 20,
EtwEnumTraceGuidList = 21, // out GUID[]
EtwGetTraceGuidInfo = 22, // in GUID, out ETW_TRACE_GUID_INFO
EtwEnumerateTraceGuids = 23,
EtwEnumerateTraceGuids = 23, // out TRACE_GUID_PROPERTIES[]
EtwRegisterSecurityProv = 24,
EtwReferenceTimeCode = 25, // in ULONG LoggerId, out ETW_REF_CLOCK
EtwTrackBinaryCode = 26, // in HANDLE
Expand Down Expand Up @@ -6243,7 +6243,7 @@ WmiExecuteMethodW(
// Enable or disable a trace logging guid.
#define NOTIFICATION_TRACE_FLAG 0x00010000
// Enable or disable a trace direct callback.
// The callback is invoked immediately via a seperate thread.
// The callback is invoked immediately via a separate thread.
#define NOTIFICATION_CALLBACK_DIRECT 0x00000004
// Set this flag (and only this flag) when you want to only check if the
// caller has permission to receive events for the guid
Expand Down Expand Up @@ -6300,30 +6300,29 @@ typedef struct _MOFRESOURCEINFOA
{
PSTR ImagePath; // Path to image containing MOF resource
PSTR ResourceName; // Name of resource in image
ULONG ResourceSize; // Number of bytes in resource
ULONG ResourceSize; // Number of bytes in resource
PUCHAR ResourceBuffer;
} MOFRESOURCEINFOA, * PMOFRESOURCEINFOA;

typedef struct _MOFRESOURCEINFOW
{
LPWSTR ImagePath; // Path to image containing MOF resource
LPWSTR ResourceName; // Name of resource in image
ULONG ResourceSize; // Number of bytes in resource
PUCHAR ResourceBuffer; // Reserved
} MOFRESOURCEINFOW, * PMOFRESOURCEINFOW;

#ifdef UNICODE
typedef struct _MOFRESOURCEINFOA MOFRESOURCEINFO, PMOFRESOURCEINFO;
typedef struct _MOFRESOURCEINFOW MOFRESOURCEINFO, PMOFRESOURCEINFO;
#else
typedef struct _MOFRESOURCEINFOA MOFRESOURCEINFO, PMOFRESOURCEINFO;
#endif

//
// When set the guid can be opened and accessed
#define MOFCI_RESERVED0 0x00000001
#define MOFCI_RESERVED1 0x00000002
#define MOFCI_RESERVED2 0x00000004

typedef struct
{
LPWSTR ImagePath; // Path to image containing MOF resource
LPWSTR ResourceName; // Name of resource in image
ULONG ResourceSize; // Number of bytes in resource
PUCHAR ResourceBuffer; // Reserved
} MOFRESOURCEINFOW, * PMOFRESOURCEINFOW;

NTSYSAPI
ULONG
NTAPI
Expand Down
Loading

0 comments on commit d953d69

Please sign in to comment.