Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WinSock
Message
 
To
22/10/1997 17:06:38
Tony Roberson
Peavey Electronics Corporaiton
Meridian, Mississippi, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00056165
Message ID:
00056234
Views:
28
>>>>>Is there a way to make WinSock Programming calls from within Visual Foxpro
>>>>
>>>>Tony,
>>>>
>>>>If the DLL is one VFP can use (I think that it is) and you know the specification, how you would access it would depend on the version of Windows. If you were running VFP 3.0/Win 3.1, then you would use the RegFN(), CallFN functions in FOXTOOLS to access the WINSOCK.DLL. Under VFP 3.0/5.0/Win 95, you'd use the DECLARE... DLL syntax for accessing WSOCK32.DLL.
>>>>
>>>>hth,
>>>>
>>>>George
>>>
>>>
>>>Thanks George! What I'm really having a problem with is knowing how to pass a Word datatype to the function WSAStartup to initialize the Socket. Any Ideas????
>>>
>>>Tony
>>
>>Tony,
>>
>>It depends on the API. 16 or 32 bit. If you're accessing the 16 bit, it's integer ("I"). If it's 32 bit, it's a SHORT declaration.
>>
>>hth,
>>
>>George
>
>
>Its 32 Bit, I'm using WSock32.DLL. The specific parameter is wVersionRequested which is the Version. I'm trying to 1.1 as the parameter but am having no luck......

If I understand the question right, you need to pass a version number in the form of a 16 bit word to function. All I've got is a guess. Here goes...

The ROM BIOS passes (or used to) the DOS version back in two of the processor registers (CD:DX I think, but I don't remember the order). One of them represented the major version (the integer portion of the number), the other the minor version (the decimal portion). Since we're dealing with a 16 bit word, maybe they expect something similar. Minor version in the low order byte, major version in the high. If so, version 2.1 would then be equal to 513. For version 1.1, I'd try passing 257.

That's the best I've got.

hth,

George
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform