Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VC++ COM
Message
 
À
27/09/1999 21:15:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Divers
Thread ID:
00269140
Message ID:
00269853
Vues:
25
>>>I haven't gotten into it in detail, but I have been told that the C++ functions that operate on BSTR data types assume NUL terminated strings. Have you found alternatives to this?
>>
>>BSTR strings contain a counter value, plus the string buffer, so you can
>>indeed store binary data in these values. Keep in mind though that BSTR
>>is a very inefficient format for this because BSTRS are double byte and
>>with binary data that second byte is wasted.
>>
>>The problem is that most 'framework' functions and objects don't treat
>>BSTRS as binary strings by default. So the various ATL COM classes
>>don't support binary strings in BSTR values. Through the BSTR API
>>calls you can get at the binary data fine though.
>
>Thanks, is there a BLOB like COM data type? That works more efficiently?

SafeArrays (also known as ByteArrays in VB)... But they're a bitch to work with. They're basically raw buffers that you can type as you see fit.

+++ Rick ---
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform