1 | /**
|
---|
2 | * This file has no copyright assigned and is placed in the Public Domain.
|
---|
3 | * This file is part of the mingw-w64 runtime package.
|
---|
4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
---|
5 | */
|
---|
6 | DEFINE_GUID(cNodetypeSceTemplateServices,0x24a7f717,0x1f0c,0x11d1,0xaf,0xfb,0x0,0xc0,0x4f,0xb9,0x84,0xf9);
|
---|
7 | DEFINE_GUID(cNodetypeSceAnalysisServices,0x678050c7,0x1ff8,0x11d1,0xaf,0xfb,0x0,0xc0,0x4f,0xb9,0x84,0xf9);
|
---|
8 | DEFINE_GUID(cNodetypeSceEventLog,0x2ce06698,0x4bf3,0x11d1,0x8c,0x30,0x0,0xc0,0x4f,0xb9,0x84,0xf9);
|
---|
9 | DEFINE_GUID(IID_ISceSvcAttachmentPersistInfo,0x6d90e0d0,0x200d,0x11d1,0xaf,0xfb,0x0,0xc0,0x4f,0xb9,0x84,0xf9);
|
---|
10 | DEFINE_GUID(IID_ISceSvcAttachmentData,0x17c35fde,0x200d,0x11d1,0xaf,0xfb,0x0,0xc0,0x4f,0xb9,0x84,0xf9);
|
---|
11 |
|
---|
12 | #ifndef _scesvc_
|
---|
13 | #define _scesvc_
|
---|
14 |
|
---|
15 | #ifdef __cplusplus
|
---|
16 | extern "C" {
|
---|
17 | #endif
|
---|
18 |
|
---|
19 | #ifndef _SCE_SHARED_HEADER
|
---|
20 | #define _SCE_SHARED_HEADER
|
---|
21 |
|
---|
22 | typedef DWORD SCESTATUS;
|
---|
23 |
|
---|
24 | #define SCESTATUS_SUCCESS __MSABI_LONG(0)
|
---|
25 | #define SCESTATUS_INVALID_PARAMETER __MSABI_LONG(1)
|
---|
26 | #define SCESTATUS_RECORD_NOT_FOUND __MSABI_LONG(2)
|
---|
27 | #define SCESTATUS_INVALID_DATA __MSABI_LONG(3)
|
---|
28 | #define SCESTATUS_OBJECT_EXIST __MSABI_LONG(4)
|
---|
29 | #define SCESTATUS_BUFFER_TOO_SMALL __MSABI_LONG(5)
|
---|
30 | #define SCESTATUS_PROFILE_NOT_FOUND __MSABI_LONG(6)
|
---|
31 | #define SCESTATUS_BAD_FORMAT __MSABI_LONG(7)
|
---|
32 | #define SCESTATUS_NOT_ENOUGH_RESOURCE __MSABI_LONG(8)
|
---|
33 | #define SCESTATUS_ACCESS_DENIED __MSABI_LONG(9)
|
---|
34 | #define SCESTATUS_CANT_DELETE __MSABI_LONG(10)
|
---|
35 | #define SCESTATUS_PREFIX_OVERFLOW __MSABI_LONG(11)
|
---|
36 | #define SCESTATUS_OTHER_ERROR __MSABI_LONG(12)
|
---|
37 | #define SCESTATUS_ALREADY_RUNNING __MSABI_LONG(13)
|
---|
38 | #define SCESTATUS_SERVICE_NOT_SUPPORT __MSABI_LONG(14)
|
---|
39 | #define SCESTATUS_MOD_NOT_FOUND __MSABI_LONG(15)
|
---|
40 | #define SCESTATUS_EXCEPTION_IN_SERVER __MSABI_LONG(16)
|
---|
41 | #define SCESTATUS_NO_TEMPLATE_GIVEN __MSABI_LONG(17)
|
---|
42 | #define SCESTATUS_NO_MAPPING __MSABI_LONG(18)
|
---|
43 | #define SCESTATUS_TRUST_FAIL __MSABI_LONG(19)
|
---|
44 |
|
---|
45 | typedef struct _SCESVC_CONFIGURATION_LINE_ {
|
---|
46 | LPTSTR Key;
|
---|
47 | LPTSTR Value;
|
---|
48 | DWORD ValueLen;
|
---|
49 | } SCESVC_CONFIGURATION_LINE,*PSCESVC_CONFIGURATION_LINE;
|
---|
50 |
|
---|
51 | typedef struct _SCESVC_CONFIGURATION_INFO_ {
|
---|
52 | DWORD Count;
|
---|
53 | PSCESVC_CONFIGURATION_LINE Lines;
|
---|
54 | } SCESVC_CONFIGURATION_INFO,*PSCESVC_CONFIGURATION_INFO;
|
---|
55 |
|
---|
56 | typedef PVOID SCE_HANDLE;
|
---|
57 | typedef ULONG SCE_ENUMERATION_CONTEXT,*PSCE_ENUMERATION_CONTEXT;
|
---|
58 |
|
---|
59 | typedef enum _SCESVC_INFO_TYPE {
|
---|
60 | SceSvcConfigurationInfo,SceSvcMergedPolicyInfo,SceSvcAnalysisInfo,SceSvcInternalUse
|
---|
61 | } SCESVC_INFO_TYPE;
|
---|
62 |
|
---|
63 | #define SCE_ROOT_PATH TEXT("Software\\Microsoft\\Windows NT\\CurrentVersion\\SeCEdit")
|
---|
64 | #define SCE_ROOT_SERVICE_PATH SCE_ROOT_PATH TEXT("\\SvcEngs")
|
---|
65 | #endif
|
---|
66 |
|
---|
67 | typedef PVOID SCESVC_HANDLE;
|
---|
68 |
|
---|
69 | typedef struct _SCESVC_ANALYSIS_LINE_ {
|
---|
70 | LPTSTR Key;
|
---|
71 | PBYTE Value;
|
---|
72 | DWORD ValueLen;
|
---|
73 | } SCESVC_ANALYSIS_LINE,*PSCESVC_ANALYSIS_LINE;
|
---|
74 |
|
---|
75 | typedef struct _SCESVC_ANALYSIS_INFO_ {
|
---|
76 | DWORD Count;
|
---|
77 | PSCESVC_ANALYSIS_LINE Lines;
|
---|
78 | } SCESVC_ANALYSIS_INFO,*PSCESVC_ANALYSIS_INFO;
|
---|
79 |
|
---|
80 | #define SCESVC_ENUMERATION_MAX __MSABI_LONG(100)
|
---|
81 |
|
---|
82 | typedef SCESTATUS (CALLBACK *PFSCE_QUERY_INFO)(SCE_HANDLE sceHandle,SCESVC_INFO_TYPE sceType,LPTSTR lpPrefix,WINBOOL bExact,PVOID *ppvInfo,PSCE_ENUMERATION_CONTEXT psceEnumHandle);
|
---|
83 | typedef SCESTATUS (CALLBACK *PFSCE_SET_INFO)(SCE_HANDLE sceHandle,SCESVC_INFO_TYPE sceType,LPTSTR lpPrefix,WINBOOL bExact,PVOID pvInfo);
|
---|
84 | typedef SCESTATUS (CALLBACK *PFSCE_FREE_INFO)(PVOID pvServiceInfo);
|
---|
85 |
|
---|
86 | #define SCE_LOG_LEVEL_ALWAYS 0
|
---|
87 | #define SCE_LOG_LEVEL_ERROR 1
|
---|
88 | #define SCE_LOG_LEVEL_DETAIL 2
|
---|
89 | #define SCE_LOG_LEVEL_DEBUG 3
|
---|
90 |
|
---|
91 | typedef SCESTATUS (CALLBACK *PFSCE_LOG_INFO)(INT ErrLevel,DWORD Win32rc,LPTSTR pErrFmt,...);
|
---|
92 |
|
---|
93 | typedef struct _SCESVC_CALLBACK_INFO_ {
|
---|
94 | SCE_HANDLE sceHandle;
|
---|
95 | PFSCE_QUERY_INFO pfQueryInfo;
|
---|
96 | PFSCE_SET_INFO pfSetInfo;
|
---|
97 | PFSCE_FREE_INFO pfFreeInfo;
|
---|
98 | PFSCE_LOG_INFO pfLogInfo;
|
---|
99 | } SCESVC_CALLBACK_INFO,*PSCESVC_CALLBACK_INFO;
|
---|
100 |
|
---|
101 | typedef SCESTATUS (*PF_ConfigAnalyzeService)(PSCESVC_CALLBACK_INFO pSceCbInfo);
|
---|
102 | typedef SCESTATUS (*PF_UpdateService)(PSCESVC_CALLBACK_INFO pSceCbInfo,PSCESVC_CONFIGURATION_INFO ServiceInfo);
|
---|
103 |
|
---|
104 | #ifdef __cplusplus
|
---|
105 | }
|
---|
106 | #endif
|
---|
107 | #endif
|
---|
108 |
|
---|
109 | #ifndef _UUIDS_SCE_ATTACHMENT_
|
---|
110 | #define _UUIDS_SCE_ATTACHMENT_
|
---|
111 |
|
---|
112 | #include "rpc.h"
|
---|
113 | #include "rpcndr.h"
|
---|
114 |
|
---|
115 | #if __RPCNDR_H_VERSION__ < 440
|
---|
116 | #define __RPCNDR_H_VERSION__ 440
|
---|
117 | #endif
|
---|
118 |
|
---|
119 | #ifndef COM_NO_WINDOWS_H
|
---|
120 | #include "windows.h"
|
---|
121 | #include "ole2.h"
|
---|
122 | #endif
|
---|
123 |
|
---|
124 | #ifdef __cplusplus
|
---|
125 | extern "C" {
|
---|
126 | #endif
|
---|
127 |
|
---|
128 | #define struuidNodetypeSceTemplateServices "{24a7f717-1f0c-11d1-affb-00c04fb984f9}"
|
---|
129 | #define lstruuidNodetypeSceTemplateServices L"{24a7f717-1f0c-11d1-affb-00c04fb984f9}"
|
---|
130 | #define struuidNodetypeSceAnalysisServices "{678050c7-1ff8-11d1-affb-00c04fb984f9}"
|
---|
131 | #define lstruuidNodetypeSceAnalysisServices L"{678050c7-1ff8-11d1-affb-00c04fb984f9}"
|
---|
132 | #define struuidNodetypeSceEventLog "{2ce06698-4bf3-11d1-8c30-00c04fb984f9}"
|
---|
133 | #define lstruuidNodetypeSceEventLog L"{2ce06698-4bf3-11d1-8c30-00c04fb984f9}"
|
---|
134 |
|
---|
135 | typedef PSCESVC_CONFIGURATION_INFO *LPSCESVC_CONFIGURATION_INFO;
|
---|
136 | typedef PSCESVC_ANALYSIS_INFO *LPSCESVC_ANALYSIS_INFO;
|
---|
137 |
|
---|
138 | #define CCF_SCESVC_ATTACHMENT L"CCF_SCESVC_ATTACHMENT"
|
---|
139 | #define CCF_SCESVC_ATTACHMENT_DATA L"CCF_SCESVC_ATTACHMENT_DATA"
|
---|
140 |
|
---|
141 | typedef struct ISceSvcAttachmentPersistInfo ISceSvcAttachmentPersistInfo;
|
---|
142 | typedef ISceSvcAttachmentPersistInfo *LPSCESVCATTACHMENTPERSISTINFO;
|
---|
143 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
---|
144 | struct ISceSvcAttachmentPersistInfo : public IUnknown {
|
---|
145 | public:
|
---|
146 | virtual HRESULT WINAPI Save(LPTSTR lpTemplateName,SCESVC_HANDLE *scesvcHandle,PVOID *ppvData,PBOOL pbOverwriteAll) = 0;
|
---|
147 | virtual HRESULT WINAPI IsDirty(LPTSTR lpTemplateName) = 0;
|
---|
148 | virtual HRESULT WINAPI FreeBuffer(PVOID pvData) = 0;
|
---|
149 | };
|
---|
150 | #else
|
---|
151 | typedef struct ISceSvcAttachmentPersistInfoVtbl {
|
---|
152 | BEGIN_INTERFACE
|
---|
153 | HRESULT (WINAPI *QueryInterface)(ISceSvcAttachmentPersistInfo *This,REFIID riid,void **ppvObject);
|
---|
154 | ULONG (WINAPI *AddRef)(ISceSvcAttachmentPersistInfo *This);
|
---|
155 | ULONG (WINAPI *Release)(ISceSvcAttachmentPersistInfo *This);
|
---|
156 | HRESULT (WINAPI *Save)(ISceSvcAttachmentPersistInfo *This,LPTSTR lpTemplateName,SCESVC_HANDLE scesvcHandle,PVOID *ppvData,PBOOL pbOverwriteAll);
|
---|
157 | HRESULT (WINAPI *FreeBuffer)(ISceSvcAttachmentPersistInfo *This,PVOID pvData);
|
---|
158 | HRESULT (WINAPI *IsDirty)(ISceSvcAttachmentPersistInfo *This,LPTSTR lpTemplateName);
|
---|
159 | END_INTERFACE
|
---|
160 | } ISceSvcAttachmentPersistInfoVtbl;
|
---|
161 | struct ISceSvcAttachmentPersistInfo {
|
---|
162 | CONST_VTBL struct ISceSvcAttachmentPersistInfoVtbl *lpVtbl;
|
---|
163 | };
|
---|
164 | #ifdef COBJMACROS
|
---|
165 | #define IData_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
|
---|
166 | #define ISceSvcAttachmentPersistInfo_AddRef(This) (This)->lpVtbl->AddRef(This)
|
---|
167 | #define ISceSvcAttachmentPersistInfo_Release(This) (This)->lpVtbl->Release(This)
|
---|
168 | #define ISceSvcAttachmentPersistInfo_Save(This,lpTemplateName,scesvcHandle,ppvData,pbOverwriteAll) (This)->lpVtbl->Save(lpTemplateName,scesvcHandle,ppvData,pbOverwriteAll)
|
---|
169 | #define ISceSvcAttachmentPersistInfo_FreeBuffer(This,pvData) (This)->lpVtbl->FreeBuffer(pvData)
|
---|
170 | #define ISceSvcAttachmentPersistInfo_CloseHandle(This,lpTemplateName) (This)->lpVtbl->IsDirty(lpTemplateName)
|
---|
171 | #endif
|
---|
172 | #endif
|
---|
173 |
|
---|
174 | typedef struct ISceSvcAttachmentData ISceSvcAttachmentData;
|
---|
175 | typedef ISceSvcAttachmentData *LPSCESVCATTACHMENTDATA;
|
---|
176 | #if defined(__cplusplus) && !defined(CINTERFACE)
|
---|
177 | struct ISceSvcAttachmentData : public IUnknown {
|
---|
178 | public:
|
---|
179 | virtual HRESULT WINAPI GetData(SCESVC_HANDLE scesvcHandle,SCESVC_INFO_TYPE sceType,PVOID *ppvData,PSCE_ENUMERATION_CONTEXT psceEnumHandle) = 0;
|
---|
180 | virtual HRESULT WINAPI Initialize(LPCTSTR lpServiceName,LPCTSTR lpTemplateName,LPSCESVCATTACHMENTPERSISTINFO lpSceSvcPersistInfo,SCESVC_HANDLE *pscesvcHandle) = 0;
|
---|
181 | virtual HRESULT WINAPI FreeBuffer(PVOID pvData) = 0;
|
---|
182 | virtual HRESULT WINAPI CloseHandle(SCESVC_HANDLE scesvcHandle) = 0;
|
---|
183 | };
|
---|
184 | #else
|
---|
185 | typedef struct ISceSvcAttachmentDataVtbl {
|
---|
186 | BEGIN_INTERFACE
|
---|
187 | HRESULT (WINAPI *QueryInterface)(ISceSvcAttachmentData *This,REFIID riid,void **ppvObject);
|
---|
188 | ULONG (WINAPI *AddRef)(ISceSvcAttachmentData *This);
|
---|
189 | ULONG (WINAPI *Release)(ISceSvcAttachmentData *This);
|
---|
190 | HRESULT (WINAPI *Initialize)(ISceSvcAttachmentData *This,LPCTSTR lpServiceName,LPCTSTR lpTemplateName,LPSCESVCATTACHMENTPERSISTINFO lpSceSvcPersistInfo,SCESVC_HANDLE *pscesvcHandle);
|
---|
191 | HRESULT (WINAPI *GetData)(ISceSvcAttachmentData *This,SCESVC_HANDLE scesvcHandle,SCESVC_INFO_TYPE sceType,PVOID *ppvData,PSCE_ENUMERATION_CONTEXT psceEnumHandle);
|
---|
192 | HRESULT (WINAPI *FreeBuffer)(ISceSvcAttachmentData *This,PVOID pvData);
|
---|
193 | HRESULT (WINAPI *CloseHandle)(ISceSvcAttachmentData *This,SCESVC_HANDLE scesvcHandle);
|
---|
194 | END_INTERFACE
|
---|
195 | } ISceSvcAttachmentDataVtbl;
|
---|
196 | struct ISceSvcAttachmentData {
|
---|
197 | CONST_VTBL struct ISceSvcAttachmentDataVtbl *lpVtbl;
|
---|
198 | };
|
---|
199 | #ifdef COBJMACROS
|
---|
200 | #define IData_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
|
---|
201 | #define ISceSvcAttachmentData_AddRef(This) (This)->lpVtbl->AddRef(This)
|
---|
202 | #define ISceSvcAttachmentData_Release(This) (This)->lpVtbl->Release(This)
|
---|
203 | #define ISceSvcAttachmentData_Initialize(This,lpServiceName,lpTemplateName,lpSceSvcPersistInfo,pscesvcHandle) (This)->lpVtbl->Initialize(lpServiceName,lpTemplateName,lpSceSvcPersistInfo,pscesvcHandle)
|
---|
204 | #define ISceSvcAttachmentData_GetData(This,scesvcHandle,sceType,ppvData,psceEnumHandle) (This)->lpVtbl->GetData(scesvcHandle,sceType,ppvData,psceEnumHandle)
|
---|
205 | #define ISceSvcAttachmentData_FreeBuffer(This,pvData) (This)->lpVtbl->FreeBuffer(pvData)
|
---|
206 | #define ISceSvcAttachmentData_CloseHandle(This,scesvcHandle) (This)->lpVtbl->CloseHandle(scesvcHandle)
|
---|
207 | #endif
|
---|
208 | #endif
|
---|
209 |
|
---|
210 | #ifdef __cplusplus
|
---|
211 | }
|
---|
212 | #endif
|
---|
213 | #endif
|
---|