Passing arrays back and forth from COM 
Author Message
 Passing arrays back and forth from COM

I'm having a problem passing arrays back and forth from my VC++ based COM
server (it's out of process if that makes any difference).  I can receive
single number values fine, it's just the arrays that give me difficulty.
I'm also having problems passing strings back and forth (I figured they must
be related).  I can sort of get the string example working, but only if I
use variants in COM.  Can I not pass a wchar_t* data type to and receive one
from a COM interfance?  What about double arrays?  I have not been able to
get those to work either.  Please help.

Thanks,
Charles



Wed, 16 Jul 2003 02:31:20 GMT  
 Passing arrays back and forth from COM
If you need to pass arrays to a VC++ COM server from VB, use the SAFEARRAY
type. If you want to pass strings, use the BSTR type.
--
Michael "The" Gnter, MCP (VC++, VB)
Software Engineer
Infinity Software Development, Inc.
Phone: (850) 383-1011 . Fax: (850) 383-1015


Quote:
> I'm having a problem passing arrays back and forth from my VC++ based COM
> server (it's out of process if that makes any difference).  I can receive
> single number values fine, it's just the arrays that give me difficulty.
> I'm also having problems passing strings back and forth (I figured they
must
> be related).  I can sort of get the string example working, but only if I
> use variants in COM.  Can I not pass a wchar_t* data type to and receive
one
> from a COM interfance?  What about double arrays?  I have not been able to
> get those to work either.  Please help.

> Thanks,
> Charles




Wed, 16 Jul 2003 04:52:02 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Passing a Com port handle from VB to a CPP DLL back and forth

2. Passing Variables Back And Forth From Access To Word

3. Passing Variables back and forth

4. Passing Array to Session Variable Then back to Array

5. Linking Access tables to MS Outlook (back and forth)

6. Send the form back and forth

7. OVC crashes Outlook when switching back and forth continuously between folders

8. more elegant way than switching back and forth between windows

9. BinHex conversion back and forth

10. AT Commands - Back and Forth

11. How to Scroll Text in a Text Box back and forth accross a Fomr in VB

12. Newbie Question- switching back and forth between two forms

 

 
Powered by phpBB® Forum Software