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=trueUnfortunately, 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