B
Bryan G
I am trying to access a native C dll in a VB.Net Smart
Device application. I believe I'm accessing the dll in the
correct way but I keep getting an:
An unhandled exception of
type 'System.NotSupportedException' occurred in
SmartDeviceApplication2.exe
error. This is the code I've been trying to use:
Imports System.Text
Imports System.Runtime.InteropServices
Module Module1
Public Declare Function GetMsg Lib "DBAccess.dll" ()
As StringBuilder
Sub Main()
Dim s As StringBuilder = New StringBuilder(15)
s = GetMsg()
Console.WriteLine(s)
End Sub
End Module
I make sure that DBAccess.dll is in the same folder as the
VB exectuable. Any suggestions as to what i'm doing wrong?
Device application. I believe I'm accessing the dll in the
correct way but I keep getting an:
An unhandled exception of
type 'System.NotSupportedException' occurred in
SmartDeviceApplication2.exe
error. This is the code I've been trying to use:
Imports System.Text
Imports System.Runtime.InteropServices
Module Module1
Public Declare Function GetMsg Lib "DBAccess.dll" ()
As StringBuilder
Sub Main()
Dim s As StringBuilder = New StringBuilder(15)
s = GetMsg()
Console.WriteLine(s)
End Sub
End Module
I make sure that DBAccess.dll is in the same folder as the
VB exectuable. Any suggestions as to what i'm doing wrong?