Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB sample to VFP
Message
De
27/01/2001 10:40:43
 
 
À
27/01/2001 10:07:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00468999
Message ID:
00469389
Vues:
8
>Ed, thanks for the help, but it is still not working it comes up with OLE Error Code 0xB000ffff: unexpected Failure. I thought this error was coming up because you have to define which map to open first, so I tried to set the Atlas method, and it also comes out with the same error. Do you have any more suggestions, or a place where I can read up about these sort off things?
>

You're going to need to read the vendor's docs on the control, and implement the code under VB or VBScript to get it to actually run, and then translate that back into VFP if the docs are truly hostile. Another option if you can get the code working in VB is to create a wrapper ActiveX object in VB that exposes an interface that you can use with VFP, and then takes whatever parameters are passed in from VFP to VB into the formats needed by the OCX; I've done this numerous times where I ran into a component that really had problems if it were not used with early binding, passing SafeArrays; I just wrote shells around them in VB that early bound the problem control, exposed an interface that VFP could handle and allowed for late-binding, and did whatever conversions were needed to get things in and out in the VB wrapper.

One obvious thing is that BSTRs want to use UniCode strings, so you may have to use STRCONV() to change normal ASCII strings to double-byte strings and then to Unicode Strings, something like:
cMyUniCodeValueToPass = STRCONV(STRCONV(cMyANSIStringToPass,1),5)
This converts single-byte ANSI to a double-byte ANSI (,1) and then converts double-byte ANSI into UniCode (,5).

If it's critical, I do consulting on these sorts of things for a living; digging into this much more is going to require billable time.
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