Add initial cmake support and fix compatibility issues
This commit is contained in:
@@ -2344,7 +2344,7 @@ BOOLEAN PhUiThawTreeProcess(
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (freezeHandle = InterlockedExchangePointer(&Process->FreezeHandle, nullptr))
|
||||
if (freezeHandle = InterlockedExchangePointer(&Process->FreezeHandle, NULL))
|
||||
{
|
||||
NtClose(freezeHandle);
|
||||
}
|
||||
@@ -5301,7 +5301,7 @@ BOOLEAN PhUiRestartServices(
|
||||
|
||||
if (NT_SUCCESS(status))
|
||||
{
|
||||
status = PhStartService(serviceHandle, 0, nullptr);
|
||||
status = PhStartService(serviceHandle, 0, NULL);
|
||||
|
||||
if (NT_SUCCESS(status))
|
||||
success = TRUE;
|
||||
|
||||
@@ -2045,7 +2045,7 @@ BOOLEAN PhInsertCopyListViewEMenuItem(
|
||||
|
||||
context = PhAllocate(sizeof(PH_COPY_ITEM_CONTEXT));
|
||||
context->ListViewHandle = ListViewHandle;
|
||||
context->ListViewClass = nullptr;
|
||||
context->ListViewClass = NULL;
|
||||
context->Id = lvHitInfo.iItem;
|
||||
context->SubId = lvHitInfo.iSubItem;
|
||||
context->MenuItemText = menuItemText;
|
||||
|
||||
@@ -1281,15 +1281,15 @@ VOID PhRegisterHeaderSuperClass(
|
||||
|
||||
// Detours export procedure hooks
|
||||
|
||||
static typeof(&DrawThemeBackground) DefaultDrawThemeBackground = NULL;
|
||||
static typeof(&DrawThemeBackgroundEx) DefaultDrawThemeBackgroundEx = NULL;
|
||||
static typeof(&DrawThemeText) DefaultDrawThemeText = NULL;
|
||||
static typeof(&DrawThemeTextEx) DefaultDrawThemeTextEx = NULL;
|
||||
static typeof(&DrawTextW) DefaultComCtl32DrawTextW = NULL;
|
||||
static typeof(&TaskDialogIndirect) DefaultTaskDialogIndirect = NULL;
|
||||
static typeof(&GetThemeColor) DefaultGetThemeColor = NULL;
|
||||
static typeof(&SystemParametersInfoW) DefaultSystemParametersInfo = NULL;
|
||||
static typeof(&CreateWindowExW) DefaultCreateWindowEx = NULL;
|
||||
static __typeof__(&DrawThemeBackground) DefaultDrawThemeBackground = NULL;
|
||||
static __typeof__(&DrawThemeBackgroundEx) DefaultDrawThemeBackgroundEx = NULL;
|
||||
static __typeof__(&DrawThemeText) DefaultDrawThemeText = NULL;
|
||||
static __typeof__(&DrawThemeTextEx) DefaultDrawThemeTextEx = NULL;
|
||||
static __typeof__(&DrawTextW) DefaultComCtl32DrawTextW = NULL;
|
||||
static __typeof__(&TaskDialogIndirect) DefaultTaskDialogIndirect = NULL;
|
||||
static __typeof__(&GetThemeColor) DefaultGetThemeColor = NULL;
|
||||
static __typeof__(&SystemParametersInfoW) DefaultSystemParametersInfo = NULL;
|
||||
static __typeof__(&CreateWindowExW) DefaultCreateWindowEx = NULL;
|
||||
|
||||
// uxtheme.dll ordinal 49
|
||||
static HTHEME(WINAPI* DefaultOpenNcThemeData)(
|
||||
|
||||
@@ -1079,7 +1079,7 @@ NTSTATUS PhpFindObjectsThreadStart(
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
PhShowStatus(nullptr, L"Unidentified third party object.", status, 0);
|
||||
PhShowStatus(NULL, L"Unidentified third party object.", status, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -637,7 +637,7 @@ PPH_PROCESS_ITEM PhpCreateProcessItemForZombieProcess(
|
||||
NtClose(processHandle);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NTSTATUS PhpEnumZombieProcessesBruteForce(
|
||||
|
||||
@@ -950,7 +950,7 @@ VOID PhpUpdateHandleGeneral(
|
||||
PPH_STRING name;
|
||||
|
||||
clientId.UniqueProcess = UlongToHandle(serverInfo.ProcessId);
|
||||
clientId.UniqueThread = nullptr;
|
||||
clientId.UniqueThread = NULL;
|
||||
|
||||
name = PhGetClientIdName(&clientId);
|
||||
PhSetHandleListViewItem(Context, PH_HANDLE_GENERAL_INDEX_ALPCOWNER, 1, name->Buffer);
|
||||
|
||||
@@ -558,7 +558,7 @@ VOID PhActivatePreviousInstance(
|
||||
VOID
|
||||
)
|
||||
{
|
||||
PhEnumDirectoryObjects(PhGetNamespaceHandle(), PhpPreviousInstancesCallback, nullptr);
|
||||
PhEnumDirectoryObjects(PhGetNamespaceHandle(), PhpPreviousInstancesCallback, NULL);
|
||||
}
|
||||
|
||||
VOID PhInitializeCommonControls(
|
||||
|
||||
@@ -2626,7 +2626,7 @@ VOID PhMwpSaveSettings(
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
PhShowStatus(nullptr, L"Unable to save application settings.", status, 0);
|
||||
PhShowStatus(NULL, L"Unable to save application settings.", status, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -560,9 +560,9 @@ VOID PhShowMemoryListCommand(
|
||||
if (!PhIsNullOrEmptyString(message))
|
||||
{
|
||||
if (showError)
|
||||
PhShowError2(ParentWindow, L"Memory Command", PhGetString(message));
|
||||
PhShowError2(ParentWindow, L"Unable to empty the memory list.", L"%s", PhGetString(message));
|
||||
else
|
||||
PhShowInformation2(ParentWindow, L"Memory Command", PhGetString(message));
|
||||
PhShowInformation2(ParentWindow, L"Unable to empty the memory list.", L"%s", PhGetString(message));
|
||||
}
|
||||
|
||||
PhClearReference(&message);
|
||||
@@ -597,7 +597,7 @@ VOID PhShowMemoryListCommand(
|
||||
|
||||
message = PhFinalStringBuilderString(&stringBuilder);
|
||||
if (!PhIsNullOrEmptyString(message))
|
||||
PhShowInformation2(ParentWindow, L"Memory Command", PhGetString(message));
|
||||
PhShowInformation2(ParentWindow, L"Unable to empty the memory list.", L"%s", PhGetString(message));
|
||||
PhClearReference(&message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3284,10 +3284,10 @@ INT_PTR CALLBACK PhpOptionsAdvancedDlgProc(
|
||||
|
||||
typedef struct _COLOR_ITEM
|
||||
{
|
||||
PWSTR SettingName;
|
||||
PWSTR UseSettingName;
|
||||
PWSTR Name;
|
||||
PWSTR Description;
|
||||
PCWSTR SettingName;
|
||||
PCWSTR UseSettingName;
|
||||
PCWSTR Name;
|
||||
PCWSTR Description;
|
||||
|
||||
BOOLEAN CurrentUse;
|
||||
COLORREF CurrentColor;
|
||||
|
||||
@@ -208,7 +208,7 @@ BOOLEAN PhSvcHandleVerify(
|
||||
info.Flags = PH_VERIFY_PREVENT_NETWORK_ACCESS;
|
||||
info.FileHandle = fileHandle;
|
||||
|
||||
if (NT_SUCCESS(PhVerifyFileEx(&info, &result, nullptr, nullptr)))
|
||||
if (NT_SUCCESS(PhVerifyFileEx(&info, &result, NULL, NULL)))
|
||||
{
|
||||
if (result == VrTrusted)
|
||||
{
|
||||
|
||||
@@ -724,8 +724,8 @@ BOOLEAN PhRunAsGetLogonSid(
|
||||
_Out_ PSID* LogonSid
|
||||
)
|
||||
{
|
||||
PSID userSid = nullptr;
|
||||
PSID groupSid = nullptr;
|
||||
PSID userSid = NULL;
|
||||
PSID groupSid = NULL;
|
||||
HANDLE tokenHandle;
|
||||
|
||||
if (NT_SUCCESS(PhOpenProcessToken(
|
||||
|
||||
@@ -127,9 +127,9 @@ static HANDLE PhNonPollEventHandle = NULL;
|
||||
static LIST_ENTRY PhpNonPollServiceListHead = { &PhpNonPollServiceListHead, &PhpNonPollServiceListHead };
|
||||
static LIST_ENTRY PhpNonPollServicePendingListHead = { &PhpNonPollServicePendingListHead, &PhpNonPollServicePendingListHead };
|
||||
static SLIST_HEADER PhpServiceQueryDataListHead;
|
||||
static typeof(&NotifyServiceStatusChangeW) NotifyServiceStatusChange_I = NULL;
|
||||
static typeof(&SubscribeServiceChangeNotifications) SubscribeServiceChangeNotifications_I = NULL;
|
||||
static typeof(&UnsubscribeServiceChangeNotifications) UnsubscribeServiceChangeNotifications_I = NULL;
|
||||
static __typeof__(&NotifyServiceStatusChangeW) NotifyServiceStatusChange_I = NULL;
|
||||
static __typeof__(&SubscribeServiceChangeNotifications) SubscribeServiceChangeNotifications_I = NULL;
|
||||
static __typeof__(&UnsubscribeServiceChangeNotifications) UnsubscribeServiceChangeNotifications_I = NULL;
|
||||
|
||||
BOOLEAN PhServiceProviderInitialization(
|
||||
VOID
|
||||
|
||||
@@ -1413,7 +1413,7 @@ BOOLEAN NTAPI PhpThreadStacksTreeNewCallback(
|
||||
{
|
||||
PPH_PROCESS_PROPCONTEXT propContext;
|
||||
|
||||
if (propContext = PhCreateProcessPropContext(nullptr, processItem))
|
||||
if (propContext = PhCreateProcessPropContext(NULL, processItem))
|
||||
{
|
||||
PhShowProcessProperties(propContext);
|
||||
PhDereferenceObject(propContext);
|
||||
@@ -1450,7 +1450,7 @@ BOOLEAN NTAPI PhpThreadStacksTreeNewCallback(
|
||||
{
|
||||
PPH_PROCESS_PROPCONTEXT propContext;
|
||||
|
||||
if (propContext = PhCreateProcessPropContext(nullptr, processItem))
|
||||
if (propContext = PhCreateProcessPropContext(NULL, processItem))
|
||||
{
|
||||
PhSetSelectThreadIdProcessPropContext(propContext, threadId);
|
||||
PhShowProcessProperties(propContext);
|
||||
|
||||
+5
-5
@@ -132,13 +132,13 @@ PVOID PhpImportProcedureNative(
|
||||
* @param Name The name of the procedure.
|
||||
*/
|
||||
#define PH_DEFINE_IMPORT(Module, Name) \
|
||||
typeof(&(Name)) Name##_Import(VOID) \
|
||||
__typeof__(&(Name)) Name##_Import(VOID) \
|
||||
{ \
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT; \
|
||||
static PVOID cache = NULL; \
|
||||
static ULONG_PTR cookie = 0; \
|
||||
\
|
||||
return (typeof(&(Name)))PhpImportProcedure(&initOnce, &cache, &cookie, Module, #Name); \
|
||||
return (__typeof__(&(Name)))PhpImportProcedure(&initOnce, &cache, &cookie, Module, #Name); \
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -148,13 +148,13 @@ typeof(&(Name)) Name##_Import(VOID) \
|
||||
* @param Name The name of the procedure.
|
||||
*/
|
||||
#define PH_DEFINE_IMPORT_NATIVE(Module, Name) \
|
||||
typeof(&(Name)) Name##_Import(VOID) \
|
||||
__typeof__(&(Name)) Name##_Import(VOID) \
|
||||
{ \
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT; \
|
||||
static PVOID cache = NULL; \
|
||||
static ULONG_PTR cookie = 0; \
|
||||
\
|
||||
return (typeof(&(Name)))PhpImportProcedureNative(&initOnce, &cache, &cookie, Module, #Name); \
|
||||
return (__typeof__(&(Name)))PhpImportProcedureNative(&initOnce, &cache, &cookie, Module, #Name); \
|
||||
}
|
||||
|
||||
PH_DEFINE_IMPORT(L"ntdll.dll", NtQueryInformationEnlistment);
|
||||
@@ -227,7 +227,7 @@ PVOID NTAPI GetProcAddress_Stub(
|
||||
PVOID baseAddress;
|
||||
|
||||
if (IS_INTRESOURCE(Name))
|
||||
baseAddress = PhGetProcedureAddress(Module, nullptr, PtrToUshort(Name));
|
||||
baseAddress = PhGetProcedureAddress(Module, NULL, PtrToUshort(Name));
|
||||
else
|
||||
baseAddress = PhGetProcedureAddress(Module, Name, 0);
|
||||
|
||||
|
||||
+5
-5
@@ -1338,7 +1338,7 @@ BOOLEAN PhFppInsertFreeList(
|
||||
)
|
||||
{
|
||||
ULONG oldSegmentIndex;
|
||||
PPH_FP_BLOCK_HEADER oldSegmentFirstBlock = nullptr;
|
||||
PPH_FP_BLOCK_HEADER oldSegmentFirstBlock = NULL;
|
||||
PPH_FP_SEGMENT_HEADER oldSegmentHeader;
|
||||
|
||||
oldSegmentIndex = Pool->Header->FreeLists[FreeListIndex];
|
||||
@@ -1385,11 +1385,11 @@ BOOLEAN PhFppRemoveFreeList(
|
||||
)
|
||||
{
|
||||
ULONG flinkSegmentIndex;
|
||||
PPH_FP_BLOCK_HEADER flinkSegmentFirstBlock = nullptr;
|
||||
PPH_FP_SEGMENT_HEADER flinkSegmentHeader = nullptr;
|
||||
PPH_FP_BLOCK_HEADER flinkSegmentFirstBlock = NULL;
|
||||
PPH_FP_SEGMENT_HEADER flinkSegmentHeader = NULL;
|
||||
ULONG blinkSegmentIndex;
|
||||
PPH_FP_BLOCK_HEADER blinkSegmentFirstBlock = nullptr;
|
||||
PPH_FP_SEGMENT_HEADER blinkSegmentHeader = nullptr;
|
||||
PPH_FP_BLOCK_HEADER blinkSegmentFirstBlock = NULL;
|
||||
PPH_FP_SEGMENT_HEADER blinkSegmentHeader = NULL;
|
||||
|
||||
flinkSegmentIndex = SegmentHeader->FreeFlink;
|
||||
blinkSegmentIndex = SegmentHeader->FreeBlink;
|
||||
|
||||
+6
-6
@@ -210,7 +210,7 @@ HDC PhGetScreenDC(
|
||||
VOID
|
||||
)
|
||||
{
|
||||
static HDC hdc = nullptr;
|
||||
static HDC hdc = NULL;
|
||||
|
||||
if (hdc == NULL)
|
||||
{
|
||||
@@ -230,7 +230,7 @@ HGDIOBJ PhGetStockObject(
|
||||
_In_ LONG Index
|
||||
)
|
||||
{
|
||||
static HBRUSH brush[STOCK_LAST + 1] = { nullptr };
|
||||
static HBRUSH brush[STOCK_LAST + 1] = { NULL };
|
||||
|
||||
assert(Index <= STOCK_LAST);
|
||||
|
||||
@@ -510,7 +510,7 @@ BOOLEAN PhSetChildWindowNoActivate(
|
||||
_In_ HWND WindowHandle
|
||||
);
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(SetChildWindowNoActivate) SetChildWindowNoActivate_I = NULL; // NtUserSetChildWindowNoActivate
|
||||
static __typeof__(SetChildWindowNoActivate) SetChildWindowNoActivate_I = NULL; // NtUserSetChildWindowNoActivate
|
||||
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
{
|
||||
@@ -518,7 +518,7 @@ BOOLEAN PhSetChildWindowNoActivate(
|
||||
|
||||
if (baseAddress = PhLoadLibrary(L"user32.dll"))
|
||||
{
|
||||
SetChildWindowNoActivate_I = PhGetDllBaseProcedureAddress(baseAddress, nullptr, 2005);
|
||||
SetChildWindowNoActivate_I = PhGetDllBaseProcedureAddress(baseAddress, NULL, 2005);
|
||||
}
|
||||
|
||||
PhEndInitOnce(&initOnce);
|
||||
@@ -2787,7 +2787,7 @@ NTSTATUS PhGetPhysicallyInstalledSystemMemory(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&GetPhysicallyInstalledSystemMemory) GetPhysicallyInstalledSystemMemory_I = NULL;
|
||||
static __typeof__(&GetPhysicallyInstalledSystemMemory) GetPhysicallyInstalledSystemMemory_I = NULL;
|
||||
ULONGLONG physicallyInstalledSystemMemory = 0;
|
||||
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
@@ -2883,7 +2883,7 @@ NTSTATUS PhGetSendMessageReceiver(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&GetSendMessageReceiver) GetSendMessageReceiver_I = nullptr;
|
||||
static __typeof__(&GetSendMessageReceiver) GetSendMessageReceiver_I = NULL;
|
||||
HWND windowHandle;
|
||||
|
||||
// GetSendMessageReceiver is an undocumented function exported by
|
||||
|
||||
+3
-3
@@ -622,7 +622,7 @@ BOOLEAN PhpAllocateMoreHandleTableEntries(
|
||||
{
|
||||
ULONG_PTR tableValue;
|
||||
ULONG tableLevel;
|
||||
PPH_HANDLE_TABLE_ENTRY table0 = nullptr;
|
||||
PPH_HANDLE_TABLE_ENTRY table0 = NULL;
|
||||
PPH_HANDLE_TABLE_ENTRY *table1;
|
||||
PPH_HANDLE_TABLE_ENTRY **table2;
|
||||
ULONG i;
|
||||
@@ -838,7 +838,7 @@ PPH_HANDLE_TABLE_ENTRY PhpLookupHandleTableEntry(
|
||||
PPH_HANDLE_TABLE_ENTRY table0;
|
||||
PPH_HANDLE_TABLE_ENTRY *table1;
|
||||
PPH_HANDLE_TABLE_ENTRY **table2;
|
||||
PPH_HANDLE_TABLE_ENTRY entry = nullptr;
|
||||
PPH_HANDLE_TABLE_ENTRY entry = NULL;
|
||||
|
||||
if (HandleValue >= HandleTable->NextValue)
|
||||
return NULL;
|
||||
@@ -892,7 +892,7 @@ ULONG PhpMoveFreeHandleTableEntries(
|
||||
ULONG nextIndex;
|
||||
ULONG lastIndex;
|
||||
PPH_HANDLE_TABLE_ENTRY entry;
|
||||
PPH_HANDLE_TABLE_ENTRY firstEntry = nullptr;
|
||||
PPH_HANDLE_TABLE_ENTRY firstEntry = NULL;
|
||||
ULONG count;
|
||||
ULONG freeValue;
|
||||
|
||||
|
||||
+1
-1
@@ -438,7 +438,7 @@ NTSTATUS PhQueryCloseHandle(
|
||||
ObjectHandleFlagInformation,
|
||||
&objectInfo,
|
||||
sizeof(objectInfo),
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
|
||||
if (NT_SUCCESS(status) && objectInfo.ProtectFromClose)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
EXTERN_C_START
|
||||
|
||||
#define PH_DECLARE_IMPORT(Name) typeof(&Name) Name##_Import(VOID)
|
||||
#define PH_DECLARE_IMPORT(Name) __typeof__(&(Name)) Name##_Import(VOID)
|
||||
|
||||
// Ntdll
|
||||
|
||||
|
||||
@@ -965,7 +965,7 @@ PhGetListViewInterface(
|
||||
_In_ HWND ListViewHandle
|
||||
)
|
||||
{
|
||||
IListView* listviewInterface = nullptr;
|
||||
IListView* listviewInterface = NULL;
|
||||
|
||||
SendMessage(
|
||||
ListViewHandle,
|
||||
|
||||
@@ -323,13 +323,13 @@ PhAllocatePageZero(
|
||||
{
|
||||
PVOID buffer;
|
||||
|
||||
if (buffer = PhAllocatePage(Size, nullptr))
|
||||
if (buffer = PhAllocatePage(Size, NULL))
|
||||
{
|
||||
memset(buffer, 0, Size);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PHLIBAPI
|
||||
|
||||
@@ -53,7 +53,7 @@ EXTERN_C PCWSTR WindowsVersionName;
|
||||
#define WINDOWS_NEW ULONG_MAX
|
||||
|
||||
#ifdef DEBUG
|
||||
#define dprintf(format, ...) DbgPrint(format __VA_OPT__(,) __VA_ARGS__)
|
||||
#define dprintf(format, ...) DbgPrint(format, __VA_ARGS__)
|
||||
#else
|
||||
#define dprintf(format, ...)
|
||||
#endif
|
||||
|
||||
+21
-14
@@ -835,22 +835,22 @@ PhGetProcessPowerThrottlingState(
|
||||
)
|
||||
{
|
||||
NTSTATUS status;
|
||||
POWER_THROTTLING_PROCESS_STATE powerThrottlingState;
|
||||
POWER_THROTTLING_PROCESS_STATE processPowerThrottlingState;
|
||||
|
||||
memset(&powerThrottlingState, 0, sizeof(POWER_THROTTLING_PROCESS_STATE));
|
||||
powerThrottlingState.Version = POWER_THROTTLING_PROCESS_CURRENT_VERSION;
|
||||
memset(&processPowerThrottlingState, 0, sizeof(POWER_THROTTLING_PROCESS_STATE));
|
||||
processPowerThrottlingState.Version = POWER_THROTTLING_PROCESS_CURRENT_VERSION;
|
||||
|
||||
status = NtQueryInformationProcess(
|
||||
ProcessHandle,
|
||||
ProcessPowerThrottlingState,
|
||||
&powerThrottlingState,
|
||||
&processPowerThrottlingState,
|
||||
sizeof(POWER_THROTTLING_PROCESS_STATE),
|
||||
NULL
|
||||
);
|
||||
|
||||
if (NT_SUCCESS(status))
|
||||
{
|
||||
*PowerThrottlingState = powerThrottlingState;
|
||||
*PowerThrottlingState = processPowerThrottlingState;
|
||||
}
|
||||
|
||||
return status;
|
||||
@@ -864,19 +864,22 @@ PhGetThreadPowerThrottlingState(
|
||||
)
|
||||
{
|
||||
NTSTATUS status;
|
||||
POWER_THROTTLING_THREAD_STATE powerThrottlingState = { .Version = POWER_THROTTLING_THREAD_CURRENT_VERSION };
|
||||
POWER_THROTTLING_THREAD_STATE threadPowerThrottlingState;
|
||||
|
||||
memset(&threadPowerThrottlingState, 0, sizeof(POWER_THROTTLING_THREAD_STATE));
|
||||
threadPowerThrottlingState.Version = POWER_THROTTLING_THREAD_CURRENT_VERSION;
|
||||
|
||||
status = NtQueryInformationThread(
|
||||
ThreadHandle,
|
||||
ThreadPowerThrottlingState,
|
||||
&powerThrottlingState,
|
||||
sizeof(powerThrottlingState),
|
||||
&threadPowerThrottlingState,
|
||||
sizeof(POWER_THROTTLING_THREAD_STATE),
|
||||
NULL
|
||||
);
|
||||
|
||||
if (NT_SUCCESS(status))
|
||||
{
|
||||
*PowerThrottlingState = powerThrottlingState;
|
||||
*PowerThrottlingState = threadPowerThrottlingState;
|
||||
}
|
||||
|
||||
return status;
|
||||
@@ -2167,14 +2170,18 @@ NTSTATUS PhWaitForSingleObject(
|
||||
_In_opt_ ULONG Timeout
|
||||
)
|
||||
{
|
||||
LARGE_INTEGER timeout;
|
||||
|
||||
if (Timeout)
|
||||
{
|
||||
timeout.QuadPart = -(LONGLONG)UInt32x32To64(Timeout, PH_TIMEOUT_MS);
|
||||
}
|
||||
LARGE_INTEGER timeout;
|
||||
|
||||
return NtWaitForSingleObject(Handle, FALSE, Timeout ? &timeout : nullptr);
|
||||
timeout.QuadPart = -(LONGLONG)UInt32x32To64(Timeout, PH_TIMEOUT_MS);
|
||||
|
||||
return NtWaitForSingleObject(Handle, FALSE, &timeout);
|
||||
}
|
||||
else
|
||||
{
|
||||
return NtWaitForSingleObject(Handle, FALSE, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -320,9 +320,9 @@ PhShowMessage2(
|
||||
#define TD_SHIELD_ICON MAKEINTRESOURCEW(-4)
|
||||
#endif
|
||||
|
||||
#define PhShowError2(WindowHandle, Title, Format, ...) PhShowMessage2(WindowHandle, TD_CLOSE_BUTTON, TD_ERROR_ICON, Title, Format __VA_OPT__(,) __VA_ARGS__)
|
||||
#define PhShowWarning2(WindowHandle, Title, Format, ...) PhShowMessage2(WindowHandle, TD_CLOSE_BUTTON, TD_WARNING_ICON, Title, Format __VA_OPT__(,) __VA_ARGS__)
|
||||
#define PhShowInformation2(WindowHandle, Title, Format, ...) PhShowMessage2(WindowHandle, TD_CLOSE_BUTTON, TD_INFORMATION_ICON, Title, Format __VA_OPT__(,) __VA_ARGS__)
|
||||
#define PhShowError2(WindowHandle, Title, Format, ...) PhShowMessage2(WindowHandle, TD_CLOSE_BUTTON, TD_ERROR_ICON, Title, Format, __VA_ARGS__)
|
||||
#define PhShowWarning2(WindowHandle, Title, Format, ...) PhShowMessage2(WindowHandle, TD_CLOSE_BUTTON, TD_WARNING_ICON, Title, Format, __VA_ARGS__)
|
||||
#define PhShowInformation2(WindowHandle, Title, Format, ...) PhShowMessage2(WindowHandle, TD_CLOSE_BUTTON, TD_INFORMATION_ICON, Title, Format, __VA_ARGS__)
|
||||
|
||||
PHLIBAPI
|
||||
BOOLEAN
|
||||
|
||||
+1
-1
@@ -597,7 +597,7 @@ static PPH_BYTES PhXmlSaveString(
|
||||
PhInitializeBytesBuilder(&stringBuilder, 0x8000);
|
||||
|
||||
options = mxmlOptionsNew();
|
||||
mxmlOptionsSetWhitespaceCallback(options, XmlSaveCallback, nullptr);
|
||||
mxmlOptionsSetWhitespaceCallback(options, XmlSaveCallback, NULL);
|
||||
mxmlOptionsSetTypeValue(options, MXML_TYPE_OPAQUE);
|
||||
success = !!mxmlSaveIO(XmlRootObject, options, mxml_io_callback, &stringBuilder);
|
||||
mxmlOptionsDelete(options);
|
||||
|
||||
+3
-3
@@ -527,7 +527,7 @@ PIMAGE_SECTION_HEADER PhMappedImageSectionByName(
|
||||
&MappedImage->Sections[i],
|
||||
sectionName,
|
||||
RTL_NUMBER_OF(sectionName),
|
||||
nullptr
|
||||
NULL
|
||||
) && PhEqualStringZ(sectionName, Name, IgnoreCase))
|
||||
{
|
||||
return &MappedImage->Sections[i];
|
||||
@@ -818,7 +818,7 @@ NTSTATUS PhLoadRemoteMappedImage(
|
||||
_Out_ PPH_REMOTE_MAPPED_IMAGE RemoteMappedImage
|
||||
)
|
||||
{
|
||||
return PhLoadRemoteMappedImageEx(ProcessHandle, ViewBase, ViewSize, nullptr, RemoteMappedImage);
|
||||
return PhLoadRemoteMappedImageEx(ProcessHandle, ViewBase, ViewSize, NULL, RemoteMappedImage);
|
||||
}
|
||||
|
||||
NTSTATUS PhLoadRemoteMappedImagePageSize(
|
||||
@@ -5711,7 +5711,7 @@ NTSTATUS PhGetRemoteMappedImageCHPEVersion(
|
||||
_Out_ PULONG CHPEVersion
|
||||
)
|
||||
{
|
||||
return PhGetRemoteMappedImageCHPEVersionEx(RemoteMappedImage, nullptr, CHPEVersion);
|
||||
return PhGetRemoteMappedImageCHPEVersionEx(RemoteMappedImage, NULL, CHPEVersion);
|
||||
}
|
||||
|
||||
NTSTATUS PhGetRemoteMappedImageCHPEVersionEx(
|
||||
|
||||
+1
-1
@@ -480,7 +480,7 @@ NTSTATUS PhGetProcedureAddressRemote(
|
||||
)
|
||||
{
|
||||
NTSTATUS status;
|
||||
PPH_STRING fileName = nullptr;
|
||||
PPH_STRING fileName = NULL;
|
||||
PH_MAPPED_IMAGE mappedImage;
|
||||
PH_MAPPED_IMAGE_EXPORTS exports;
|
||||
PH_PROCEDURE_ADDRESS_REMOTE_CONTEXT context;
|
||||
|
||||
+7
-7
@@ -46,7 +46,7 @@ PH_TOKEN_ATTRIBUTES PhGetOwnTokenAttributes(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static PH_TOKEN_ATTRIBUTES attributes = { nullptr };
|
||||
static PH_TOKEN_ATTRIBUTES attributes = { NULL };
|
||||
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
{
|
||||
@@ -1560,7 +1560,7 @@ NTSTATUS PhGetProcessSectionFileName(
|
||||
PVOID viewBase;
|
||||
|
||||
viewSize = PAGE_SIZE;
|
||||
viewBase = nullptr;
|
||||
viewBase = NULL;
|
||||
|
||||
status = NtMapViewOfSection(
|
||||
SectionHandle,
|
||||
@@ -1568,7 +1568,7 @@ NTSTATUS PhGetProcessSectionFileName(
|
||||
&viewBase,
|
||||
0,
|
||||
0,
|
||||
nullptr,
|
||||
NULL,
|
||||
&viewSize,
|
||||
ViewUnmap,
|
||||
0,
|
||||
@@ -5533,7 +5533,7 @@ NTSTATUS PhGetProcessActivityModerationState(
|
||||
)
|
||||
{
|
||||
NTSTATUS status;
|
||||
SYSTEM_ACTIVITY_MODERATION_USER_SETTINGS activityModeration = { nullptr };
|
||||
SYSTEM_ACTIVITY_MODERATION_USER_SETTINGS activityModeration = { NULL };
|
||||
PKEY_VALUE_PARTIAL_INFORMATION keyValueInfo;
|
||||
|
||||
status = NtQuerySystemInformation(
|
||||
@@ -6345,7 +6345,7 @@ NTSTATUS PhEnumHandlesGeneric(
|
||||
{
|
||||
PPROCESS_HANDLE_TABLE_ENTRY_INFO handle = &handles->Handles[i];
|
||||
|
||||
convertedHandles->Handles[i].Object = nullptr;
|
||||
convertedHandles->Handles[i].Object = NULL;
|
||||
convertedHandles->Handles[i].UniqueProcessId = ProcessId;
|
||||
convertedHandles->Handles[i].HandleValue = handle->HandleValue;
|
||||
convertedHandles->Handles[i].GrantedAccess = handle->GrantedAccess;
|
||||
@@ -13037,7 +13037,7 @@ static BOOLEAN NTAPI PhpKnownDllObjectsCallback(
|
||||
return TRUE;
|
||||
|
||||
viewSize = PAGE_SIZE;
|
||||
viewBase = nullptr;
|
||||
viewBase = NULL;
|
||||
|
||||
status = NtMapViewOfSection(
|
||||
sectionHandle,
|
||||
@@ -13103,7 +13103,7 @@ VOID PhInitializeKnownDlls(
|
||||
PhEnumDirectoryObjects(
|
||||
directoryHandle,
|
||||
PhpKnownDllObjectsCallback,
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
NtClose(directoryHandle);
|
||||
}
|
||||
|
||||
+6
-6
@@ -35,7 +35,7 @@ NTSTATUS PhCreatePipeEx(
|
||||
)
|
||||
{
|
||||
NTSTATUS status;
|
||||
PACL pipeAcl = nullptr;
|
||||
PACL pipeAcl = NULL;
|
||||
HANDLE pipeDirectoryHandle;
|
||||
HANDLE pipeReadHandle;
|
||||
HANDLE pipeWriteHandle;
|
||||
@@ -57,8 +57,8 @@ NTSTATUS PhCreatePipeEx(
|
||||
&objectAttributes,
|
||||
&pipeName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
nullptr,
|
||||
nullptr
|
||||
NULL,
|
||||
NULL
|
||||
);
|
||||
|
||||
status = NtOpenFile(
|
||||
@@ -73,7 +73,7 @@ NTSTATUS PhCreatePipeEx(
|
||||
if (!NT_SUCCESS(status))
|
||||
return status;
|
||||
|
||||
RtlInitEmptyUnicodeString(&pipeName, nullptr, 0);
|
||||
RtlInitEmptyUnicodeString(&pipeName, NULL, 0);
|
||||
InitializeObjectAttributes(
|
||||
&objectAttributes,
|
||||
&pipeName,
|
||||
@@ -127,13 +127,13 @@ NTSTATUS PhCreatePipeEx(
|
||||
if (!NT_SUCCESS(status))
|
||||
goto CleanupExit;
|
||||
|
||||
RtlInitEmptyUnicodeString(&pipeName, nullptr, 0);
|
||||
RtlInitEmptyUnicodeString(&pipeName, NULL, 0);
|
||||
InitializeObjectAttributes(
|
||||
&objectAttributes,
|
||||
&pipeName,
|
||||
OBJ_CASE_INSENSITIVE,
|
||||
pipeReadHandle,
|
||||
nullptr
|
||||
NULL
|
||||
);
|
||||
objectAttributes.SecurityQualityOfService = &pipeSecurityQos;
|
||||
|
||||
|
||||
@@ -753,7 +753,7 @@ NTSTATUS PhGetThreadApartmentState(
|
||||
#ifdef _WIN64
|
||||
BOOLEAN isWow64 = FALSE;
|
||||
#endif
|
||||
typeof(RTL_FIELD_TYPE(TEB, ReservedForOle)) oletlsBaseAddress = nullptr;
|
||||
__typeof__(RTL_FIELD_TYPE(TEB, ReservedForOle)) oletlsBaseAddress = NULL;
|
||||
|
||||
if (!NT_SUCCESS(status = PhGetThreadBasicInformation(ThreadHandle, &basicInfo)))
|
||||
return status;
|
||||
@@ -844,7 +844,7 @@ NTSTATUS PhGetThreadApartmentCallState(
|
||||
#ifdef _WIN64
|
||||
BOOLEAN isWow64 = FALSE;
|
||||
#endif
|
||||
typeof(RTL_FIELD_TYPE(TEB, ReservedForOle)) oletlsBaseAddress = nullptr;
|
||||
__typeof__(RTL_FIELD_TYPE(TEB, ReservedForOle)) oletlsBaseAddress = NULL;
|
||||
|
||||
if (!NT_SUCCESS(status = PhGetThreadBasicInformation(ThreadHandle, &basicInfo)))
|
||||
return status;
|
||||
@@ -1058,7 +1058,7 @@ NTSTATUS PhGetThreadSocketState(
|
||||
#ifdef _WIN64
|
||||
BOOLEAN isWow64 = FALSE;
|
||||
#endif
|
||||
typeof(RTL_FIELD_TYPE(TEB, WinSockData)) winsockHandleAddress = nullptr;
|
||||
__typeof__(RTL_FIELD_TYPE(TEB, WinSockData)) winsockHandleAddress = NULL;
|
||||
|
||||
if (!NT_SUCCESS(status = PhGetThreadBasicInformation(ThreadHandle, &basicInfo)))
|
||||
return status;
|
||||
|
||||
@@ -325,7 +325,6 @@
|
||||
<ClInclude Include="include\phconsole.h" />
|
||||
<ClInclude Include="include\phfirmware.h" />
|
||||
<ClInclude Include="include\searchbox.h" />
|
||||
<ClInclude Include="include\user.h" />
|
||||
<ClInclude Include="include\cpysave.h" />
|
||||
<ClInclude Include="include\exlf.h" />
|
||||
<ClInclude Include="include\exprodid.h" />
|
||||
|
||||
@@ -415,9 +415,6 @@
|
||||
<ClInclude Include="include\thirdparty.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\user.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="include\searchbox.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
|
||||
+1
-1
@@ -1091,7 +1091,7 @@ VOID FASTCALL PhfQueueWakeEvent(
|
||||
|
||||
WaitBlock->Flags = PH_QUEUED_WAITER_SPINNING;
|
||||
|
||||
value = _InterlockedCompareExchangePointer((volatile PVOID *)&WakeEvent->Value, nullptr, nullptr);
|
||||
value = _InterlockedCompareExchangePointer((volatile PVOID *)&WakeEvent->Value, NULL, NULL);
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
|
||||
+3
-3
@@ -680,19 +680,19 @@ LRESULT CALLBACK PhpSearchWndSubclassProc(
|
||||
if (context->CaseButton.TooltipHandle)
|
||||
{
|
||||
DestroyWindow(context->CaseButton.TooltipHandle);
|
||||
context->CaseButton.TooltipHandle = nullptr;
|
||||
context->CaseButton.TooltipHandle = NULL;
|
||||
}
|
||||
|
||||
if (context->RegexButton.TooltipHandle)
|
||||
{
|
||||
DestroyWindow(context->RegexButton.TooltipHandle);
|
||||
context->RegexButton.TooltipHandle = nullptr;
|
||||
context->RegexButton.TooltipHandle = NULL;
|
||||
}
|
||||
|
||||
if (context->SearchButton.TooltipHandle)
|
||||
{
|
||||
DestroyWindow(context->SearchButton.TooltipHandle);
|
||||
context->SearchButton.TooltipHandle = nullptr;
|
||||
context->SearchButton.TooltipHandle = NULL;
|
||||
}
|
||||
|
||||
PhpSearchControlDestroyBufferedContext(context);
|
||||
|
||||
+6
-6
@@ -21,13 +21,13 @@
|
||||
DEFINE_GUID(CLSID_WbemLocator, 0x4590f811, 0x1d3a, 0x11d0, 0x89, 0x1f, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24);
|
||||
DEFINE_GUID(IID_IWbemLocator, 0xdc12a687, 0x737f, 0x11cf, 0x88, 0x4d, 0x00, 0xaa, 0x00, 0x4b, 0x2e, 0x24);
|
||||
|
||||
typeof(&PowerGetActiveScheme) PowerGetActiveScheme_I = NULL;
|
||||
typeof(&PowerSetActiveScheme) PowerSetActiveScheme_I = NULL;
|
||||
typeof(&PowerRestoreDefaultPowerSchemes) PowerRestoreDefaultPowerSchemes_I = NULL;
|
||||
__typeof__(&PowerGetActiveScheme) PowerGetActiveScheme_I = NULL;
|
||||
__typeof__(&PowerSetActiveScheme) PowerSetActiveScheme_I = NULL;
|
||||
__typeof__(&PowerRestoreDefaultPowerSchemes) PowerRestoreDefaultPowerSchemes_I = NULL;
|
||||
_PowerReadSecurityDescriptor PowerReadSecurityDescriptor_I = NULL;
|
||||
_PowerWriteSecurityDescriptor PowerWriteSecurityDescriptor_I = NULL;
|
||||
typeof(&WTSGetListenerSecurityW) WTSGetListenerSecurity_I = NULL;
|
||||
typeof(&WTSSetListenerSecurityW) WTSSetListenerSecurity_I = NULL;
|
||||
__typeof__(&WTSGetListenerSecurityW) WTSGetListenerSecurity_I = NULL;
|
||||
__typeof__(&WTSSetListenerSecurityW) WTSSetListenerSecurity_I = NULL;
|
||||
|
||||
HRESULT PhGetWbemLocatorClass(
|
||||
_Out_ struct IWbemLocator** WbemLocatorClass
|
||||
@@ -186,7 +186,7 @@ PVOID PhGetWbemClassObjectUlongPtr(
|
||||
return (PVOID)V_UINT_PTR(&variant);
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Power policy security descriptors
|
||||
|
||||
+2
-2
@@ -336,7 +336,7 @@ NTSTATUS PhOpenService(
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
*ServiceHandle = nullptr;
|
||||
*ServiceHandle = NULL;
|
||||
return PhGetLastWin32ErrorAsNtStatus();
|
||||
}
|
||||
|
||||
@@ -435,7 +435,7 @@ NTSTATUS PhCreateService(
|
||||
}
|
||||
else
|
||||
{
|
||||
*ServiceHandle = nullptr;
|
||||
*ServiceHandle = NULL;
|
||||
status = PhGetLastWin32ErrorAsNtStatus();
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -1003,7 +1003,7 @@ VOID PhShowStatus(
|
||||
if (Message)
|
||||
PhShowError2(WindowHandle, Message, L"%s", PhGetString(statusMessage));
|
||||
else
|
||||
PhShowError2(WindowHandle, L"Unable to perform the operation.", PhGetString(statusMessage));
|
||||
PhShowError2(WindowHandle, L"Unable to perform the operation.", L"%s", PhGetString(statusMessage));
|
||||
|
||||
PhDereferenceObject(statusMessage);
|
||||
}
|
||||
@@ -2288,7 +2288,7 @@ NTSTATUS PhFormatGuidToBuffer(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&RtlStringFromGUIDEx) RtlStringFromGUIDEx_I = NULL;
|
||||
static __typeof__(&RtlStringFromGUIDEx) RtlStringFromGUIDEx_I = NULL;
|
||||
NTSTATUS status;
|
||||
UNICODE_STRING unicodeString;
|
||||
|
||||
@@ -5552,8 +5552,8 @@ VOID PhShellExploreFile(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&SHOpenFolderAndSelectItems) SHOpenFolderAndSelectItems_I = NULL;
|
||||
static typeof(&SHParseDisplayName) SHParseDisplayName_I = NULL;
|
||||
static __typeof__(&SHOpenFolderAndSelectItems) SHOpenFolderAndSelectItems_I = NULL;
|
||||
static __typeof__(&SHParseDisplayName) SHParseDisplayName_I = NULL;
|
||||
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
{
|
||||
@@ -9033,7 +9033,7 @@ HRESULT PhDevGetObjects(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&DevGetObjects) DevGetObjects_I = NULL;
|
||||
static __typeof__(&DevGetObjects) DevGetObjects_I = NULL;
|
||||
HRESULT status;
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
{
|
||||
@@ -9078,7 +9078,7 @@ VOID PhDevFreeObjects(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&DevFreeObjects) DevFreeObjects_I = NULL;
|
||||
static __typeof__(&DevFreeObjects) DevFreeObjects_I = NULL;
|
||||
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
{
|
||||
@@ -9110,7 +9110,7 @@ HRESULT PhDevGetObjectProperties(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&DevGetObjectProperties) DevGetObjectProperties_I = NULL;
|
||||
static __typeof__(&DevGetObjectProperties) DevGetObjectProperties_I = NULL;
|
||||
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
{
|
||||
@@ -9144,7 +9144,7 @@ VOID PhDevFreeObjectProperties(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&DevFreeObjectProperties) DevFreeObjectProperties_I = NULL;
|
||||
static __typeof__(&DevFreeObjectProperties) DevFreeObjectProperties_I = NULL;
|
||||
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
{
|
||||
@@ -9178,7 +9178,7 @@ HRESULT PhDevCreateObjectQuery(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&DevCreateObjectQuery) DevGetObjectProperties_I = NULL;
|
||||
static __typeof__(&DevCreateObjectQuery) DevGetObjectProperties_I = NULL;
|
||||
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
{
|
||||
@@ -9213,7 +9213,7 @@ VOID PhDevCloseObjectQuery(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&DevCloseObjectQuery) DevCloseObjectQuery_I = NULL;
|
||||
static __typeof__(&DevCloseObjectQuery) DevCloseObjectQuery_I = NULL;
|
||||
|
||||
if (PhBeginInitOnce(&initOnce))
|
||||
{
|
||||
|
||||
+10
-10
@@ -33,10 +33,10 @@ _CryptCATAdminReleaseContext CryptCATAdminReleaseContext;
|
||||
//_WTHelperProvDataFromStateData WTHelperProvDataFromStateData_I;
|
||||
//_WTHelperGetProvSignerFromChain WTHelperGetProvSignerFromChain_I;
|
||||
_WinVerifyTrust WinVerifyTrust_I;
|
||||
typeof(&CertNameToStrW) CertNameToStr_I;
|
||||
typeof(&CertGetEnhancedKeyUsage) CertGetEnhancedKeyUsage_I;
|
||||
typeof(&CertDuplicateCertificateContext) CertDuplicateCertificateContext_I;
|
||||
typeof(&CertFreeCertificateContext) CertFreeCertificateContext_I;
|
||||
__typeof__(&CertNameToStrW) CertNameToStr_I;
|
||||
__typeof__(&CertGetEnhancedKeyUsage) CertGetEnhancedKeyUsage_I;
|
||||
__typeof__(&CertDuplicateCertificateContext) CertDuplicateCertificateContext_I;
|
||||
__typeof__(&CertFreeCertificateContext) CertFreeCertificateContext_I;
|
||||
|
||||
static PH_INITONCE PhpVerifyInitOnce = PH_INITONCE_INIT;
|
||||
static CONST GUID WinTrustActionGenericVerifyV2 = WINTRUST_ACTION_GENERIC_VERIFY_V2;
|
||||
@@ -168,12 +168,12 @@ BOOLEAN PhIsChainedToMicrosoft(
|
||||
)
|
||||
{
|
||||
static PH_INITONCE initOnce = PH_INITONCE_INIT;
|
||||
static typeof(&CertOpenStore) CertOpenStore_I = NULL;
|
||||
static typeof(&CertAddStoreToCollection) CertAddStoreToCollection_I = NULL;
|
||||
static typeof(&CertGetCertificateChain) CertGetCertificateChain_I = NULL;
|
||||
static typeof(&CertVerifyCertificateChainPolicy) CertVerifyCertificateChainPolicy_I = NULL;
|
||||
static typeof(&CertFreeCertificateChain) CertFreeCertificateChain_I = NULL;
|
||||
static typeof(&CertCloseStore) CertCloseStore_I = NULL;
|
||||
static __typeof__(&CertOpenStore) CertOpenStore_I = NULL;
|
||||
static __typeof__(&CertAddStoreToCollection) CertAddStoreToCollection_I = NULL;
|
||||
static __typeof__(&CertGetCertificateChain) CertGetCertificateChain_I = NULL;
|
||||
static __typeof__(&CertVerifyCertificateChainPolicy) CertVerifyCertificateChainPolicy_I = NULL;
|
||||
static __typeof__(&CertFreeCertificateChain) CertFreeCertificateChain_I = NULL;
|
||||
static __typeof__(&CertCloseStore) CertCloseStore_I = NULL;
|
||||
BOOLEAN status = FALSE;
|
||||
HCERTSTORE cryptStoreHandle;
|
||||
CERT_CHAIN_POLICY_PARA policyPara = { sizeof(CERT_CHAIN_POLICY_PARA) };
|
||||
|
||||
@@ -164,14 +164,8 @@ typedef GUID *PGUID;
|
||||
typedef const GUID* PCGUID;
|
||||
#endif
|
||||
|
||||
#ifndef GUID_NULL
|
||||
DEFINE_GUID(GUID_NULL, 0x00000000L, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
|
||||
|
||||
#if __STDC_VERSION__ >= 202311L
|
||||
#ifndef __cplusplus
|
||||
#define nullptr ((void *)0)
|
||||
#endif
|
||||
typedef typeof(nullptr) nullptr_t;
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -200,9 +200,6 @@
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="resources\pooltag.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="resources\callback.ico" />
|
||||
<Image Include="resources\cpu.ico" />
|
||||
|
||||
@@ -272,11 +272,6 @@
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="resources\pooltag.txt">
|
||||
<Filter>Resource Files</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Image Include="resources\folder.ico">
|
||||
<Filter>Resource Files</Filter>
|
||||
|
||||
Vendored
-2
@@ -257,7 +257,6 @@
|
||||
<ClInclude Include="jsonc\snprintf_compat.h" />
|
||||
<ClInclude Include="jsonc\strdup_compat.h" />
|
||||
<ClInclude Include="jsonc\strerror_override.h" />
|
||||
<ClInclude Include="jsonc\strerror_override_private.h" />
|
||||
<ClInclude Include="jsonc\vasprintf_compat.h" />
|
||||
<ClInclude Include="maxminddb\data-pool.h" />
|
||||
<ClInclude Include="maxminddb\maxminddb-compat-util.h" />
|
||||
@@ -282,7 +281,6 @@
|
||||
<ClInclude Include="tlsh\tlsh_util.h" />
|
||||
<ClInclude Include="tlsh\tlsh_win_version.h" />
|
||||
<ClInclude Include="tlsh\tlsh_wrapper.h" />
|
||||
<ClInclude Include="tlsh\win_version.h" />
|
||||
<ClInclude Include="xxhash\xxhashwrapper.h" />
|
||||
<ClInclude Include="xxhash\xxhash.h" />
|
||||
</ItemGroup>
|
||||
|
||||
-3
@@ -335,9 +335,6 @@
|
||||
<ClInclude Include="jsonc\strerror_override.h">
|
||||
<Filter>Json-C\Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="jsonc\strerror_override_private.h">
|
||||
<Filter>Json-C\Headers</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="jsonc\json_types.h">
|
||||
<Filter>Json-C\Headers</Filter>
|
||||
</ClInclude>
|
||||
|
||||
Reference in New Issue
Block a user