Download samples/winrt/ImageManipulations/MediaExtensions/OcvTransform/dllmain.cpp from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 1.75 kB
-
https://huggingface.co/tgollogly/test/resolve/main/samples/winrt/ImageManipulations/MediaExtensions/OcvTransform/dllmain.cpp
- Command line
-
hf download hf://tgollogly/test/samples/winrt/ImageManipulations/MediaExtensions/OcvTransform/dllmain.cpp
-
curl -L -o dllmain.cpp https://huggingface.co/tgollogly/test/resolve/main/samples/winrt/ImageManipulations/MediaExtensions/OcvTransform/dllmain.cpp
1.75 kB
| ////////////////////////////////////////////////////////////////////////// | |
| // | |
| // dllmain.cpp | |
| // | |
| // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF | |
| // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO | |
| // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A | |
| // PARTICULAR PURPOSE. | |
| // | |
| // Copyright (c) Microsoft Corporation. All rights reserved. | |
| // | |
| ////////////////////////////////////////////////////////////////////////// | |
| using namespace Microsoft::WRL; | |
| namespace Microsoft { namespace Samples { | |
| ActivatableClass(OcvImageManipulations); | |
| }} | |
| BOOL WINAPI DllMain( _In_ HINSTANCE hInstance, _In_ DWORD dwReason, _In_opt_ LPVOID lpReserved ) | |
| { | |
| if( DLL_PROCESS_ATTACH == dwReason ) | |
| { | |
| // | |
| // Don't need per-thread callbacks | |
| // | |
| DisableThreadLibraryCalls( hInstance ); | |
| Module<InProc>::GetModule().Create(); | |
| } | |
| else if( DLL_PROCESS_DETACH == dwReason ) | |
| { | |
| Module<InProc>::GetModule().Terminate(); | |
| } | |
| return TRUE; | |
| } | |
| HRESULT WINAPI DllGetActivationFactory( _In_ HSTRING activatibleClassId, _Outptr_ IActivationFactory** factory ) | |
| { | |
| auto &module = Microsoft::WRL::Module< Microsoft::WRL::InProc >::GetModule(); | |
| return module.GetActivationFactory( activatibleClassId, factory ); | |
| } | |
| HRESULT WINAPI DllCanUnloadNow() | |
| { | |
| auto &module = Microsoft::WRL::Module<Microsoft::WRL::InProc>::GetModule(); | |
| return (module.Terminate()) ? S_OK : S_FALSE; | |
| } | |
| STDAPI DllGetClassObject( _In_ REFCLSID rclsid, _In_ REFIID riid, _Outptr_ LPVOID FAR* ppv ) | |
| { | |
| auto &module = Microsoft::WRL::Module<Microsoft::WRL::InProc>::GetModule(); | |
| return module.GetClassObject( rclsid, riid, ppv ); | |
| } | |