diff options
Diffstat (limited to 'audio/sysvad/KeywordDetectorAdapter/dllmain.cpp')
| -rw-r--r-- | audio/sysvad/KeywordDetectorAdapter/dllmain.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/audio/sysvad/KeywordDetectorAdapter/dllmain.cpp b/audio/sysvad/KeywordDetectorAdapter/dllmain.cpp new file mode 100644 index 00000000..c29f4464 --- /dev/null +++ b/audio/sysvad/KeywordDetectorAdapter/dllmain.cpp @@ -0,0 +1,33 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" +#include <wrl\module.h> + +using namespace Microsoft::WRL; + +#if !defined(__WRL_CLASSIC_COM__) +STDAPI DllGetActivationFactory(_In_ HSTRING activatibleClassId, _COM_Outptr_ IActivationFactory** factory) +{ + return Module<InProc>::GetModule().GetActivationFactory(activatibleClassId, factory); +} +#endif + +#if !defined(__WRL_WINRT_STRICT__) +STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, _COM_Outptr_ void** ppv) +{ + return Module<InProc>::GetModule().GetClassObject(rclsid, riid, ppv); +} +#endif + +STDAPI DllCanUnloadNow() +{ + return Module<InProc>::GetModule().Terminate() ? S_OK : S_FALSE; +} + +STDAPI_(BOOL) DllMain(_In_opt_ HINSTANCE hinst, DWORD reason, _In_opt_ void*) +{ + if (reason == DLL_PROCESS_ATTACH) + { + DisableThreadLibraryCalls(hinst); + } + return TRUE; +} |
