On (06 Nov 97) Christopher Butler wrote to All...
CB> How do I get the address of a member function?
_Very_ carefully!
CB> For example:
CB> class foo
CB> {
CB> public:
CB> foo();
CB> void interrupt myInt(...)
To act as an interrupt handler, your member function must be static.
CB> }
CB> foo::foo()
CB> {
CB> _dos_setvect(0x1C, &myInt); // Here is where I want to get the
Once you've made myInt static, this should work just fine. In fact, you
don't even need the `&' if you don't want it.
I should add that this is entirely different from getting the address of
a normal member function. However, since a normal member function won't
work as an interrupt handler (the CPU doesn't generally know enough to
pass us a `this' pointer) we won't worry about that for the moment.
Later,
Jerry.
--- PPoint 2.02
---------------
* Origin: Point Pointedly Pointless (1:128/166.5)
|