My program currently writes data to the registry when it is closed (Either by closing its window or using the Task Manager). However, it doesn't seem to do it when the computer is shutdown. My WinMain loop calls the functions necessary:-
And in my WindowProc:-
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
g_hInstance = hInstance;
Registry(FALSE); // Load
while (GetMessage(&msg, NULL, 0, 0))
Registry(TRUE); // Save
This leads me to believe that either the WM_DESTROY message isn't being sent, or the function call after the message pump in WinMain is being side-stepped for some reason. Or perhaps the registry is locked up for the night before I can write to it?