Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// app.h
class CYourApp : public CWinApp
{
...
private:
HANDLE hMutex;
};
// app.cpp
BOOL CYourApp::InitInstance()
{
// Create mutex
hMutex = ::CreateMutex(NULL, TRUE, "GlobalMutex");
switch(::GetLastError())
{
case ERROR_SUCCESS:
// Mutex created successfully. There is no instance running
break;
case ERROR_ALREADY_EXISTS:
// Mutex already exists so there is a running instance of our app.
return FALSE;
default:
// Failed to create mutex by unknown reason
return FALSE;
}
}