• Advertisement

Archived

This topic is now archived and is closed to further replies.

I FOUND OUT THE PROBLEM =)

This topic is 6221 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

okay some of you may know i''ve been having trouble with console win32 apps cause they freeze at startup! well i found out the problem was with winsock 2.0. I can live with 1.0 for now but i really think i should use 2.0 later. i know it''s easily upgradeable but any ideas how to fix my problem with 2.0?

Share this post


Link to post
Share on other sites
Advertisement
Post your code.

Assuming you''re using Visual Studio, where does the app hang when debugging it?

Share this post


Link to post
Share on other sites
Well i'm not using my code (lol my code just plain isn't working but i didn't make it from scratch so....). I got one game server to work with downgrading to 1.1 but this other server program jsut doesn't want to work (it keeps hanging at startup like before). I think it's a problem with either the way i'm initializing or (knowing microsoft) the commands for winsock are using functions for winsock 2 and it's causing problems right away. What's a good way in your opionion to initialize winsock for 1.1?

*update*
well i checked the code and the recieving functions and winsock calls are all winsock 1.1 compatible so....

Edited by - kalldrex on February 12, 2001 5:16:49 PM

Share this post


Link to post
Share on other sites

#include

int main(int argc, char* argv[])
{
WSADATA wsaData;
int nRet = 0;

if((nRet = WSAStartup(MAKEWORD(2,0), &wsaData)))
{
switch(nRet)
{
case WSASYSNOTREADY:
...
case WSAVERNOTSUPPORTED:
...
case WSAEINPROGRESS:
...
case WSAEPROCLIM:
...
case WSAEFAULT:
...
};
return 1;
}

//MAIN GAME LOOP

WSACleanup();

return 0;
}

Share this post


Link to post
Share on other sites

  • Advertisement