From c239e0cc3a28a50c42c63b086ee62e17cf699104 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 4 Feb 2019 20:06:58 -0600 Subject: Integrate into latest v4. --- src/ca/complusca.def | 15 ++++++ src/ca/complusca.vcxproj | 99 +++++++++++++++++++++++++++++++++++ src/ca/cpappexec.cpp | 4 +- src/ca/cpappsched.cpp | 10 ++-- src/ca/cpasmexec.cpp | 133 ++++++++++++++++++++++------------------------- src/ca/cpasmsched.cpp | 82 ++++++++++++++--------------- src/ca/cpasmsched.h | 30 +++++------ src/ca/cpexec.cpp | 43 ++++----------- src/ca/cpexec.def | 11 ---- src/ca/cppartexec.cpp | 4 +- src/ca/cppartsched.cpp | 12 ++--- src/ca/cpsched.cpp | 36 +++---------- src/ca/cpsubssched.cpp | 6 +-- src/ca/cpsubssched.h | 2 +- src/ca/cputilexec.cpp | 56 ++++++++++---------- src/ca/cputilexec.h | 14 ++--- src/ca/cputilsched.cpp | 28 +++++----- src/ca/cputilsched.h | 26 +++------ src/ca/custommsierrors.h | 29 +++++++++++ src/ca/dllmain.cpp | 27 ++++++++++ src/ca/packages.config | 5 ++ src/ca/precomp.h | 33 ++++++++++++ 22 files changed, 416 insertions(+), 289 deletions(-) create mode 100644 src/ca/complusca.def create mode 100644 src/ca/complusca.vcxproj delete mode 100644 src/ca/cpexec.def create mode 100644 src/ca/custommsierrors.h create mode 100644 src/ca/dllmain.cpp create mode 100644 src/ca/packages.config create mode 100644 src/ca/precomp.h (limited to 'src/ca') diff --git a/src/ca/complusca.def b/src/ca/complusca.def new file mode 100644 index 00000000..7c475759 --- /dev/null +++ b/src/ca/complusca.def @@ -0,0 +1,15 @@ +; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + + +LIBRARY "complusca" + +EXPORTS + ComPlusPrepare + ComPlusCleanup + ComPlusInstallExecute + ComPlusInstallExecuteCommit + ComPlusRollbackInstallExecute + ComPlusUninstallExecute + ComPlusRollbackUninstallExecute + ConfigureComPlusInstall + ConfigureComPlusUninstall diff --git a/src/ca/complusca.vcxproj b/src/ca/complusca.vcxproj new file mode 100644 index 00000000..5085f61d --- /dev/null +++ b/src/ca/complusca.vcxproj @@ -0,0 +1,99 @@ + + + + + + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + + {BDEF51ED-E242-4FA2-801A-01B127DF851A} + DynamicLibrary + v141 + Unicode + complusca + complusca.def + WiX Toolset ComPlus CustomAction + + + + + + + msi.lib + + + + + + + + + + + + + + + + + + + + + Create + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + diff --git a/src/ca/cpappexec.cpp b/src/ca/cpappexec.cpp index 43d6cd6d..48948210 100644 --- a/src/ca/cpappexec.cpp +++ b/src/ca/cpappexec.cpp @@ -239,7 +239,7 @@ static HRESULT CreateApplication( WcaLog(LOGMSG_VERBOSE, "Creating application, key: %S", pAttrs->pwzKey); // get applications collection - hr = CpiGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); + hr = CpiExecGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); if (S_FALSE == hr) hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); ExitOnFailure(hr, "Failed to get applications collection"); @@ -304,7 +304,7 @@ static HRESULT RemoveApplication( WcaLog(LOGMSG_VERBOSE, "Removing application, key: %S", pAttrs->pwzKey); // get applications collection - hr = CpiGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); + hr = CpiExecGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) diff --git a/src/ca/cpappsched.cpp b/src/ca/cpappsched.cpp index cec99794..1fb2203b 100644 --- a/src/ca/cpappsched.cpp +++ b/src/ca/cpappsched.cpp @@ -579,7 +579,7 @@ HRESULT CpiGetRolesCollForApplication( if (pApp->pPartition) hr = CpiGetApplicationsCollForPartition(pApp->pPartition, &piAppColl); else - hr = CpiGetApplicationsCollection(&piAppColl); + hr = CpiSchedGetApplicationsCollection(&piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -593,7 +593,7 @@ HRESULT CpiGetRolesCollForApplication( ExitFunction(); // exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Roles", &pApp->piRolesColl); + hr = CpiSchedGetCatalogCollection(piAppColl, piAppObj, L"Roles", &pApp->piRolesColl); ExitOnFailure(hr, "Failed to get roles collection"); } @@ -632,7 +632,7 @@ HRESULT CpiGetComponentsCollForApplication( if (pApp->pPartition) hr = CpiGetApplicationsCollForPartition(pApp->pPartition, &piAppColl); else - hr = CpiGetApplicationsCollection(&piAppColl); + hr = CpiSchedGetApplicationsCollection(&piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -646,7 +646,7 @@ HRESULT CpiGetComponentsCollForApplication( ExitFunction(); // exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Components", &pApp->piCompsColl); + hr = CpiSchedGetCatalogCollection(piAppColl, piAppObj, L"Components", &pApp->piCompsColl); ExitOnFailure(hr, "Failed to get components collection"); } @@ -695,7 +695,7 @@ static HRESULT FindObjectForApplication( if (pItm->pPartition) hr = CpiGetApplicationsCollForPartition(pItm->pPartition, &piAppColl); else - hr = CpiGetApplicationsCollection(&piAppColl); + hr = CpiSchedGetApplicationsCollection(&piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) diff --git a/src/ca/cpasmexec.cpp b/src/ca/cpasmexec.cpp index 339c08e1..3d140027 100644 --- a/src/ca/cpasmexec.cpp +++ b/src/ca/cpasmexec.cpp @@ -75,58 +75,47 @@ enum eInstallationFlags { }; -// private constants - -enum eAssemblyAttributes -{ - aaEventClass = (1 << 0), - aaDotNetAssembly = (1 << 1), - aaPathFromGAC = (1 << 2), - aaRunInCommit = (1 << 3) -}; - - // private structs -struct CPI_ROLE_ASSIGNMENT +struct CPIEXEC_ROLE_ASSIGNMENT { WCHAR wzKey[MAX_DARWIN_KEY + 1]; WCHAR wzRoleName[MAX_DARWIN_COLUMN + 1]; - CPI_ROLE_ASSIGNMENT* pNext; + CPIEXEC_ROLE_ASSIGNMENT* pNext; }; -struct CPI_METHOD +struct CPIEXEC_METHOD { WCHAR wzIndex[11 + 1]; WCHAR wzName[MAX_DARWIN_COLUMN + 1]; CPI_PROPERTY* pPropertyList; - CPI_ROLE_ASSIGNMENT* pRoleAssignmentList; + CPIEXEC_ROLE_ASSIGNMENT* pRoleAssignmentList; - CPI_METHOD* pNext; + CPIEXEC_METHOD* pNext; }; -struct CPI_INTERFACE +struct CPIEXEC_INTERFACE { WCHAR wzIID[CPI_MAX_GUID + 1]; CPI_PROPERTY* pPropertyList; - CPI_ROLE_ASSIGNMENT* pRoleAssignmentList; - CPI_METHOD* pMethodList; + CPIEXEC_ROLE_ASSIGNMENT* pRoleAssignmentList; + CPIEXEC_METHOD* pMethodList; - CPI_INTERFACE* pNext; + CPIEXEC_INTERFACE* pNext; }; -struct CPI_COMPONENT +struct CPIEXEC_COMPONENT { WCHAR wzCLSID[CPI_MAX_GUID + 1]; CPI_PROPERTY* pPropertyList; - CPI_ROLE_ASSIGNMENT* pRoleAssignmentList; - CPI_INTERFACE* pInterfaceList; + CPIEXEC_ROLE_ASSIGNMENT* pRoleAssignmentList; + CPIEXEC_INTERFACE* pInterfaceList; - CPI_COMPONENT* pNext; + CPIEXEC_COMPONENT* pNext; }; struct CPI_ASSEMBLY_ATTRIBUTES @@ -141,7 +130,7 @@ struct CPI_ASSEMBLY_ATTRIBUTES LPWSTR pwzAppID; LPWSTR pwzPartID; int iAttributes; - CPI_COMPONENT* pCompList; + CPIEXEC_COMPONENT* pCompList; }; struct CPI_ROLE_ASSIGNMENTS_ATTRIBUTES @@ -152,7 +141,7 @@ struct CPI_ROLE_ASSIGNMENTS_ATTRIBUTES LPWSTR pwzAppID; LPWSTR pwzPartID; int iRoleCount; - CPI_COMPONENT* pCompList; + CPIEXEC_COMPONENT* pCompList; }; @@ -187,7 +176,7 @@ static HRESULT UnregisterDotNetAssembly( ); static HRESULT RemoveComponents( ICatalogCollection* piCompColl, - CPI_COMPONENT* pCompList + CPIEXEC_COMPONENT* pCompList ); static HRESULT ReadAssemblyAttributes( LPWSTR* ppwzData, @@ -206,56 +195,56 @@ static void FreeRoleAssignmentsAttributes( static HRESULT ConfigureComponents( LPCWSTR pwzPartID, LPCWSTR pwzAppID, - CPI_COMPONENT* pCompList, + CPIEXEC_COMPONENT* pCompList, BOOL fCreate, BOOL fProgress ); static HRESULT ConfigureInterfaces( ICatalogCollection* piCompColl, ICatalogObject* piCompObj, - CPI_INTERFACE* pIntfList, + CPIEXEC_INTERFACE* pIntfList, BOOL fCreate ); static HRESULT ConfigureMethods( ICatalogCollection* piIntfColl, ICatalogObject* piIntfObj, - CPI_METHOD* pMethList, + CPIEXEC_METHOD* pMethList, BOOL fCreate ); static HRESULT ConfigureRoleAssignments( LPCWSTR pwzCollName, ICatalogCollection* piCompColl, ICatalogObject* piCompObj, - CPI_ROLE_ASSIGNMENT* pRoleList, + CPIEXEC_ROLE_ASSIGNMENT* pRoleList, BOOL fCreate ); static HRESULT ReadComponentList( LPWSTR* ppwzData, - CPI_COMPONENT** ppCompList + CPIEXEC_COMPONENT** ppCompList ); static HRESULT ReadInterfaceList( LPWSTR* ppwzData, - CPI_INTERFACE** ppIntfList + CPIEXEC_INTERFACE** ppIntfList ); static HRESULT ReadMethodList( LPWSTR* ppwzData, - CPI_METHOD** ppMethList + CPIEXEC_METHOD** ppMethList ); static HRESULT ReadRoleAssignmentList( LPWSTR* ppwzData, - CPI_ROLE_ASSIGNMENT** ppRoleList + CPIEXEC_ROLE_ASSIGNMENT** ppRoleList ); static void FreeComponentList( - CPI_COMPONENT* pList + CPIEXEC_COMPONENT* pList ); static void FreeInterfaceList( - CPI_INTERFACE* pList + CPIEXEC_INTERFACE* pList ); static void FreeMethodList( - CPI_METHOD* pList + CPIEXEC_METHOD* pList ); static void FreeRoleAssignmentList( - CPI_ROLE_ASSIGNMENT* pList + CPIEXEC_ROLE_ASSIGNMENT* pList ); @@ -648,7 +637,7 @@ static HRESULT UnregisterAssembly( // TODO: handle rollbacks // get applications collection - hr = CpiGetApplicationsCollection(pAttrs->pwzPartID, &piColl); + hr = CpiExecGetApplicationsCollection(pAttrs->pwzPartID, &piColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -993,7 +982,7 @@ static HRESULT RegisterNativeAssembly( ExitOnNull(bstrPSDllPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for tlb path"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get ICOMAdminCatalog2 interface @@ -1154,12 +1143,12 @@ LExit: static HRESULT RemoveComponents( ICatalogCollection* piCompColl, - CPI_COMPONENT* pCompList + CPIEXEC_COMPONENT* pCompList ) { HRESULT hr = S_OK; - for (CPI_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) + for (CPIEXEC_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) { // remove hr = CpiRemoveCollectionObject(piCompColl, pItm->wzCLSID, NULL, FALSE); @@ -1291,7 +1280,7 @@ static void FreeRoleAssignmentsAttributes( static HRESULT ConfigureComponents( LPCWSTR pwzPartID, LPCWSTR pwzAppID, - CPI_COMPONENT* pCompList, + CPIEXEC_COMPONENT* pCompList, BOOL fCreate, BOOL fProgress ) @@ -1313,7 +1302,7 @@ static HRESULT ConfigureComponents( ExitOnFailure(hr, "Failed to get components collection"); // read components - for (CPI_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) + for (CPIEXEC_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) { // progress message if (fProgress) @@ -1375,7 +1364,7 @@ LExit: static HRESULT ConfigureInterfaces( ICatalogCollection* piCompColl, ICatalogObject* piCompObj, - CPI_INTERFACE* pIntfList, + CPIEXEC_INTERFACE* pIntfList, BOOL fCreate ) { @@ -1396,7 +1385,7 @@ static HRESULT ConfigureInterfaces( ExitOnFailure(hr, "Failed to get interfaces collection"); // read interfaces - for (CPI_INTERFACE* pItm = pIntfList; pItm; pItm = pItm->pNext) + for (CPIEXEC_INTERFACE* pItm = pIntfList; pItm; pItm = pItm->pNext) { // find interface hr = CpiFindCollectionObjectByStringKey(piIntfColl, pItm->wzIID, &piIntfObj); @@ -1448,7 +1437,7 @@ LExit: static HRESULT ConfigureMethods( ICatalogCollection* piIntfColl, ICatalogObject* piIntfObj, - CPI_METHOD* pMethList, + CPIEXEC_METHOD* pMethList, BOOL fCreate ) { @@ -1469,7 +1458,7 @@ static HRESULT ConfigureMethods( ExitOnFailure(hr, "Failed to get methods collection"); // read methods - for (CPI_METHOD* pItm = pMethList; pItm; pItm = pItm->pNext) + for (CPIEXEC_METHOD* pItm = pMethList; pItm; pItm = pItm->pNext) { // find method if (*pItm->wzIndex) @@ -1519,7 +1508,7 @@ static HRESULT ConfigureRoleAssignments( LPCWSTR pwzCollName, ICatalogCollection* piCompColl, ICatalogObject* piCompObj, - CPI_ROLE_ASSIGNMENT* pRoleList, + CPIEXEC_ROLE_ASSIGNMENT* pRoleList, BOOL fCreate ) { @@ -1531,7 +1520,7 @@ static HRESULT ConfigureRoleAssignments( long lChanges = 0; // get roles collection - hr = CpiGetCatalogCollection(piCompColl, piCompObj, pwzCollName, &piRoleColl); + hr = CpiExecGetCatalogCollection(piCompColl, piCompObj, pwzCollName, &piRoleColl); if (S_FALSE == hr) if (fCreate) hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); @@ -1540,7 +1529,7 @@ static HRESULT ConfigureRoleAssignments( ExitOnFailure(hr, "Failed to get role assignments collection"); // read roles - for (CPI_ROLE_ASSIGNMENT* pItm = pRoleList; pItm; pItm = pItm->pNext) + for (CPIEXEC_ROLE_ASSIGNMENT* pItm = pRoleList; pItm; pItm = pItm->pNext) { if (fCreate) { @@ -1588,14 +1577,14 @@ LExit: static HRESULT ReadComponentList( LPWSTR* ppwzData, - CPI_COMPONENT** ppCompList + CPIEXEC_COMPONENT** ppCompList ) { HRESULT hr = S_OK; LPWSTR pwzData = NULL; - CPI_COMPONENT* pItm = NULL; + CPIEXEC_COMPONENT* pItm = NULL; int iCnt = 0; @@ -1606,7 +1595,7 @@ static HRESULT ReadComponentList( // read components for (int i = 0; i < iCnt; i++) { - pItm = (CPI_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_COMPONENT)); + pItm = (CPIEXEC_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_COMPONENT)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1648,14 +1637,14 @@ LExit: static HRESULT ReadInterfaceList( LPWSTR* ppwzData, - CPI_INTERFACE** ppIntfList + CPIEXEC_INTERFACE** ppIntfList ) { HRESULT hr = S_OK; LPWSTR pwzData = NULL; - CPI_INTERFACE* pItm = NULL; + CPIEXEC_INTERFACE* pItm = NULL; int iCnt = 0; @@ -1666,7 +1655,7 @@ static HRESULT ReadInterfaceList( // read interfaces for (int i = 0; i < iCnt; i++) { - pItm = (CPI_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_INTERFACE)); + pItm = (CPIEXEC_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_INTERFACE)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1708,14 +1697,14 @@ LExit: static HRESULT ReadMethodList( LPWSTR* ppwzData, - CPI_METHOD** ppMethList + CPIEXEC_METHOD** ppMethList ) { HRESULT hr = S_OK; LPWSTR pwzData = NULL; - CPI_METHOD* pItm = NULL; + CPIEXEC_METHOD* pItm = NULL; int iCnt = 0; @@ -1726,7 +1715,7 @@ static HRESULT ReadMethodList( // read methods for (int i = 0; i < iCnt; i++) { - pItm = (CPI_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_METHOD)); + pItm = (CPIEXEC_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_METHOD)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1769,14 +1758,14 @@ LExit: static HRESULT ReadRoleAssignmentList( LPWSTR* ppwzData, - CPI_ROLE_ASSIGNMENT** ppRoleList + CPIEXEC_ROLE_ASSIGNMENT** ppRoleList ) { HRESULT hr = S_OK; LPWSTR pwzData = NULL; - CPI_ROLE_ASSIGNMENT* pItm = NULL; + CPIEXEC_ROLE_ASSIGNMENT* pItm = NULL; int iCnt = 0; @@ -1787,7 +1776,7 @@ static HRESULT ReadRoleAssignmentList( // read roles for (int i = 0; i < iCnt; i++) { - pItm = (CPI_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_ROLE_ASSIGNMENT)); + pItm = (CPIEXEC_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_ROLE_ASSIGNMENT)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1821,7 +1810,7 @@ LExit: } static void FreeComponentList( - CPI_COMPONENT* pList + CPIEXEC_COMPONENT* pList ) { while (pList) @@ -1833,14 +1822,14 @@ static void FreeComponentList( if (pList->pInterfaceList) FreeInterfaceList(pList->pInterfaceList); - CPI_COMPONENT* pDelete = pList; + CPIEXEC_COMPONENT* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void FreeInterfaceList( - CPI_INTERFACE* pList + CPIEXEC_INTERFACE* pList ) { while (pList) @@ -1852,14 +1841,14 @@ static void FreeInterfaceList( if (pList->pMethodList) FreeMethodList(pList->pMethodList); - CPI_INTERFACE* pDelete = pList; + CPIEXEC_INTERFACE* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void FreeMethodList( - CPI_METHOD* pList + CPIEXEC_METHOD* pList ) { while (pList) @@ -1869,19 +1858,19 @@ static void FreeMethodList( if (pList->pRoleAssignmentList) FreeRoleAssignmentList(pList->pRoleAssignmentList); - CPI_METHOD* pDelete = pList; + CPIEXEC_METHOD* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void FreeRoleAssignmentList( - CPI_ROLE_ASSIGNMENT* pList + CPIEXEC_ROLE_ASSIGNMENT* pList ) { while (pList) { - CPI_ROLE_ASSIGNMENT* pDelete = pList; + CPIEXEC_ROLE_ASSIGNMENT* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } diff --git a/src/ca/cpasmsched.cpp b/src/ca/cpasmsched.cpp index 97ecff61..2d0573a5 100644 --- a/src/ca/cpasmsched.cpp +++ b/src/ca/cpasmsched.cpp @@ -169,19 +169,19 @@ static HRESULT InterfacesRead( LPCWSTR pwzCompKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, CPI_ASSEMBLY* pAsm, - CPI_COMPONENT* pComp + CPISCHED_COMPONENT* pComp ); static HRESULT MethodsRead( LPCWSTR pwzIntfKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, CPI_ASSEMBLY* pAsm, - CPI_INTERFACE* pIntf + CPISCHED_INTERFACE* pIntf ); static HRESULT RoleAssignmentsRead( LPCWSTR pwzQuery, LPCWSTR pwzKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, - CPI_ROLE_ASSIGNMENT** ppRoleList, + CPISCHED_ROLE_ASSIGNMENT** ppRoleList, int* piInstallCount, int* piUninstallCount ); @@ -238,21 +238,21 @@ static HRESULT AddRoleAssignmentsToActionData( LPWSTR* ppwzActionData ); static HRESULT AddComponentToActionData( - CPI_COMPONENT* pItm, + CPISCHED_COMPONENT* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, LPWSTR* ppwzActionData ); static HRESULT AddInterfaceToActionData( - CPI_INTERFACE* pItm, + CPISCHED_INTERFACE* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, LPWSTR* ppwzActionData ); static HRESULT AddMethodToActionData( - CPI_METHOD* pItm, + CPISCHED_METHOD* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, @@ -261,7 +261,7 @@ static HRESULT AddMethodToActionData( static HRESULT AddRolesToActionData( int iRoleInstallCount, int iRoleUninstallCount, - CPI_ROLE_ASSIGNMENT* pRoleList, + CPISCHED_ROLE_ASSIGNMENT* pRoleList, BOOL fInstall, BOOL fRoles, LPWSTR* ppwzActionData @@ -284,16 +284,16 @@ static void ModuleFree( CPI_MODULE* pItm ); static void ComponentsFreeList( - CPI_COMPONENT* pList + CPISCHED_COMPONENT* pList ); static void InterfacesFreeList( - CPI_INTERFACE* pList + CPISCHED_INTERFACE* pList ); static void MethodsFreeList( - CPI_METHOD* pList + CPISCHED_METHOD* pList ); static void RoleAssignmentsFreeList( - CPI_ROLE_ASSIGNMENT* pList + CPISCHED_ROLE_ASSIGNMENT* pList ); @@ -686,7 +686,7 @@ LExit: HRESULT CpiGetSubscriptionsCollForComponent( CPI_ASSEMBLY* pAsm, - CPI_COMPONENT* pComp, + CPISCHED_COMPONENT* pComp, ICatalogCollection** ppiSubsColl ) { @@ -713,7 +713,7 @@ HRESULT CpiGetSubscriptionsCollForComponent( ExitFunction(); // exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", &pComp->piSubsColl); + hr = CpiSchedGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", &pComp->piSubsColl); ExitOnFailure(hr, "Failed to get subscriptions collection"); } @@ -1372,7 +1372,7 @@ static HRESULT ComponentsRead( PMSIHANDLE hView; PMSIHANDLE hRec; PMSIHANDLE hRecKey; - CPI_COMPONENT* pItm = NULL; + CPISCHED_COMPONENT* pItm = NULL; LPWSTR pwzData = NULL; // create parameter record @@ -1390,7 +1390,7 @@ static HRESULT ComponentsRead( while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) { // create entry - pItm = (CPI_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_COMPONENT)); + pItm = (CPISCHED_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_COMPONENT)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1455,14 +1455,14 @@ static HRESULT InterfacesRead( LPCWSTR pwzCompKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, CPI_ASSEMBLY* pAsm, - CPI_COMPONENT* pComp + CPISCHED_COMPONENT* pComp ) { HRESULT hr = S_OK; PMSIHANDLE hView; PMSIHANDLE hRec; PMSIHANDLE hRecKey; - CPI_INTERFACE* pItm = NULL; + CPISCHED_INTERFACE* pItm = NULL; LPWSTR pwzData = NULL; // create parameter record @@ -1480,7 +1480,7 @@ static HRESULT InterfacesRead( while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) { // create entry - pItm = (CPI_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_INTERFACE)); + pItm = (CPISCHED_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_INTERFACE)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1545,12 +1545,12 @@ static HRESULT MethodsRead( LPCWSTR pwzIntfKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, CPI_ASSEMBLY* pAsm, - CPI_INTERFACE* pIntf + CPISCHED_INTERFACE* pIntf ) { HRESULT hr = S_OK; PMSIHANDLE hView, hRec, hRecKey; - CPI_METHOD* pItm = NULL; + CPISCHED_METHOD* pItm = NULL; LPWSTR pwzData = NULL; // create parameter record @@ -1568,7 +1568,7 @@ static HRESULT MethodsRead( while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) { // create entry - pItm = (CPI_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_METHOD)); + pItm = (CPISCHED_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_METHOD)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1635,7 +1635,7 @@ static HRESULT RoleAssignmentsRead( LPCWSTR pwzQuery, LPCWSTR pwzKey, CPI_APPLICATION_ROLE_LIST* pAppRoleList, - CPI_ROLE_ASSIGNMENT** ppRoleList, + CPISCHED_ROLE_ASSIGNMENT** ppRoleList, int* piInstallCount, int* piUninstallCount ) @@ -1645,7 +1645,7 @@ static HRESULT RoleAssignmentsRead( PMSIHANDLE hView, hRec, hRecKey; - CPI_ROLE_ASSIGNMENT* pItm = NULL; + CPISCHED_ROLE_ASSIGNMENT* pItm = NULL; LPWSTR pwzData = NULL; BOOL fMatchingArchitecture = FALSE; @@ -1677,7 +1677,7 @@ static HRESULT RoleAssignmentsRead( } // create entry - pItm = (CPI_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_ROLE_ASSIGNMENT)); + pItm = (CPISCHED_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_ROLE_ASSIGNMENT)); if (!pItm) ExitFunction1(hr = E_OUTOFMEMORY); @@ -1786,7 +1786,7 @@ static HRESULT AddAssemblyToActionData( if (iCompCount) { - for (CPI_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) + for (CPISCHED_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) { hr = AddComponentToActionData(pComp, fInstall, atCreate == iActionType, FALSE, ppwzActionData); ExitOnFailure(hr, "Failed to add component to custom action data, component: %S", pComp->wzKey); @@ -1834,7 +1834,7 @@ static HRESULT AddRoleAssignmentsToActionData( hr = WcaWriteIntegerToCaData(pItm->iComponentCount, ppwzActionData); ExitOnFailure(hr, "Failed to add component count to custom action data"); - for (CPI_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) + for (CPISCHED_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) { hr = AddComponentToActionData(pComp, fInstall, FALSE, TRUE, ppwzActionData); ExitOnFailure(hr, "Failed to add component to custom action data, component: %S", pComp->wzKey); @@ -1847,7 +1847,7 @@ LExit: } static HRESULT AddComponentToActionData( - CPI_COMPONENT* pItm, + CPISCHED_COMPONENT* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, @@ -1875,7 +1875,7 @@ static HRESULT AddComponentToActionData( if (iIntfCount) { - for (CPI_INTERFACE* pIntf = pItm->pInterfaces; pIntf; pIntf = pIntf->pNext) + for (CPISCHED_INTERFACE* pIntf = pItm->pInterfaces; pIntf; pIntf = pIntf->pNext) { hr = AddInterfaceToActionData(pIntf, fInstall, fProps, fRoles, ppwzActionData); ExitOnFailure(hr, "Failed to add interface custom action data, interface: %S", pIntf->wzKey); @@ -1889,7 +1889,7 @@ LExit: } static HRESULT AddInterfaceToActionData( - CPI_INTERFACE* pItm, + CPISCHED_INTERFACE* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, @@ -1914,7 +1914,7 @@ static HRESULT AddInterfaceToActionData( hr = WcaWriteIntegerToCaData(pItm->iMethodCount, ppwzActionData); ExitOnFailure(hr, "Failed to add method count to custom action data"); - for (CPI_METHOD* pMeth = pItm->pMethods; pMeth; pMeth = pMeth->pNext) + for (CPISCHED_METHOD* pMeth = pItm->pMethods; pMeth; pMeth = pMeth->pNext) { hr = AddMethodToActionData(pMeth, fInstall, fProps, fRoles, ppwzActionData); ExitOnFailure(hr, "Failed to add method custom action data, method: %S", pMeth->wzKey); @@ -1927,7 +1927,7 @@ LExit: } static HRESULT AddMethodToActionData( - CPI_METHOD* pItm, + CPISCHED_METHOD* pItm, BOOL fInstall, BOOL fProps, BOOL fRoles, @@ -1960,7 +1960,7 @@ LExit: static HRESULT AddRolesToActionData( int iRoleInstallCount, int iRoleUninstallCount, - CPI_ROLE_ASSIGNMENT* pRoleList, + CPISCHED_ROLE_ASSIGNMENT* pRoleList, BOOL fInstall, BOOL fRoles, LPWSTR* ppwzActionData @@ -1974,7 +1974,7 @@ static HRESULT AddRolesToActionData( if (iRoleCount) { - for (CPI_ROLE_ASSIGNMENT* pRole = pRoleList; pRole; pRole = pRole->pNext) + for (CPISCHED_ROLE_ASSIGNMENT* pRole = pRoleList; pRole; pRole = pRole->pNext) { // make sure the install state matches the create flag if (fInstall ? !WcaIsInstalling(pRole->isInstalled, pRole->isAction) : !WcaIsUninstalling(pRole->isInstalled, pRole->isAction)) @@ -2061,7 +2061,7 @@ static void ModuleFree( } static void ComponentsFreeList( - CPI_COMPONENT* pList + CPISCHED_COMPONENT* pList ) { while (pList) @@ -2077,14 +2077,14 @@ static void ComponentsFreeList( ReleaseObject(pList->piSubsColl); - CPI_COMPONENT* pDelete = pList; + CPISCHED_COMPONENT* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void InterfacesFreeList( - CPI_INTERFACE* pList + CPISCHED_INTERFACE* pList ) { while (pList) @@ -2098,14 +2098,14 @@ static void InterfacesFreeList( if (pList->pMethods) MethodsFreeList(pList->pMethods); - CPI_INTERFACE* pDelete = pList; + CPISCHED_INTERFACE* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void MethodsFreeList( - CPI_METHOD* pList + CPISCHED_METHOD* pList ) { while (pList) @@ -2116,19 +2116,19 @@ static void MethodsFreeList( if (pList->pRoles) RoleAssignmentsFreeList(pList->pRoles); - CPI_METHOD* pDelete = pList; + CPISCHED_METHOD* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } } static void RoleAssignmentsFreeList( - CPI_ROLE_ASSIGNMENT* pList + CPISCHED_ROLE_ASSIGNMENT* pList ) { while (pList) { - CPI_ROLE_ASSIGNMENT* pDelete = pList; + CPISCHED_ROLE_ASSIGNMENT* pDelete = pList; pList = pList->pNext; ::HeapFree(::GetProcessHeap(), 0, pDelete); } diff --git a/src/ca/cpasmsched.h b/src/ca/cpasmsched.h index b5a68d7e..ddf4b6c0 100644 --- a/src/ca/cpasmsched.h +++ b/src/ca/cpasmsched.h @@ -13,7 +13,7 @@ enum eAssemblyAttributes // structs -struct CPI_ROLE_ASSIGNMENT +struct CPISCHED_ROLE_ASSIGNMENT { WCHAR wzKey[MAX_DARWIN_KEY + 1]; @@ -21,10 +21,10 @@ struct CPI_ROLE_ASSIGNMENT CPI_APPLICATION_ROLE* pApplicationRole; - CPI_ROLE_ASSIGNMENT* pNext; + CPISCHED_ROLE_ASSIGNMENT* pNext; }; -struct CPI_METHOD +struct CPISCHED_METHOD { WCHAR wzKey[MAX_DARWIN_KEY + 1]; WCHAR wzIndex[11 + 1]; @@ -35,12 +35,12 @@ struct CPI_METHOD int iRoleInstallCount; int iRoleUninstallCount; - CPI_ROLE_ASSIGNMENT* pRoles; + CPISCHED_ROLE_ASSIGNMENT* pRoles; - CPI_METHOD* pNext; + CPISCHED_METHOD* pNext; }; -struct CPI_INTERFACE +struct CPISCHED_INTERFACE { WCHAR wzKey[MAX_DARWIN_KEY + 1]; WCHAR wzIID[CPI_MAX_GUID + 1]; @@ -50,15 +50,15 @@ struct CPI_INTERFACE int iRoleInstallCount; int iRoleUninstallCount; - CPI_ROLE_ASSIGNMENT* pRoles; + CPISCHED_ROLE_ASSIGNMENT* pRoles; int iMethodCount; - CPI_METHOD* pMethods; + CPISCHED_METHOD* pMethods; - CPI_INTERFACE* pNext; + CPISCHED_INTERFACE* pNext; }; -struct CPI_COMPONENT +struct CPISCHED_COMPONENT { WCHAR wzKey[MAX_DARWIN_KEY + 1]; WCHAR wzCLSID[CPI_MAX_GUID + 1]; @@ -68,14 +68,14 @@ struct CPI_COMPONENT int iRoleInstallCount; int iRoleUninstallCount; - CPI_ROLE_ASSIGNMENT* pRoles; + CPISCHED_ROLE_ASSIGNMENT* pRoles; int iInterfaceCount; - CPI_INTERFACE* pInterfaces; + CPISCHED_INTERFACE* pInterfaces; ICatalogCollection* piSubsColl; - CPI_COMPONENT* pNext; + CPISCHED_COMPONENT* pNext; }; struct CPI_ASSEMBLY @@ -89,7 +89,7 @@ struct CPI_ASSEMBLY int iAttributes; int iComponentCount; - CPI_COMPONENT* pComponents; + CPISCHED_COMPONENT* pComponents; BOOL fReferencedForInstall; BOOL fReferencedForUninstall; @@ -163,6 +163,6 @@ HRESULT CpiRoleAssignmentsUninstall( ); HRESULT CpiGetSubscriptionsCollForComponent( CPI_ASSEMBLY* pAsm, - CPI_COMPONENT* pComp, + CPISCHED_COMPONENT* pComp, ICatalogCollection** ppiSubsColl ); diff --git a/src/ca/cpexec.cpp b/src/ca/cpexec.cpp index fa2446d8..9b1691fc 100644 --- a/src/ca/cpexec.cpp +++ b/src/ca/cpexec.cpp @@ -2,29 +2,6 @@ #include "precomp.h" -/******************************************************************** - DllMain - standard entry point for all WiX CustomActions - -********************************************************************/ -extern "C" BOOL WINAPI DllMain( - IN HINSTANCE hInst, - IN ULONG ulReason, - IN LPVOID) -{ - switch(ulReason) - { - case DLL_PROCESS_ATTACH: - WcaGlobalInitialize(hInst); - break; - - case DLL_PROCESS_DETACH: - WcaGlobalFinalize(); - break; - } - - return TRUE; -} - /******************************************************************** ComPlusPrepare - CUSTOM ACTION ENTRY POINT @@ -133,7 +110,7 @@ extern "C" UINT __stdcall ComPlusInstallExecute(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -204,7 +181,7 @@ LExit: ::CloseHandle(hRollbackFile); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -239,7 +216,7 @@ extern "C" UINT __stdcall ComPlusInstallExecuteCommit(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -282,7 +259,7 @@ LExit: ::CloseHandle(hRollbackFile); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -327,7 +304,7 @@ extern "C" UINT __stdcall ComPlusRollbackInstallExecute(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -439,7 +416,7 @@ LExit: CpiFreeRollbackDataList(prdSubscriptions); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -474,7 +451,7 @@ extern "C" UINT __stdcall ComPlusUninstallExecute(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -545,7 +522,7 @@ LExit: ::CloseHandle(hRollbackFile); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -590,7 +567,7 @@ extern "C" UINT __stdcall ComPlusRollbackUninstallExecute(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiExecInitialize(); // get custom action data hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); @@ -694,7 +671,7 @@ LExit: CpiFreeRollbackDataList(prdSubscriptions); // unitialize - CpiFinalize(); + CpiExecFinalize(); if (fInitializedCom) ::CoUninitialize(); diff --git a/src/ca/cpexec.def b/src/ca/cpexec.def deleted file mode 100644 index 1dad15c2..00000000 --- a/src/ca/cpexec.def +++ /dev/null @@ -1,11 +0,0 @@ -; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. - - -EXPORTS - ComPlusPrepare - ComPlusCleanup - ComPlusInstallExecute - ComPlusInstallExecuteCommit - ComPlusRollbackInstallExecute - ComPlusUninstallExecute - ComPlusRollbackUninstallExecute diff --git a/src/ca/cppartexec.cpp b/src/ca/cppartexec.cpp index d8c30c6a..673bdaf9 100644 --- a/src/ca/cppartexec.cpp +++ b/src/ca/cppartexec.cpp @@ -399,7 +399,7 @@ static HRESULT CreatePartition( WcaLog(LOGMSG_VERBOSE, "Creating partition, key: %S", pAttrs->pwzKey); // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiExecGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // check if partition exists @@ -456,7 +456,7 @@ static HRESULT RemovePartition( WcaLog(LOGMSG_VERBOSE, "Removing partition, key: %S", pAttrs->pwzKey); // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiExecGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // remove diff --git a/src/ca/cppartsched.cpp b/src/ca/cppartsched.cpp index 6643a50b..7cd98791 100644 --- a/src/ca/cppartsched.cpp +++ b/src/ca/cppartsched.cpp @@ -199,7 +199,7 @@ HRESULT CpiPartitionsVerifyInstall( // get partitions collection if (!piPartColl) { - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); } @@ -336,7 +336,7 @@ HRESULT CpiPartitionsVerifyUninstall( // get partitions collection if (!piPartColl) { - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); } @@ -526,7 +526,7 @@ HRESULT CpiGetApplicationsCollForPartition( if (!pPart->piApplicationsColl) { // get partitions collection from catalog - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // find application object @@ -540,7 +540,7 @@ HRESULT CpiGetApplicationsCollForPartition( } // get roles collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"Applications", &pPart->piApplicationsColl); + hr = CpiSchedGetCatalogCollection(piPartColl, piPartObj, L"Applications", &pPart->piApplicationsColl); ExitOnFailure(hr, "Failed to get applications collection"); } @@ -576,7 +576,7 @@ HRESULT CpiGetRolesCollForPartition( if (!pPart->piRolesColl) { // get partitions collection from catalog - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // find partition object @@ -587,7 +587,7 @@ HRESULT CpiGetRolesCollForPartition( ExitFunction(); // exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", &pPart->piRolesColl); + hr = CpiSchedGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", &pPart->piRolesColl); ExitOnFailure(hr, "Failed to get roles collection"); } diff --git a/src/ca/cpsched.cpp b/src/ca/cpsched.cpp index ac0dda59..ebc547ae 100644 --- a/src/ca/cpsched.cpp +++ b/src/ca/cpsched.cpp @@ -29,30 +29,6 @@ #define CP_COMPLUSINSTALLCOMMIT L"ComPlusInstallCommit" #endif - -/******************************************************************** - DllMain - standard entry point for all WiX CustomActions - -********************************************************************/ -extern "C" BOOL WINAPI DllMain( - IN HINSTANCE hInst, - IN ULONG ulReason, - IN LPVOID) -{ - switch(ulReason) - { - case DLL_PROCESS_ATTACH: - WcaGlobalInitialize(hInst); - break; - - case DLL_PROCESS_DETACH: - WcaGlobalFinalize(); - break; - } - - return TRUE; -} - /******************************************************************** ConfigureComPlusInstall - CUSTOM ACTION ENTRY POINT for installing COM+ components @@ -103,7 +79,7 @@ extern "C" UINT __stdcall ConfigureComPlusInstall(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiSchedInitialize(); // check for the prerequsite tables if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) @@ -114,7 +90,7 @@ extern "C" UINT __stdcall ConfigureComPlusInstall(MSIHANDLE hInstall) // make sure we can access the COM+ admin catalog do { - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); if (FAILED(hr)) { WcaLog(LOGMSG_STANDARD, "Failed to get COM+ admin catalog"); @@ -320,7 +296,7 @@ LExit: CpiSubscriptionListFree(&subList); // unitialize - CpiFinalize(); + CpiSchedFinalize(); if (fInitializedCom) ::CoUninitialize(); @@ -378,7 +354,7 @@ extern "C" UINT __stdcall ConfigureComPlusUninstall(MSIHANDLE hInstall) ExitOnFailure(hr, "Failed to initialize COM"); fInitializedCom = TRUE; - CpiInitialize(); + CpiSchedInitialize(); // check for the prerequsite tables if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) @@ -389,7 +365,7 @@ extern "C" UINT __stdcall ConfigureComPlusUninstall(MSIHANDLE hInstall) // make sure we can access the COM+ admin catalog do { - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); if (FAILED(hr)) { WcaLog(LOGMSG_STANDARD, "Failed to get COM+ admin catalog"); @@ -580,7 +556,7 @@ LExit: CpiSubscriptionListFree(&subList); // unitialize - CpiFinalize(); + CpiSchedFinalize(); if (fInitializedCom) ::CoUninitialize(); diff --git a/src/ca/cpsubssched.cpp b/src/ca/cpsubssched.cpp index 73fd4f6d..df15fd03 100644 --- a/src/ca/cpsubssched.cpp +++ b/src/ca/cpsubssched.cpp @@ -53,7 +53,7 @@ static HRESULT ComponentFindByKey( CPI_ASSEMBLY_LIST* pAsmList, LPCWSTR pwzKey, CPI_ASSEMBLY** ppAsmItm, - CPI_COMPONENT** ppCompItm + CPISCHED_COMPONENT** ppCompItm ); @@ -586,12 +586,12 @@ static HRESULT ComponentFindByKey( CPI_ASSEMBLY_LIST* pAsmList, LPCWSTR pwzKey, CPI_ASSEMBLY** ppAsmItm, - CPI_COMPONENT** ppCompItm + CPISCHED_COMPONENT** ppCompItm ) { for (CPI_ASSEMBLY* pAsmItm = pAsmList->pFirst; pAsmItm; pAsmItm = pAsmItm->pNext) { - for (CPI_COMPONENT* pCompItm = pAsmItm->pComponents; pCompItm; pCompItm = pCompItm->pNext) + for (CPISCHED_COMPONENT* pCompItm = pAsmItm->pComponents; pCompItm; pCompItm = pCompItm->pNext) { if (0 == lstrcmpW(pCompItm->wzKey, pwzKey)) { diff --git a/src/ca/cpsubssched.h b/src/ca/cpsubssched.h index 3fc18478..83ff1af8 100644 --- a/src/ca/cpsubssched.h +++ b/src/ca/cpsubssched.h @@ -18,7 +18,7 @@ struct CPI_SUBSCRIPTION INSTALLSTATE isInstalled, isAction; CPI_ASSEMBLY* pAssembly; - CPI_COMPONENT* pComponent; + CPISCHED_COMPONENT* pComponent; CPI_SUBSCRIPTION* pNext; }; diff --git a/src/ca/cputilexec.cpp b/src/ca/cputilexec.cpp index e081678b..1c2c8b93 100644 --- a/src/ca/cputilexec.cpp +++ b/src/ca/cputilexec.cpp @@ -69,13 +69,13 @@ static ICOMAdminCatalog* gpiCatalog; // function definitions -void CpiInitialize() +void CpiExecInitialize() { // collections gpiCatalog = NULL; } -void CpiFinalize() +void CpiExecFinalize() { // collections ReleaseObject(gpiCatalog); @@ -187,7 +187,7 @@ LExit: return hr; } -HRESULT CpiGetAdminCatalog( +HRESULT CpiExecGetAdminCatalog( ICOMAdminCatalog** ppiCatalog ) { @@ -225,11 +225,11 @@ HRESULT CpiLogCatalogErrorInfo() LPWSTR pwzMinorRef = NULL; // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get error info collection - hr = CpiGetCatalogCollection(L"ErrorInfo", &piErrColl); + hr = CpiExecGetCatalogCollection(L"ErrorInfo", &piErrColl); ExitOnFailure(hr, "Failed to get error info collection"); // loop objects @@ -282,7 +282,7 @@ LExit: return hr; } -HRESULT CpiGetCatalogCollection( +HRESULT CpiExecGetCatalogCollection( LPCWSTR pwzName, ICatalogCollection** ppiColl ) @@ -299,7 +299,7 @@ HRESULT CpiGetCatalogCollection( ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get collecton from catalog @@ -326,7 +326,7 @@ LExit: return hr; } -HRESULT CpiGetCatalogCollection( +HRESULT CpiExecGetCatalogCollection( ICatalogCollection* piColl, ICatalogObject* piObj, LPCWSTR pwzName, @@ -348,7 +348,7 @@ HRESULT CpiGetCatalogCollection( ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get key @@ -894,14 +894,14 @@ LExit: return hr; } -HRESULT CpiGetPartitionsCollection( +HRESULT CpiExecGetPartitionsCollection( ICatalogCollection** ppiPartColl ) { HRESULT hr = S_OK; // get collection - hr = CpiGetCatalogCollection(L"Partitions", ppiPartColl); + hr = CpiExecGetCatalogCollection(L"Partitions", ppiPartColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -921,7 +921,7 @@ HRESULT CpiGetPartitionRolesCollection( ICatalogObject* piPartObj = NULL; // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiExecGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); if (S_FALSE == hr) @@ -935,7 +935,7 @@ HRESULT CpiGetPartitionRolesCollection( ExitFunction(); // partition not found, exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", ppiRolesColl); + hr = CpiExecGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", ppiRolesColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -974,7 +974,7 @@ HRESULT CpiGetUsersInPartitionRoleCollection( ExitFunction(); // user not found, exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInPartitionRole", ppiUsrInRoleColl); + hr = CpiExecGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInPartitionRole", ppiUsrInRoleColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -994,7 +994,7 @@ HRESULT CpiGetPartitionUsersCollection( HRESULT hr = S_OK; // get roles collection - hr = CpiGetCatalogCollection(L"PartitionUsers", ppiUserColl); + hr = CpiExecGetCatalogCollection(L"PartitionUsers", ppiUserColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1003,7 +1003,7 @@ LExit: return hr; } -HRESULT CpiGetApplicationsCollection( +HRESULT CpiExecGetApplicationsCollection( LPCWSTR pwzPartID, ICatalogCollection** ppiAppColl ) @@ -1018,7 +1018,7 @@ HRESULT CpiGetApplicationsCollection( ICatalogObject* piPartObj = NULL; // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiExecGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get ICOMAdminCatalog2 interface @@ -1038,7 +1038,7 @@ HRESULT CpiGetApplicationsCollection( } // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiExecGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // find object @@ -1049,7 +1049,7 @@ HRESULT CpiGetApplicationsCollection( ExitFunction(); // partition not found, exit with hr = S_FALSE // get applications collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"Applications", ppiAppColl); + hr = CpiExecGetCatalogCollection(piPartColl, piPartObj, L"Applications", ppiAppColl); ExitOnFailure(hr, "Failed to get catalog collection for partition"); } @@ -1061,7 +1061,7 @@ HRESULT CpiGetApplicationsCollection( ExitOnFailure(hr = E_FAIL, "Partitions are not supported by this version of COM+"); // get applications collection - hr = CpiGetCatalogCollection(L"Applications", ppiAppColl); + hr = CpiExecGetCatalogCollection(L"Applications", ppiAppColl); ExitOnFailure(hr, "Failed to get catalog collection"); } @@ -1091,7 +1091,7 @@ HRESULT CpiGetRolesCollection( ICatalogObject* piAppObj = NULL; // get applications collection - hr = CpiGetApplicationsCollection(pwzPartID, &piAppColl); + hr = CpiExecGetApplicationsCollection(pwzPartID, &piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -1105,7 +1105,7 @@ HRESULT CpiGetRolesCollection( ExitFunction(); // application not found, exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Roles", ppiRolesColl); + hr = CpiExecGetCatalogCollection(piAppColl, piAppObj, L"Roles", ppiRolesColl); ExitOnFailure(hr, "Failed to catalog collection"); hr = S_OK; @@ -1145,7 +1145,7 @@ HRESULT CpiGetUsersInRoleCollection( ExitFunction(); // role not found, exit with hr = S_FALSE // get roles collection - hr = CpiGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInRole", ppiUsrInRoleColl); + hr = CpiExecGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInRole", ppiUsrInRoleColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1170,7 +1170,7 @@ HRESULT CpiGetComponentsCollection( ICatalogObject* piAppObj = NULL; // get applications collection - hr = CpiGetApplicationsCollection(pwzPartID, &piAppColl); + hr = CpiExecGetApplicationsCollection(pwzPartID, &piAppColl); ExitOnFailure(hr, "Failed to get applications collection"); if (S_FALSE == hr) @@ -1184,7 +1184,7 @@ HRESULT CpiGetComponentsCollection( ExitFunction(); // application not found, exit with hr = S_FALSE // get components collection - hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Components", ppiCompsColl); + hr = CpiExecGetCatalogCollection(piAppColl, piAppObj, L"Components", ppiCompsColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1206,7 +1206,7 @@ HRESULT CpiGetInterfacesCollection( HRESULT hr = S_OK; // get interfaces collection - hr = CpiGetCatalogCollection(piCompColl, piCompObj, L"InterfacesForComponent", ppiIntfColl); + hr = CpiExecGetCatalogCollection(piCompColl, piCompObj, L"InterfacesForComponent", ppiIntfColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1224,7 +1224,7 @@ HRESULT CpiGetMethodsCollection( HRESULT hr = S_OK; // get interfaces collection - hr = CpiGetCatalogCollection(piIntfColl, piIntfObj, L"MethodsForInterface", ppiMethColl); + hr = CpiExecGetCatalogCollection(piIntfColl, piIntfObj, L"MethodsForInterface", ppiMethColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; @@ -1260,7 +1260,7 @@ HRESULT CpiGetSubscriptionsCollection( ExitFunction(); // component not found, exit with hr = S_FALSE // get subscriptions collection - hr = CpiGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", ppiSubsColl); + hr = CpiExecGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", ppiSubsColl); ExitOnFailure(hr, "Failed to get catalog collection"); hr = S_OK; diff --git a/src/ca/cputilexec.h b/src/ca/cputilexec.h index 51b47583..b900883d 100644 --- a/src/ca/cputilexec.h +++ b/src/ca/cputilexec.h @@ -28,8 +28,8 @@ struct CPI_ROLLBACK_DATA // function prototypes -void CpiInitialize(); -void CpiFinalize(); +void CpiExecInitialize(); +void CpiExecFinalize(); HRESULT CpiActionStartMessage( LPWSTR* ppwzActionData, BOOL fSuppress @@ -38,15 +38,15 @@ HRESULT CpiActionDataMessage( DWORD cArgs, ... ); -HRESULT CpiGetAdminCatalog( +HRESULT CpiExecGetAdminCatalog( ICOMAdminCatalog** ppiCatalog ); HRESULT CpiLogCatalogErrorInfo(); -HRESULT CpiGetCatalogCollection( +HRESULT CpiExecGetCatalogCollection( LPCWSTR pwzName, ICatalogCollection** ppiColl ); -HRESULT CpiGetCatalogCollection( +HRESULT CpiExecGetCatalogCollection( ICatalogCollection* piColl, ICatalogObject* piObj, LPCWSTR pwzName, @@ -105,7 +105,7 @@ HRESULT CpiFindUserCollectionObject( PSID pSid, ICatalogObject** ppiObj ); -HRESULT CpiGetPartitionsCollection( +HRESULT CpiExecGetPartitionsCollection( ICatalogCollection** ppiPartColl ); HRESULT CpiGetPartitionRolesCollection( @@ -120,7 +120,7 @@ HRESULT CpiGetUsersInPartitionRoleCollection( HRESULT CpiGetPartitionUsersCollection( ICatalogCollection** ppiUserColl ); -HRESULT CpiGetApplicationsCollection( +HRESULT CpiExecGetApplicationsCollection( LPCWSTR pwzPartID, ICatalogCollection** ppiAppColl ); diff --git a/src/ca/cputilsched.cpp b/src/ca/cputilsched.cpp index 9dbe21ec..1a958c56 100644 --- a/src/ca/cputilsched.cpp +++ b/src/ca/cputilsched.cpp @@ -43,7 +43,7 @@ static int giTables; // function definitions -void CpiInitialize() +void CpiSchedInitialize() { // collections gpiCatalog = NULL; @@ -80,7 +80,7 @@ void CpiInitialize() if (S_OK == WcaTableExists(L"ComPlusSubscriptionProperty")) giTables |= cptComPlusSubscriptionProperty; } -void CpiFinalize() +void CpiSchedFinalize() { // collections ReleaseObject(gpiCatalog); @@ -95,7 +95,7 @@ BOOL CpiTableExists( return (giTables & iTable) == iTable; } -HRESULT CpiGetAdminCatalog( +HRESULT CpiSchedGetAdminCatalog( ICOMAdminCatalog** ppiCatalog ) { @@ -118,7 +118,7 @@ LExit: return hr; } -HRESULT CpiGetCatalogCollection( +HRESULT CpiSchedGetCatalogCollection( LPCWSTR pwzName, ICatalogCollection** ppiColl ) @@ -134,7 +134,7 @@ HRESULT CpiGetCatalogCollection( ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get collecton from catalog @@ -159,7 +159,7 @@ LExit: return hr; } -HRESULT CpiGetCatalogCollection( +HRESULT CpiSchedGetCatalogCollection( ICatalogCollection* piColl, ICatalogObject* piObj, LPCWSTR pwzName, @@ -180,7 +180,7 @@ HRESULT CpiGetCatalogCollection( ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get key @@ -331,7 +331,7 @@ LExit: return hr; } -HRESULT CpiGetPartitionsCollection( +HRESULT CpiSchedGetPartitionsCollection( ICatalogCollection** ppiPartColl ) { @@ -340,7 +340,7 @@ HRESULT CpiGetPartitionsCollection( if (!gpiPartColl) { // get collection - hr = CpiGetCatalogCollection(L"Partitions", &gpiPartColl); + hr = CpiSchedGetCatalogCollection(L"Partitions", &gpiPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); } @@ -354,7 +354,7 @@ LExit: return hr; } -HRESULT CpiGetApplicationsCollection( +HRESULT CpiSchedGetApplicationsCollection( ICatalogCollection** ppiAppColl ) { @@ -369,7 +369,7 @@ HRESULT CpiGetApplicationsCollection( if (!gpiAppColl) { // get catalog - hr = CpiGetAdminCatalog(&piCatalog); + hr = CpiSchedGetAdminCatalog(&piCatalog); ExitOnFailure(hr, "Failed to get COM+ admin catalog"); // get ICOMAdminCatalog2 interface @@ -385,7 +385,7 @@ HRESULT CpiGetApplicationsCollection( ExitOnFailure(hr, "Failed to get global partition id"); // get partitions collection - hr = CpiGetPartitionsCollection(&piPartColl); + hr = CpiSchedGetPartitionsCollection(&piPartColl); ExitOnFailure(hr, "Failed to get partitions collection"); // find object @@ -396,7 +396,7 @@ HRESULT CpiGetApplicationsCollection( ExitFunction(); // partition not found, exit with hr = S_FALSE // get applications collection - hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"Applications", &gpiAppColl); + hr = CpiSchedGetCatalogCollection(piPartColl, piPartObj, L"Applications", &gpiAppColl); ExitOnFailure(hr, "Failed to get applications collection"); } @@ -404,7 +404,7 @@ HRESULT CpiGetApplicationsCollection( else { // get applications collection - hr = CpiGetCatalogCollection(L"Applications", &gpiAppColl); + hr = CpiSchedGetCatalogCollection(L"Applications", &gpiAppColl); ExitOnFailure(hr, "Failed to get applications collection"); } } diff --git a/src/ca/cputilsched.h b/src/ca/cputilsched.h index 61aaab84..1f315576 100644 --- a/src/ca/cputilsched.h +++ b/src/ca/cputilsched.h @@ -2,12 +2,8 @@ // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -#define CPI_MAX_GUID 38 - enum eRunMode { rmDeferred = 1, rmCommit, rmRollback }; -enum eActionType { atNoOp = 0, atCreate, atRemove }; - enum eComPlusPropertyType { cpptNone = 0, cpptBoolean, cpptInteger, cpptString, cpptUser }; enum eComPlusTables @@ -42,14 +38,6 @@ enum eComPlusTables // structs -struct CPI_PROPERTY -{ - WCHAR wzName[MAX_DARWIN_KEY + 1]; - LPWSTR pwzValue; - - CPI_PROPERTY* pNext; -}; - struct CPI_PROPERTY_DEFINITION { LPCWSTR pwzName; @@ -60,19 +48,19 @@ struct CPI_PROPERTY_DEFINITION // function prototypes -void CpiInitialize(); -void CpiFinalize(); +void CpiSchedInitialize(); +void CpiSchedFinalize(); BOOL CpiTableExists( int iTable ); -HRESULT CpiGetAdminCatalog( +HRESULT CpiSchedGetAdminCatalog( ICOMAdminCatalog** ppiCatalog ); -HRESULT CpiGetCatalogCollection( +HRESULT CpiSchedGetCatalogCollection( LPCWSTR pwzName, ICatalogCollection** ppiColl ); -HRESULT CpiGetCatalogCollection( +HRESULT CpiSchedGetCatalogCollection( ICatalogCollection* piColl, ICatalogObject* piObj, LPCWSTR pwzName, @@ -89,10 +77,10 @@ HRESULT CpiFindCollectionObject( LPCWSTR pwzName, ICatalogObject** ppiObj ); -HRESULT CpiGetPartitionsCollection( +HRESULT CpiSchedGetPartitionsCollection( ICatalogCollection** ppiPartColl ); -HRESULT CpiGetApplicationsCollection( +HRESULT CpiSchedGetApplicationsCollection( ICatalogCollection** ppiAppColl ); HRESULT CpiAddActionTextToActionData( diff --git a/src/ca/custommsierrors.h b/src/ca/custommsierrors.h new file mode 100644 index 00000000..219df698 --- /dev/null +++ b/src/ca/custommsierrors.h @@ -0,0 +1,29 @@ +#pragma once +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + + +#define msierrComPlusCannotConnect 28001 +#define msierrComPlusPartitionReadFailed 28002 +#define msierrComPlusPartitionRoleReadFailed 28003 +#define msierrComPlusUserInPartitionRoleReadFailed 28004 +#define msierrComPlusPartitionUserReadFailed 28005 +#define msierrComPlusApplicationReadFailed 28006 +#define msierrComPlusApplicationRoleReadFailed 28007 +#define msierrComPlusUserInApplicationRoleReadFailed 28008 +#define msierrComPlusAssembliesReadFailed 28009 +#define msierrComPlusSubscriptionReadFailed 28010 +#define msierrComPlusPartitionDependency 28011 +#define msierrComPlusPartitionNotFound 28012 +#define msierrComPlusPartitionIdConflict 28013 +#define msierrComPlusPartitionNameConflict 28014 +#define msierrComPlusApplicationDependency 28015 +#define msierrComPlusApplicationNotFound 28016 +#define msierrComPlusApplicationIdConflict 28017 +#define msierrComPlusApplicationNameConflict 28018 +#define msierrComPlusApplicationRoleDependency 28019 +#define msierrComPlusApplicationRoleNotFound 28020 +#define msierrComPlusApplicationRoleConflict 28021 +#define msierrComPlusAssemblyDependency 28022 +#define msierrComPlusSubscriptionIdConflict 28023 +#define msierrComPlusSubscriptionNameConflict 28024 +#define msierrComPlusFailedLookupNames 28025 diff --git a/src/ca/dllmain.cpp b/src/ca/dllmain.cpp new file mode 100644 index 00000000..7d299feb --- /dev/null +++ b/src/ca/dllmain.cpp @@ -0,0 +1,27 @@ +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + +#include "precomp.h" + +/******************************************************************** +DllMain - standard entry point for all WiX custom actions. + +********************************************************************/ +extern "C" BOOL WINAPI DllMain( + IN HINSTANCE hInstance, + IN ULONG ulReason, + IN LPVOID) +{ + switch(ulReason) + { + case DLL_PROCESS_ATTACH: + WcaGlobalInitialize(hInstance); + ::DisableThreadLibraryCalls(hInstance); + break; + + case DLL_PROCESS_DETACH: + WcaGlobalFinalize(); + break; + } + + return TRUE; +} diff --git a/src/ca/packages.config b/src/ca/packages.config new file mode 100644 index 00000000..ab964d2c --- /dev/null +++ b/src/ca/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/src/ca/precomp.h b/src/ca/precomp.h new file mode 100644 index 00000000..74c328d2 --- /dev/null +++ b/src/ca/precomp.h @@ -0,0 +1,33 @@ +#pragma once +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. + + +#include +#include +#include +#include +#include +#include + +#include "wcautil.h" +#include "memutil.h" +#include "strutil.h" +#include "wiutil.h" + +#include "CustomMsiErrors.h" + +#include "cpcost.h" +#include "cputilexec.h" +#include "cppartexec.h" +#include "cppartroleexec.h" +#include "cpappexec.h" +#include "cpapproleexec.h" +#include "cpasmexec.h" +#include "cpsubsexec.h" +#include "cputilsched.h" +#include "cppartsched.h" +#include "cppartrolesched.h" +#include "cpappsched.h" +#include "cpapprolesched.h" +#include "cpasmsched.h" +#include "cpsubssched.h" -- cgit v1.2.3-55-g6feb