donho1976

donho1976

  • NA
  • 15
  • 0

need help on how to pass address of an array to a dll(coded in c++)

May 27 2004 10:23 PM
HI.. i'm a newbie in using vb.net... need help on how to pass address of an array to a dll(coded in c++). i am just testing out my intended coding in a simpler code as shown below. code is somthing like this Public Shared Sub testpoint(ByRef N() As Byte) ' Leave function empty - DLLImport attribute forwards calls to testpoint to ' testpoint in test1.DLL. End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim c(20) As Byte testpoint(c) MsgBox(c(9)) End Sub *function to call in the test1.dll* void testpoint(char & output) { char * t = &output; t[9] = 'a'; t[10]='b'; } thks in advance... iceman11

Answers (2)