I am coding to make UDP communication among computers.
I just take the local port no from the user & create the socket. But, I get the screen with
this message............
TODO: <File description> has encountered a problem and needs to close. We are sorry for the inconvenience.

The debugger does not enter in the if loop also..it goes to if statement execute it & shows that screen.

The code I used is...........

void CUDPTry2Dlg::OnCreateSocket()
{
UpdateData(TRUE);

m_sendBuffer = ""; //for async send
m_nBytesSent = 0;
m_nBytesBufferSize = 0;

if ( !UDPptr -> Create( m_LocalPort, SOCK_DGRAM ) )
{
wsprintf(m_szError, "Failed to create UDP socket: %d! Close and restart app.",
UDPptr->GetLastError());
delete UDPptr;
UDPptr = NULL;
AfxMessageBox ( m_szError );
return;
}
}