P
pgugel
Hi!
I just got that Problem by calling a c-written dll - at runtime the
dll will not found: System.DllNotFoundException
I copied the dll in both project folders (debug/release), i imported
it into project-explorer and set property "copy always". I checked
methodname with dependens.exe - name is correct.
The documentation for the dll is:
Function Prototype :
extern "C" __declspec(dllexport) bool RHIO_SockConnect
(BYTE bAddr1, BYTE bAddr2, BYTE bAddr3, BYTE bAddr4,
int iPort);
I don't know the Problem???
I upload my vs-sample-project to: http://www.FastShare.org/download/SenaRHIO.zip
Here is my code that imports and calls a method:
Imports System.Runtime.InteropServices
Public Class Form1
<DllImport("RHIO_Proc.dll", EntryPoint:="RHIO_SockConnect")> _
Public Shared Function RHIO_SockConnect(ByVal bAddr1 As Byte,
ByVal bAddr2 As Byte, _
ByVal bAddr3 As Byte, ByVal bAddr4 As Byte, ByVal iPort As
Integer) As Boolean
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) _
Handles Button1.Click
If RHIO_SockConnect(192, 168, 0, 10, 6001) Then
MsgBox("Connection successful!")
Else
MsgBox("Connection failed!")
End If
End Sub
End Class
Thanx for your help!
I just got that Problem by calling a c-written dll - at runtime the
dll will not found: System.DllNotFoundException
I copied the dll in both project folders (debug/release), i imported
it into project-explorer and set property "copy always". I checked
methodname with dependens.exe - name is correct.
The documentation for the dll is:
Function Prototype :
extern "C" __declspec(dllexport) bool RHIO_SockConnect
(BYTE bAddr1, BYTE bAddr2, BYTE bAddr3, BYTE bAddr4,
int iPort);
I don't know the Problem???
I upload my vs-sample-project to: http://www.FastShare.org/download/SenaRHIO.zip
Here is my code that imports and calls a method:
Imports System.Runtime.InteropServices
Public Class Form1
<DllImport("RHIO_Proc.dll", EntryPoint:="RHIO_SockConnect")> _
Public Shared Function RHIO_SockConnect(ByVal bAddr1 As Byte,
ByVal bAddr2 As Byte, _
ByVal bAddr3 As Byte, ByVal bAddr4 As Byte, ByVal iPort As
Integer) As Boolean
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) _
Handles Button1.Click
If RHIO_SockConnect(192, 168, 0, 10, 6001) Then
MsgBox("Connection successful!")
Else
MsgBox("Connection failed!")
End If
End Sub
End Class
Thanx for your help!