Boun said:
Can anyone help me with this problem? I have problem with
winsock.dll. Everytime I install wireless notebook adapter
I got this message: 10093:Successful WSAStartup not yet
performed. What can I do to fix this. Any help would be
appreciate it.
Thanks,
Boun
I suspect your driver is out-of-date, as the WSAStartup
function initiates use of WS2_32.DLL by a process.
If you have access to the Windows SDK, try this test . . .
/*-----------------------------------------------
A. Illeman
Program to get Winsock protocol list.
06-06-2004
------------------------------------------------*/
#include <stdio.h>
#include <malloc.h>
#include <winsock2.h>
int main(int argc, char *argv[])
{
int i, error, nProtocols;
DWORD dwNum, *pdwNum;
struct WSAData wsaData;
WSAPROTOCOL_INFO *pInfo, *pData;
/* Startup Winsock library */
error = WSAStartup(MAKEWORD(2, 2), &wsaData);
if (error != 0) {
printf("WSAStartup error.\n");
return -1;
}
/* Get minimum bytes for protocol data */
dwNum = 0;
pdwNum = &dwNum;
WSAEnumProtocols(NULL, NULL, pdwNum);
/* Allocate space */
pInfo = (WSAPROTOCOL_INFO *) malloc(dwNum);
if (pInfo == NULL) {
printf("Unable to allocate %d bytes\n", dwNum);
WSACleanup();
return -1;
}
/* Load protocol info */
nProtocols = WSAEnumProtocols(NULL, pInfo, pdwNum);
printf("Number of protocols = %d \n", nProtocols);
/* Scan structures in memory */
for (i=0; i<nProtocols; i++) {
pData = &pInfo
;
printf("Protocol %d: %s\n", i+1, pData->szProtocol);
}
/* Exit */
free(pInfo);
WSACleanup();
printf("\nOperation was successful.\n");
return 0;
}
-------- makefile (NMAKE.EXE) ------------------------
project = localinf
cflags = /c /G5 /W3
lflags = /NODEFAULTLIBldnames.lib /NODEFAULTLIB:uuid.lib /INCREMENTAL:NO /WARN:3
all: $(project).exe
OBJS = localinf.obj
LIBS = ws2_32.lib
test1.obj:
cl $(cflags) $*.c
$(project).exe: $(OBJS)
link $(lflags) -out:$(project).exe $(OBJS) $(LIBS)
-------------------------------------------------
Alternatively, I could email you the .exe file (28k)
which you would run in a 'Command Prompt Box'
Alan