效果:
//测试用例
class IBaseInterface
{
public:
virtual ~IBaseInterface() = default;
};
class ITestClass : public IBaseInterface
{
public:
virtual void testfn1() = 0;
virtual void testfn2() = 0;
virtual void testfn3() = 0;
virtual void testfn4() = 0;
};
class CTestClass : public ITestClass
{
public:
CTestClass()
{
DbgPrintEx(DPFLTR_DEFAULT_ID, DPFLTR_ERROR_LEVEL, "ctor\n");
}
~CTestClass()
{
DbgPrintEx(DPFLTR_DEFAULT_ID, DPFLTR_ERROR_LEVEL, "dtor\n");
}
virtual void testfn1() override;
virtual void testfn2() override;
virtual void testfn3() override;
virtual void testfn4() override;
int GetVTableSize() const;
PVOID GetVTablePointer() const;
private:
};
更多【 发点好玩的东西 x 2,但是依旧没源码】相关视频教程:www.yxfzedu.com