Domito/include/Domito.h

45 lines
909 B
C
Raw Normal View History

#pragma once
//
// Custom allocator for function that allocate pool memory
//
2023-07-01 04:23:11 +02:00
typedef
_IRQL_requires_same_
2023-07-01 04:36:59 +02:00
_Function_class_(EVT_DOMITO_ALLOCATE_ROUTINE)
2023-07-01 04:23:11 +02:00
__drv_allocatesMem(Mem)
PVOID
NTAPI
2023-07-01 04:36:59 +02:00
EVT_DOMITO_ALLOCATE_ROUTINE(
2023-07-01 04:23:11 +02:00
_In_ SIZE_T ByteSize
);
2023-07-01 04:36:59 +02:00
typedef EVT_DOMITO_ALLOCATE_ROUTINE* PFN_DOMITO_ALLOCATE_ROUTINE;
2023-07-01 04:36:59 +02:00
//
// Finds the base address of a driver module
//
_Success_(return == STATUS_SUCCESS)
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
EXTERN_C
NTSTATUS
DomitoFindDriverBaseAddress(
2023-07-01 04:23:11 +02:00
_In_ STRING ModuleName,
2023-07-01 04:36:59 +02:00
_In_ PFN_DOMITO_ALLOCATE_ROUTINE Allocator,
2023-07-01 04:23:11 +02:00
_Inout_opt_ PVOID * ModuleBase
);
2023-07-01 04:36:59 +02:00
//
// Finds the address of an exported function by name
//
_Success_(return == STATUS_SUCCESS)
_Must_inspect_result_
_IRQL_requires_max_(PASSIVE_LEVEL)
EXTERN_C
NTSTATUS
DomitoFindExportedFunctionAddress(
2023-07-01 04:23:11 +02:00
_In_ PVOID ModuleBase,
_In_ STRING FunctionName,
_Inout_opt_ PVOID * FunctionAddress
);