Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When a DLL function expects a 'structure'
Message
 
 
To
08/06/1998 22:16:35
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00105414
Message ID:
00106183
Views:
34
Gerry,

The 12 comes from the 3 longs which are 4 bytes each. I built it like that so I didn't have to stuff a dummy 4 byte 0 in for the length and then replace it with the real length.

>Why did you add 12 to length of cTchar and why did you take the length of the structure before adding values for nSubEntry & nCallbackID.

>>cEntryName = padl( "SomeName", RAS_MaxEntryName ) + chr(0)
>>cPhoneNumber = padl( "8008001234", RAS_MaxPhoneNumber ) + chr(0)
>>...
>>cTchar = cEntryName + cPhoneNumber + ...
>>nSubEntry = 0
>>nCallBackId = 0
>>cRASDIALPARAMS = ToLong( len( cTchar ) + 12 ) + cTchar + ToLong( nSubEntry ) + ToLong( nCallbackId )
>>
>>n = SomeRASFunction( ..., @cRASDIALPARAMS, ... )
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform