Skip to content

DetourFindRemotePayload

Brian Gianforcaro edited this page Mar 6, 2021 · 1 revision

DetourFindRemotePayload

Return the address of the specified payload within a remote process.

Definition

_Success_(return != NULL)
PVOID DetourFindRemotePayload(
    _In_      HANDLE  hProcess,
    _In_      REFGUID rguid,
    _Out_opt_ DWORD  *pcbData
);

Parameters

hProcess : Process in which the specified payload should be searched.

rguid : GUID of the specified payload.

pcbData : Variable to receive the size in bytes of the specified payload.

Return value

Pointer to the specified payload or NULL if the payload doesn't exist.

Error codes

On failure, DetourFindRemotePayload will return NULL. Extended error code information may be retrieved by calling GetLastError.

Remarks

Where DetourFindPayload and DetourFindPayloadEx search for a payload in the current process, DetourFindRemotePayload searches for a payload in a different process. The returned value can then be read or written with ReadProcessMemory or WriteProcessMemory.

For more information on binary editing with Detours and payloads, see Payloads and DLL Import Editing in the Detours Overview.

Related Samples

Payload.

Clone this wiki locally