Hi,
I keep getting a WSAEPROVIDERFAILEDINIT error when trying to create a socket
i have never had this problem before....this is a snippet



invoke WSAStartup,0x0202,lpWSADATA ;returns successfully

invoke socket,AF_INET,SOCK_STREAM,IPPROTO_TCP ;returns the error


but i think there is another problem maybe with system settings
I'm running win2k service pack 3.
has any1 else had this problem?
Posted on 2003-03-02 10:22:19 by keyoke
Hi

have you always used:

invoke socket,AF_INET,SOCK_STREAM,IPPROTO_TCP

?

invoke socket,AF_INET,SOCK_STREAM,0

works fine, far as I recall.

Fake
Posted on 2003-03-02 15:24:16 by Fake51
You say that
invoke WSAStartup,0x0202,lpWSADATA ;returns successfully

I believe it should be
invoke WSAStartup,202h,lpWSADATA

I have used
invoke socket,AF_INET,SOCK_STREAM,IPPROTO_TCP
with no problems.

If invoke socket,AF_INET,SOCK_STREAM,IPPROTO_TCP fails,
it should return INVALID_SOCKET then a call to WSAGetLastError
should return:
1. WSANOTINITIALISED
2. WSAENETDOWN
3. WSAEAFNOSUPPORT The specified address family is not supported.
4. WSAEINPROGRESS
5. WSAEMFILE
6. WSAENOBUFS
7. WSAEPROTONOSUPPORT
8. WSAEPROTOTYPE
9. WSAESOCKTNOSUPPORT


WSAEPROVIDERFAILEDINIT is not in the list of valid returns
Posted on 2003-03-02 17:00:54 by anon
thnx for the replies

have you always used:

invoke socket,AF_INET,SOCK_STREAM,IPPROTO_TCP

?

invoke socket,AF_INET,SOCK_STREAM,0



yes i have used this before and worked fine, i have also tried 0 but returns same error eax = -1 and the error WSAEPROVIDERFAILEDINIT


I believe it should be
invoke WSAStartup,202h,lpWSADATA


0x202 is the same as 202h in fasm

and I am not using WSAGetLastError WSAEPROVIDERFAILEDINIT is returned when debugging the prog, this error is in the sdk's but doesnt really give good explanantion maybe my os stuffed up. because this was working fine before.

ok i tried this on another machine also win2k and works fine so must be problem with home machine :(
Posted on 2003-03-03 02:14:24 by keyoke