3dscontroller-ng/PC/source/general.c

19 lines
362 B
C
Raw Normal View History

2014-12-05 20:03:50 +00:00
#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);
}