c++ - How to call winapi function via pointer to this function? -
i functions ntdll.dll
dynamically, using getprocaddress
winapi function this:
hmodule ntdllh = loadlibrary(l"ntdll.dll"); unsigned char* ptrtontloaddriver = (unsigned char*)getprocaddress(ntdllh, "ntloaddriver");
how can call ntloaddriver
function via ptrtontloaddriver
? thought of this: ((ntstatus ntloaddriver(punicode_string driverservicename))ptrtontloaddriver)(foostring)
- do typedef "x" function type want call (example: "typedef returntype (*x)(argtype);")
- change "unsigned char* ptrtontloaddriver" "x ptrtontloaddriver"
- call function "ptrtontloaddriver(argshere)"
Comments
Post a Comment