diff options
Diffstat (limited to 'src/ca/cputilexec.cpp')
-rw-r--r-- | src/ca/cputilexec.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
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; |