-
How can I get a pointer to the class of the current function? I mean like this:
Code:
'In class cTest
Function SetNumber( iLast as cTest ) as Long
Number = iLast.Number + 1
Call SetNumber( Me )
End Function
I know ways to make the function above, I only need to know how to get the pointer.
-
Do you mean a pointer to the object in which case it's just objptr(me) If you need a pointer to the function you need to look it up on it's vTable but that's really hard look at http://www.bstorage.com/nervenet/vtablemodification.asp and it'll give you some clues but you'll have to work out what's going on yourself, I've never needed it so havn't looked at it very hard, I'm not sure it'll work properly either.
-
Me is a reference to the current class, so Call MyFunc(Me) should work.
-
thx Crazy D, works fine ;)