On Wed, Mar 5, 2008 at 6:28 PM, Christopher Harvey arbuckle911@gmail.com wrote:
Are you seriously asking if adding a hack to a public header in order to read a global variable from another dll is acceptable? That pretty much sums up the answer.
I'm giving the mswsock.c file some development time. I need to know if the winsock API has been inited.
The question is, why do you need to know that? Can't you just initialize it yourself? Then you'll know it has been. --Juan
Juan Lang wrote:
There are some functions that return errors if WSAStartup hasn't been called. I think wine should do that too, rather than call it for the application.
Perhaps it should, but that should be fixed in ws2_32, not in mswsock. --Juan
"Christopher Harvey" arbuckle911@gmail.com wrote:
It would really help to at least name those "some functions", or even better to provide a test case.
Dmitry Timoshkov wrote:
Alright, I see where I'm going wrong. I was reading the WSAAccept function when I thought I was reading the AcceptEx page in MSDN.
Sorry.
Actually the correct way IMHO is to implement AcceptEx/GetAcceptExSockaddrs/TransmitFile in ws2_32.dll, and use WSAIoctl(SIO_GET_EXTENSION_FUNCTION_POINTER) to get function addresses in mswsock.dll. I believe this is that Windows' mswsock.dll do.
Christopher Harvey wrote: