Skip to content

Commit

Permalink
[TRANSACTION] Mark "Delay Hook" available when targets NT6+
Browse files Browse the repository at this point in the history
  • Loading branch information
RatinCN committed Jul 26, 2024
1 parent ef3a5ac commit c63bf90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/SlimDetours/SlimDetours.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ NTSTATUS NTAPI SlimDetoursDetach(
_Inout_ PVOID* ppPointer,
_In_ PVOID pDetour);

#if (NTDDI_VERSION >= NTDDI_WIN6)

/// <summary>
/// Delay hook, set hooks automatically when target DLL loaded.
/// </summary>
Expand All @@ -76,6 +78,8 @@ NTSTATUS NTAPI SlimDetoursDelayAttach(
_In_opt_ __callback DETOUR_DELAY_ATTACH_CALLBACK Callback,
_In_opt_ PVOID Context);

#endif /* (NTDDI_VERSION >= NTDDI_WIN6) */

PVOID
NTAPI
SlimDetoursCodeFromPointer(
Expand Down
4 changes: 4 additions & 0 deletions Source/SlimDetours/Transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,8 @@ SlimDetoursDetach(
return STATUS_SUCCESS;
}

#if (NTDDI_VERSION >= NTDDI_WIN6)

static
NTSTATUS
NTAPI
Expand Down Expand Up @@ -750,3 +752,5 @@ SlimDetoursDelayAttach(
RtlReleaseSRWLockExclusive(&g_DelayedAttachesLock);
return Status;
}

#endif /* (NTDDI_VERSION >= NTDDI_WIN6) */

0 comments on commit c63bf90

Please sign in to comment.