Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP7 and SafeArrays
Message
De
29/08/2001 05:10:16
 
 
À
27/08/2001 10:46:52
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00549442
Message ID:
00550174
Vues:
12
>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.
>

I posted a FAQ entry some months back here on UT demonstrating code for creating SafeArrays of BSTRs - you could modify that as needed.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform