diff --git a/CscdCfg/CscdCfg.vcxproj b/CscdCfg/CscdCfg.vcxproj
index 5e8f7cc..b3339e7 100644
--- a/CscdCfg/CscdCfg.vcxproj
+++ b/CscdCfg/CscdCfg.vcxproj
@@ -93,6 +93,7 @@
true
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ MultiThreadedDebug
Console
@@ -109,6 +110,7 @@
true
WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ MultiThreaded
Console
@@ -125,6 +127,7 @@
true
_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ MultiThreadedDebug
Console
@@ -141,6 +144,7 @@
true
NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ MultiThreaded
Console
diff --git a/CscdCom/build.cmd b/CscdCom/build.cmd
new file mode 100644
index 0000000..3332d90
--- /dev/null
+++ b/CscdCom/build.cmd
@@ -0,0 +1,3 @@
+mc -U error.mc
+rc -r error.rc
+link -dll -noentry -out:error.dll error.res
\ No newline at end of file
diff --git a/CscdCom/error.dll b/CscdCom/error.dll
new file mode 100644
index 0000000..5244b03
Binary files /dev/null and b/CscdCom/error.dll differ
diff --git a/CscdCom/readme.txt b/CscdCom/readme.txt
index 1cc9ada..02aa057 100644
--- a/CscdCom/readme.txt
+++ b/CscdCom/readme.txt
@@ -6,4 +6,6 @@ For information relating to the error files,
see:
https://learn.microsoft.com/en-us/windows/win3
2/services/the-complete-service-sample
-under "Building the Service."
\ No newline at end of file
+under "Building the Service."
+
+Run build.cmd to build the error message DLL and files
\ No newline at end of file
diff --git a/CscdSvc/CscdSvc.vcxproj b/CscdSvc/CscdSvc.vcxproj
index 303cb32..8635f70 100644
--- a/CscdSvc/CscdSvc.vcxproj
+++ b/CscdSvc/CscdSvc.vcxproj
@@ -93,6 +93,7 @@
true
WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ MultiThreadedDebug
Console
@@ -109,6 +110,7 @@
true
WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ MultiThreaded
Console
@@ -125,6 +127,7 @@
true
_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ MultiThreadedDebug
Console
@@ -141,6 +144,7 @@
true
NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ MultiThreaded
Console
diff --git a/CscdSvc/hook.c b/CscdSvc/hook.c
index 2eb5b96..528270c 100644
--- a/CscdSvc/hook.c
+++ b/CscdSvc/hook.c
@@ -40,8 +40,12 @@ __declspec(dllexport) BOOL CALLBACK InstallUserHook()
WCHAR szFullPath[MAX_PATH];
USERAPIHOOKINFO uah;
+ MessageBox(NULL, L"test", L"InstallUserHook called", MB_OK);
OutputDebugString(L"InstallUserHook called\n");
+ // Get the module
+ g_hModule = GetModuleHandle(NULL);
+
// Get our current directory and filename
GetModuleFileName(g_hModule, szFullPath, ARRAYSIZE(szFullPath));
@@ -150,6 +154,7 @@ __declspec(dllexport) BOOL CALLBACK InitUserHook(UAPIHK State, PUSERAPIHOOK puah
\* * * */
__declspec(dllexport) BOOL CALLBACK RemoveUserHook(VOID)
{
+ MessageBox(NULL, L"test", L"RemoveUserHook called", MB_OK);
return UnregisterUserApiHookDelay();
}