Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C Structures and VFP
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00522430
Message ID:
00522699
Views:
8
>>>>Based on what you've given us, I'd say the above declaration is also correct. If I were to hazard a guess as to what the problem is it would be that the declaration of the structure should indicate a pointer to the structure member identified as the char type. That's strictly a guess, but it would explain the invalid parameter message since, in this case the structure itself would only be 32 bytes long.
>>>

>>>Which means I'm probably SOL. Is there a way to allocate memory (by API), assign it and send the pointer to the function through VFP? [Hopefully made easily available for us in VFP7 SP1 :) ]
>>
>>You could use Ed Rauh's Heap Allocation Class for this. Also Christof Lange's API-Structures in VFP does this as well.
>>
>>The question now is whether or not that should be a pointer. Their tech support people should be able to tell you.
>

>Had already looked at those, but only at the numtoDWord function in Ed Rauh's Heap Allocation. But it didn't work either. So I took the step and looked at their sample in VB6 (*shiver*) and see what they did there. Turns out that the structure size is 160 bytes (weird in my opinion. 7 DWords, 128 bytes string and one extra DWord as point maybe?). Now it initialize fine.
>
>Again thanks for helping and letting me know that I'm not as crazy as I think.

No problem what so ever. Been there myself more times than I can relate.
George

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

Click here to load this message in the networking platform