Im having an error when returning an integer variable to a defined function that seems to be specified to return void. This is in the winsock.h header file for version 1.1. This problem lies in the function WSAGetLastError - which simply stores -1 in int nret. But, WSAGetLastError seems to return void in the included header file.
Should I just edit the header file so that WSAGetLastError returns int? I.E. WSAGetLastError(int) instead of (void)?Code:int nret; //... if(nret == SOCKET_ERROR) { nret = WSAGetLastError; ReportError = WSAGetLastError(nret, "bind()"); WSACleanup(); return NETWORK_ERROR; } //In winsock.h int PASCAL WSAGetLastError(void);



LinkBack URL
About LinkBacks


