From d40232638faaab19de557e70a3ee938da7a35295 Mon Sep 17 00:00:00 2001 From: Dave Wilson Date: Wed, 29 Apr 2015 09:48:49 -0700 Subject: samples update for //build --- network/radio/RadioManagerSample/cpp/dllmain.cpp | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 network/radio/RadioManagerSample/cpp/dllmain.cpp (limited to 'network/radio/RadioManagerSample/cpp/dllmain.cpp') 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 +{ +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; +} -- cgit v1.3.1