RtlAdjustPrivilege and NtRaiseHardError
Arsium
mehdi81101 at gmail.com
Fri May 22 19:19:19 UTC 2020
Just I tried to launch those functions from win32 api and seems
doesn't work
Here is my code
module D_Programming_Test;
import core.sys.windows.windows;
pragma(lib, "ntdll.lib");
alias extern(C) int function(string[] args) MainFunc;
extern (C) int _d_run_main(int argc, char **argv, MainFunc
mainFunc);
extern (Windows)
int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
lpCmdLine, int nCmdShow)
{
return _d_run_main(0, null, &main); // arguments unused,
retrieved via CommandLineToArgvW
}
extern (Windows)
LRESULT NtRaiseHardError(int az512 , uint az56 , uint sqd56 , int
sqd52 , int foazeo , uint azd);
extern (Windows)
int RtlAdjustPrivilege(ulong az512 , bool az56 , bool sqd56 ,
bool sqd52 )
{
return 1;
}
extern(C) int main(string[] args)
{
MessageBoxW(null, "Hello D World!"w.ptr, "D Windows
Application"w.ptr, MB_OK);
bool t1 ;
uint t2 ;
int i = 0xC0000022 ;
RtlAdjustPrivilege(19, true, false, t1);
NtRaiseHardError(i, 0, 0, 0, 6, t2);
return 0;
}
More information about the Digitalmars-d-learn
mailing list