diff options
| author | Daniel Rugerio <[email protected]> | 2025-11-25 11:00:04 -0800 |
|---|---|---|
| committer | Daniel Rugerio <[email protected]> | 2025-12-15 14:00:37 -0800 |
| commit | 6fa87d3bef7972f7fac034adb68cd856f69c8607 (patch) | |
| tree | 90ddf9e506b651c81dd803e0a9cc04af5db24a79 /audio/SoundWire/Samples/SdcaVad/EventDetectorAdapter/dllmain.cpp | |
| parent | 1d89a1513f519f62226f84a3131916ab2fd0c3ef (diff) | |
New SDCAVAD sample.
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; +} |
