Callback functions to a C++ DLL in VB
On my C++ Dll I have the folowing protocol:
extern "C" __declspec(dllexport) void Op(LPCSTR IP_Adress, BYTE Serial_Port, void (FAR WINAPI *epf)(DWORD,HANDLE), void (FAR WINAPI *drf)(DWORD,HANDLE), LPSTR Buffer, DWORD BufLen, HANDLE* Identifier)
So the third and fourth parameters are callback functions to the DLL function. I've tried to use like this on VB project:
Op("129.214.68.250", "A", AddressOf Error_Function, AddressOf Reception_Function, b, 512, handle)
below are the function protocols used in Vb project :
Private Declare Function Op Lib "Trans.dll" (ip As String, PORT As String, ByVal Error_Func As Long, ByVal Reception_Func As Long, ByVal Buffer As String, Size As Integer, ByVal handle As Long) As Variant
Function Error_Function(buffer_length As Double, handle As Long)
End Function
Function Reception_Function(buffer_length As Double, handle As Long)
End Function
But I am having the message "Invalid use of AddressOF operator" . Can anybody image what should I do?
Thank you...

