aboutsummaryrefslogtreecommitdiff
path: root/ddk-template-cplusplus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ddk-template-cplusplus.cpp')
-rw-r--r--ddk-template-cplusplus.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/ddk-template-cplusplus.cpp b/ddk-template-cplusplus.cpp
index 9406213..380603a 100644
--- a/ddk-template-cplusplus.cpp
+++ b/ddk-template-cplusplus.cpp
@@ -7,12 +7,18 @@ class TestSmth
public:
TestSmth()
{
+ DbgPrint("%s\n", "ctor");
+ }
+ ~TestSmth()
+ {
+ DbgPrint("%s\n", "dtor");
}
void doSmth(void)
{
DbgPrint("%s\n", "Hello Class!");
}
};
+static TestSmth * cdtor_test;
class Derived : public TestSmth
{
@@ -20,6 +26,9 @@ public:
Derived()
{
}
+ ~Derived()
+ {
+ }
void doSmth(void)
{
DbgPrint("%s\n", "Hello Derived!");
@@ -75,6 +84,7 @@ extern "C"
(void)RegistryPath;
DbgPrint("%s\n", "Hello ring0!");
+ cdtor_test = new TestSmth();
/* support for service stopping */
DriverObject->DriverUnload = DriverUnload;
@@ -88,6 +98,7 @@ extern "C"
{
(void)DriverObject;
+ delete cdtor_test;
DbgPrint("%s\n", "Bye ring0!");
}
}