cast(typeof(Function Poiner Name))
sample
/*==========================================
NtCreateFile
==========================================*/
extern(Windows) NTSTATUS function
(
PHANDLE FileHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes,
PIO_STATUS_BLOCK IoStatusBlock,
PLARGE_INTEGER AllocationSize,
ULONG FileAttributes,
ULONG ShareAccess,
ULONG CreateDisposition,
ULONG CreateOptions,
PVOID EaBuffer,
ULONG EaLength
) NtCreateFile;
NtCreateFile = cast(typeof(NtCreateFile)) GetProcAddress ( GetModuleHandleA ("ntdll.dll"), "NtCreateFile");
sample
/*==========================================
NtCreateFile
==========================================*/
extern(Windows) NTSTATUS function
(
PHANDLE FileHandle,
ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes,
PIO_STATUS_BLOCK IoStatusBlock,
PLARGE_INTEGER AllocationSize,
ULONG FileAttributes,
ULONG ShareAccess,
ULONG CreateDisposition,
ULONG CreateOptions,
PVOID EaBuffer,
ULONG EaLength
) NtCreateFile;
NtCreateFile = cast(typeof(NtCreateFile)) GetProcAddress ( GetModuleHandleA ("ntdll.dll"), "NtCreateFile");