3 /* Copies string corresponding to the error code provided */
4 /* into buf, maximum length len. Returns length actually */
5 /* copied to buffer, or zero if error code is unknown. */
6 /* String resources should be present for each error code */
7 /* using the value of the code as the string ID (except for */
8 /* error = 0, which is mapped to WSABASEERR to keep it with */
9 /* the others). The DLL is free to use any string IDs that */
10 /* are less than WSABASEERR for its own use. The LibMain */
11 /* procedure of the DLL is presumed to have saved its */
12 /* HINSTANCE in the global variable hInst. */
14 int PASCAL FAR WSAsperror (int errorcode, char far * buf, int len)
17 errorcode = WSABASEERR;
18 if (errorcode < WSABASEERR)
20 return LoadString(hInst,errorcode,buf,len);