aboutsummaryrefslogtreecommitdiff
path: root/src/ext/ComPlus/ca/cputilexec.h
blob: b900883d748dc6af4ca566d5397369db23f1e206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
#pragma once
// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.


#define CPI_MAX_GUID 38

enum eActionType { atNoOp = 0, atCreate, atRemove };


// structs

struct CPI_PROPERTY
{
    WCHAR wzName[MAX_DARWIN_KEY + 1];
    LPWSTR pwzValue;

    CPI_PROPERTY* pNext;
};

struct CPI_ROLLBACK_DATA
{
    WCHAR wzKey[MAX_DARWIN_KEY + 1];
    int iStatus;

    CPI_ROLLBACK_DATA* pNext;
};


// function prototypes

void CpiExecInitialize();
void CpiExecFinalize();
HRESULT CpiActionStartMessage(
    LPWSTR* ppwzActionData,
    BOOL fSuppress
    );
HRESULT CpiActionDataMessage(
    DWORD cArgs,
    ...
    );
HRESULT CpiExecGetAdminCatalog(
    ICOMAdminCatalog** ppiCatalog
    );
HRESULT CpiLogCatalogErrorInfo();
HRESULT CpiExecGetCatalogCollection(
    LPCWSTR pwzName,
    ICatalogCollection** ppiColl
    );
HRESULT CpiExecGetCatalogCollection(
    ICatalogCollection* piColl,
    ICatalogObject* piObj,
    LPCWSTR pwzName,
    ICatalogCollection** ppiColl
    );
HRESULT CpiAddCollectionObject(
    ICatalogCollection* piColl,
    ICatalogObject** ppiObj
    );
HRESULT CpiPutCollectionObjectValue(
    ICatalogObject* piObj,
    LPCWSTR pwzPropName,
    LPCWSTR pwzValue
    );
HRESULT CpiPutCollectionObjectValues(
    ICatalogObject* piObj,
    CPI_PROPERTY* pPropList
    );
HRESULT CpiGetCollectionObjectValue(
    ICatalogObject* piObj,
    LPCWSTR szPropName,
    LPWSTR* ppwzValue
    );
HRESULT CpiResetObjectProperty(
    ICatalogCollection* piColl,
    ICatalogObject* piObj,
    LPCWSTR pwzPropName
    );
HRESULT CpiRemoveCollectionObject(
    ICatalogCollection* piColl,
    LPCWSTR pwzID,
    LPCWSTR pwzName,
    BOOL fResetDeleteable
    );
HRESULT CpiRemoveUserCollectionObject(
    ICatalogCollection* piColl,
    PSID pSid
    );
HRESULT CpiFindCollectionObjectByStringKey(
    ICatalogCollection* piColl,
    LPCWSTR pwzKey,
    ICatalogObject** ppiObj
    );
HRESULT CpiFindCollectionObjectByIntegerKey(
    ICatalogCollection* piColl,
    long lKey,
    ICatalogObject** ppiObj
    );
HRESULT CpiFindCollectionObjectByName(
    ICatalogCollection* piColl,
    LPCWSTR pwzName,
    ICatalogObject** ppiObj
    );
HRESULT CpiFindUserCollectionObject(
    ICatalogCollection* piColl,
    PSID pSid,
    ICatalogObject** ppiObj
    );
HRESULT CpiExecGetPartitionsCollection(
    ICatalogCollection** ppiPartColl
    );
HRESULT CpiGetPartitionRolesCollection(
    LPCWSTR pwzPartID,
    ICatalogCollection** ppiRolesColl
    );
HRESULT CpiGetUsersInPartitionRoleCollection(
    LPCWSTR pwzPartID,
    LPCWSTR pwzRoleName,
    ICatalogCollection** ppiUsrInRoleColl
    );
HRESULT CpiGetPartitionUsersCollection(
    ICatalogCollection** ppiUserColl
    );
HRESULT CpiExecGetApplicationsCollection(
    LPCWSTR pwzPartID,
    ICatalogCollection** ppiAppColl
    );
HRESULT CpiGetRolesCollection(
    LPCWSTR pwzPartID,
    LPCWSTR pwzAppID,
    ICatalogCollection** ppiRolesColl
    );
HRESULT CpiGetUsersInRoleCollection(
    LPCWSTR pwzPartID,
    LPCWSTR pwzAppID,
    LPCWSTR pwzRoleName,
    ICatalogCollection** ppiUsrInRoleColl
    );
HRESULT CpiGetComponentsCollection(
    LPCWSTR pwzPartID,
    LPCWSTR pwzAppID,
    ICatalogCollection** ppiCompsColl
    );
HRESULT CpiGetInterfacesCollection(
    ICatalogCollection* piCompColl,
    ICatalogObject* piCompObj,
    ICatalogCollection** ppiIntfColl
    );
HRESULT CpiGetMethodsCollection(
    ICatalogCollection* piIntfColl,
    ICatalogObject* piIntfObj,
    ICatalogCollection** ppiMethColl
    );
HRESULT CpiGetSubscriptionsCollection(
    LPCWSTR pwzPartID,
    LPCWSTR pwzAppID,
    LPCWSTR pwzCompCLSID,
    ICatalogCollection** ppiCompsColl
    );
HRESULT CpiReadPropertyList(
    LPWSTR* ppwzData,
    CPI_PROPERTY** ppPropList
    );
void CpiFreePropertyList(
    CPI_PROPERTY* pList
    );
HRESULT CpiWriteKeyToRollbackFile(
    HANDLE hFile,
    LPCWSTR pwzKey
    );
HRESULT CpiWriteIntegerToRollbackFile(
    HANDLE hFile,
    int i
    );
HRESULT CpiReadRollbackDataList(
    HANDLE hFile,
    CPI_ROLLBACK_DATA** pprdList
    );
void CpiFreeRollbackDataList(
    CPI_ROLLBACK_DATA* pList
    );
HRESULT CpiFindRollbackStatus(
    CPI_ROLLBACK_DATA* pList,
    LPCWSTR pwzKey,
    int* piStatus
    );
HRESULT CpiAccountNameToSid(
    LPCWSTR pwzAccountName,
    PSID* ppSid
    );
HRESULT CpiSidToAccountName(
    PSID pSid,
    LPWSTR* ppwzAccountName
    );