36 lines
1.1 KiB
C
36 lines
1.1 KiB
C
// Public nt-lite DDK deferred procedure call declarations.
|
|
|
|
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <ntlite/ddk/list.h>
|
|
#include <ntlite/ddk/sync.h>
|
|
|
|
typedef struct KDPC KDPC;
|
|
|
|
typedef void (*KDEFERRED_ROUTINE)(KDPC* dpc,
|
|
void* context,
|
|
void* systemArgument1,
|
|
void* systemArgument2);
|
|
|
|
// Legacy DPC storage used by current kernel-mode drivers.
|
|
struct KDPC {
|
|
LIST_ENTRY Link;
|
|
KDEFERRED_ROUTINE Routine;
|
|
void* Context;
|
|
void* SystemArgument1;
|
|
void* SystemArgument2;
|
|
volatile int32_t Inserted;
|
|
};
|
|
|
|
// Initializes a DPC object.
|
|
__declspec(dllexport) void KeInitializeDpc(KDPC* dpc,
|
|
KDEFERRED_ROUTINE routine,
|
|
void* context);
|
|
|
|
// Queues a DPC if it is not already queued.
|
|
__declspec(dllexport) bool KeInsertQueueDpc(KDPC* dpc,
|
|
void* systemArgument1,
|
|
void* systemArgument2);
|