Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP7 and SafeArrays
Message
 
To
27/08/2001 10:46:52
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00549442
Message ID:
00549766
Views:
14
>Hi All,
>Does anybody know if VFP7 can pass a SafeArray of bytes (VT_UI1) by reference to a COM server? ComArray() and CreateBinary() never could do it in 6 sp3. The only arrays passed by reference were arrays of variants. VFP6 can pass an array of bytes by value, but not by ref. This caused no end of grief for me on a contract a while back and fed into the VB faction in the department because we needed to talk to third party COM servers by passing SafeArrays by reference so the server could fill them with data and they choked on variant arrays. This led to the VB champions getting VFP eliminated for the serious COM work and generally undermined in the eyes of management. Any hope that this lame deficiency has been corrected?
>
>Test one:
>DIMENSION aTest[10]
>aTest[1] = ‘a’
>aTest[2] = ‘b’
>…
>aTest[10] = ‘j’
>
>ComArray() and @ affects the BY_REF, but not the variant.
>VT_ARRAY|VT_VARIANT||VT_BYREF
>
>
>Test 2:
>CreateBinary() and ComArray() give me the following with or without the @:
>VT_ARRAY|VT_UI1
>
>My initial experiments don’t look good. Anybody have any experience with this? Thanks.
>
>Gary

Just an idea - didn't try that, but you probably can instantiate a little VB COM object in your VFP program and have it pass the required array to your another COM object. Kind of a compatible communication port.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform