WinMain entry point The user-provided entry point for a
graphical Windows-based application. WinMain is the conventional
name used for the application entry point. For more information,
see Remarks. int CALLBACK WinMain( _In_ HINSTANCE hInstance,
_In_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int
nCmdShow ); - hInstance [in] A handle to the current instance of
the application. - hPrevInstance [in] A handle to the previous
instance of the application. This parameter is always NULL. If
you need to detect whether another instance already exists,
create a uniquely named mutex using the CreateMutex function.
CreateMutex will succeed even if the mutex already exists, but
the function will return ERROR_ALREADY_EXISTS. This indicates
that another instance of your application exists, because it
created the mutex first. However, a malicious user can create
this mutex before you do and prevent your application from
starting. To prevent this situation, create a randomly named
mutex and store the name so that it