In TLWHView code...
HANDLE hMutex = CreateMutex(NULL, FALSE, g_szAppName); // create or open the mutex
if (hMutex)
if (GetLastError() == ERROR_ALREADY_EXISTS) {// test a mutex existence
COPYDATASTRUCT cds;
g_hFrame = FindWindow(szFrameClass, NULL);
cds.dwData = 1;
cds.cbData = lstrlen(lpCmdLine);
cds.lpData = lpCmdLine;
SendMessage(g_hFrame, WM_COPYDATA, 0, (LPARAM)&cds);
ShowWindow(g_hFrame, SW_RESTORE);
} else {
// create application window
...
case WM_COPYDATA:
return OnCopyData(hwnd,(UINT)wParam, (PCOPYDATASTRUCT)lParam),0;
...
...