brainlilo/bootloader.cpp
2022-11-01 03:46:14 +09:00

24 lines
460 B
C++

#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmd, int nShow)
{
HINSTANCE lib = LoadLibrary(L"BrainLILO");
if (!lib)
{
return 1;
}
typedef BOOL (*RKDoSoftResetProc)();
RKDoSoftResetProc RKDoSoftReset = (RKDoSoftResetProc)GetProcAddress(lib, L"RKDoSoftReset");
if (!RKDoSoftReset)
{
return 1;
}
if (!RKDoSoftReset())
{
return 1;
}
return 0;
}