BOOL CSyncPollerDlg::OnInitDialog()
{
CDialog::OnInitDialog();
//to prevent multiple instances of SyncPoller.exe
strcpy(pipename, "\\\\.\\pipe\\TriviumSycPoller");
pipe = CreateNamedPipe(pipename, PIPE_ACCESS_DUPLEX, PIPE_TYPE_BYTE, 1, 64, 64, 100, 0);
if (pipe == INVALID_HANDLE_VALUE)
{
AfxMessage("Already opened");
CDialog::OnClose();
return false;
}
When i create another instance it works fine but i couldnt press OK in the message box. Could any one please help me to sort out this.