MakeWord( hi, low )
Blitz3D Forums/Blitz3D Beginners Area/MakeWord( hi, low )
| ||
wVersionRequested = MAKEWORD( 2, 2 ) ; is the following code going to result in what I need? Please let me know if I need to provide more info. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/wsastartup_2.asp Function MakeWord( hi, low ) tempbank = CreateBank(2) PokeByte tempbank,0,hi PokeByte tempbank,1,low tempshort = PeekShort(tempbank,0) FreeBank tempbank Return tempshort End Function |
| ||
I don't think so, because wVersionRequested would then contain a pointer to the word. Better to just pass a regular int % (not bank *) by doing something like this: wVersionRequested = (hi Shl 8) Or low ... and make sure your decls specifies the parameter as %. |
| ||
And reverse the bytes, so it is low followed by hi (Intel order). |