//
// BootCompleteApp.cpp
//

#include <windows.h>
#include <nkintr.h>

int WINAPI WinMain(HINSTANCE hInstance,
                     HINSTANCE hPrevInstance,
                     LPTSTR     lpCmdLine,
                     int       nCmdShow)
{

    HANDLE BootCompleteEvent = OpenEvent(EVENT_ALL_ACCESS, FALSE, TEXT("OEM/BootCompleteEvent"));
    if (BootCompleteEvent == NULL)
    {
        RETAILMSG(1, (TEXT("[BootCompleteApp] ERROR: Notify OpenEvent() FAIL 0x%08X\r\n"), GetLastError()));
        CloseHandle(BootCompleteEvent);
        BootCompleteEvent = NULL;
    }
    else
    {
        RETAILMSG(1,(TEXT("[BootCompleteApp] Boot Complete Event Occured\r\n")));    
        ResetEvent(BootCompleteEvent);
        SetEvent(BootCompleteEvent);
    }
    return 0;
}
