3dscontroller-ng/PC/source/general.c
2014-12-05 20:03:50 +00:00

18 lines
362 B
C

#include "wireless.h"
#include "general.h"
void error(const char *functionName) {
char errorMsg[92];
ZeroMemory(errorMsg, 92);
sprintf(errorMsg, "Call to %s returned error %d!", (char *)functionName, WSAGetLastError());
MessageBox(NULL, errorMsg, "socketIndication", MB_OK);
closesocket(client);
closesocket(listener);
WSACleanup();
exit(0);
}