aboutsummaryrefslogtreecommitdiff
path: root/src/ca/cpasmexec.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2019-02-04 20:06:58 -0600
committerSean Hall <r.sean.hall@gmail.com>2019-02-04 20:11:32 -0600
commitc239e0cc3a28a50c42c63b086ee62e17cf699104 (patch)
tree5ba3e85a9bb1aef22a9162629b248a8e27e2c43f /src/ca/cpasmexec.cpp
parentcbc09b6cd6d0d0b8bf095a88d4d8333616637f71 (diff)
downloadwix-c239e0cc3a28a50c42c63b086ee62e17cf699104.tar.gz
wix-c239e0cc3a28a50c42c63b086ee62e17cf699104.tar.bz2
wix-c239e0cc3a28a50c42c63b086ee62e17cf699104.zip
Integrate into latest v4.
Diffstat (limited to 'src/ca/cpasmexec.cpp')
-rw-r--r--src/ca/cpasmexec.cpp133
1 files changed, 61 insertions, 72 deletions
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
80enum 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
91struct CPI_ROLE_ASSIGNMENT 80struct 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
99struct CPI_METHOD 88struct 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
110struct CPI_INTERFACE 99struct 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
121struct CPI_COMPONENT 110struct 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
132struct CPI_ASSEMBLY_ATTRIBUTES 121struct 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
147struct CPI_ROLE_ASSIGNMENTS_ATTRIBUTES 136struct 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 );
188static HRESULT RemoveComponents( 177static HRESULT RemoveComponents(
189 ICatalogCollection* piCompColl, 178 ICatalogCollection* piCompColl,
190 CPI_COMPONENT* pCompList 179 CPIEXEC_COMPONENT* pCompList
191 ); 180 );
192static HRESULT ReadAssemblyAttributes( 181static HRESULT ReadAssemblyAttributes(
193 LPWSTR* ppwzData, 182 LPWSTR* ppwzData,
@@ -206,56 +195,56 @@ static void FreeRoleAssignmentsAttributes(
206static HRESULT ConfigureComponents( 195static 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 );
213static HRESULT ConfigureInterfaces( 202static 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 );
219static HRESULT ConfigureMethods( 208static 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 );
225static HRESULT ConfigureRoleAssignments( 214static 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 );
232static HRESULT ReadComponentList( 221static HRESULT ReadComponentList(
233 LPWSTR* ppwzData, 222 LPWSTR* ppwzData,
234 CPI_COMPONENT** ppCompList 223 CPIEXEC_COMPONENT** ppCompList
235 ); 224 );
236static HRESULT ReadInterfaceList( 225static HRESULT ReadInterfaceList(
237 LPWSTR* ppwzData, 226 LPWSTR* ppwzData,
238 CPI_INTERFACE** ppIntfList 227 CPIEXEC_INTERFACE** ppIntfList
239 ); 228 );
240static HRESULT ReadMethodList( 229static HRESULT ReadMethodList(
241 LPWSTR* ppwzData, 230 LPWSTR* ppwzData,
242 CPI_METHOD** ppMethList 231 CPIEXEC_METHOD** ppMethList
243 ); 232 );
244static HRESULT ReadRoleAssignmentList( 233static HRESULT ReadRoleAssignmentList(
245 LPWSTR* ppwzData, 234 LPWSTR* ppwzData,
246 CPI_ROLE_ASSIGNMENT** ppRoleList 235 CPIEXEC_ROLE_ASSIGNMENT** ppRoleList
247 ); 236 );
248static void FreeComponentList( 237static void FreeComponentList(
249 CPI_COMPONENT* pList 238 CPIEXEC_COMPONENT* pList
250 ); 239 );
251static void FreeInterfaceList( 240static void FreeInterfaceList(
252 CPI_INTERFACE* pList 241 CPIEXEC_INTERFACE* pList
253 ); 242 );
254static void FreeMethodList( 243static void FreeMethodList(
255 CPI_METHOD* pList 244 CPIEXEC_METHOD* pList
256 ); 245 );
257static void FreeRoleAssignmentList( 246static 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
1155static HRESULT RemoveComponents( 1144static 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(
1291static HRESULT ConfigureComponents( 1280static 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:
1375static HRESULT ConfigureInterfaces( 1364static 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:
1448static HRESULT ConfigureMethods( 1437static 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
1589static HRESULT ReadComponentList( 1578static 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
1649static HRESULT ReadInterfaceList( 1638static 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
1709static HRESULT ReadMethodList( 1698static 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
1770static HRESULT ReadRoleAssignmentList( 1759static 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
1823static void FreeComponentList( 1812static 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
1842static void FreeInterfaceList( 1831static 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
1861static void FreeMethodList( 1850static 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
1878static void FreeRoleAssignmentList( 1867static 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 }