ComClsids.cpp (3434B)
1 // Copyright (c) Microsoft Corporation. 2 // Licensed under the MIT License. 3 #include "pch.h" 4 #include "Public/ComClsids.h" 5 #pragma warning( push ) 6 #pragma warning ( disable : 4467 ) 7 // 4467 Allow use of uuid attribute for com object creation. 8 #include "PackageManager.h" 9 #include "FindPackagesOptions.h" 10 #include "CreateCompositePackageCatalogOptions.h" 11 #include "InstallOptions.h" 12 #include "UninstallOptions.h" 13 #include "PackageMatchFilter.h" 14 #include "PackageManagerSettings.h" 15 #include "DownloadOptions.h" 16 #include "AuthenticationArguments.h" 17 #include "RepairOptions.h" 18 #include "AddPackageCatalogOptions.h" 19 #include "RemovePackageCatalogOptions.h" 20 #pragma warning( pop ) 21 22 namespace winrt::Microsoft::Management::Deployment 23 { 24 CLSID GetRedirectedClsidFromInProcClsid(REFCLSID clsid) 25 { 26 if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_PackageManager)) 27 { 28 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::PackageManager); 29 } 30 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_FindPackagesOptions)) 31 { 32 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::FindPackagesOptions); 33 } 34 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_CreateCompositePackageCatalogOptions)) 35 { 36 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::CreateCompositePackageCatalogOptions); 37 } 38 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_InstallOptions)) 39 { 40 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::InstallOptions); 41 } 42 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_UninstallOptions)) 43 { 44 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::UninstallOptions); 45 } 46 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_DownloadOptions)) 47 { 48 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::DownloadOptions); 49 } 50 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_PackageMatchFilter)) 51 { 52 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::PackageMatchFilter); 53 } 54 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_AuthenticationArguments)) 55 { 56 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::AuthenticationArguments); 57 } 58 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_PackageManagerSettings)) 59 { 60 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::PackageManagerSettings); 61 } 62 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_RepairOptions)) 63 { 64 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::RepairOptions); 65 } 66 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_AddPackageCatalogOptions)) 67 { 68 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::AddPackageCatalogOptions); 69 } 70 else if (IsEqualCLSID(clsid, WINGET_INPROC_COM_CLSID_RemovePackageCatalogOptions)) 71 { 72 return __uuidof(winrt::Microsoft::Management::Deployment::implementation::RemovePackageCatalogOptions); 73 } 74 else 75 { 76 return CLSID_NULL; 77 } 78 } 79 }