diff options
| author | David Spruill <[email protected]> | 2026-07-20 16:40:01 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-07-20 16:40:01 -0400 |
| commit | 6b4e5cc14c3a45aa5c51badb6bfe4886af30ad32 (patch) | |
| tree | 296afa9bd3722816f2390bb5e9eff27c6e75eb93 /audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp | |
| parent | c5fc3ca1fd0e00a7e085ef48abfeff9c0c39817e (diff) | |
| parent | 15640356a5a6eeafefff403f6d287821213635cd (diff) | |
Merge branch 'develop' into user/daspr/kmodsamplefix
Diffstat (limited to 'audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp')
| -rw-r--r-- | audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp new file mode 100644 index 00000000..39c15c7b --- /dev/null +++ b/audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp @@ -0,0 +1,35 @@ +// Copyright (C) Microsoft Corporation. All rights reserved. +#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__) +_Check_return_ +STDAPI DllGetClassObject(_In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID FAR* ppv) +{ + return Module<InProc>::GetModule().GetClassObject(rclsid, riid, ppv); +} +#endif + +__control_entrypoint(DllExport) +STDAPI DllCanUnloadNow() +{ + return Module<InProc>::GetModule().Terminate() ? S_OK : S_FALSE; +} + +STDAPI_(BOOL) DllMain(_In_ HINSTANCE hinst, DWORD reason, _In_opt_ void*) +{ + if (reason == DLL_PROCESS_ATTACH) + { + DisableThreadLibraryCalls(hinst); + } + return TRUE; +} |
