brainlilo/bootloader.cpp

24 lines
460 B
C++
Raw Normal View History

2022-01-24 01:52:45 +09:00
#include <windows.h>
2020-09-28 03:19:37 +09:00
2022-01-24 01:52:45 +09:00
int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR lpCmd, int nShow)
{
HINSTANCE lib = LoadLibrary(L"BrainLILO");
if (!lib)
{
2020-09-28 03:19:37 +09:00
return 1;
}
2022-01-24 01:52:45 +09:00
2020-09-28 03:19:37 +09:00
typedef BOOL (*RKDoSoftResetProc)();
2022-01-24 01:52:45 +09:00
RKDoSoftResetProc RKDoSoftReset = (RKDoSoftResetProc)GetProcAddress(lib, L"RKDoSoftReset");
if (!RKDoSoftReset)
{
2020-09-28 03:19:37 +09:00
return 1;
}
2022-01-24 01:52:45 +09:00
if (!RKDoSoftReset())
{
2020-09-28 03:19:37 +09:00
return 1;
}
return 0;
}