![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have a VC++ COM DLL which is making calls to C#.net DLL. The C#.net DLL functions which are byte array expecting SAFEARRAY from VC++ DLL. VC++ DLL get called from my VB client where I need to pass this SAFEARRAY as VARIANT to VB. Could anyone help me how to get byte array from C# into VC++ and pass it in VARIANT to my VB client application. The current code I wrote seems not working can anyone help me in this - SAFEARRAY *psa; SAFEARRAYBOUND aDataItemBounds[1]; aDataItemBounds[0].lLbound = 0; aDataItemBounds[0].cElements = nLength; psa = SafeArrayCreate( VT_ARRAY, 1, aDataItemBounds ); // call to .net method pInet->DotNetMethod(&psa, &lResult); // copy into VARIANT to send to VB client SafeArrayCopyData( psa, pVariant->parray); Can anyone send me the code snippet for the above if it is wrongly coded. -- Software Engineer |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |