diff options
author | Sean Hall <r.sean.hall@gmail.com> | 2019-02-04 20:06:58 -0600 |
---|---|---|
committer | Sean Hall <r.sean.hall@gmail.com> | 2019-02-04 20:11:32 -0600 |
commit | c239e0cc3a28a50c42c63b086ee62e17cf699104 (patch) | |
tree | 5ba3e85a9bb1aef22a9162629b248a8e27e2c43f /src/ca | |
parent | cbc09b6cd6d0d0b8bf095a88d4d8333616637f71 (diff) | |
download | wix-c239e0cc3a28a50c42c63b086ee62e17cf699104.tar.gz wix-c239e0cc3a28a50c42c63b086ee62e17cf699104.tar.bz2 wix-c239e0cc3a28a50c42c63b086ee62e17cf699104.zip |
Integrate into latest v4.
Diffstat (limited to 'src/ca')
-rw-r--r-- | src/ca/complusca.def (renamed from src/ca/cpexec.def) | 4 | ||||
-rw-r--r-- | src/ca/complusca.vcxproj | 99 | ||||
-rw-r--r-- | src/ca/cpappexec.cpp | 4 | ||||
-rw-r--r-- | src/ca/cpappsched.cpp | 10 | ||||
-rw-r--r-- | src/ca/cpasmexec.cpp | 133 | ||||
-rw-r--r-- | src/ca/cpasmsched.cpp | 82 | ||||
-rw-r--r-- | src/ca/cpasmsched.h | 30 | ||||
-rw-r--r-- | src/ca/cpexec.cpp | 43 | ||||
-rw-r--r-- | src/ca/cppartexec.cpp | 4 | ||||
-rw-r--r-- | src/ca/cppartsched.cpp | 12 | ||||
-rw-r--r-- | src/ca/cpsched.cpp | 36 | ||||
-rw-r--r-- | src/ca/cpsubssched.cpp | 6 | ||||
-rw-r--r-- | src/ca/cpsubssched.h | 2 | ||||
-rw-r--r-- | src/ca/cputilexec.cpp | 56 | ||||
-rw-r--r-- | src/ca/cputilexec.h | 14 | ||||
-rw-r--r-- | src/ca/cputilsched.cpp | 28 | ||||
-rw-r--r-- | src/ca/cputilsched.h | 26 | ||||
-rw-r--r-- | src/ca/custommsierrors.h | 29 | ||||
-rw-r--r-- | src/ca/dllmain.cpp | 27 | ||||
-rw-r--r-- | src/ca/packages.config | 5 | ||||
-rw-r--r-- | src/ca/precomp.h | 33 |
21 files changed, 405 insertions, 278 deletions
diff --git a/src/ca/cpexec.def b/src/ca/complusca.def index 1dad15c2..7c475759 100644 --- a/src/ca/cpexec.def +++ b/src/ca/complusca.def | |||
@@ -1,6 +1,8 @@ | |||
1 | ; 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. | 1 | ; 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. |
2 | 2 | ||
3 | 3 | ||
4 | LIBRARY "complusca" | ||
5 | |||
4 | EXPORTS | 6 | EXPORTS |
5 | ComPlusPrepare | 7 | ComPlusPrepare |
6 | ComPlusCleanup | 8 | ComPlusCleanup |
@@ -9,3 +11,5 @@ EXPORTS | |||
9 | ComPlusRollbackInstallExecute | 11 | ComPlusRollbackInstallExecute |
10 | ComPlusUninstallExecute | 12 | ComPlusUninstallExecute |
11 | ComPlusRollbackUninstallExecute | 13 | ComPlusRollbackUninstallExecute |
14 | ConfigureComPlusInstall | ||
15 | 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 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- 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. --> | ||
3 | |||
4 | <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
5 | <Import Project="..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props')" /> | ||
6 | <Import Project="..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props" Condition="Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" /> | ||
7 | |||
8 | <ItemGroup Label="ProjectConfigurations"> | ||
9 | <ProjectConfiguration Include="Debug|Win32"> | ||
10 | <Configuration>Debug</Configuration> | ||
11 | <Platform>Win32</Platform> | ||
12 | </ProjectConfiguration> | ||
13 | <ProjectConfiguration Include="Release|Win32"> | ||
14 | <Configuration>Release</Configuration> | ||
15 | <Platform>Win32</Platform> | ||
16 | </ProjectConfiguration> | ||
17 | <ProjectConfiguration Include="Debug|x64"> | ||
18 | <Configuration>Debug</Configuration> | ||
19 | <Platform>x64</Platform> | ||
20 | </ProjectConfiguration> | ||
21 | <ProjectConfiguration Include="Release|x64"> | ||
22 | <Configuration>Release</Configuration> | ||
23 | <Platform>x64</Platform> | ||
24 | </ProjectConfiguration> | ||
25 | </ItemGroup> | ||
26 | |||
27 | <PropertyGroup Label="Globals"> | ||
28 | <ProjectGuid>{BDEF51ED-E242-4FA2-801A-01B127DF851A}</ProjectGuid> | ||
29 | <ConfigurationType>DynamicLibrary</ConfigurationType> | ||
30 | <PlatformToolset>v141</PlatformToolset> | ||
31 | <CharacterSet>Unicode</CharacterSet> | ||
32 | <TargetName>complusca</TargetName> | ||
33 | <ProjectModuleDefinitionFile>complusca.def</ProjectModuleDefinitionFile> | ||
34 | <Description>WiX Toolset ComPlus CustomAction</Description> | ||
35 | </PropertyGroup> | ||
36 | |||
37 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
38 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
39 | |||
40 | <PropertyGroup> | ||
41 | <ProjectAdditionalLinkLibraries>msi.lib</ProjectAdditionalLinkLibraries> | ||
42 | </PropertyGroup> | ||
43 | |||
44 | <ItemGroup> | ||
45 | <ClCompile Include="cpappexec.cpp" /> | ||
46 | <ClCompile Include="cpapproleexec.cpp" /> | ||
47 | <ClCompile Include="cpapprolesched.cpp" /> | ||
48 | <ClCompile Include="cpappsched.cpp" /> | ||
49 | <ClCompile Include="cpasmexec.cpp" /> | ||
50 | <ClCompile Include="cpasmsched.cpp" /> | ||
51 | <ClCompile Include="cpexec.cpp" /> | ||
52 | <ClCompile Include="cppartexec.cpp" /> | ||
53 | <ClCompile Include="cppartroleexec.cpp" /> | ||
54 | <ClCompile Include="cppartrolesched.cpp" /> | ||
55 | <ClCompile Include="cppartsched.cpp" /> | ||
56 | <ClCompile Include="cpsched.cpp" /> | ||
57 | <ClCompile Include="cpsubsexec.cpp" /> | ||
58 | <ClCompile Include="cpsubssched.cpp" /> | ||
59 | <ClCompile Include="cputilexec.cpp" /> | ||
60 | <ClCompile Include="cputilsched.cpp" /> | ||
61 | <ClCompile Include="dllmain.cpp"> | ||
62 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
63 | </ClCompile> | ||
64 | </ItemGroup> | ||
65 | |||
66 | <ItemGroup> | ||
67 | <ClInclude Include="cpappexec.h" /> | ||
68 | <ClInclude Include="cpapproleexec.h" /> | ||
69 | <ClInclude Include="cpapprolesched.h" /> | ||
70 | <ClInclude Include="cpappsched.h" /> | ||
71 | <ClInclude Include="cpasmexec.h" /> | ||
72 | <ClInclude Include="cpasmsched.h" /> | ||
73 | <ClInclude Include="cpcost.h" /> | ||
74 | <ClInclude Include="cppartexec.h" /> | ||
75 | <ClInclude Include="cppartroleexec.h" /> | ||
76 | <ClInclude Include="cppartrolesched.h" /> | ||
77 | <ClInclude Include="cppartsched.h" /> | ||
78 | <ClInclude Include="cpsubsexec.h" /> | ||
79 | <ClInclude Include="cpsubssched.h" /> | ||
80 | <ClInclude Include="cputilexec.h" /> | ||
81 | <ClInclude Include="cputilsched.h" /> | ||
82 | <ClInclude Include="precomp.h" /> | ||
83 | </ItemGroup> | ||
84 | |||
85 | <ItemGroup> | ||
86 | <None Include="packages.config" /> | ||
87 | <None Include="complusca.def" /> | ||
88 | </ItemGroup> | ||
89 | |||
90 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
91 | |||
92 | <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
93 | <PropertyGroup> | ||
94 | <ErrorText>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}.</ErrorText> | ||
95 | </PropertyGroup> | ||
96 | <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.16\build\WixToolset.DUtil.props'))" /> | ||
97 | <Error Condition="!Exists('..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.WcaUtil.4.0.2\build\WixToolset.WcaUtil.props'))" /> | ||
98 | </Target> | ||
99 | </Project> | ||
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( | |||
239 | WcaLog(LOGMSG_VERBOSE, "Creating application, key: %S", pAttrs->pwzKey); | 239 | WcaLog(LOGMSG_VERBOSE, "Creating application, key: %S", pAttrs->pwzKey); |
240 | 240 | ||
241 | // get applications collection | 241 | // get applications collection |
242 | hr = CpiGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); | 242 | hr = CpiExecGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); |
243 | if (S_FALSE == hr) | 243 | if (S_FALSE == hr) |
244 | hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); | 244 | hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); |
245 | ExitOnFailure(hr, "Failed to get applications collection"); | 245 | ExitOnFailure(hr, "Failed to get applications collection"); |
@@ -304,7 +304,7 @@ static HRESULT RemoveApplication( | |||
304 | WcaLog(LOGMSG_VERBOSE, "Removing application, key: %S", pAttrs->pwzKey); | 304 | WcaLog(LOGMSG_VERBOSE, "Removing application, key: %S", pAttrs->pwzKey); |
305 | 305 | ||
306 | // get applications collection | 306 | // get applications collection |
307 | hr = CpiGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); | 307 | hr = CpiExecGetApplicationsCollection(pAttrs->pwzPartID, &piAppColl); |
308 | ExitOnFailure(hr, "Failed to get applications collection"); | 308 | ExitOnFailure(hr, "Failed to get applications collection"); |
309 | 309 | ||
310 | if (S_FALSE == hr) | 310 | 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( | |||
579 | if (pApp->pPartition) | 579 | if (pApp->pPartition) |
580 | hr = CpiGetApplicationsCollForPartition(pApp->pPartition, &piAppColl); | 580 | hr = CpiGetApplicationsCollForPartition(pApp->pPartition, &piAppColl); |
581 | else | 581 | else |
582 | hr = CpiGetApplicationsCollection(&piAppColl); | 582 | hr = CpiSchedGetApplicationsCollection(&piAppColl); |
583 | ExitOnFailure(hr, "Failed to get applications collection"); | 583 | ExitOnFailure(hr, "Failed to get applications collection"); |
584 | 584 | ||
585 | if (S_FALSE == hr) | 585 | if (S_FALSE == hr) |
@@ -593,7 +593,7 @@ HRESULT CpiGetRolesCollForApplication( | |||
593 | ExitFunction(); // exit with hr = S_FALSE | 593 | ExitFunction(); // exit with hr = S_FALSE |
594 | 594 | ||
595 | // get roles collection | 595 | // get roles collection |
596 | hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Roles", &pApp->piRolesColl); | 596 | hr = CpiSchedGetCatalogCollection(piAppColl, piAppObj, L"Roles", &pApp->piRolesColl); |
597 | ExitOnFailure(hr, "Failed to get roles collection"); | 597 | ExitOnFailure(hr, "Failed to get roles collection"); |
598 | } | 598 | } |
599 | 599 | ||
@@ -632,7 +632,7 @@ HRESULT CpiGetComponentsCollForApplication( | |||
632 | if (pApp->pPartition) | 632 | if (pApp->pPartition) |
633 | hr = CpiGetApplicationsCollForPartition(pApp->pPartition, &piAppColl); | 633 | hr = CpiGetApplicationsCollForPartition(pApp->pPartition, &piAppColl); |
634 | else | 634 | else |
635 | hr = CpiGetApplicationsCollection(&piAppColl); | 635 | hr = CpiSchedGetApplicationsCollection(&piAppColl); |
636 | ExitOnFailure(hr, "Failed to get applications collection"); | 636 | ExitOnFailure(hr, "Failed to get applications collection"); |
637 | 637 | ||
638 | if (S_FALSE == hr) | 638 | if (S_FALSE == hr) |
@@ -646,7 +646,7 @@ HRESULT CpiGetComponentsCollForApplication( | |||
646 | ExitFunction(); // exit with hr = S_FALSE | 646 | ExitFunction(); // exit with hr = S_FALSE |
647 | 647 | ||
648 | // get roles collection | 648 | // get roles collection |
649 | hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Components", &pApp->piCompsColl); | 649 | hr = CpiSchedGetCatalogCollection(piAppColl, piAppObj, L"Components", &pApp->piCompsColl); |
650 | ExitOnFailure(hr, "Failed to get components collection"); | 650 | ExitOnFailure(hr, "Failed to get components collection"); |
651 | } | 651 | } |
652 | 652 | ||
@@ -695,7 +695,7 @@ static HRESULT FindObjectForApplication( | |||
695 | if (pItm->pPartition) | 695 | if (pItm->pPartition) |
696 | hr = CpiGetApplicationsCollForPartition(pItm->pPartition, &piAppColl); | 696 | hr = CpiGetApplicationsCollForPartition(pItm->pPartition, &piAppColl); |
697 | else | 697 | else |
698 | hr = CpiGetApplicationsCollection(&piAppColl); | 698 | hr = CpiSchedGetApplicationsCollection(&piAppColl); |
699 | ExitOnFailure(hr, "Failed to get applications collection"); | 699 | ExitOnFailure(hr, "Failed to get applications collection"); |
700 | 700 | ||
701 | if (S_FALSE == hr) | 701 | 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 { | |||
75 | }; | 75 | }; |
76 | 76 | ||
77 | 77 | ||
78 | // private constants | ||
79 | |||
80 | enum eAssemblyAttributes | ||
81 | { | ||
82 | aaEventClass = (1 << 0), | ||
83 | aaDotNetAssembly = (1 << 1), | ||
84 | aaPathFromGAC = (1 << 2), | ||
85 | aaRunInCommit = (1 << 3) | ||
86 | }; | ||
87 | |||
88 | |||
89 | // private structs | 78 | // private structs |
90 | 79 | ||
91 | struct CPI_ROLE_ASSIGNMENT | 80 | struct CPIEXEC_ROLE_ASSIGNMENT |
92 | { | 81 | { |
93 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; | 82 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; |
94 | WCHAR wzRoleName[MAX_DARWIN_COLUMN + 1]; | 83 | WCHAR wzRoleName[MAX_DARWIN_COLUMN + 1]; |
95 | 84 | ||
96 | CPI_ROLE_ASSIGNMENT* pNext; | 85 | CPIEXEC_ROLE_ASSIGNMENT* pNext; |
97 | }; | 86 | }; |
98 | 87 | ||
99 | struct CPI_METHOD | 88 | struct CPIEXEC_METHOD |
100 | { | 89 | { |
101 | WCHAR wzIndex[11 + 1]; | 90 | WCHAR wzIndex[11 + 1]; |
102 | WCHAR wzName[MAX_DARWIN_COLUMN + 1]; | 91 | WCHAR wzName[MAX_DARWIN_COLUMN + 1]; |
103 | 92 | ||
104 | CPI_PROPERTY* pPropertyList; | 93 | CPI_PROPERTY* pPropertyList; |
105 | CPI_ROLE_ASSIGNMENT* pRoleAssignmentList; | 94 | CPIEXEC_ROLE_ASSIGNMENT* pRoleAssignmentList; |
106 | 95 | ||
107 | CPI_METHOD* pNext; | 96 | CPIEXEC_METHOD* pNext; |
108 | }; | 97 | }; |
109 | 98 | ||
110 | struct CPI_INTERFACE | 99 | struct CPIEXEC_INTERFACE |
111 | { | 100 | { |
112 | WCHAR wzIID[CPI_MAX_GUID + 1]; | 101 | WCHAR wzIID[CPI_MAX_GUID + 1]; |
113 | 102 | ||
114 | CPI_PROPERTY* pPropertyList; | 103 | CPI_PROPERTY* pPropertyList; |
115 | CPI_ROLE_ASSIGNMENT* pRoleAssignmentList; | 104 | CPIEXEC_ROLE_ASSIGNMENT* pRoleAssignmentList; |
116 | CPI_METHOD* pMethodList; | 105 | CPIEXEC_METHOD* pMethodList; |
117 | 106 | ||
118 | CPI_INTERFACE* pNext; | 107 | CPIEXEC_INTERFACE* pNext; |
119 | }; | 108 | }; |
120 | 109 | ||
121 | struct CPI_COMPONENT | 110 | struct CPIEXEC_COMPONENT |
122 | { | 111 | { |
123 | WCHAR wzCLSID[CPI_MAX_GUID + 1]; | 112 | WCHAR wzCLSID[CPI_MAX_GUID + 1]; |
124 | 113 | ||
125 | CPI_PROPERTY* pPropertyList; | 114 | CPI_PROPERTY* pPropertyList; |
126 | CPI_ROLE_ASSIGNMENT* pRoleAssignmentList; | 115 | CPIEXEC_ROLE_ASSIGNMENT* pRoleAssignmentList; |
127 | CPI_INTERFACE* pInterfaceList; | 116 | CPIEXEC_INTERFACE* pInterfaceList; |
128 | 117 | ||
129 | CPI_COMPONENT* pNext; | 118 | CPIEXEC_COMPONENT* pNext; |
130 | }; | 119 | }; |
131 | 120 | ||
132 | struct CPI_ASSEMBLY_ATTRIBUTES | 121 | struct CPI_ASSEMBLY_ATTRIBUTES |
@@ -141,7 +130,7 @@ struct CPI_ASSEMBLY_ATTRIBUTES | |||
141 | LPWSTR pwzAppID; | 130 | LPWSTR pwzAppID; |
142 | LPWSTR pwzPartID; | 131 | LPWSTR pwzPartID; |
143 | int iAttributes; | 132 | int iAttributes; |
144 | CPI_COMPONENT* pCompList; | 133 | CPIEXEC_COMPONENT* pCompList; |
145 | }; | 134 | }; |
146 | 135 | ||
147 | struct CPI_ROLE_ASSIGNMENTS_ATTRIBUTES | 136 | struct CPI_ROLE_ASSIGNMENTS_ATTRIBUTES |
@@ -152,7 +141,7 @@ struct CPI_ROLE_ASSIGNMENTS_ATTRIBUTES | |||
152 | LPWSTR pwzAppID; | 141 | LPWSTR pwzAppID; |
153 | LPWSTR pwzPartID; | 142 | LPWSTR pwzPartID; |
154 | int iRoleCount; | 143 | int iRoleCount; |
155 | CPI_COMPONENT* pCompList; | 144 | CPIEXEC_COMPONENT* pCompList; |
156 | }; | 145 | }; |
157 | 146 | ||
158 | 147 | ||
@@ -187,7 +176,7 @@ static HRESULT UnregisterDotNetAssembly( | |||
187 | ); | 176 | ); |
188 | static HRESULT RemoveComponents( | 177 | static HRESULT RemoveComponents( |
189 | ICatalogCollection* piCompColl, | 178 | ICatalogCollection* piCompColl, |
190 | CPI_COMPONENT* pCompList | 179 | CPIEXEC_COMPONENT* pCompList |
191 | ); | 180 | ); |
192 | static HRESULT ReadAssemblyAttributes( | 181 | static HRESULT ReadAssemblyAttributes( |
193 | LPWSTR* ppwzData, | 182 | LPWSTR* ppwzData, |
@@ -206,56 +195,56 @@ static void FreeRoleAssignmentsAttributes( | |||
206 | static HRESULT ConfigureComponents( | 195 | static HRESULT ConfigureComponents( |
207 | LPCWSTR pwzPartID, | 196 | LPCWSTR pwzPartID, |
208 | LPCWSTR pwzAppID, | 197 | LPCWSTR pwzAppID, |
209 | CPI_COMPONENT* pCompList, | 198 | CPIEXEC_COMPONENT* pCompList, |
210 | BOOL fCreate, | 199 | BOOL fCreate, |
211 | BOOL fProgress | 200 | BOOL fProgress |
212 | ); | 201 | ); |
213 | static HRESULT ConfigureInterfaces( | 202 | static HRESULT ConfigureInterfaces( |
214 | ICatalogCollection* piCompColl, | 203 | ICatalogCollection* piCompColl, |
215 | ICatalogObject* piCompObj, | 204 | ICatalogObject* piCompObj, |
216 | CPI_INTERFACE* pIntfList, | 205 | CPIEXEC_INTERFACE* pIntfList, |
217 | BOOL fCreate | 206 | BOOL fCreate |
218 | ); | 207 | ); |
219 | static HRESULT ConfigureMethods( | 208 | static HRESULT ConfigureMethods( |
220 | ICatalogCollection* piIntfColl, | 209 | ICatalogCollection* piIntfColl, |
221 | ICatalogObject* piIntfObj, | 210 | ICatalogObject* piIntfObj, |
222 | CPI_METHOD* pMethList, | 211 | CPIEXEC_METHOD* pMethList, |
223 | BOOL fCreate | 212 | BOOL fCreate |
224 | ); | 213 | ); |
225 | static HRESULT ConfigureRoleAssignments( | 214 | static HRESULT ConfigureRoleAssignments( |
226 | LPCWSTR pwzCollName, | 215 | LPCWSTR pwzCollName, |
227 | ICatalogCollection* piCompColl, | 216 | ICatalogCollection* piCompColl, |
228 | ICatalogObject* piCompObj, | 217 | ICatalogObject* piCompObj, |
229 | CPI_ROLE_ASSIGNMENT* pRoleList, | 218 | CPIEXEC_ROLE_ASSIGNMENT* pRoleList, |
230 | BOOL fCreate | 219 | BOOL fCreate |
231 | ); | 220 | ); |
232 | static HRESULT ReadComponentList( | 221 | static HRESULT ReadComponentList( |
233 | LPWSTR* ppwzData, | 222 | LPWSTR* ppwzData, |
234 | CPI_COMPONENT** ppCompList | 223 | CPIEXEC_COMPONENT** ppCompList |
235 | ); | 224 | ); |
236 | static HRESULT ReadInterfaceList( | 225 | static HRESULT ReadInterfaceList( |
237 | LPWSTR* ppwzData, | 226 | LPWSTR* ppwzData, |
238 | CPI_INTERFACE** ppIntfList | 227 | CPIEXEC_INTERFACE** ppIntfList |
239 | ); | 228 | ); |
240 | static HRESULT ReadMethodList( | 229 | static HRESULT ReadMethodList( |
241 | LPWSTR* ppwzData, | 230 | LPWSTR* ppwzData, |
242 | CPI_METHOD** ppMethList | 231 | CPIEXEC_METHOD** ppMethList |
243 | ); | 232 | ); |
244 | static HRESULT ReadRoleAssignmentList( | 233 | static HRESULT ReadRoleAssignmentList( |
245 | LPWSTR* ppwzData, | 234 | LPWSTR* ppwzData, |
246 | CPI_ROLE_ASSIGNMENT** ppRoleList | 235 | CPIEXEC_ROLE_ASSIGNMENT** ppRoleList |
247 | ); | 236 | ); |
248 | static void FreeComponentList( | 237 | static void FreeComponentList( |
249 | CPI_COMPONENT* pList | 238 | CPIEXEC_COMPONENT* pList |
250 | ); | 239 | ); |
251 | static void FreeInterfaceList( | 240 | static void FreeInterfaceList( |
252 | CPI_INTERFACE* pList | 241 | CPIEXEC_INTERFACE* pList |
253 | ); | 242 | ); |
254 | static void FreeMethodList( | 243 | static void FreeMethodList( |
255 | CPI_METHOD* pList | 244 | CPIEXEC_METHOD* pList |
256 | ); | 245 | ); |
257 | static void FreeRoleAssignmentList( | 246 | static void FreeRoleAssignmentList( |
258 | CPI_ROLE_ASSIGNMENT* pList | 247 | CPIEXEC_ROLE_ASSIGNMENT* pList |
259 | ); | 248 | ); |
260 | 249 | ||
261 | 250 | ||
@@ -648,7 +637,7 @@ static HRESULT UnregisterAssembly( | |||
648 | // TODO: handle rollbacks | 637 | // TODO: handle rollbacks |
649 | 638 | ||
650 | // get applications collection | 639 | // get applications collection |
651 | hr = CpiGetApplicationsCollection(pAttrs->pwzPartID, &piColl); | 640 | hr = CpiExecGetApplicationsCollection(pAttrs->pwzPartID, &piColl); |
652 | ExitOnFailure(hr, "Failed to get applications collection"); | 641 | ExitOnFailure(hr, "Failed to get applications collection"); |
653 | 642 | ||
654 | if (S_FALSE == hr) | 643 | if (S_FALSE == hr) |
@@ -993,7 +982,7 @@ static HRESULT RegisterNativeAssembly( | |||
993 | ExitOnNull(bstrPSDllPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for tlb path"); | 982 | ExitOnNull(bstrPSDllPath, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for tlb path"); |
994 | 983 | ||
995 | // get catalog | 984 | // get catalog |
996 | hr = CpiGetAdminCatalog(&piCatalog); | 985 | hr = CpiExecGetAdminCatalog(&piCatalog); |
997 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); | 986 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); |
998 | 987 | ||
999 | // get ICOMAdminCatalog2 interface | 988 | // get ICOMAdminCatalog2 interface |
@@ -1154,12 +1143,12 @@ LExit: | |||
1154 | 1143 | ||
1155 | static HRESULT RemoveComponents( | 1144 | static HRESULT RemoveComponents( |
1156 | ICatalogCollection* piCompColl, | 1145 | ICatalogCollection* piCompColl, |
1157 | CPI_COMPONENT* pCompList | 1146 | CPIEXEC_COMPONENT* pCompList |
1158 | ) | 1147 | ) |
1159 | { | 1148 | { |
1160 | HRESULT hr = S_OK; | 1149 | HRESULT hr = S_OK; |
1161 | 1150 | ||
1162 | for (CPI_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) | 1151 | for (CPIEXEC_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) |
1163 | { | 1152 | { |
1164 | // remove | 1153 | // remove |
1165 | hr = CpiRemoveCollectionObject(piCompColl, pItm->wzCLSID, NULL, FALSE); | 1154 | hr = CpiRemoveCollectionObject(piCompColl, pItm->wzCLSID, NULL, FALSE); |
@@ -1291,7 +1280,7 @@ static void FreeRoleAssignmentsAttributes( | |||
1291 | static HRESULT ConfigureComponents( | 1280 | static HRESULT ConfigureComponents( |
1292 | LPCWSTR pwzPartID, | 1281 | LPCWSTR pwzPartID, |
1293 | LPCWSTR pwzAppID, | 1282 | LPCWSTR pwzAppID, |
1294 | CPI_COMPONENT* pCompList, | 1283 | CPIEXEC_COMPONENT* pCompList, |
1295 | BOOL fCreate, | 1284 | BOOL fCreate, |
1296 | BOOL fProgress | 1285 | BOOL fProgress |
1297 | ) | 1286 | ) |
@@ -1313,7 +1302,7 @@ static HRESULT ConfigureComponents( | |||
1313 | ExitOnFailure(hr, "Failed to get components collection"); | 1302 | ExitOnFailure(hr, "Failed to get components collection"); |
1314 | 1303 | ||
1315 | // read components | 1304 | // read components |
1316 | for (CPI_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) | 1305 | for (CPIEXEC_COMPONENT* pItm = pCompList; pItm; pItm = pItm->pNext) |
1317 | { | 1306 | { |
1318 | // progress message | 1307 | // progress message |
1319 | if (fProgress) | 1308 | if (fProgress) |
@@ -1375,7 +1364,7 @@ LExit: | |||
1375 | static HRESULT ConfigureInterfaces( | 1364 | static HRESULT ConfigureInterfaces( |
1376 | ICatalogCollection* piCompColl, | 1365 | ICatalogCollection* piCompColl, |
1377 | ICatalogObject* piCompObj, | 1366 | ICatalogObject* piCompObj, |
1378 | CPI_INTERFACE* pIntfList, | 1367 | CPIEXEC_INTERFACE* pIntfList, |
1379 | BOOL fCreate | 1368 | BOOL fCreate |
1380 | ) | 1369 | ) |
1381 | { | 1370 | { |
@@ -1396,7 +1385,7 @@ static HRESULT ConfigureInterfaces( | |||
1396 | ExitOnFailure(hr, "Failed to get interfaces collection"); | 1385 | ExitOnFailure(hr, "Failed to get interfaces collection"); |
1397 | 1386 | ||
1398 | // read interfaces | 1387 | // read interfaces |
1399 | for (CPI_INTERFACE* pItm = pIntfList; pItm; pItm = pItm->pNext) | 1388 | for (CPIEXEC_INTERFACE* pItm = pIntfList; pItm; pItm = pItm->pNext) |
1400 | { | 1389 | { |
1401 | // find interface | 1390 | // find interface |
1402 | hr = CpiFindCollectionObjectByStringKey(piIntfColl, pItm->wzIID, &piIntfObj); | 1391 | hr = CpiFindCollectionObjectByStringKey(piIntfColl, pItm->wzIID, &piIntfObj); |
@@ -1448,7 +1437,7 @@ LExit: | |||
1448 | static HRESULT ConfigureMethods( | 1437 | static HRESULT ConfigureMethods( |
1449 | ICatalogCollection* piIntfColl, | 1438 | ICatalogCollection* piIntfColl, |
1450 | ICatalogObject* piIntfObj, | 1439 | ICatalogObject* piIntfObj, |
1451 | CPI_METHOD* pMethList, | 1440 | CPIEXEC_METHOD* pMethList, |
1452 | BOOL fCreate | 1441 | BOOL fCreate |
1453 | ) | 1442 | ) |
1454 | { | 1443 | { |
@@ -1469,7 +1458,7 @@ static HRESULT ConfigureMethods( | |||
1469 | ExitOnFailure(hr, "Failed to get methods collection"); | 1458 | ExitOnFailure(hr, "Failed to get methods collection"); |
1470 | 1459 | ||
1471 | // read methods | 1460 | // read methods |
1472 | for (CPI_METHOD* pItm = pMethList; pItm; pItm = pItm->pNext) | 1461 | for (CPIEXEC_METHOD* pItm = pMethList; pItm; pItm = pItm->pNext) |
1473 | { | 1462 | { |
1474 | // find method | 1463 | // find method |
1475 | if (*pItm->wzIndex) | 1464 | if (*pItm->wzIndex) |
@@ -1519,7 +1508,7 @@ static HRESULT ConfigureRoleAssignments( | |||
1519 | LPCWSTR pwzCollName, | 1508 | LPCWSTR pwzCollName, |
1520 | ICatalogCollection* piCompColl, | 1509 | ICatalogCollection* piCompColl, |
1521 | ICatalogObject* piCompObj, | 1510 | ICatalogObject* piCompObj, |
1522 | CPI_ROLE_ASSIGNMENT* pRoleList, | 1511 | CPIEXEC_ROLE_ASSIGNMENT* pRoleList, |
1523 | BOOL fCreate | 1512 | BOOL fCreate |
1524 | ) | 1513 | ) |
1525 | { | 1514 | { |
@@ -1531,7 +1520,7 @@ static HRESULT ConfigureRoleAssignments( | |||
1531 | long lChanges = 0; | 1520 | long lChanges = 0; |
1532 | 1521 | ||
1533 | // get roles collection | 1522 | // get roles collection |
1534 | hr = CpiGetCatalogCollection(piCompColl, piCompObj, pwzCollName, &piRoleColl); | 1523 | hr = CpiExecGetCatalogCollection(piCompColl, piCompObj, pwzCollName, &piRoleColl); |
1535 | if (S_FALSE == hr) | 1524 | if (S_FALSE == hr) |
1536 | if (fCreate) | 1525 | if (fCreate) |
1537 | hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); | 1526 | hr = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); |
@@ -1540,7 +1529,7 @@ static HRESULT ConfigureRoleAssignments( | |||
1540 | ExitOnFailure(hr, "Failed to get role assignments collection"); | 1529 | ExitOnFailure(hr, "Failed to get role assignments collection"); |
1541 | 1530 | ||
1542 | // read roles | 1531 | // read roles |
1543 | for (CPI_ROLE_ASSIGNMENT* pItm = pRoleList; pItm; pItm = pItm->pNext) | 1532 | for (CPIEXEC_ROLE_ASSIGNMENT* pItm = pRoleList; pItm; pItm = pItm->pNext) |
1544 | { | 1533 | { |
1545 | if (fCreate) | 1534 | if (fCreate) |
1546 | { | 1535 | { |
@@ -1588,14 +1577,14 @@ LExit: | |||
1588 | 1577 | ||
1589 | static HRESULT ReadComponentList( | 1578 | static HRESULT ReadComponentList( |
1590 | LPWSTR* ppwzData, | 1579 | LPWSTR* ppwzData, |
1591 | CPI_COMPONENT** ppCompList | 1580 | CPIEXEC_COMPONENT** ppCompList |
1592 | ) | 1581 | ) |
1593 | { | 1582 | { |
1594 | HRESULT hr = S_OK; | 1583 | HRESULT hr = S_OK; |
1595 | 1584 | ||
1596 | LPWSTR pwzData = NULL; | 1585 | LPWSTR pwzData = NULL; |
1597 | 1586 | ||
1598 | CPI_COMPONENT* pItm = NULL; | 1587 | CPIEXEC_COMPONENT* pItm = NULL; |
1599 | 1588 | ||
1600 | int iCnt = 0; | 1589 | int iCnt = 0; |
1601 | 1590 | ||
@@ -1606,7 +1595,7 @@ static HRESULT ReadComponentList( | |||
1606 | // read components | 1595 | // read components |
1607 | for (int i = 0; i < iCnt; i++) | 1596 | for (int i = 0; i < iCnt; i++) |
1608 | { | 1597 | { |
1609 | pItm = (CPI_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_COMPONENT)); | 1598 | pItm = (CPIEXEC_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_COMPONENT)); |
1610 | if (!pItm) | 1599 | if (!pItm) |
1611 | ExitFunction1(hr = E_OUTOFMEMORY); | 1600 | ExitFunction1(hr = E_OUTOFMEMORY); |
1612 | 1601 | ||
@@ -1648,14 +1637,14 @@ LExit: | |||
1648 | 1637 | ||
1649 | static HRESULT ReadInterfaceList( | 1638 | static HRESULT ReadInterfaceList( |
1650 | LPWSTR* ppwzData, | 1639 | LPWSTR* ppwzData, |
1651 | CPI_INTERFACE** ppIntfList | 1640 | CPIEXEC_INTERFACE** ppIntfList |
1652 | ) | 1641 | ) |
1653 | { | 1642 | { |
1654 | HRESULT hr = S_OK; | 1643 | HRESULT hr = S_OK; |
1655 | 1644 | ||
1656 | LPWSTR pwzData = NULL; | 1645 | LPWSTR pwzData = NULL; |
1657 | 1646 | ||
1658 | CPI_INTERFACE* pItm = NULL; | 1647 | CPIEXEC_INTERFACE* pItm = NULL; |
1659 | 1648 | ||
1660 | int iCnt = 0; | 1649 | int iCnt = 0; |
1661 | 1650 | ||
@@ -1666,7 +1655,7 @@ static HRESULT ReadInterfaceList( | |||
1666 | // read interfaces | 1655 | // read interfaces |
1667 | for (int i = 0; i < iCnt; i++) | 1656 | for (int i = 0; i < iCnt; i++) |
1668 | { | 1657 | { |
1669 | pItm = (CPI_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_INTERFACE)); | 1658 | pItm = (CPIEXEC_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_INTERFACE)); |
1670 | if (!pItm) | 1659 | if (!pItm) |
1671 | ExitFunction1(hr = E_OUTOFMEMORY); | 1660 | ExitFunction1(hr = E_OUTOFMEMORY); |
1672 | 1661 | ||
@@ -1708,14 +1697,14 @@ LExit: | |||
1708 | 1697 | ||
1709 | static HRESULT ReadMethodList( | 1698 | static HRESULT ReadMethodList( |
1710 | LPWSTR* ppwzData, | 1699 | LPWSTR* ppwzData, |
1711 | CPI_METHOD** ppMethList | 1700 | CPIEXEC_METHOD** ppMethList |
1712 | ) | 1701 | ) |
1713 | { | 1702 | { |
1714 | HRESULT hr = S_OK; | 1703 | HRESULT hr = S_OK; |
1715 | 1704 | ||
1716 | LPWSTR pwzData = NULL; | 1705 | LPWSTR pwzData = NULL; |
1717 | 1706 | ||
1718 | CPI_METHOD* pItm = NULL; | 1707 | CPIEXEC_METHOD* pItm = NULL; |
1719 | 1708 | ||
1720 | int iCnt = 0; | 1709 | int iCnt = 0; |
1721 | 1710 | ||
@@ -1726,7 +1715,7 @@ static HRESULT ReadMethodList( | |||
1726 | // read methods | 1715 | // read methods |
1727 | for (int i = 0; i < iCnt; i++) | 1716 | for (int i = 0; i < iCnt; i++) |
1728 | { | 1717 | { |
1729 | pItm = (CPI_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_METHOD)); | 1718 | pItm = (CPIEXEC_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_METHOD)); |
1730 | if (!pItm) | 1719 | if (!pItm) |
1731 | ExitFunction1(hr = E_OUTOFMEMORY); | 1720 | ExitFunction1(hr = E_OUTOFMEMORY); |
1732 | 1721 | ||
@@ -1769,14 +1758,14 @@ LExit: | |||
1769 | 1758 | ||
1770 | static HRESULT ReadRoleAssignmentList( | 1759 | static HRESULT ReadRoleAssignmentList( |
1771 | LPWSTR* ppwzData, | 1760 | LPWSTR* ppwzData, |
1772 | CPI_ROLE_ASSIGNMENT** ppRoleList | 1761 | CPIEXEC_ROLE_ASSIGNMENT** ppRoleList |
1773 | ) | 1762 | ) |
1774 | { | 1763 | { |
1775 | HRESULT hr = S_OK; | 1764 | HRESULT hr = S_OK; |
1776 | 1765 | ||
1777 | LPWSTR pwzData = NULL; | 1766 | LPWSTR pwzData = NULL; |
1778 | 1767 | ||
1779 | CPI_ROLE_ASSIGNMENT* pItm = NULL; | 1768 | CPIEXEC_ROLE_ASSIGNMENT* pItm = NULL; |
1780 | 1769 | ||
1781 | int iCnt = 0; | 1770 | int iCnt = 0; |
1782 | 1771 | ||
@@ -1787,7 +1776,7 @@ static HRESULT ReadRoleAssignmentList( | |||
1787 | // read roles | 1776 | // read roles |
1788 | for (int i = 0; i < iCnt; i++) | 1777 | for (int i = 0; i < iCnt; i++) |
1789 | { | 1778 | { |
1790 | pItm = (CPI_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_ROLE_ASSIGNMENT)); | 1779 | pItm = (CPIEXEC_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPIEXEC_ROLE_ASSIGNMENT)); |
1791 | if (!pItm) | 1780 | if (!pItm) |
1792 | ExitFunction1(hr = E_OUTOFMEMORY); | 1781 | ExitFunction1(hr = E_OUTOFMEMORY); |
1793 | 1782 | ||
@@ -1821,7 +1810,7 @@ LExit: | |||
1821 | } | 1810 | } |
1822 | 1811 | ||
1823 | static void FreeComponentList( | 1812 | static void FreeComponentList( |
1824 | CPI_COMPONENT* pList | 1813 | CPIEXEC_COMPONENT* pList |
1825 | ) | 1814 | ) |
1826 | { | 1815 | { |
1827 | while (pList) | 1816 | while (pList) |
@@ -1833,14 +1822,14 @@ static void FreeComponentList( | |||
1833 | if (pList->pInterfaceList) | 1822 | if (pList->pInterfaceList) |
1834 | FreeInterfaceList(pList->pInterfaceList); | 1823 | FreeInterfaceList(pList->pInterfaceList); |
1835 | 1824 | ||
1836 | CPI_COMPONENT* pDelete = pList; | 1825 | CPIEXEC_COMPONENT* pDelete = pList; |
1837 | pList = pList->pNext; | 1826 | pList = pList->pNext; |
1838 | ::HeapFree(::GetProcessHeap(), 0, pDelete); | 1827 | ::HeapFree(::GetProcessHeap(), 0, pDelete); |
1839 | } | 1828 | } |
1840 | } | 1829 | } |
1841 | 1830 | ||
1842 | static void FreeInterfaceList( | 1831 | static void FreeInterfaceList( |
1843 | CPI_INTERFACE* pList | 1832 | CPIEXEC_INTERFACE* pList |
1844 | ) | 1833 | ) |
1845 | { | 1834 | { |
1846 | while (pList) | 1835 | while (pList) |
@@ -1852,14 +1841,14 @@ static void FreeInterfaceList( | |||
1852 | if (pList->pMethodList) | 1841 | if (pList->pMethodList) |
1853 | FreeMethodList(pList->pMethodList); | 1842 | FreeMethodList(pList->pMethodList); |
1854 | 1843 | ||
1855 | CPI_INTERFACE* pDelete = pList; | 1844 | CPIEXEC_INTERFACE* pDelete = pList; |
1856 | pList = pList->pNext; | 1845 | pList = pList->pNext; |
1857 | ::HeapFree(::GetProcessHeap(), 0, pDelete); | 1846 | ::HeapFree(::GetProcessHeap(), 0, pDelete); |
1858 | } | 1847 | } |
1859 | } | 1848 | } |
1860 | 1849 | ||
1861 | static void FreeMethodList( | 1850 | static void FreeMethodList( |
1862 | CPI_METHOD* pList | 1851 | CPIEXEC_METHOD* pList |
1863 | ) | 1852 | ) |
1864 | { | 1853 | { |
1865 | while (pList) | 1854 | while (pList) |
@@ -1869,19 +1858,19 @@ static void FreeMethodList( | |||
1869 | if (pList->pRoleAssignmentList) | 1858 | if (pList->pRoleAssignmentList) |
1870 | FreeRoleAssignmentList(pList->pRoleAssignmentList); | 1859 | FreeRoleAssignmentList(pList->pRoleAssignmentList); |
1871 | 1860 | ||
1872 | CPI_METHOD* pDelete = pList; | 1861 | CPIEXEC_METHOD* pDelete = pList; |
1873 | pList = pList->pNext; | 1862 | pList = pList->pNext; |
1874 | ::HeapFree(::GetProcessHeap(), 0, pDelete); | 1863 | ::HeapFree(::GetProcessHeap(), 0, pDelete); |
1875 | } | 1864 | } |
1876 | } | 1865 | } |
1877 | 1866 | ||
1878 | static void FreeRoleAssignmentList( | 1867 | static void FreeRoleAssignmentList( |
1879 | CPI_ROLE_ASSIGNMENT* pList | 1868 | CPIEXEC_ROLE_ASSIGNMENT* pList |
1880 | ) | 1869 | ) |
1881 | { | 1870 | { |
1882 | while (pList) | 1871 | while (pList) |
1883 | { | 1872 | { |
1884 | CPI_ROLE_ASSIGNMENT* pDelete = pList; | 1873 | CPIEXEC_ROLE_ASSIGNMENT* pDelete = pList; |
1885 | pList = pList->pNext; | 1874 | pList = pList->pNext; |
1886 | ::HeapFree(::GetProcessHeap(), 0, pDelete); | 1875 | ::HeapFree(::GetProcessHeap(), 0, pDelete); |
1887 | } | 1876 | } |
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( | |||
169 | LPCWSTR pwzCompKey, | 169 | LPCWSTR pwzCompKey, |
170 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, | 170 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, |
171 | CPI_ASSEMBLY* pAsm, | 171 | CPI_ASSEMBLY* pAsm, |
172 | CPI_COMPONENT* pComp | 172 | CPISCHED_COMPONENT* pComp |
173 | ); | 173 | ); |
174 | static HRESULT MethodsRead( | 174 | static HRESULT MethodsRead( |
175 | LPCWSTR pwzIntfKey, | 175 | LPCWSTR pwzIntfKey, |
176 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, | 176 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, |
177 | CPI_ASSEMBLY* pAsm, | 177 | CPI_ASSEMBLY* pAsm, |
178 | CPI_INTERFACE* pIntf | 178 | CPISCHED_INTERFACE* pIntf |
179 | ); | 179 | ); |
180 | static HRESULT RoleAssignmentsRead( | 180 | static HRESULT RoleAssignmentsRead( |
181 | LPCWSTR pwzQuery, | 181 | LPCWSTR pwzQuery, |
182 | LPCWSTR pwzKey, | 182 | LPCWSTR pwzKey, |
183 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, | 183 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, |
184 | CPI_ROLE_ASSIGNMENT** ppRoleList, | 184 | CPISCHED_ROLE_ASSIGNMENT** ppRoleList, |
185 | int* piInstallCount, | 185 | int* piInstallCount, |
186 | int* piUninstallCount | 186 | int* piUninstallCount |
187 | ); | 187 | ); |
@@ -238,21 +238,21 @@ static HRESULT AddRoleAssignmentsToActionData( | |||
238 | LPWSTR* ppwzActionData | 238 | LPWSTR* ppwzActionData |
239 | ); | 239 | ); |
240 | static HRESULT AddComponentToActionData( | 240 | static HRESULT AddComponentToActionData( |
241 | CPI_COMPONENT* pItm, | 241 | CPISCHED_COMPONENT* pItm, |
242 | BOOL fInstall, | 242 | BOOL fInstall, |
243 | BOOL fProps, | 243 | BOOL fProps, |
244 | BOOL fRoles, | 244 | BOOL fRoles, |
245 | LPWSTR* ppwzActionData | 245 | LPWSTR* ppwzActionData |
246 | ); | 246 | ); |
247 | static HRESULT AddInterfaceToActionData( | 247 | static HRESULT AddInterfaceToActionData( |
248 | CPI_INTERFACE* pItm, | 248 | CPISCHED_INTERFACE* pItm, |
249 | BOOL fInstall, | 249 | BOOL fInstall, |
250 | BOOL fProps, | 250 | BOOL fProps, |
251 | BOOL fRoles, | 251 | BOOL fRoles, |
252 | LPWSTR* ppwzActionData | 252 | LPWSTR* ppwzActionData |
253 | ); | 253 | ); |
254 | static HRESULT AddMethodToActionData( | 254 | static HRESULT AddMethodToActionData( |
255 | CPI_METHOD* pItm, | 255 | CPISCHED_METHOD* pItm, |
256 | BOOL fInstall, | 256 | BOOL fInstall, |
257 | BOOL fProps, | 257 | BOOL fProps, |
258 | BOOL fRoles, | 258 | BOOL fRoles, |
@@ -261,7 +261,7 @@ static HRESULT AddMethodToActionData( | |||
261 | static HRESULT AddRolesToActionData( | 261 | static HRESULT AddRolesToActionData( |
262 | int iRoleInstallCount, | 262 | int iRoleInstallCount, |
263 | int iRoleUninstallCount, | 263 | int iRoleUninstallCount, |
264 | CPI_ROLE_ASSIGNMENT* pRoleList, | 264 | CPISCHED_ROLE_ASSIGNMENT* pRoleList, |
265 | BOOL fInstall, | 265 | BOOL fInstall, |
266 | BOOL fRoles, | 266 | BOOL fRoles, |
267 | LPWSTR* ppwzActionData | 267 | LPWSTR* ppwzActionData |
@@ -284,16 +284,16 @@ static void ModuleFree( | |||
284 | CPI_MODULE* pItm | 284 | CPI_MODULE* pItm |
285 | ); | 285 | ); |
286 | static void ComponentsFreeList( | 286 | static void ComponentsFreeList( |
287 | CPI_COMPONENT* pList | 287 | CPISCHED_COMPONENT* pList |
288 | ); | 288 | ); |
289 | static void InterfacesFreeList( | 289 | static void InterfacesFreeList( |
290 | CPI_INTERFACE* pList | 290 | CPISCHED_INTERFACE* pList |
291 | ); | 291 | ); |
292 | static void MethodsFreeList( | 292 | static void MethodsFreeList( |
293 | CPI_METHOD* pList | 293 | CPISCHED_METHOD* pList |
294 | ); | 294 | ); |
295 | static void RoleAssignmentsFreeList( | 295 | static void RoleAssignmentsFreeList( |
296 | CPI_ROLE_ASSIGNMENT* pList | 296 | CPISCHED_ROLE_ASSIGNMENT* pList |
297 | ); | 297 | ); |
298 | 298 | ||
299 | 299 | ||
@@ -686,7 +686,7 @@ LExit: | |||
686 | 686 | ||
687 | HRESULT CpiGetSubscriptionsCollForComponent( | 687 | HRESULT CpiGetSubscriptionsCollForComponent( |
688 | CPI_ASSEMBLY* pAsm, | 688 | CPI_ASSEMBLY* pAsm, |
689 | CPI_COMPONENT* pComp, | 689 | CPISCHED_COMPONENT* pComp, |
690 | ICatalogCollection** ppiSubsColl | 690 | ICatalogCollection** ppiSubsColl |
691 | ) | 691 | ) |
692 | { | 692 | { |
@@ -713,7 +713,7 @@ HRESULT CpiGetSubscriptionsCollForComponent( | |||
713 | ExitFunction(); // exit with hr = S_FALSE | 713 | ExitFunction(); // exit with hr = S_FALSE |
714 | 714 | ||
715 | // get roles collection | 715 | // get roles collection |
716 | hr = CpiGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", &pComp->piSubsColl); | 716 | hr = CpiSchedGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", &pComp->piSubsColl); |
717 | ExitOnFailure(hr, "Failed to get subscriptions collection"); | 717 | ExitOnFailure(hr, "Failed to get subscriptions collection"); |
718 | } | 718 | } |
719 | 719 | ||
@@ -1372,7 +1372,7 @@ static HRESULT ComponentsRead( | |||
1372 | PMSIHANDLE hView; | 1372 | PMSIHANDLE hView; |
1373 | PMSIHANDLE hRec; | 1373 | PMSIHANDLE hRec; |
1374 | PMSIHANDLE hRecKey; | 1374 | PMSIHANDLE hRecKey; |
1375 | CPI_COMPONENT* pItm = NULL; | 1375 | CPISCHED_COMPONENT* pItm = NULL; |
1376 | LPWSTR pwzData = NULL; | 1376 | LPWSTR pwzData = NULL; |
1377 | 1377 | ||
1378 | // create parameter record | 1378 | // create parameter record |
@@ -1390,7 +1390,7 @@ static HRESULT ComponentsRead( | |||
1390 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) | 1390 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) |
1391 | { | 1391 | { |
1392 | // create entry | 1392 | // create entry |
1393 | pItm = (CPI_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_COMPONENT)); | 1393 | pItm = (CPISCHED_COMPONENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_COMPONENT)); |
1394 | if (!pItm) | 1394 | if (!pItm) |
1395 | ExitFunction1(hr = E_OUTOFMEMORY); | 1395 | ExitFunction1(hr = E_OUTOFMEMORY); |
1396 | 1396 | ||
@@ -1455,14 +1455,14 @@ static HRESULT InterfacesRead( | |||
1455 | LPCWSTR pwzCompKey, | 1455 | LPCWSTR pwzCompKey, |
1456 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, | 1456 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, |
1457 | CPI_ASSEMBLY* pAsm, | 1457 | CPI_ASSEMBLY* pAsm, |
1458 | CPI_COMPONENT* pComp | 1458 | CPISCHED_COMPONENT* pComp |
1459 | ) | 1459 | ) |
1460 | { | 1460 | { |
1461 | HRESULT hr = S_OK; | 1461 | HRESULT hr = S_OK; |
1462 | PMSIHANDLE hView; | 1462 | PMSIHANDLE hView; |
1463 | PMSIHANDLE hRec; | 1463 | PMSIHANDLE hRec; |
1464 | PMSIHANDLE hRecKey; | 1464 | PMSIHANDLE hRecKey; |
1465 | CPI_INTERFACE* pItm = NULL; | 1465 | CPISCHED_INTERFACE* pItm = NULL; |
1466 | LPWSTR pwzData = NULL; | 1466 | LPWSTR pwzData = NULL; |
1467 | 1467 | ||
1468 | // create parameter record | 1468 | // create parameter record |
@@ -1480,7 +1480,7 @@ static HRESULT InterfacesRead( | |||
1480 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) | 1480 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) |
1481 | { | 1481 | { |
1482 | // create entry | 1482 | // create entry |
1483 | pItm = (CPI_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_INTERFACE)); | 1483 | pItm = (CPISCHED_INTERFACE*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_INTERFACE)); |
1484 | if (!pItm) | 1484 | if (!pItm) |
1485 | ExitFunction1(hr = E_OUTOFMEMORY); | 1485 | ExitFunction1(hr = E_OUTOFMEMORY); |
1486 | 1486 | ||
@@ -1545,12 +1545,12 @@ static HRESULT MethodsRead( | |||
1545 | LPCWSTR pwzIntfKey, | 1545 | LPCWSTR pwzIntfKey, |
1546 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, | 1546 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, |
1547 | CPI_ASSEMBLY* pAsm, | 1547 | CPI_ASSEMBLY* pAsm, |
1548 | CPI_INTERFACE* pIntf | 1548 | CPISCHED_INTERFACE* pIntf |
1549 | ) | 1549 | ) |
1550 | { | 1550 | { |
1551 | HRESULT hr = S_OK; | 1551 | HRESULT hr = S_OK; |
1552 | PMSIHANDLE hView, hRec, hRecKey; | 1552 | PMSIHANDLE hView, hRec, hRecKey; |
1553 | CPI_METHOD* pItm = NULL; | 1553 | CPISCHED_METHOD* pItm = NULL; |
1554 | LPWSTR pwzData = NULL; | 1554 | LPWSTR pwzData = NULL; |
1555 | 1555 | ||
1556 | // create parameter record | 1556 | // create parameter record |
@@ -1568,7 +1568,7 @@ static HRESULT MethodsRead( | |||
1568 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) | 1568 | while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) |
1569 | { | 1569 | { |
1570 | // create entry | 1570 | // create entry |
1571 | pItm = (CPI_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_METHOD)); | 1571 | pItm = (CPISCHED_METHOD*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_METHOD)); |
1572 | if (!pItm) | 1572 | if (!pItm) |
1573 | ExitFunction1(hr = E_OUTOFMEMORY); | 1573 | ExitFunction1(hr = E_OUTOFMEMORY); |
1574 | 1574 | ||
@@ -1635,7 +1635,7 @@ static HRESULT RoleAssignmentsRead( | |||
1635 | LPCWSTR pwzQuery, | 1635 | LPCWSTR pwzQuery, |
1636 | LPCWSTR pwzKey, | 1636 | LPCWSTR pwzKey, |
1637 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, | 1637 | CPI_APPLICATION_ROLE_LIST* pAppRoleList, |
1638 | CPI_ROLE_ASSIGNMENT** ppRoleList, | 1638 | CPISCHED_ROLE_ASSIGNMENT** ppRoleList, |
1639 | int* piInstallCount, | 1639 | int* piInstallCount, |
1640 | int* piUninstallCount | 1640 | int* piUninstallCount |
1641 | ) | 1641 | ) |
@@ -1645,7 +1645,7 @@ static HRESULT RoleAssignmentsRead( | |||
1645 | 1645 | ||
1646 | PMSIHANDLE hView, hRec, hRecKey; | 1646 | PMSIHANDLE hView, hRec, hRecKey; |
1647 | 1647 | ||
1648 | CPI_ROLE_ASSIGNMENT* pItm = NULL; | 1648 | CPISCHED_ROLE_ASSIGNMENT* pItm = NULL; |
1649 | LPWSTR pwzData = NULL; | 1649 | LPWSTR pwzData = NULL; |
1650 | BOOL fMatchingArchitecture = FALSE; | 1650 | BOOL fMatchingArchitecture = FALSE; |
1651 | 1651 | ||
@@ -1677,7 +1677,7 @@ static HRESULT RoleAssignmentsRead( | |||
1677 | } | 1677 | } |
1678 | 1678 | ||
1679 | // create entry | 1679 | // create entry |
1680 | pItm = (CPI_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPI_ROLE_ASSIGNMENT)); | 1680 | pItm = (CPISCHED_ROLE_ASSIGNMENT*)::HeapAlloc(::GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(CPISCHED_ROLE_ASSIGNMENT)); |
1681 | if (!pItm) | 1681 | if (!pItm) |
1682 | ExitFunction1(hr = E_OUTOFMEMORY); | 1682 | ExitFunction1(hr = E_OUTOFMEMORY); |
1683 | 1683 | ||
@@ -1786,7 +1786,7 @@ static HRESULT AddAssemblyToActionData( | |||
1786 | 1786 | ||
1787 | if (iCompCount) | 1787 | if (iCompCount) |
1788 | { | 1788 | { |
1789 | for (CPI_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) | 1789 | for (CPISCHED_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) |
1790 | { | 1790 | { |
1791 | hr = AddComponentToActionData(pComp, fInstall, atCreate == iActionType, FALSE, ppwzActionData); | 1791 | hr = AddComponentToActionData(pComp, fInstall, atCreate == iActionType, FALSE, ppwzActionData); |
1792 | ExitOnFailure(hr, "Failed to add component to custom action data, component: %S", pComp->wzKey); | 1792 | ExitOnFailure(hr, "Failed to add component to custom action data, component: %S", pComp->wzKey); |
@@ -1834,7 +1834,7 @@ static HRESULT AddRoleAssignmentsToActionData( | |||
1834 | hr = WcaWriteIntegerToCaData(pItm->iComponentCount, ppwzActionData); | 1834 | hr = WcaWriteIntegerToCaData(pItm->iComponentCount, ppwzActionData); |
1835 | ExitOnFailure(hr, "Failed to add component count to custom action data"); | 1835 | ExitOnFailure(hr, "Failed to add component count to custom action data"); |
1836 | 1836 | ||
1837 | for (CPI_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) | 1837 | for (CPISCHED_COMPONENT* pComp = pItm->pComponents; pComp; pComp = pComp->pNext) |
1838 | { | 1838 | { |
1839 | hr = AddComponentToActionData(pComp, fInstall, FALSE, TRUE, ppwzActionData); | 1839 | hr = AddComponentToActionData(pComp, fInstall, FALSE, TRUE, ppwzActionData); |
1840 | ExitOnFailure(hr, "Failed to add component to custom action data, component: %S", pComp->wzKey); | 1840 | ExitOnFailure(hr, "Failed to add component to custom action data, component: %S", pComp->wzKey); |
@@ -1847,7 +1847,7 @@ LExit: | |||
1847 | } | 1847 | } |
1848 | 1848 | ||
1849 | static HRESULT AddComponentToActionData( | 1849 | static HRESULT AddComponentToActionData( |
1850 | CPI_COMPONENT* pItm, | 1850 | CPISCHED_COMPONENT* pItm, |
1851 | BOOL fInstall, | 1851 | BOOL fInstall, |
1852 | BOOL fProps, | 1852 | BOOL fProps, |
1853 | BOOL fRoles, | 1853 | BOOL fRoles, |
@@ -1875,7 +1875,7 @@ static HRESULT AddComponentToActionData( | |||
1875 | 1875 | ||
1876 | if (iIntfCount) | 1876 | if (iIntfCount) |
1877 | { | 1877 | { |
1878 | for (CPI_INTERFACE* pIntf = pItm->pInterfaces; pIntf; pIntf = pIntf->pNext) | 1878 | for (CPISCHED_INTERFACE* pIntf = pItm->pInterfaces; pIntf; pIntf = pIntf->pNext) |
1879 | { | 1879 | { |
1880 | hr = AddInterfaceToActionData(pIntf, fInstall, fProps, fRoles, ppwzActionData); | 1880 | hr = AddInterfaceToActionData(pIntf, fInstall, fProps, fRoles, ppwzActionData); |
1881 | ExitOnFailure(hr, "Failed to add interface custom action data, interface: %S", pIntf->wzKey); | 1881 | ExitOnFailure(hr, "Failed to add interface custom action data, interface: %S", pIntf->wzKey); |
@@ -1889,7 +1889,7 @@ LExit: | |||
1889 | } | 1889 | } |
1890 | 1890 | ||
1891 | static HRESULT AddInterfaceToActionData( | 1891 | static HRESULT AddInterfaceToActionData( |
1892 | CPI_INTERFACE* pItm, | 1892 | CPISCHED_INTERFACE* pItm, |
1893 | BOOL fInstall, | 1893 | BOOL fInstall, |
1894 | BOOL fProps, | 1894 | BOOL fProps, |
1895 | BOOL fRoles, | 1895 | BOOL fRoles, |
@@ -1914,7 +1914,7 @@ static HRESULT AddInterfaceToActionData( | |||
1914 | hr = WcaWriteIntegerToCaData(pItm->iMethodCount, ppwzActionData); | 1914 | hr = WcaWriteIntegerToCaData(pItm->iMethodCount, ppwzActionData); |
1915 | ExitOnFailure(hr, "Failed to add method count to custom action data"); | 1915 | ExitOnFailure(hr, "Failed to add method count to custom action data"); |
1916 | 1916 | ||
1917 | for (CPI_METHOD* pMeth = pItm->pMethods; pMeth; pMeth = pMeth->pNext) | 1917 | for (CPISCHED_METHOD* pMeth = pItm->pMethods; pMeth; pMeth = pMeth->pNext) |
1918 | { | 1918 | { |
1919 | hr = AddMethodToActionData(pMeth, fInstall, fProps, fRoles, ppwzActionData); | 1919 | hr = AddMethodToActionData(pMeth, fInstall, fProps, fRoles, ppwzActionData); |
1920 | ExitOnFailure(hr, "Failed to add method custom action data, method: %S", pMeth->wzKey); | 1920 | ExitOnFailure(hr, "Failed to add method custom action data, method: %S", pMeth->wzKey); |
@@ -1927,7 +1927,7 @@ LExit: | |||
1927 | } | 1927 | } |
1928 | 1928 | ||
1929 | static HRESULT AddMethodToActionData( | 1929 | static HRESULT AddMethodToActionData( |
1930 | CPI_METHOD* pItm, | 1930 | CPISCHED_METHOD* pItm, |
1931 | BOOL fInstall, | 1931 | BOOL fInstall, |
1932 | BOOL fProps, | 1932 | BOOL fProps, |
1933 | BOOL fRoles, | 1933 | BOOL fRoles, |
@@ -1960,7 +1960,7 @@ LExit: | |||
1960 | static HRESULT AddRolesToActionData( | 1960 | static HRESULT AddRolesToActionData( |
1961 | int iRoleInstallCount, | 1961 | int iRoleInstallCount, |
1962 | int iRoleUninstallCount, | 1962 | int iRoleUninstallCount, |
1963 | CPI_ROLE_ASSIGNMENT* pRoleList, | 1963 | CPISCHED_ROLE_ASSIGNMENT* pRoleList, |
1964 | BOOL fInstall, | 1964 | BOOL fInstall, |
1965 | BOOL fRoles, | 1965 | BOOL fRoles, |
1966 | LPWSTR* ppwzActionData | 1966 | LPWSTR* ppwzActionData |
@@ -1974,7 +1974,7 @@ static HRESULT AddRolesToActionData( | |||
1974 | 1974 | ||
1975 | if (iRoleCount) | 1975 | if (iRoleCount) |
1976 | { | 1976 | { |
1977 | for (CPI_ROLE_ASSIGNMENT* pRole = pRoleList; pRole; pRole = pRole->pNext) | 1977 | for (CPISCHED_ROLE_ASSIGNMENT* pRole = pRoleList; pRole; pRole = pRole->pNext) |
1978 | { | 1978 | { |
1979 | // make sure the install state matches the create flag | 1979 | // make sure the install state matches the create flag |
1980 | if (fInstall ? !WcaIsInstalling(pRole->isInstalled, pRole->isAction) : !WcaIsUninstalling(pRole->isInstalled, pRole->isAction)) | 1980 | if (fInstall ? !WcaIsInstalling(pRole->isInstalled, pRole->isAction) : !WcaIsUninstalling(pRole->isInstalled, pRole->isAction)) |
@@ -2061,7 +2061,7 @@ static void ModuleFree( | |||
2061 | } | 2061 | } |
2062 | 2062 | ||
2063 | static void ComponentsFreeList( | 2063 | static void ComponentsFreeList( |
2064 | CPI_COMPONENT* pList | 2064 | CPISCHED_COMPONENT* pList |
2065 | ) | 2065 | ) |
2066 | { | 2066 | { |
2067 | while (pList) | 2067 | while (pList) |
@@ -2077,14 +2077,14 @@ static void ComponentsFreeList( | |||
2077 | 2077 | ||
2078 | ReleaseObject(pList->piSubsColl); | 2078 | ReleaseObject(pList->piSubsColl); |
2079 | 2079 | ||
2080 | CPI_COMPONENT* pDelete = pList; | 2080 | CPISCHED_COMPONENT* pDelete = pList; |
2081 | pList = pList->pNext; | 2081 | pList = pList->pNext; |
2082 | ::HeapFree(::GetProcessHeap(), 0, pDelete); | 2082 | ::HeapFree(::GetProcessHeap(), 0, pDelete); |
2083 | } | 2083 | } |
2084 | } | 2084 | } |
2085 | 2085 | ||
2086 | static void InterfacesFreeList( | 2086 | static void InterfacesFreeList( |
2087 | CPI_INTERFACE* pList | 2087 | CPISCHED_INTERFACE* pList |
2088 | ) | 2088 | ) |
2089 | { | 2089 | { |
2090 | while (pList) | 2090 | while (pList) |
@@ -2098,14 +2098,14 @@ static void InterfacesFreeList( | |||
2098 | if (pList->pMethods) | 2098 | if (pList->pMethods) |
2099 | MethodsFreeList(pList->pMethods); | 2099 | MethodsFreeList(pList->pMethods); |
2100 | 2100 | ||
2101 | CPI_INTERFACE* pDelete = pList; | 2101 | CPISCHED_INTERFACE* pDelete = pList; |
2102 | pList = pList->pNext; | 2102 | pList = pList->pNext; |
2103 | ::HeapFree(::GetProcessHeap(), 0, pDelete); | 2103 | ::HeapFree(::GetProcessHeap(), 0, pDelete); |
2104 | } | 2104 | } |
2105 | } | 2105 | } |
2106 | 2106 | ||
2107 | static void MethodsFreeList( | 2107 | static void MethodsFreeList( |
2108 | CPI_METHOD* pList | 2108 | CPISCHED_METHOD* pList |
2109 | ) | 2109 | ) |
2110 | { | 2110 | { |
2111 | while (pList) | 2111 | while (pList) |
@@ -2116,19 +2116,19 @@ static void MethodsFreeList( | |||
2116 | if (pList->pRoles) | 2116 | if (pList->pRoles) |
2117 | RoleAssignmentsFreeList(pList->pRoles); | 2117 | RoleAssignmentsFreeList(pList->pRoles); |
2118 | 2118 | ||
2119 | CPI_METHOD* pDelete = pList; | 2119 | CPISCHED_METHOD* pDelete = pList; |
2120 | pList = pList->pNext; | 2120 | pList = pList->pNext; |
2121 | ::HeapFree(::GetProcessHeap(), 0, pDelete); | 2121 | ::HeapFree(::GetProcessHeap(), 0, pDelete); |
2122 | } | 2122 | } |
2123 | } | 2123 | } |
2124 | 2124 | ||
2125 | static void RoleAssignmentsFreeList( | 2125 | static void RoleAssignmentsFreeList( |
2126 | CPI_ROLE_ASSIGNMENT* pList | 2126 | CPISCHED_ROLE_ASSIGNMENT* pList |
2127 | ) | 2127 | ) |
2128 | { | 2128 | { |
2129 | while (pList) | 2129 | while (pList) |
2130 | { | 2130 | { |
2131 | CPI_ROLE_ASSIGNMENT* pDelete = pList; | 2131 | CPISCHED_ROLE_ASSIGNMENT* pDelete = pList; |
2132 | pList = pList->pNext; | 2132 | pList = pList->pNext; |
2133 | ::HeapFree(::GetProcessHeap(), 0, pDelete); | 2133 | ::HeapFree(::GetProcessHeap(), 0, pDelete); |
2134 | } | 2134 | } |
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 | |||
13 | 13 | ||
14 | // structs | 14 | // structs |
15 | 15 | ||
16 | struct CPI_ROLE_ASSIGNMENT | 16 | struct CPISCHED_ROLE_ASSIGNMENT |
17 | { | 17 | { |
18 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; | 18 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; |
19 | 19 | ||
@@ -21,10 +21,10 @@ struct CPI_ROLE_ASSIGNMENT | |||
21 | 21 | ||
22 | CPI_APPLICATION_ROLE* pApplicationRole; | 22 | CPI_APPLICATION_ROLE* pApplicationRole; |
23 | 23 | ||
24 | CPI_ROLE_ASSIGNMENT* pNext; | 24 | CPISCHED_ROLE_ASSIGNMENT* pNext; |
25 | }; | 25 | }; |
26 | 26 | ||
27 | struct CPI_METHOD | 27 | struct CPISCHED_METHOD |
28 | { | 28 | { |
29 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; | 29 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; |
30 | WCHAR wzIndex[11 + 1]; | 30 | WCHAR wzIndex[11 + 1]; |
@@ -35,12 +35,12 @@ struct CPI_METHOD | |||
35 | 35 | ||
36 | int iRoleInstallCount; | 36 | int iRoleInstallCount; |
37 | int iRoleUninstallCount; | 37 | int iRoleUninstallCount; |
38 | CPI_ROLE_ASSIGNMENT* pRoles; | 38 | CPISCHED_ROLE_ASSIGNMENT* pRoles; |
39 | 39 | ||
40 | CPI_METHOD* pNext; | 40 | CPISCHED_METHOD* pNext; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | struct CPI_INTERFACE | 43 | struct CPISCHED_INTERFACE |
44 | { | 44 | { |
45 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; | 45 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; |
46 | WCHAR wzIID[CPI_MAX_GUID + 1]; | 46 | WCHAR wzIID[CPI_MAX_GUID + 1]; |
@@ -50,15 +50,15 @@ struct CPI_INTERFACE | |||
50 | 50 | ||
51 | int iRoleInstallCount; | 51 | int iRoleInstallCount; |
52 | int iRoleUninstallCount; | 52 | int iRoleUninstallCount; |
53 | CPI_ROLE_ASSIGNMENT* pRoles; | 53 | CPISCHED_ROLE_ASSIGNMENT* pRoles; |
54 | 54 | ||
55 | int iMethodCount; | 55 | int iMethodCount; |
56 | CPI_METHOD* pMethods; | 56 | CPISCHED_METHOD* pMethods; |
57 | 57 | ||
58 | CPI_INTERFACE* pNext; | 58 | CPISCHED_INTERFACE* pNext; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | struct CPI_COMPONENT | 61 | struct CPISCHED_COMPONENT |
62 | { | 62 | { |
63 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; | 63 | WCHAR wzKey[MAX_DARWIN_KEY + 1]; |
64 | WCHAR wzCLSID[CPI_MAX_GUID + 1]; | 64 | WCHAR wzCLSID[CPI_MAX_GUID + 1]; |
@@ -68,14 +68,14 @@ struct CPI_COMPONENT | |||
68 | 68 | ||
69 | int iRoleInstallCount; | 69 | int iRoleInstallCount; |
70 | int iRoleUninstallCount; | 70 | int iRoleUninstallCount; |
71 | CPI_ROLE_ASSIGNMENT* pRoles; | 71 | CPISCHED_ROLE_ASSIGNMENT* pRoles; |
72 | 72 | ||
73 | int iInterfaceCount; | 73 | int iInterfaceCount; |
74 | CPI_INTERFACE* pInterfaces; | 74 | CPISCHED_INTERFACE* pInterfaces; |
75 | 75 | ||
76 | ICatalogCollection* piSubsColl; | 76 | ICatalogCollection* piSubsColl; |
77 | 77 | ||
78 | CPI_COMPONENT* pNext; | 78 | CPISCHED_COMPONENT* pNext; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | struct CPI_ASSEMBLY | 81 | struct CPI_ASSEMBLY |
@@ -89,7 +89,7 @@ struct CPI_ASSEMBLY | |||
89 | int iAttributes; | 89 | int iAttributes; |
90 | 90 | ||
91 | int iComponentCount; | 91 | int iComponentCount; |
92 | CPI_COMPONENT* pComponents; | 92 | CPISCHED_COMPONENT* pComponents; |
93 | 93 | ||
94 | BOOL fReferencedForInstall; | 94 | BOOL fReferencedForInstall; |
95 | BOOL fReferencedForUninstall; | 95 | BOOL fReferencedForUninstall; |
@@ -163,6 +163,6 @@ HRESULT CpiRoleAssignmentsUninstall( | |||
163 | ); | 163 | ); |
164 | HRESULT CpiGetSubscriptionsCollForComponent( | 164 | HRESULT CpiGetSubscriptionsCollForComponent( |
165 | CPI_ASSEMBLY* pAsm, | 165 | CPI_ASSEMBLY* pAsm, |
166 | CPI_COMPONENT* pComp, | 166 | CPISCHED_COMPONENT* pComp, |
167 | ICatalogCollection** ppiSubsColl | 167 | ICatalogCollection** ppiSubsColl |
168 | ); | 168 | ); |
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 | |||
@@ -3,29 +3,6 @@ | |||
3 | #include "precomp.h" | 3 | #include "precomp.h" |
4 | 4 | ||
5 | /******************************************************************** | 5 | /******************************************************************** |
6 | DllMain - standard entry point for all WiX CustomActions | ||
7 | |||
8 | ********************************************************************/ | ||
9 | extern "C" BOOL WINAPI DllMain( | ||
10 | IN HINSTANCE hInst, | ||
11 | IN ULONG ulReason, | ||
12 | IN LPVOID) | ||
13 | { | ||
14 | switch(ulReason) | ||
15 | { | ||
16 | case DLL_PROCESS_ATTACH: | ||
17 | WcaGlobalInitialize(hInst); | ||
18 | break; | ||
19 | |||
20 | case DLL_PROCESS_DETACH: | ||
21 | WcaGlobalFinalize(); | ||
22 | break; | ||
23 | } | ||
24 | |||
25 | return TRUE; | ||
26 | } | ||
27 | |||
28 | /******************************************************************** | ||
29 | ComPlusPrepare - CUSTOM ACTION ENTRY POINT | 6 | ComPlusPrepare - CUSTOM ACTION ENTRY POINT |
30 | 7 | ||
31 | Input: deferred CustomActionData - ComPlusPrepare | 8 | Input: deferred CustomActionData - ComPlusPrepare |
@@ -133,7 +110,7 @@ extern "C" UINT __stdcall ComPlusInstallExecute(MSIHANDLE hInstall) | |||
133 | ExitOnFailure(hr, "Failed to initialize COM"); | 110 | ExitOnFailure(hr, "Failed to initialize COM"); |
134 | fInitializedCom = TRUE; | 111 | fInitializedCom = TRUE; |
135 | 112 | ||
136 | CpiInitialize(); | 113 | CpiExecInitialize(); |
137 | 114 | ||
138 | // get custom action data | 115 | // get custom action data |
139 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); | 116 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); |
@@ -204,7 +181,7 @@ LExit: | |||
204 | ::CloseHandle(hRollbackFile); | 181 | ::CloseHandle(hRollbackFile); |
205 | 182 | ||
206 | // unitialize | 183 | // unitialize |
207 | CpiFinalize(); | 184 | CpiExecFinalize(); |
208 | 185 | ||
209 | if (fInitializedCom) | 186 | if (fInitializedCom) |
210 | ::CoUninitialize(); | 187 | ::CoUninitialize(); |
@@ -239,7 +216,7 @@ extern "C" UINT __stdcall ComPlusInstallExecuteCommit(MSIHANDLE hInstall) | |||
239 | ExitOnFailure(hr, "Failed to initialize COM"); | 216 | ExitOnFailure(hr, "Failed to initialize COM"); |
240 | fInitializedCom = TRUE; | 217 | fInitializedCom = TRUE; |
241 | 218 | ||
242 | CpiInitialize(); | 219 | CpiExecInitialize(); |
243 | 220 | ||
244 | // get custom action data | 221 | // get custom action data |
245 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); | 222 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); |
@@ -282,7 +259,7 @@ LExit: | |||
282 | ::CloseHandle(hRollbackFile); | 259 | ::CloseHandle(hRollbackFile); |
283 | 260 | ||
284 | // unitialize | 261 | // unitialize |
285 | CpiFinalize(); | 262 | CpiExecFinalize(); |
286 | 263 | ||
287 | if (fInitializedCom) | 264 | if (fInitializedCom) |
288 | ::CoUninitialize(); | 265 | ::CoUninitialize(); |
@@ -327,7 +304,7 @@ extern "C" UINT __stdcall ComPlusRollbackInstallExecute(MSIHANDLE hInstall) | |||
327 | ExitOnFailure(hr, "Failed to initialize COM"); | 304 | ExitOnFailure(hr, "Failed to initialize COM"); |
328 | fInitializedCom = TRUE; | 305 | fInitializedCom = TRUE; |
329 | 306 | ||
330 | CpiInitialize(); | 307 | CpiExecInitialize(); |
331 | 308 | ||
332 | // get custom action data | 309 | // get custom action data |
333 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); | 310 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); |
@@ -439,7 +416,7 @@ LExit: | |||
439 | CpiFreeRollbackDataList(prdSubscriptions); | 416 | CpiFreeRollbackDataList(prdSubscriptions); |
440 | 417 | ||
441 | // unitialize | 418 | // unitialize |
442 | CpiFinalize(); | 419 | CpiExecFinalize(); |
443 | 420 | ||
444 | if (fInitializedCom) | 421 | if (fInitializedCom) |
445 | ::CoUninitialize(); | 422 | ::CoUninitialize(); |
@@ -474,7 +451,7 @@ extern "C" UINT __stdcall ComPlusUninstallExecute(MSIHANDLE hInstall) | |||
474 | ExitOnFailure(hr, "Failed to initialize COM"); | 451 | ExitOnFailure(hr, "Failed to initialize COM"); |
475 | fInitializedCom = TRUE; | 452 | fInitializedCom = TRUE; |
476 | 453 | ||
477 | CpiInitialize(); | 454 | CpiExecInitialize(); |
478 | 455 | ||
479 | // get custom action data | 456 | // get custom action data |
480 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); | 457 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); |
@@ -545,7 +522,7 @@ LExit: | |||
545 | ::CloseHandle(hRollbackFile); | 522 | ::CloseHandle(hRollbackFile); |
546 | 523 | ||
547 | // unitialize | 524 | // unitialize |
548 | CpiFinalize(); | 525 | CpiExecFinalize(); |
549 | 526 | ||
550 | if (fInitializedCom) | 527 | if (fInitializedCom) |
551 | ::CoUninitialize(); | 528 | ::CoUninitialize(); |
@@ -590,7 +567,7 @@ extern "C" UINT __stdcall ComPlusRollbackUninstallExecute(MSIHANDLE hInstall) | |||
590 | ExitOnFailure(hr, "Failed to initialize COM"); | 567 | ExitOnFailure(hr, "Failed to initialize COM"); |
591 | fInitializedCom = TRUE; | 568 | fInitializedCom = TRUE; |
592 | 569 | ||
593 | CpiInitialize(); | 570 | CpiExecInitialize(); |
594 | 571 | ||
595 | // get custom action data | 572 | // get custom action data |
596 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); | 573 | hr = WcaGetProperty(L"CustomActionData", &pwzCustomActionData); |
@@ -694,7 +671,7 @@ LExit: | |||
694 | CpiFreeRollbackDataList(prdSubscriptions); | 671 | CpiFreeRollbackDataList(prdSubscriptions); |
695 | 672 | ||
696 | // unitialize | 673 | // unitialize |
697 | CpiFinalize(); | 674 | CpiExecFinalize(); |
698 | 675 | ||
699 | if (fInitializedCom) | 676 | if (fInitializedCom) |
700 | ::CoUninitialize(); | 677 | ::CoUninitialize(); |
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( | |||
399 | WcaLog(LOGMSG_VERBOSE, "Creating partition, key: %S", pAttrs->pwzKey); | 399 | WcaLog(LOGMSG_VERBOSE, "Creating partition, key: %S", pAttrs->pwzKey); |
400 | 400 | ||
401 | // get partitions collection | 401 | // get partitions collection |
402 | hr = CpiGetPartitionsCollection(&piPartColl); | 402 | hr = CpiExecGetPartitionsCollection(&piPartColl); |
403 | ExitOnFailure(hr, "Failed to get partitions collection"); | 403 | ExitOnFailure(hr, "Failed to get partitions collection"); |
404 | 404 | ||
405 | // check if partition exists | 405 | // check if partition exists |
@@ -456,7 +456,7 @@ static HRESULT RemovePartition( | |||
456 | WcaLog(LOGMSG_VERBOSE, "Removing partition, key: %S", pAttrs->pwzKey); | 456 | WcaLog(LOGMSG_VERBOSE, "Removing partition, key: %S", pAttrs->pwzKey); |
457 | 457 | ||
458 | // get partitions collection | 458 | // get partitions collection |
459 | hr = CpiGetPartitionsCollection(&piPartColl); | 459 | hr = CpiExecGetPartitionsCollection(&piPartColl); |
460 | ExitOnFailure(hr, "Failed to get partitions collection"); | 460 | ExitOnFailure(hr, "Failed to get partitions collection"); |
461 | 461 | ||
462 | // remove | 462 | // 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( | |||
199 | // get partitions collection | 199 | // get partitions collection |
200 | if (!piPartColl) | 200 | if (!piPartColl) |
201 | { | 201 | { |
202 | hr = CpiGetPartitionsCollection(&piPartColl); | 202 | hr = CpiSchedGetPartitionsCollection(&piPartColl); |
203 | ExitOnFailure(hr, "Failed to get partitions collection"); | 203 | ExitOnFailure(hr, "Failed to get partitions collection"); |
204 | } | 204 | } |
205 | 205 | ||
@@ -336,7 +336,7 @@ HRESULT CpiPartitionsVerifyUninstall( | |||
336 | // get partitions collection | 336 | // get partitions collection |
337 | if (!piPartColl) | 337 | if (!piPartColl) |
338 | { | 338 | { |
339 | hr = CpiGetPartitionsCollection(&piPartColl); | 339 | hr = CpiSchedGetPartitionsCollection(&piPartColl); |
340 | ExitOnFailure(hr, "Failed to get partitions collection"); | 340 | ExitOnFailure(hr, "Failed to get partitions collection"); |
341 | } | 341 | } |
342 | 342 | ||
@@ -526,7 +526,7 @@ HRESULT CpiGetApplicationsCollForPartition( | |||
526 | if (!pPart->piApplicationsColl) | 526 | if (!pPart->piApplicationsColl) |
527 | { | 527 | { |
528 | // get partitions collection from catalog | 528 | // get partitions collection from catalog |
529 | hr = CpiGetPartitionsCollection(&piPartColl); | 529 | hr = CpiSchedGetPartitionsCollection(&piPartColl); |
530 | ExitOnFailure(hr, "Failed to get partitions collection"); | 530 | ExitOnFailure(hr, "Failed to get partitions collection"); |
531 | 531 | ||
532 | // find application object | 532 | // find application object |
@@ -540,7 +540,7 @@ HRESULT CpiGetApplicationsCollForPartition( | |||
540 | } | 540 | } |
541 | 541 | ||
542 | // get roles collection | 542 | // get roles collection |
543 | hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"Applications", &pPart->piApplicationsColl); | 543 | hr = CpiSchedGetCatalogCollection(piPartColl, piPartObj, L"Applications", &pPart->piApplicationsColl); |
544 | ExitOnFailure(hr, "Failed to get applications collection"); | 544 | ExitOnFailure(hr, "Failed to get applications collection"); |
545 | } | 545 | } |
546 | 546 | ||
@@ -576,7 +576,7 @@ HRESULT CpiGetRolesCollForPartition( | |||
576 | if (!pPart->piRolesColl) | 576 | if (!pPart->piRolesColl) |
577 | { | 577 | { |
578 | // get partitions collection from catalog | 578 | // get partitions collection from catalog |
579 | hr = CpiGetPartitionsCollection(&piPartColl); | 579 | hr = CpiSchedGetPartitionsCollection(&piPartColl); |
580 | ExitOnFailure(hr, "Failed to get partitions collection"); | 580 | ExitOnFailure(hr, "Failed to get partitions collection"); |
581 | 581 | ||
582 | // find partition object | 582 | // find partition object |
@@ -587,7 +587,7 @@ HRESULT CpiGetRolesCollForPartition( | |||
587 | ExitFunction(); // exit with hr = S_FALSE | 587 | ExitFunction(); // exit with hr = S_FALSE |
588 | 588 | ||
589 | // get roles collection | 589 | // get roles collection |
590 | hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", &pPart->piRolesColl); | 590 | hr = CpiSchedGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", &pPart->piRolesColl); |
591 | ExitOnFailure(hr, "Failed to get roles collection"); | 591 | ExitOnFailure(hr, "Failed to get roles collection"); |
592 | } | 592 | } |
593 | 593 | ||
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 @@ | |||
29 | #define CP_COMPLUSINSTALLCOMMIT L"ComPlusInstallCommit" | 29 | #define CP_COMPLUSINSTALLCOMMIT L"ComPlusInstallCommit" |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | |||
33 | /******************************************************************** | ||
34 | DllMain - standard entry point for all WiX CustomActions | ||
35 | |||
36 | ********************************************************************/ | ||
37 | extern "C" BOOL WINAPI DllMain( | ||
38 | IN HINSTANCE hInst, | ||
39 | IN ULONG ulReason, | ||
40 | IN LPVOID) | ||
41 | { | ||
42 | switch(ulReason) | ||
43 | { | ||
44 | case DLL_PROCESS_ATTACH: | ||
45 | WcaGlobalInitialize(hInst); | ||
46 | break; | ||
47 | |||
48 | case DLL_PROCESS_DETACH: | ||
49 | WcaGlobalFinalize(); | ||
50 | break; | ||
51 | } | ||
52 | |||
53 | return TRUE; | ||
54 | } | ||
55 | |||
56 | /******************************************************************** | 32 | /******************************************************************** |
57 | ConfigureComPlusInstall - CUSTOM ACTION ENTRY POINT for installing COM+ components | 33 | ConfigureComPlusInstall - CUSTOM ACTION ENTRY POINT for installing COM+ components |
58 | 34 | ||
@@ -103,7 +79,7 @@ extern "C" UINT __stdcall ConfigureComPlusInstall(MSIHANDLE hInstall) | |||
103 | ExitOnFailure(hr, "Failed to initialize COM"); | 79 | ExitOnFailure(hr, "Failed to initialize COM"); |
104 | fInitializedCom = TRUE; | 80 | fInitializedCom = TRUE; |
105 | 81 | ||
106 | CpiInitialize(); | 82 | CpiSchedInitialize(); |
107 | 83 | ||
108 | // check for the prerequsite tables | 84 | // check for the prerequsite tables |
109 | if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) | 85 | if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) |
@@ -114,7 +90,7 @@ extern "C" UINT __stdcall ConfigureComPlusInstall(MSIHANDLE hInstall) | |||
114 | 90 | ||
115 | // make sure we can access the COM+ admin catalog | 91 | // make sure we can access the COM+ admin catalog |
116 | do { | 92 | do { |
117 | hr = CpiGetAdminCatalog(&piCatalog); | 93 | hr = CpiSchedGetAdminCatalog(&piCatalog); |
118 | if (FAILED(hr)) | 94 | if (FAILED(hr)) |
119 | { | 95 | { |
120 | WcaLog(LOGMSG_STANDARD, "Failed to get COM+ admin catalog"); | 96 | WcaLog(LOGMSG_STANDARD, "Failed to get COM+ admin catalog"); |
@@ -320,7 +296,7 @@ LExit: | |||
320 | CpiSubscriptionListFree(&subList); | 296 | CpiSubscriptionListFree(&subList); |
321 | 297 | ||
322 | // unitialize | 298 | // unitialize |
323 | CpiFinalize(); | 299 | CpiSchedFinalize(); |
324 | 300 | ||
325 | if (fInitializedCom) | 301 | if (fInitializedCom) |
326 | ::CoUninitialize(); | 302 | ::CoUninitialize(); |
@@ -378,7 +354,7 @@ extern "C" UINT __stdcall ConfigureComPlusUninstall(MSIHANDLE hInstall) | |||
378 | ExitOnFailure(hr, "Failed to initialize COM"); | 354 | ExitOnFailure(hr, "Failed to initialize COM"); |
379 | fInitializedCom = TRUE; | 355 | fInitializedCom = TRUE; |
380 | 356 | ||
381 | CpiInitialize(); | 357 | CpiSchedInitialize(); |
382 | 358 | ||
383 | // check for the prerequsite tables | 359 | // check for the prerequsite tables |
384 | if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) | 360 | if (!CpiTableExists(cptComPlusPartition) && !CpiTableExists(cptComPlusApplication) && !CpiTableExists(cptComPlusAssembly)) |
@@ -389,7 +365,7 @@ extern "C" UINT __stdcall ConfigureComPlusUninstall(MSIHANDLE hInstall) | |||
389 | 365 | ||
390 | // make sure we can access the COM+ admin catalog | 366 | // make sure we can access the COM+ admin catalog |
391 | do { | 367 | do { |
392 | hr = CpiGetAdminCatalog(&piCatalog); | 368 | hr = CpiSchedGetAdminCatalog(&piCatalog); |
393 | if (FAILED(hr)) | 369 | if (FAILED(hr)) |
394 | { | 370 | { |
395 | WcaLog(LOGMSG_STANDARD, "Failed to get COM+ admin catalog"); | 371 | WcaLog(LOGMSG_STANDARD, "Failed to get COM+ admin catalog"); |
@@ -580,7 +556,7 @@ LExit: | |||
580 | CpiSubscriptionListFree(&subList); | 556 | CpiSubscriptionListFree(&subList); |
581 | 557 | ||
582 | // unitialize | 558 | // unitialize |
583 | CpiFinalize(); | 559 | CpiSchedFinalize(); |
584 | 560 | ||
585 | if (fInitializedCom) | 561 | if (fInitializedCom) |
586 | ::CoUninitialize(); | 562 | ::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( | |||
53 | CPI_ASSEMBLY_LIST* pAsmList, | 53 | CPI_ASSEMBLY_LIST* pAsmList, |
54 | LPCWSTR pwzKey, | 54 | LPCWSTR pwzKey, |
55 | CPI_ASSEMBLY** ppAsmItm, | 55 | CPI_ASSEMBLY** ppAsmItm, |
56 | CPI_COMPONENT** ppCompItm | 56 | CPISCHED_COMPONENT** ppCompItm |
57 | ); | 57 | ); |
58 | 58 | ||
59 | 59 | ||
@@ -586,12 +586,12 @@ static HRESULT ComponentFindByKey( | |||
586 | CPI_ASSEMBLY_LIST* pAsmList, | 586 | CPI_ASSEMBLY_LIST* pAsmList, |
587 | LPCWSTR pwzKey, | 587 | LPCWSTR pwzKey, |
588 | CPI_ASSEMBLY** ppAsmItm, | 588 | CPI_ASSEMBLY** ppAsmItm, |
589 | CPI_COMPONENT** ppCompItm | 589 | CPISCHED_COMPONENT** ppCompItm |
590 | ) | 590 | ) |
591 | { | 591 | { |
592 | for (CPI_ASSEMBLY* pAsmItm = pAsmList->pFirst; pAsmItm; pAsmItm = pAsmItm->pNext) | 592 | for (CPI_ASSEMBLY* pAsmItm = pAsmList->pFirst; pAsmItm; pAsmItm = pAsmItm->pNext) |
593 | { | 593 | { |
594 | for (CPI_COMPONENT* pCompItm = pAsmItm->pComponents; pCompItm; pCompItm = pCompItm->pNext) | 594 | for (CPISCHED_COMPONENT* pCompItm = pAsmItm->pComponents; pCompItm; pCompItm = pCompItm->pNext) |
595 | { | 595 | { |
596 | if (0 == lstrcmpW(pCompItm->wzKey, pwzKey)) | 596 | if (0 == lstrcmpW(pCompItm->wzKey, pwzKey)) |
597 | { | 597 | { |
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 | |||
18 | INSTALLSTATE isInstalled, isAction; | 18 | INSTALLSTATE isInstalled, isAction; |
19 | 19 | ||
20 | CPI_ASSEMBLY* pAssembly; | 20 | CPI_ASSEMBLY* pAssembly; |
21 | CPI_COMPONENT* pComponent; | 21 | CPISCHED_COMPONENT* pComponent; |
22 | 22 | ||
23 | CPI_SUBSCRIPTION* pNext; | 23 | CPI_SUBSCRIPTION* pNext; |
24 | }; | 24 | }; |
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; | |||
69 | 69 | ||
70 | // function definitions | 70 | // function definitions |
71 | 71 | ||
72 | void CpiInitialize() | 72 | void CpiExecInitialize() |
73 | { | 73 | { |
74 | // collections | 74 | // collections |
75 | gpiCatalog = NULL; | 75 | gpiCatalog = NULL; |
76 | } | 76 | } |
77 | 77 | ||
78 | void CpiFinalize() | 78 | void CpiExecFinalize() |
79 | { | 79 | { |
80 | // collections | 80 | // collections |
81 | ReleaseObject(gpiCatalog); | 81 | ReleaseObject(gpiCatalog); |
@@ -187,7 +187,7 @@ LExit: | |||
187 | return hr; | 187 | return hr; |
188 | } | 188 | } |
189 | 189 | ||
190 | HRESULT CpiGetAdminCatalog( | 190 | HRESULT CpiExecGetAdminCatalog( |
191 | ICOMAdminCatalog** ppiCatalog | 191 | ICOMAdminCatalog** ppiCatalog |
192 | ) | 192 | ) |
193 | { | 193 | { |
@@ -225,11 +225,11 @@ HRESULT CpiLogCatalogErrorInfo() | |||
225 | LPWSTR pwzMinorRef = NULL; | 225 | LPWSTR pwzMinorRef = NULL; |
226 | 226 | ||
227 | // get catalog | 227 | // get catalog |
228 | hr = CpiGetAdminCatalog(&piCatalog); | 228 | hr = CpiExecGetAdminCatalog(&piCatalog); |
229 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); | 229 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); |
230 | 230 | ||
231 | // get error info collection | 231 | // get error info collection |
232 | hr = CpiGetCatalogCollection(L"ErrorInfo", &piErrColl); | 232 | hr = CpiExecGetCatalogCollection(L"ErrorInfo", &piErrColl); |
233 | ExitOnFailure(hr, "Failed to get error info collection"); | 233 | ExitOnFailure(hr, "Failed to get error info collection"); |
234 | 234 | ||
235 | // loop objects | 235 | // loop objects |
@@ -282,7 +282,7 @@ LExit: | |||
282 | return hr; | 282 | return hr; |
283 | } | 283 | } |
284 | 284 | ||
285 | HRESULT CpiGetCatalogCollection( | 285 | HRESULT CpiExecGetCatalogCollection( |
286 | LPCWSTR pwzName, | 286 | LPCWSTR pwzName, |
287 | ICatalogCollection** ppiColl | 287 | ICatalogCollection** ppiColl |
288 | ) | 288 | ) |
@@ -299,7 +299,7 @@ HRESULT CpiGetCatalogCollection( | |||
299 | ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); | 299 | ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); |
300 | 300 | ||
301 | // get catalog | 301 | // get catalog |
302 | hr = CpiGetAdminCatalog(&piCatalog); | 302 | hr = CpiExecGetAdminCatalog(&piCatalog); |
303 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); | 303 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); |
304 | 304 | ||
305 | // get collecton from catalog | 305 | // get collecton from catalog |
@@ -326,7 +326,7 @@ LExit: | |||
326 | return hr; | 326 | return hr; |
327 | } | 327 | } |
328 | 328 | ||
329 | HRESULT CpiGetCatalogCollection( | 329 | HRESULT CpiExecGetCatalogCollection( |
330 | ICatalogCollection* piColl, | 330 | ICatalogCollection* piColl, |
331 | ICatalogObject* piObj, | 331 | ICatalogObject* piObj, |
332 | LPCWSTR pwzName, | 332 | LPCWSTR pwzName, |
@@ -348,7 +348,7 @@ HRESULT CpiGetCatalogCollection( | |||
348 | ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); | 348 | ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); |
349 | 349 | ||
350 | // get catalog | 350 | // get catalog |
351 | hr = CpiGetAdminCatalog(&piCatalog); | 351 | hr = CpiExecGetAdminCatalog(&piCatalog); |
352 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); | 352 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); |
353 | 353 | ||
354 | // get key | 354 | // get key |
@@ -894,14 +894,14 @@ LExit: | |||
894 | return hr; | 894 | return hr; |
895 | } | 895 | } |
896 | 896 | ||
897 | HRESULT CpiGetPartitionsCollection( | 897 | HRESULT CpiExecGetPartitionsCollection( |
898 | ICatalogCollection** ppiPartColl | 898 | ICatalogCollection** ppiPartColl |
899 | ) | 899 | ) |
900 | { | 900 | { |
901 | HRESULT hr = S_OK; | 901 | HRESULT hr = S_OK; |
902 | 902 | ||
903 | // get collection | 903 | // get collection |
904 | hr = CpiGetCatalogCollection(L"Partitions", ppiPartColl); | 904 | hr = CpiExecGetCatalogCollection(L"Partitions", ppiPartColl); |
905 | ExitOnFailure(hr, "Failed to get catalog collection"); | 905 | ExitOnFailure(hr, "Failed to get catalog collection"); |
906 | 906 | ||
907 | hr = S_OK; | 907 | hr = S_OK; |
@@ -921,7 +921,7 @@ HRESULT CpiGetPartitionRolesCollection( | |||
921 | ICatalogObject* piPartObj = NULL; | 921 | ICatalogObject* piPartObj = NULL; |
922 | 922 | ||
923 | // get partitions collection | 923 | // get partitions collection |
924 | hr = CpiGetPartitionsCollection(&piPartColl); | 924 | hr = CpiExecGetPartitionsCollection(&piPartColl); |
925 | ExitOnFailure(hr, "Failed to get partitions collection"); | 925 | ExitOnFailure(hr, "Failed to get partitions collection"); |
926 | 926 | ||
927 | if (S_FALSE == hr) | 927 | if (S_FALSE == hr) |
@@ -935,7 +935,7 @@ HRESULT CpiGetPartitionRolesCollection( | |||
935 | ExitFunction(); // partition not found, exit with hr = S_FALSE | 935 | ExitFunction(); // partition not found, exit with hr = S_FALSE |
936 | 936 | ||
937 | // get roles collection | 937 | // get roles collection |
938 | hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", ppiRolesColl); | 938 | hr = CpiExecGetCatalogCollection(piPartColl, piPartObj, L"RolesForPartition", ppiRolesColl); |
939 | ExitOnFailure(hr, "Failed to get catalog collection"); | 939 | ExitOnFailure(hr, "Failed to get catalog collection"); |
940 | 940 | ||
941 | hr = S_OK; | 941 | hr = S_OK; |
@@ -974,7 +974,7 @@ HRESULT CpiGetUsersInPartitionRoleCollection( | |||
974 | ExitFunction(); // user not found, exit with hr = S_FALSE | 974 | ExitFunction(); // user not found, exit with hr = S_FALSE |
975 | 975 | ||
976 | // get roles collection | 976 | // get roles collection |
977 | hr = CpiGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInPartitionRole", ppiUsrInRoleColl); | 977 | hr = CpiExecGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInPartitionRole", ppiUsrInRoleColl); |
978 | ExitOnFailure(hr, "Failed to get catalog collection"); | 978 | ExitOnFailure(hr, "Failed to get catalog collection"); |
979 | 979 | ||
980 | hr = S_OK; | 980 | hr = S_OK; |
@@ -994,7 +994,7 @@ HRESULT CpiGetPartitionUsersCollection( | |||
994 | HRESULT hr = S_OK; | 994 | HRESULT hr = S_OK; |
995 | 995 | ||
996 | // get roles collection | 996 | // get roles collection |
997 | hr = CpiGetCatalogCollection(L"PartitionUsers", ppiUserColl); | 997 | hr = CpiExecGetCatalogCollection(L"PartitionUsers", ppiUserColl); |
998 | ExitOnFailure(hr, "Failed to get catalog collection"); | 998 | ExitOnFailure(hr, "Failed to get catalog collection"); |
999 | 999 | ||
1000 | hr = S_OK; | 1000 | hr = S_OK; |
@@ -1003,7 +1003,7 @@ LExit: | |||
1003 | return hr; | 1003 | return hr; |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | HRESULT CpiGetApplicationsCollection( | 1006 | HRESULT CpiExecGetApplicationsCollection( |
1007 | LPCWSTR pwzPartID, | 1007 | LPCWSTR pwzPartID, |
1008 | ICatalogCollection** ppiAppColl | 1008 | ICatalogCollection** ppiAppColl |
1009 | ) | 1009 | ) |
@@ -1018,7 +1018,7 @@ HRESULT CpiGetApplicationsCollection( | |||
1018 | ICatalogObject* piPartObj = NULL; | 1018 | ICatalogObject* piPartObj = NULL; |
1019 | 1019 | ||
1020 | // get catalog | 1020 | // get catalog |
1021 | hr = CpiGetAdminCatalog(&piCatalog); | 1021 | hr = CpiExecGetAdminCatalog(&piCatalog); |
1022 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); | 1022 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); |
1023 | 1023 | ||
1024 | // get ICOMAdminCatalog2 interface | 1024 | // get ICOMAdminCatalog2 interface |
@@ -1038,7 +1038,7 @@ HRESULT CpiGetApplicationsCollection( | |||
1038 | } | 1038 | } |
1039 | 1039 | ||
1040 | // get partitions collection | 1040 | // get partitions collection |
1041 | hr = CpiGetPartitionsCollection(&piPartColl); | 1041 | hr = CpiExecGetPartitionsCollection(&piPartColl); |
1042 | ExitOnFailure(hr, "Failed to get partitions collection"); | 1042 | ExitOnFailure(hr, "Failed to get partitions collection"); |
1043 | 1043 | ||
1044 | // find object | 1044 | // find object |
@@ -1049,7 +1049,7 @@ HRESULT CpiGetApplicationsCollection( | |||
1049 | ExitFunction(); // partition not found, exit with hr = S_FALSE | 1049 | ExitFunction(); // partition not found, exit with hr = S_FALSE |
1050 | 1050 | ||
1051 | // get applications collection | 1051 | // get applications collection |
1052 | hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"Applications", ppiAppColl); | 1052 | hr = CpiExecGetCatalogCollection(piPartColl, piPartObj, L"Applications", ppiAppColl); |
1053 | ExitOnFailure(hr, "Failed to get catalog collection for partition"); | 1053 | ExitOnFailure(hr, "Failed to get catalog collection for partition"); |
1054 | } | 1054 | } |
1055 | 1055 | ||
@@ -1061,7 +1061,7 @@ HRESULT CpiGetApplicationsCollection( | |||
1061 | ExitOnFailure(hr = E_FAIL, "Partitions are not supported by this version of COM+"); | 1061 | ExitOnFailure(hr = E_FAIL, "Partitions are not supported by this version of COM+"); |
1062 | 1062 | ||
1063 | // get applications collection | 1063 | // get applications collection |
1064 | hr = CpiGetCatalogCollection(L"Applications", ppiAppColl); | 1064 | hr = CpiExecGetCatalogCollection(L"Applications", ppiAppColl); |
1065 | ExitOnFailure(hr, "Failed to get catalog collection"); | 1065 | ExitOnFailure(hr, "Failed to get catalog collection"); |
1066 | } | 1066 | } |
1067 | 1067 | ||
@@ -1091,7 +1091,7 @@ HRESULT CpiGetRolesCollection( | |||
1091 | ICatalogObject* piAppObj = NULL; | 1091 | ICatalogObject* piAppObj = NULL; |
1092 | 1092 | ||
1093 | // get applications collection | 1093 | // get applications collection |
1094 | hr = CpiGetApplicationsCollection(pwzPartID, &piAppColl); | 1094 | hr = CpiExecGetApplicationsCollection(pwzPartID, &piAppColl); |
1095 | ExitOnFailure(hr, "Failed to get applications collection"); | 1095 | ExitOnFailure(hr, "Failed to get applications collection"); |
1096 | 1096 | ||
1097 | if (S_FALSE == hr) | 1097 | if (S_FALSE == hr) |
@@ -1105,7 +1105,7 @@ HRESULT CpiGetRolesCollection( | |||
1105 | ExitFunction(); // application not found, exit with hr = S_FALSE | 1105 | ExitFunction(); // application not found, exit with hr = S_FALSE |
1106 | 1106 | ||
1107 | // get roles collection | 1107 | // get roles collection |
1108 | hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Roles", ppiRolesColl); | 1108 | hr = CpiExecGetCatalogCollection(piAppColl, piAppObj, L"Roles", ppiRolesColl); |
1109 | ExitOnFailure(hr, "Failed to catalog collection"); | 1109 | ExitOnFailure(hr, "Failed to catalog collection"); |
1110 | 1110 | ||
1111 | hr = S_OK; | 1111 | hr = S_OK; |
@@ -1145,7 +1145,7 @@ HRESULT CpiGetUsersInRoleCollection( | |||
1145 | ExitFunction(); // role not found, exit with hr = S_FALSE | 1145 | ExitFunction(); // role not found, exit with hr = S_FALSE |
1146 | 1146 | ||
1147 | // get roles collection | 1147 | // get roles collection |
1148 | hr = CpiGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInRole", ppiUsrInRoleColl); | 1148 | hr = CpiExecGetCatalogCollection(piRoleColl, piRoleObj, L"UsersInRole", ppiUsrInRoleColl); |
1149 | ExitOnFailure(hr, "Failed to get catalog collection"); | 1149 | ExitOnFailure(hr, "Failed to get catalog collection"); |
1150 | 1150 | ||
1151 | hr = S_OK; | 1151 | hr = S_OK; |
@@ -1170,7 +1170,7 @@ HRESULT CpiGetComponentsCollection( | |||
1170 | ICatalogObject* piAppObj = NULL; | 1170 | ICatalogObject* piAppObj = NULL; |
1171 | 1171 | ||
1172 | // get applications collection | 1172 | // get applications collection |
1173 | hr = CpiGetApplicationsCollection(pwzPartID, &piAppColl); | 1173 | hr = CpiExecGetApplicationsCollection(pwzPartID, &piAppColl); |
1174 | ExitOnFailure(hr, "Failed to get applications collection"); | 1174 | ExitOnFailure(hr, "Failed to get applications collection"); |
1175 | 1175 | ||
1176 | if (S_FALSE == hr) | 1176 | if (S_FALSE == hr) |
@@ -1184,7 +1184,7 @@ HRESULT CpiGetComponentsCollection( | |||
1184 | ExitFunction(); // application not found, exit with hr = S_FALSE | 1184 | ExitFunction(); // application not found, exit with hr = S_FALSE |
1185 | 1185 | ||
1186 | // get components collection | 1186 | // get components collection |
1187 | hr = CpiGetCatalogCollection(piAppColl, piAppObj, L"Components", ppiCompsColl); | 1187 | hr = CpiExecGetCatalogCollection(piAppColl, piAppObj, L"Components", ppiCompsColl); |
1188 | ExitOnFailure(hr, "Failed to get catalog collection"); | 1188 | ExitOnFailure(hr, "Failed to get catalog collection"); |
1189 | 1189 | ||
1190 | hr = S_OK; | 1190 | hr = S_OK; |
@@ -1206,7 +1206,7 @@ HRESULT CpiGetInterfacesCollection( | |||
1206 | HRESULT hr = S_OK; | 1206 | HRESULT hr = S_OK; |
1207 | 1207 | ||
1208 | // get interfaces collection | 1208 | // get interfaces collection |
1209 | hr = CpiGetCatalogCollection(piCompColl, piCompObj, L"InterfacesForComponent", ppiIntfColl); | 1209 | hr = CpiExecGetCatalogCollection(piCompColl, piCompObj, L"InterfacesForComponent", ppiIntfColl); |
1210 | ExitOnFailure(hr, "Failed to get catalog collection"); | 1210 | ExitOnFailure(hr, "Failed to get catalog collection"); |
1211 | 1211 | ||
1212 | hr = S_OK; | 1212 | hr = S_OK; |
@@ -1224,7 +1224,7 @@ HRESULT CpiGetMethodsCollection( | |||
1224 | HRESULT hr = S_OK; | 1224 | HRESULT hr = S_OK; |
1225 | 1225 | ||
1226 | // get interfaces collection | 1226 | // get interfaces collection |
1227 | hr = CpiGetCatalogCollection(piIntfColl, piIntfObj, L"MethodsForInterface", ppiMethColl); | 1227 | hr = CpiExecGetCatalogCollection(piIntfColl, piIntfObj, L"MethodsForInterface", ppiMethColl); |
1228 | ExitOnFailure(hr, "Failed to get catalog collection"); | 1228 | ExitOnFailure(hr, "Failed to get catalog collection"); |
1229 | 1229 | ||
1230 | hr = S_OK; | 1230 | hr = S_OK; |
@@ -1260,7 +1260,7 @@ HRESULT CpiGetSubscriptionsCollection( | |||
1260 | ExitFunction(); // component not found, exit with hr = S_FALSE | 1260 | ExitFunction(); // component not found, exit with hr = S_FALSE |
1261 | 1261 | ||
1262 | // get subscriptions collection | 1262 | // get subscriptions collection |
1263 | hr = CpiGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", ppiSubsColl); | 1263 | hr = CpiExecGetCatalogCollection(piCompColl, piCompObj, L"SubscriptionsForComponent", ppiSubsColl); |
1264 | ExitOnFailure(hr, "Failed to get catalog collection"); | 1264 | ExitOnFailure(hr, "Failed to get catalog collection"); |
1265 | 1265 | ||
1266 | hr = S_OK; | 1266 | 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 | |||
28 | 28 | ||
29 | // function prototypes | 29 | // function prototypes |
30 | 30 | ||
31 | void CpiInitialize(); | 31 | void CpiExecInitialize(); |
32 | void CpiFinalize(); | 32 | void CpiExecFinalize(); |
33 | HRESULT CpiActionStartMessage( | 33 | HRESULT CpiActionStartMessage( |
34 | LPWSTR* ppwzActionData, | 34 | LPWSTR* ppwzActionData, |
35 | BOOL fSuppress | 35 | BOOL fSuppress |
@@ -38,15 +38,15 @@ HRESULT CpiActionDataMessage( | |||
38 | DWORD cArgs, | 38 | DWORD cArgs, |
39 | ... | 39 | ... |
40 | ); | 40 | ); |
41 | HRESULT CpiGetAdminCatalog( | 41 | HRESULT CpiExecGetAdminCatalog( |
42 | ICOMAdminCatalog** ppiCatalog | 42 | ICOMAdminCatalog** ppiCatalog |
43 | ); | 43 | ); |
44 | HRESULT CpiLogCatalogErrorInfo(); | 44 | HRESULT CpiLogCatalogErrorInfo(); |
45 | HRESULT CpiGetCatalogCollection( | 45 | HRESULT CpiExecGetCatalogCollection( |
46 | LPCWSTR pwzName, | 46 | LPCWSTR pwzName, |
47 | ICatalogCollection** ppiColl | 47 | ICatalogCollection** ppiColl |
48 | ); | 48 | ); |
49 | HRESULT CpiGetCatalogCollection( | 49 | HRESULT CpiExecGetCatalogCollection( |
50 | ICatalogCollection* piColl, | 50 | ICatalogCollection* piColl, |
51 | ICatalogObject* piObj, | 51 | ICatalogObject* piObj, |
52 | LPCWSTR pwzName, | 52 | LPCWSTR pwzName, |
@@ -105,7 +105,7 @@ HRESULT CpiFindUserCollectionObject( | |||
105 | PSID pSid, | 105 | PSID pSid, |
106 | ICatalogObject** ppiObj | 106 | ICatalogObject** ppiObj |
107 | ); | 107 | ); |
108 | HRESULT CpiGetPartitionsCollection( | 108 | HRESULT CpiExecGetPartitionsCollection( |
109 | ICatalogCollection** ppiPartColl | 109 | ICatalogCollection** ppiPartColl |
110 | ); | 110 | ); |
111 | HRESULT CpiGetPartitionRolesCollection( | 111 | HRESULT CpiGetPartitionRolesCollection( |
@@ -120,7 +120,7 @@ HRESULT CpiGetUsersInPartitionRoleCollection( | |||
120 | HRESULT CpiGetPartitionUsersCollection( | 120 | HRESULT CpiGetPartitionUsersCollection( |
121 | ICatalogCollection** ppiUserColl | 121 | ICatalogCollection** ppiUserColl |
122 | ); | 122 | ); |
123 | HRESULT CpiGetApplicationsCollection( | 123 | HRESULT CpiExecGetApplicationsCollection( |
124 | LPCWSTR pwzPartID, | 124 | LPCWSTR pwzPartID, |
125 | ICatalogCollection** ppiAppColl | 125 | ICatalogCollection** ppiAppColl |
126 | ); | 126 | ); |
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; | |||
43 | 43 | ||
44 | // function definitions | 44 | // function definitions |
45 | 45 | ||
46 | void CpiInitialize() | 46 | void CpiSchedInitialize() |
47 | { | 47 | { |
48 | // collections | 48 | // collections |
49 | gpiCatalog = NULL; | 49 | gpiCatalog = NULL; |
@@ -80,7 +80,7 @@ void CpiInitialize() | |||
80 | if (S_OK == WcaTableExists(L"ComPlusSubscriptionProperty")) giTables |= cptComPlusSubscriptionProperty; | 80 | if (S_OK == WcaTableExists(L"ComPlusSubscriptionProperty")) giTables |= cptComPlusSubscriptionProperty; |
81 | } | 81 | } |
82 | 82 | ||
83 | void CpiFinalize() | 83 | void CpiSchedFinalize() |
84 | { | 84 | { |
85 | // collections | 85 | // collections |
86 | ReleaseObject(gpiCatalog); | 86 | ReleaseObject(gpiCatalog); |
@@ -95,7 +95,7 @@ BOOL CpiTableExists( | |||
95 | return (giTables & iTable) == iTable; | 95 | return (giTables & iTable) == iTable; |
96 | } | 96 | } |
97 | 97 | ||
98 | HRESULT CpiGetAdminCatalog( | 98 | HRESULT CpiSchedGetAdminCatalog( |
99 | ICOMAdminCatalog** ppiCatalog | 99 | ICOMAdminCatalog** ppiCatalog |
100 | ) | 100 | ) |
101 | { | 101 | { |
@@ -118,7 +118,7 @@ LExit: | |||
118 | return hr; | 118 | return hr; |
119 | } | 119 | } |
120 | 120 | ||
121 | HRESULT CpiGetCatalogCollection( | 121 | HRESULT CpiSchedGetCatalogCollection( |
122 | LPCWSTR pwzName, | 122 | LPCWSTR pwzName, |
123 | ICatalogCollection** ppiColl | 123 | ICatalogCollection** ppiColl |
124 | ) | 124 | ) |
@@ -134,7 +134,7 @@ HRESULT CpiGetCatalogCollection( | |||
134 | ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); | 134 | ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); |
135 | 135 | ||
136 | // get catalog | 136 | // get catalog |
137 | hr = CpiGetAdminCatalog(&piCatalog); | 137 | hr = CpiSchedGetAdminCatalog(&piCatalog); |
138 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); | 138 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); |
139 | 139 | ||
140 | // get collecton from catalog | 140 | // get collecton from catalog |
@@ -159,7 +159,7 @@ LExit: | |||
159 | return hr; | 159 | return hr; |
160 | } | 160 | } |
161 | 161 | ||
162 | HRESULT CpiGetCatalogCollection( | 162 | HRESULT CpiSchedGetCatalogCollection( |
163 | ICatalogCollection* piColl, | 163 | ICatalogCollection* piColl, |
164 | ICatalogObject* piObj, | 164 | ICatalogObject* piObj, |
165 | LPCWSTR pwzName, | 165 | LPCWSTR pwzName, |
@@ -180,7 +180,7 @@ HRESULT CpiGetCatalogCollection( | |||
180 | ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); | 180 | ExitOnNull(bstrName, hr, E_OUTOFMEMORY, "Failed to allocate BSTR for collection name"); |
181 | 181 | ||
182 | // get catalog | 182 | // get catalog |
183 | hr = CpiGetAdminCatalog(&piCatalog); | 183 | hr = CpiSchedGetAdminCatalog(&piCatalog); |
184 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); | 184 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); |
185 | 185 | ||
186 | // get key | 186 | // get key |
@@ -331,7 +331,7 @@ LExit: | |||
331 | return hr; | 331 | return hr; |
332 | } | 332 | } |
333 | 333 | ||
334 | HRESULT CpiGetPartitionsCollection( | 334 | HRESULT CpiSchedGetPartitionsCollection( |
335 | ICatalogCollection** ppiPartColl | 335 | ICatalogCollection** ppiPartColl |
336 | ) | 336 | ) |
337 | { | 337 | { |
@@ -340,7 +340,7 @@ HRESULT CpiGetPartitionsCollection( | |||
340 | if (!gpiPartColl) | 340 | if (!gpiPartColl) |
341 | { | 341 | { |
342 | // get collection | 342 | // get collection |
343 | hr = CpiGetCatalogCollection(L"Partitions", &gpiPartColl); | 343 | hr = CpiSchedGetCatalogCollection(L"Partitions", &gpiPartColl); |
344 | ExitOnFailure(hr, "Failed to get partitions collection"); | 344 | ExitOnFailure(hr, "Failed to get partitions collection"); |
345 | } | 345 | } |
346 | 346 | ||
@@ -354,7 +354,7 @@ LExit: | |||
354 | return hr; | 354 | return hr; |
355 | } | 355 | } |
356 | 356 | ||
357 | HRESULT CpiGetApplicationsCollection( | 357 | HRESULT CpiSchedGetApplicationsCollection( |
358 | ICatalogCollection** ppiAppColl | 358 | ICatalogCollection** ppiAppColl |
359 | ) | 359 | ) |
360 | { | 360 | { |
@@ -369,7 +369,7 @@ HRESULT CpiGetApplicationsCollection( | |||
369 | if (!gpiAppColl) | 369 | if (!gpiAppColl) |
370 | { | 370 | { |
371 | // get catalog | 371 | // get catalog |
372 | hr = CpiGetAdminCatalog(&piCatalog); | 372 | hr = CpiSchedGetAdminCatalog(&piCatalog); |
373 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); | 373 | ExitOnFailure(hr, "Failed to get COM+ admin catalog"); |
374 | 374 | ||
375 | // get ICOMAdminCatalog2 interface | 375 | // get ICOMAdminCatalog2 interface |
@@ -385,7 +385,7 @@ HRESULT CpiGetApplicationsCollection( | |||
385 | ExitOnFailure(hr, "Failed to get global partition id"); | 385 | ExitOnFailure(hr, "Failed to get global partition id"); |
386 | 386 | ||
387 | // get partitions collection | 387 | // get partitions collection |
388 | hr = CpiGetPartitionsCollection(&piPartColl); | 388 | hr = CpiSchedGetPartitionsCollection(&piPartColl); |
389 | ExitOnFailure(hr, "Failed to get partitions collection"); | 389 | ExitOnFailure(hr, "Failed to get partitions collection"); |
390 | 390 | ||
391 | // find object | 391 | // find object |
@@ -396,7 +396,7 @@ HRESULT CpiGetApplicationsCollection( | |||
396 | ExitFunction(); // partition not found, exit with hr = S_FALSE | 396 | ExitFunction(); // partition not found, exit with hr = S_FALSE |
397 | 397 | ||
398 | // get applications collection | 398 | // get applications collection |
399 | hr = CpiGetCatalogCollection(piPartColl, piPartObj, L"Applications", &gpiAppColl); | 399 | hr = CpiSchedGetCatalogCollection(piPartColl, piPartObj, L"Applications", &gpiAppColl); |
400 | ExitOnFailure(hr, "Failed to get applications collection"); | 400 | ExitOnFailure(hr, "Failed to get applications collection"); |
401 | } | 401 | } |
402 | 402 | ||
@@ -404,7 +404,7 @@ HRESULT CpiGetApplicationsCollection( | |||
404 | else | 404 | else |
405 | { | 405 | { |
406 | // get applications collection | 406 | // get applications collection |
407 | hr = CpiGetCatalogCollection(L"Applications", &gpiAppColl); | 407 | hr = CpiSchedGetCatalogCollection(L"Applications", &gpiAppColl); |
408 | ExitOnFailure(hr, "Failed to get applications collection"); | 408 | ExitOnFailure(hr, "Failed to get applications collection"); |
409 | } | 409 | } |
410 | } | 410 | } |
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 @@ | |||
2 | // 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. | 2 | // 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. |
3 | 3 | ||
4 | 4 | ||
5 | #define CPI_MAX_GUID 38 | ||
6 | |||
7 | enum eRunMode { rmDeferred = 1, rmCommit, rmRollback }; | 5 | enum eRunMode { rmDeferred = 1, rmCommit, rmRollback }; |
8 | 6 | ||
9 | enum eActionType { atNoOp = 0, atCreate, atRemove }; | ||
10 | |||
11 | enum eComPlusPropertyType { cpptNone = 0, cpptBoolean, cpptInteger, cpptString, cpptUser }; | 7 | enum eComPlusPropertyType { cpptNone = 0, cpptBoolean, cpptInteger, cpptString, cpptUser }; |
12 | 8 | ||
13 | enum eComPlusTables | 9 | enum eComPlusTables |
@@ -42,14 +38,6 @@ enum eComPlusTables | |||
42 | 38 | ||
43 | // structs | 39 | // structs |
44 | 40 | ||
45 | struct CPI_PROPERTY | ||
46 | { | ||
47 | WCHAR wzName[MAX_DARWIN_KEY + 1]; | ||
48 | LPWSTR pwzValue; | ||
49 | |||
50 | CPI_PROPERTY* pNext; | ||
51 | }; | ||
52 | |||
53 | struct CPI_PROPERTY_DEFINITION | 41 | struct CPI_PROPERTY_DEFINITION |
54 | { | 42 | { |
55 | LPCWSTR pwzName; | 43 | LPCWSTR pwzName; |
@@ -60,19 +48,19 @@ struct CPI_PROPERTY_DEFINITION | |||
60 | 48 | ||
61 | // function prototypes | 49 | // function prototypes |
62 | 50 | ||
63 | void CpiInitialize(); | 51 | void CpiSchedInitialize(); |
64 | void CpiFinalize(); | 52 | void CpiSchedFinalize(); |
65 | BOOL CpiTableExists( | 53 | BOOL CpiTableExists( |
66 | int iTable | 54 | int iTable |
67 | ); | 55 | ); |
68 | HRESULT CpiGetAdminCatalog( | 56 | HRESULT CpiSchedGetAdminCatalog( |
69 | ICOMAdminCatalog** ppiCatalog | 57 | ICOMAdminCatalog** ppiCatalog |
70 | ); | 58 | ); |
71 | HRESULT CpiGetCatalogCollection( | 59 | HRESULT CpiSchedGetCatalogCollection( |
72 | LPCWSTR pwzName, | 60 | LPCWSTR pwzName, |
73 | ICatalogCollection** ppiColl | 61 | ICatalogCollection** ppiColl |
74 | ); | 62 | ); |
75 | HRESULT CpiGetCatalogCollection( | 63 | HRESULT CpiSchedGetCatalogCollection( |
76 | ICatalogCollection* piColl, | 64 | ICatalogCollection* piColl, |
77 | ICatalogObject* piObj, | 65 | ICatalogObject* piObj, |
78 | LPCWSTR pwzName, | 66 | LPCWSTR pwzName, |
@@ -89,10 +77,10 @@ HRESULT CpiFindCollectionObject( | |||
89 | LPCWSTR pwzName, | 77 | LPCWSTR pwzName, |
90 | ICatalogObject** ppiObj | 78 | ICatalogObject** ppiObj |
91 | ); | 79 | ); |
92 | HRESULT CpiGetPartitionsCollection( | 80 | HRESULT CpiSchedGetPartitionsCollection( |
93 | ICatalogCollection** ppiPartColl | 81 | ICatalogCollection** ppiPartColl |
94 | ); | 82 | ); |
95 | HRESULT CpiGetApplicationsCollection( | 83 | HRESULT CpiSchedGetApplicationsCollection( |
96 | ICatalogCollection** ppiAppColl | 84 | ICatalogCollection** ppiAppColl |
97 | ); | 85 | ); |
98 | HRESULT CpiAddActionTextToActionData( | 86 | 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 @@ | |||
1 | #pragma once | ||
2 | // 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. | ||
3 | |||
4 | |||
5 | #define msierrComPlusCannotConnect 28001 | ||
6 | #define msierrComPlusPartitionReadFailed 28002 | ||
7 | #define msierrComPlusPartitionRoleReadFailed 28003 | ||
8 | #define msierrComPlusUserInPartitionRoleReadFailed 28004 | ||
9 | #define msierrComPlusPartitionUserReadFailed 28005 | ||
10 | #define msierrComPlusApplicationReadFailed 28006 | ||
11 | #define msierrComPlusApplicationRoleReadFailed 28007 | ||
12 | #define msierrComPlusUserInApplicationRoleReadFailed 28008 | ||
13 | #define msierrComPlusAssembliesReadFailed 28009 | ||
14 | #define msierrComPlusSubscriptionReadFailed 28010 | ||
15 | #define msierrComPlusPartitionDependency 28011 | ||
16 | #define msierrComPlusPartitionNotFound 28012 | ||
17 | #define msierrComPlusPartitionIdConflict 28013 | ||
18 | #define msierrComPlusPartitionNameConflict 28014 | ||
19 | #define msierrComPlusApplicationDependency 28015 | ||
20 | #define msierrComPlusApplicationNotFound 28016 | ||
21 | #define msierrComPlusApplicationIdConflict 28017 | ||
22 | #define msierrComPlusApplicationNameConflict 28018 | ||
23 | #define msierrComPlusApplicationRoleDependency 28019 | ||
24 | #define msierrComPlusApplicationRoleNotFound 28020 | ||
25 | #define msierrComPlusApplicationRoleConflict 28021 | ||
26 | #define msierrComPlusAssemblyDependency 28022 | ||
27 | #define msierrComPlusSubscriptionIdConflict 28023 | ||
28 | #define msierrComPlusSubscriptionNameConflict 28024 | ||
29 | #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 @@ | |||
1 | // 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. | ||
2 | |||
3 | #include "precomp.h" | ||
4 | |||
5 | /******************************************************************** | ||
6 | DllMain - standard entry point for all WiX custom actions. | ||
7 | |||
8 | ********************************************************************/ | ||
9 | extern "C" BOOL WINAPI DllMain( | ||
10 | IN HINSTANCE hInstance, | ||
11 | IN ULONG ulReason, | ||
12 | IN LPVOID) | ||
13 | { | ||
14 | switch(ulReason) | ||
15 | { | ||
16 | case DLL_PROCESS_ATTACH: | ||
17 | WcaGlobalInitialize(hInstance); | ||
18 | ::DisableThreadLibraryCalls(hInstance); | ||
19 | break; | ||
20 | |||
21 | case DLL_PROCESS_DETACH: | ||
22 | WcaGlobalFinalize(); | ||
23 | break; | ||
24 | } | ||
25 | |||
26 | return TRUE; | ||
27 | } | ||
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 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <packages> | ||
3 | <package id="WixToolset.DUtil" version="4.0.16" targetFramework="native" /> | ||
4 | <package id="WixToolset.WcaUtil" version="4.0.2" targetFramework="native" /> | ||
5 | </packages> \ 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 @@ | |||
1 | #pragma once | ||
2 | // 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. | ||
3 | |||
4 | |||
5 | #include <windows.h> | ||
6 | #include <msiquery.h> | ||
7 | #include <strsafe.h> | ||
8 | #include <comadmin.h> | ||
9 | #include <ntsecapi.h> | ||
10 | #include <aclapi.h> | ||
11 | |||
12 | #include "wcautil.h" | ||
13 | #include "memutil.h" | ||
14 | #include "strutil.h" | ||
15 | #include "wiutil.h" | ||
16 | |||
17 | #include "CustomMsiErrors.h" | ||
18 | |||
19 | #include "cpcost.h" | ||
20 | #include "cputilexec.h" | ||
21 | #include "cppartexec.h" | ||
22 | #include "cppartroleexec.h" | ||
23 | #include "cpappexec.h" | ||
24 | #include "cpapproleexec.h" | ||
25 | #include "cpasmexec.h" | ||
26 | #include "cpsubsexec.h" | ||
27 | #include "cputilsched.h" | ||
28 | #include "cppartsched.h" | ||
29 | #include "cppartrolesched.h" | ||
30 | #include "cpappsched.h" | ||
31 | #include "cpapprolesched.h" | ||
32 | #include "cpasmsched.h" | ||
33 | #include "cpsubssched.h" | ||