By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,673 Members | 1,404 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,673 IT Pros & Developers. It's quick & easy.

PLZ Help me, Pointer Array in VB.NET

P: n/a
HI~

I need to access the pointer array via DLL.
Original C code is

char * buf[64];
for (int i = 0; i < 63; i++) {
buf[i] = new char [64];
}
API_CALL(buf);

To access the API_CALL in VB.NET, I have to pass the
array (containing the pointer of buffer).

Can I access it?

Please help me.... T.T
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Can I access it?


Dim buf(63) As IntPtr
For i As Integer = 0 To 63
buf(i) = Marshal.AllocHGlobal(64)
Next
....

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 20 '05 #2

P: n/a
"Min-su KIM" <fo***@hwfaq.com> schrieb

I need to access the pointer array via DLL.
Original C code is

char * buf[64];
for (int i = 0; i < 63; i++) {
buf[i] = new char [64];
}
API_CALL(buf);

To access the API_CALL in VB.NET, I have to pass the
array (containing the pointer of buffer).

Can I access it?


http://msdn.microsoft.com/library/en...anagedcode.asp
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.