Hi,
I have a C Language dll file with a .h and .lib file. I want to use the functions which is in this dll file. But as the dll is written in C, the code in dll is unmanaged. But i got some sucess to crack some functions.
But the function below i haven't find any solution.
Function in dll
PeripheralStatus(HWND hwnd, unsigned char *SenseKey, unsigned char *SensorStatus);
hWnd - Handle of the application windows which will receive the notification messages.
SenseKey - Pointer to a byte variable that will contain the sense key status.
SensorStatus - Pointer to a four bytes variable that will contain 16 bytes of sensor status.
Code in VB.Net Program
Public Function PeripheralStatus( ByVal hWnd As IntPtr , ByRef SenseKey As Byte , ByRef StatusByte As Byte ) As Integer
End Function
I Use this function on a Button Click Event
Private
Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickDim sensekey As Byte
Dim statuskey As Byte
PeripheralStatus(IntPtr.Zero, sensekey, statuskey)
MsgBox(sensekey &
" " & statuskey) End Sub
sandeep sharmaPosted Jun 25, 2008, 8:43 AM
Thanks Bechir Bejaoui ,
The problem is solved. Thanks for your response. It worked for me.
Bechir BejaouiPosted Jun 25, 2008, 7:38 AM
[DllImport("Assemblyname.dll")]
static extern MethodName (Arguments);
Shared extern MethodName (Arguments)