News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Where are the select macros (FD_SET, FD_ZERO, etc)?

Started by Brannagan, July 19, 2014, 03:00:47 AM

Previous topic - Next topic

Brannagan

I'm trying to use the select function with MASM32, but I'm getting error messages like these:

error A2006: undefined symbol : FD_SET
error A2006: undefined symbol : FD_ZERO
error A2006: undefined symbol : select

Can anyone tell me if these are defined in any include file, or how to add them manually?

http://msdn.microsoft.com/en-us/library/windows/desktop/ms740142(v=vs.85).aspx

dedndave

i don't see them
but - it's a simple variable length array of dwords, i guess
the first dword holds a count, which tells you how many additional dwords there are in the array

MichaelW

Try the Microsoft WinSock2.h header file, probably available with Visual Studio and with at least some of the available PSDKs.
Well Microsoft, here's another nice mess you've gotten us into.

Tedd

The 'select' function is defined in "ws2_32.inc" (there's also one in "wsock32.inc").
The 'fd_set' structure is defined in "windows.inc".

The macros, unfortunately, are not. They're actually implemented as inline 'functions' so you'll need to write your own (either as separate functions, or inlined with macros); luckily they are quite simple.
Potato2