Skip to content

Commit

Permalink
Update native.c
Browse files Browse the repository at this point in the history
  • Loading branch information
dmex committed Jan 23, 2025
1 parent b3de0c6 commit f03ce19
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions phlib/native.c
Original file line number Diff line number Diff line change
Expand Up @@ -10248,7 +10248,7 @@ BOOLEAN PhDoesDirectoryExist(

// rev from RtlDetermineDosPathNameType_U (dmex)
RTL_PATH_TYPE PhDetermineDosPathNameType(
_In_ PPH_STRINGREF FileName
_In_ PCPH_STRINGREF FileName
)
{
#if defined(PHNT_USE_NATIVE_PATHTYPE)
Expand Down Expand Up @@ -12469,7 +12469,9 @@ NTSTATUS PhGetProcessorNominalFrequency(
return status;
}

//
// Process freeze/thaw support
//

NTSTATUS PhFreezeProcess(
_Out_ PHANDLE FreezeHandle,
Expand Down Expand Up @@ -12542,7 +12544,7 @@ NTSTATUS PhThawProcess(
NTSTATUS status;
HANDLE processHandle;

if (!NtChangeProcessState_Import())
if (!(NtCreateProcessStateChange_Import() && NtChangeProcessState_Import()))
return STATUS_UNSUCCESSFUL;

status = PhOpenProcess(
Expand Down Expand Up @@ -12639,7 +12641,7 @@ NTSTATUS PhThawThread(
NTSTATUS status;
HANDLE threadHandle;

if (!NtChangeThreadState_Import())
if (!(NtCreateThreadStateChange_Import() && NtChangeThreadState_Import()))
return STATUS_UNSUCCESSFUL;

status = PhOpenThread(
Expand All @@ -12665,7 +12667,9 @@ NTSTATUS PhThawThread(
return status;
}

//
// Process execution request support
//

static PH_INITONCE PhExecutionRequestInitOnce = PH_INITONCE_INIT;
static PPH_HASHTABLE PhExecutionRequestHashtable = NULL;
Expand Down

0 comments on commit f03ce19

Please sign in to comment.