LDVCode ldv_register_event(short handle, HANDLE event)
My Xojo Code:
[code] Declare Function ldv_register_event Lib “ldv32.dll” (ByVal Handle As Integer, Byval msg_p As Ptr) As Integer
dim result as Integer
dim pp as Ptr = AddressOf MessagesAvalible
result = ldv_register_event(Handle,pp)
Return result[/code]
“MessageAvalible” is a global method in the same module as this method calling the register event.
The “result” is telling me thats the event is registered, but It never fires…
[code]Declare Function ldv_open Lib “ldv32.dll” (ByVal id As CString, ByRef Handle As UInt16) As Integer
dim a as Integer
dim w as UInt16
a = ldv_open(Id,w)
return a
[/code]
Basicaly handle = 1 the first the i open, icrements for each time.
Don’t think it’s here the problem is, I get a “OK” message back when I register the event with the correct handle.
If I register the event with a number that i not have beed assigned throug the ldv_open function I get a “NOT OPENED” message.