Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Message box inside if loop

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.
0 Kudos
Message 1 of 2
(3,251 Views)
sdfsd,

I am a little unclear what part of the posted code has todo with Measurement Studio. Is it possible that this post is a VC++ question instead. If I am missing something please let me know. Have a great day!


Allan S.
National Instruments
0 Kudos
Message 2 of 2
(3,225 Views)