|
-
Apr 30th, 2000, 05:20 PM
#1
Thread Starter
PowerPoster
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.
-
Apr 30th, 2000, 05:51 PM
#2
Frenzied Member
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.
-
Apr 30th, 2000, 05:54 PM
#3
Hyperactive Member
Me is a reference to the current class, so Call MyFunc(Me) should work.
-
Apr 30th, 2000, 05:58 PM
#4
Thread Starter
PowerPoster
thx Crazy D, works fine
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|