Click to See Complete Forum and Search --> : AddressOf


Lev FatMan
March 15th, 2001, 09:02 AM
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

Clearcode
March 15th, 2001, 09:06 AM
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