diff options
| author | Dave Wilson <[email protected]> | 2015-04-29 09:48:49 -0700 |
|---|---|---|
| committer | Dave Wilson <[email protected]> | 2015-04-29 10:47:29 -0700 |
| commit | d40232638faaab19de557e70a3ee938da7a35295 (patch) | |
| tree | 14e61c973745949af186b7940e3a53d25322f5de /network/radio/RadioManagerSample/cpp/dllmain.cpp | |
| parent | 02e5b090a6131a7cc1b90f4a9373117c9e3c7088 (diff) | |
samples update for //build
Diffstat (limited to 'network/radio/RadioManagerSample/cpp/dllmain.cpp')
| -rw-r--r-- | network/radio/RadioManagerSample/cpp/dllmain.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/network/radio/RadioManagerSample/cpp/dllmain.cpp b/network/radio/RadioManagerSample/cpp/dllmain.cpp new file mode 100644 index 00000000..61d6898b --- /dev/null +++ b/network/radio/RadioManagerSample/cpp/dllmain.cpp @@ -0,0 +1,57 @@ +#include "precomp.h" +#pragma hdrstop + +OBJECT_ENTRY_AUTO(__uuidof(SampleRadioManager), CSampleRadioManager); + +class CSampleRadioModule : public CAtlDllModuleT<CSampleRadioModule> +{ +public: +}; + +static CSampleRadioModule s_AtlModule; + +//+--------------------------------------------------------------------------- +// DLL Entry Point +// + +EXTERN_C BOOL WINAPI DllMain +( + HINSTANCE /*hInstance*/, + DWORD dwReason, + LPVOID pvReserved +) +{ + return s_AtlModule.DllMain(dwReason, pvReserved); +} + +STDAPI DllCanUnloadNow(void) +{ + return s_AtlModule.DllCanUnloadNow(); +} + +STDAPI DllGetClassObject( + _In_ REFCLSID rclsid, + _In_ REFIID riid, + _Outptr_ LPVOID* ppv + ) +{ + return s_AtlModule.DllGetClassObject(rclsid, riid, ppv); +} + + +//+--------------------------------------------------------------------------- +// Adds entries to the system registry. Needed because the binary need copy to test machine. +// If binary is deployed by manifest, these functions are not needed. +STDAPI +DllRegisterServer () +{ + s_AtlModule.DllRegisterServer(FALSE); + return S_OK; +} + +STDAPI +DllUnregisterServer () +{ + HRESULT hr = s_AtlModule.DllUnregisterServer(); + return hr; +} |
