Advertisement

03.25.2006 at 03:02AM PST, ID: 21788470
[x]
Attachment Details

passing byte array from VC++ .NET dll to VB.NET

Asked by winfred_lu in Microsoft Visual C++.Net

Tags:

I am writing a vc++ .Net dll, and this dll will be used under vb.Net.

The function in vc++ would be look like:
  int _stdcall AbcCapData(char * pkt_data) {...}
I wish to fill bytes in pkt_data that is going to be used in vb.net.

I searched the EE site and found a similar question:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20828661.html?query=marshal+dll&clearTAFilter=true
Unfortunately,  I couldn't understand the answer because lacking knowledge of COM Server.

I also saw an example using LPSAFEARRAY like:
  int _stdcall AbcCapData(LPSAFEARRAY FAR * pkt_data) {...}
But I have no idea about LPSAFEARRAY, either.
Besides, it seems that LPSAFEARRAY is for vb6? (I'm not quite sure)

My question is,
which of these technologies should I use? Marshal, LPSAFEARRAY or neither?
Where should I start?

Thanks.Start Free Trial
[+][-]03.25.2006 at 03:10AM PST, ID: 16287982

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual C++.Net
Tags: lpsafearray
Sign Up Now!
Solution Provided By: AlexFM
Participating Experts: 1
Solution Grade: A
 
 
[+][-]03.25.2006 at 03:29AM PST, ID: 16288084

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32