Hi there!
The following code...
invoke socket, AF_INET, SOCK_DGRAM, 0
.. returns INVALID_SOCKET on WinXP, but runs fine on 9x/Me .
XP says theres a WSAEPROVIDERFAILEDINIT (0000277A) error.
I already dword-aligned all winsock structs but still it won't work.
Xp is evil....really :mad:
Any help?
aweX <-
The following code...
invoke socket, AF_INET, SOCK_DGRAM, 0
.. returns INVALID_SOCKET on WinXP, but runs fine on 9x/Me .
XP says theres a WSAEPROVIDERFAILEDINIT (0000277A) error.
I already dword-aligned all winsock structs but still it won't work.
Xp is evil....really :mad:
Any help?
aweX <-
Try passing IPPROTO_UDP for the last parameter instead of IPPROTO_IP (0).
Thanks for your reply IRBMe, but it still won't work.
I tried different WinSock versions... 1.1 2.0 2.2 ... everytime
it initialized successfully with the requested version in my WSAdata
struct (checked it).
But socket() won't work.
There's no straight programming for XP ... always generates errors
on the easiest things! Incredible........ :mad: :mad:
aweX <-
I tried different WinSock versions... 1.1 2.0 2.2 ... everytime
it initialized successfully with the requested version in my WSAdata
struct (checked it).
But socket() won't work.
There's no straight programming for XP ... always generates errors
on the easiest things! Incredible........ :mad: :mad:
aweX <-
I also tried to include ws2_32.lib instead of wsock32.lib ...
still no worky :(
still no worky :(
Hmmm sorry for the stupid question, but do you have any firewall on your XP station that may deny the operation ?
When using Tiny Personal Firewall, I got an error once, my connect API refused to work, that was because TFP hooked it and didn't allow it to connect...
When using Tiny Personal Firewall, I got an error once, my connect API refused to work, that was because TFP hooked it and didn't allow it to connect...
I don't have a firewall and I've also let others test the app and they also don't
have a firewall (or turned it off for the test). And it seems like it also fails
on 2k, so it's yet another mysterious NT bug ...
I also tried to pack all my WinSock operations into seperate threads. Two, to
be exact. Every thread starts with WSAStartup and ends with WSACleanup,
so it should be one straight thing...
but still... no luck.
aweX <-
have a firewall (or turned it off for the test). And it seems like it also fails
on 2k, so it's yet another mysterious NT bug ...
I also tried to pack all my WinSock operations into seperate threads. Two, to
be exact. Every thread starts with WSAStartup and ends with WSACleanup,
so it should be one straight thing...
but still... no luck.
aweX <-
Hmm... WSAPROVIDERFAILEDINIT ? Well, I read the documentation and it says that the socket function will return the following errors.
WSANOTINITIALISED="A successful WSAStartup() must occur before using this API."
WSAENETDOWN="The Windows Sockets implementation has detected that the network subsystem has failed."
WSAEAFNOSUPPORT="The specified address family is not supported."
WSAEINPROGRESS = "A blocking Windows Sockets operation is in progress."
WSAEMFILE="No more file descriptors are available."
WSAENOBUFS="No buffer space is available. The socket cannot be created."
WSAEPROTONOSUPPORT="The specified protocol is not supported."
WSAEPROTOTYPE="The specified protocol is the wrong type for this socket."
WSAESOCKTNOSUPPORT="The specified socket type is not supported in this address family."
As you see WSAPROVIDERFAILEDINIT is not one of them :confused: Are you sure you called WSAGetLastError?
I did find the entry though:
WSAPROVIDERFAILEDINIT - (OS dependent) - Unable to initialize a service provider. Either a service provider's DLL could not be loaded (LoadLibrary() failed) or the provider's WSPStartup/NSPStartup function failed.
I unfortunately don't know how to solve that though.
WSANOTINITIALISED="A successful WSAStartup() must occur before using this API."
WSAENETDOWN="The Windows Sockets implementation has detected that the network subsystem has failed."
WSAEAFNOSUPPORT="The specified address family is not supported."
WSAEINPROGRESS = "A blocking Windows Sockets operation is in progress."
WSAEMFILE="No more file descriptors are available."
WSAENOBUFS="No buffer space is available. The socket cannot be created."
WSAEPROTONOSUPPORT="The specified protocol is not supported."
WSAEPROTOTYPE="The specified protocol is the wrong type for this socket."
WSAESOCKTNOSUPPORT="The specified socket type is not supported in this address family."
As you see WSAPROVIDERFAILEDINIT is not one of them :confused: Are you sure you called WSAGetLastError?
I did find the entry though:
WSAPROVIDERFAILEDINIT - (OS dependent) - Unable to initialize a service provider. Either a service provider's DLL could not be loaded (LoadLibrary() failed) or the provider's WSPStartup/NSPStartup function failed.
I unfortunately don't know how to solve that though.
Oh yeah... I really love it! :mad: :mad: :mad:
http://www.asmcommunity.net/board/showthread.php?threadid=10462
http://www.asmcommunity.net/board/showthread.php?threadid=10462