G
Guest
I'm trying to P/Invoke a function from a DLL in VB.NET
The prototype is
PSUUID0C_API int GetSerNum (TCHAR* SerNum, DWORD len)
I've tried several translation into Visual Basic, unsuccessfully so far
This one
Public Declare Function GetSerNum Lib "psuuid0c.dll"
(ByRef data As String, ByVal dwLen As Long) As Intege
causes a "NotSupported" exception
If I tr
Public Declare Function GetSerNum Lib "psuuid0c.dll"
(ByVal data As String, ByVal dwLen As Long) As Intege
I get a "MethodNotFound" exception instead.
I've tried Integer instead of Long, etc, with no luck
Since a TCHAR * seems to map to a String pointer, I was confident that the second one would work just fine, but it does not
Can anyone shed some light
Thanks.
The prototype is
PSUUID0C_API int GetSerNum (TCHAR* SerNum, DWORD len)
I've tried several translation into Visual Basic, unsuccessfully so far
This one
Public Declare Function GetSerNum Lib "psuuid0c.dll"
(ByRef data As String, ByVal dwLen As Long) As Intege
causes a "NotSupported" exception
If I tr
Public Declare Function GetSerNum Lib "psuuid0c.dll"
(ByVal data As String, ByVal dwLen As Long) As Intege
I get a "MethodNotFound" exception instead.
I've tried Integer instead of Long, etc, with no luck
Since a TCHAR * seems to map to a String pointer, I was confident that the second one would work just fine, but it does not
Can anyone shed some light
Thanks.