I am trying to send the Address of a Function to a COM DLL but as I run it I get an error saying invalid use of AddressOf.
Why is that?
how to overcome it?
FatMan
Printable View
I am trying to send the Address of a Function to a COM DLL but as I run it I get an error saying invalid use of AddressOf.
Why is that?
how to overcome it?
FatMan
Try the seemingly stupid solution as follows:
public Function LongFromLong(byval lIn as Long) as Long
LongFromLong = lIn
End Function
And then in your call, use:
LongFromLong(AddressOf foo)
HTH,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com