E
eddom
I am trying to retrieve data from a function structured in C by using
VB.NET, can anyone help me to understand this? I am totally new to this
API or MarshalA.
Structure of the function:
int GetDLLVersion(char *data, int datasize)
the *data will return a 7 character word, but how can i store it into
the variable of VB.NET?
i tried this:
Dim VerNum as String
<DLLImport ("Vertx.dll")> Public Shared Function GetDLLVersion (ByRef
VerNum as String, ByVal data as Integer) as Integer
End Function
GetDLLVersion(VerNum, 10)
When ever i try to call this function, a error message prompt out which
tell me the problem of object, so i replace the code with:
Dim VerNum as Char
<DLLImport ("Vertx.dll")> Public Shared Function GetDLLVersion (ByRef
VerNum as Char, ByVal data as Integer) as Integer
End Function
GetDLLVersion(VerNum, 10)
it work, but only one character was returned, since char type only
store up to one character, this is not what i want, can somebody help
me to deal with this problem?
VB.NET, can anyone help me to understand this? I am totally new to this
API or MarshalA.
Structure of the function:
int GetDLLVersion(char *data, int datasize)
the *data will return a 7 character word, but how can i store it into
the variable of VB.NET?
i tried this:
Dim VerNum as String
<DLLImport ("Vertx.dll")> Public Shared Function GetDLLVersion (ByRef
VerNum as String, ByVal data as Integer) as Integer
End Function
GetDLLVersion(VerNum, 10)
When ever i try to call this function, a error message prompt out which
tell me the problem of object, so i replace the code with:
Dim VerNum as Char
<DLLImport ("Vertx.dll")> Public Shared Function GetDLLVersion (ByRef
VerNum as Char, ByVal data as Integer) as Integer
End Function
GetDLLVersion(VerNum, 10)
it work, but only one character was returned, since char type only
store up to one character, this is not what i want, can somebody help
me to deal with this problem?