Click here to Skip to main content
15,928,983 members
Home / Discussions / COM
   

COM

 
GeneralPassing a BSTR to VB Pin
Jerome Conus14-Mar-02 21:37
Jerome Conus14-Mar-02 21:37 
GeneralRe: Passing a BSTR to VB Pin
Mazdak14-Mar-02 22:04
Mazdak14-Mar-02 22:04 
GeneralRe: Passing a BSTR to VB Pin
Joao Vaz14-Mar-02 23:45
Joao Vaz14-Mar-02 23:45 
GeneralRe: Passing a BSTR to VB Pin
Jerome Conus15-Mar-02 5:27
Jerome Conus15-Mar-02 5:27 
GeneralWhether i need attach one LPDISPATCH to initialize it! Pin
Davidlou14-Mar-02 19:53
Davidlou14-Mar-02 19:53 
QuestionPassing/receiving byte-arrays ? Pin
StefanM14-Mar-02 3:22
StefanM14-Mar-02 3:22 
AnswerRe: Passing/receiving byte-arrays ? Pin
pba_14-Mar-02 6:20
pba_14-Mar-02 6:20 
AnswerRe: Passing/receiving byte-arrays ? Pin
Joao Vaz14-Mar-02 6:29
Joao Vaz14-Mar-02 6:29 
Hi Stefan, one way that to pass binary data is to use BSTRs, using the api
SysAllocStringByteLen , this creates a string with binary data .

I actually used that doing a atl com object that passed binary data to vb6.

I don't remember well, but since VB6 work with unicode internally , i think that you must allocate 2*nBytes that you want to pass to VB, but I'm not sure if you really need to double the nª of bytes, so you should try the first one.

It's not necessary with BSTR to pass the size, since their size is prefixed at the head of the data, and vb makes use of this.

Hope this helps,

Joao Vaz
AnswerRe: Passing/receiving byte-arrays ? Pin
Rashid Thadha15-Mar-02 5:19
Rashid Thadha15-Mar-02 5:19 
GeneralHlp with CoCreateInstance => Pin
13-Mar-02 20:28
suss13-Mar-02 20:28 
GeneralRe: Hlp with CoCreateInstance => Pin
Deepak Khajuria13-Mar-02 23:14
Deepak Khajuria13-Mar-02 23:14 
GeneralRe: Hlp with CoCreateInstance => Pin
14-Mar-02 2:42
suss14-Mar-02 2:42 
GeneralCreateProcessAsUser : error 1314 Pin
David Dal Zot13-Mar-02 4:00
David Dal Zot13-Mar-02 4:00 
GeneralRe: CreateProcessAsUser : error 1314 Pin
pba_14-Mar-02 5:51
pba_14-Mar-02 5:51 
GeneralRe: CreateProcessAsUser : error 1314 Pin
David Dal Zot14-Mar-02 7:21
David Dal Zot14-Mar-02 7:21 
GeneralRe: CreateProcessAsUser : error 1314 Pin
pba_15-Mar-02 8:07
pba_15-Mar-02 8:07 
GeneralException handling when receiving BREAKsignals.. Pin
dejan.n13-Mar-02 0:52
dejan.n13-Mar-02 0:52 
GeneralSmartPointers and COM+ Pin
Ryszard Krakowiak12-Mar-02 1:13
Ryszard Krakowiak12-Mar-02 1:13 
GeneralRe: SmartPointers and COM+ Pin
pba_14-Mar-02 5:43
pba_14-Mar-02 5:43 
Generaltype library not seen in OLE COM Object Viewer Pin
11-Mar-02 19:15
suss11-Mar-02 19:15 
GeneralRe: type library not seen in OLE COM Object Viewer Pin
pba_14-Mar-02 5:22
pba_14-Mar-02 5:22 
GeneralGUID in COM Pin
Leesen11-Mar-02 14:30
Leesen11-Mar-02 14:30 
GeneralRe: GUID in COM Pin
soptest11-Mar-02 15:08
soptest11-Mar-02 15:08 
GeneralRe: GUID in COM Pin
Derek Waters11-Mar-02 15:52
Derek Waters11-Mar-02 15:52 
GeneralTab key not working Pin
manjunatha.s8-Mar-02 20:23
manjunatha.s8-Mar-02 20:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.