1
{******************************************************************************}
3
{ Encrypting File System API interface Unit for Object Pascal }
5
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
6
{ Corporation. All Rights Reserved. }
8
{ The original file is: winefs.h, released June 2000. The original Pascal }
9
{ code is: WinEFS.pas, released December 2000. The initial developer of the }
10
{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
12
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
13
{ Marcel van Brakel. All Rights Reserved. }
15
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
17
{ You may retrieve the latest version of this file at the Project JEDI }
18
{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
20
{ The contents of this file are used with permission, subject to the Mozilla }
21
{ Public License Version 1.1 (the "License"); you may not use this file except }
22
{ in compliance with the License. You may obtain a copy of the License at }
23
{ http://www.mozilla.org/MPL/MPL-1.1.html }
25
{ Software distributed under the License is distributed on an "AS IS" basis, }
26
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
27
{ the specific language governing rights and limitations under the License. }
29
{ Alternatively, the contents of this file may be used under the terms of the }
30
{ GNU Lesser General Public License (the "LGPL License"), in which case the }
31
{ provisions of the LGPL License are applicable instead of those above. }
32
{ If you wish to allow use of your version of this file only under the terms }
33
{ of the LGPL License and not to allow others to use your version of this file }
34
{ under the MPL, indicate your decision by deleting the provisions above and }
35
{ replace them with the notice and other provisions required by the LGPL }
36
{ License. If you do not delete the provisions above, a recipient may use }
37
{ your version of this file under either the MPL or the LGPL License. }
39
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
41
{******************************************************************************}
43
// $Id: jwawinefs.pas,v 1.1 2005/04/04 07:56:11 marco Exp $
50
{$HPPEMIT '#include "WinEFS.h"'}
52
{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE_HASH *PPENCRYPTION_CERTIFICATE_HASH'}
53
{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE *PPENCRYPTION_CERTIFICATE'}
54
{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE_HASH_LIST *PPENCRYPTION_CERTIFICATE_HASH_LIST'}
62
JwaWinBase, JwaWinNT, JwaWinType;
69
// Encoded Certificate
73
PEFS_CERTIFICATE_BLOB = ^EFS_CERTIFICATE_BLOB;
74
{$EXTERNALSYM PEFS_CERTIFICATE_BLOB}
75
_CERTIFICATE_BLOB = record
76
dwCertEncodingType: DWORD;
80
{$EXTERNALSYM _CERTIFICATE_BLOB}
81
EFS_CERTIFICATE_BLOB = _CERTIFICATE_BLOB;
82
{$EXTERNALSYM EFS_CERTIFICATE_BLOB}
83
TEfsCertificateBlob = EFS_CERTIFICATE_BLOB;
84
PEfsCertificateBlob = PEFS_CERTIFICATE_BLOB;
90
PEFS_HASH_BLOB = ^EFS_HASH_BLOB;
91
{$EXTERNALSYM PEFS_HASH_BLOB}
92
_EFS_HASH_BLOB = record
96
{$EXTERNALSYM _EFS_HASH_BLOB}
97
EFS_HASH_BLOB = _EFS_HASH_BLOB;
98
{$EXTERNALSYM EFS_HASH_BLOB}
99
TEfsHashBlob = EFS_HASH_BLOB;
100
PEfsHashBlob = PEFS_HASH_BLOB;
106
_EFS_RPC_BLOB = record
110
{$EXTERNALSYM _EFS_RPC_BLOB}
111
EFS_RPC_BLOB = _EFS_RPC_BLOB;
112
{$EXTERNALSYM EFS_RPC_BLOB}
113
PEFS_RPC_BLOB = ^EFS_RPC_BLOB;
114
{$EXTERNALSYM PEFS_RPC_BLOB}
115
TEfsRpcBlob = EFS_RPC_BLOB;
116
PEfsRpcBlob = PEFS_RPC_BLOB;
118
_EFS_KEY_INFO = record
124
{$EXTERNALSYM _EFS_KEY_INFO}
125
EFS_KEY_INFO = _EFS_KEY_INFO;
126
{$EXTERNALSYM EFS_KEY_INFO}
127
PEFS_KEY_INFO = ^EFS_KEY_INFO;
128
{$EXTERNALSYM PEFS_KEY_INFO}
129
TEfsKeyInfo = EFS_KEY_INFO;
130
PEfsKeyInfo = PEFS_KEY_INFO;
133
// Input to add a user to an encrypted file
136
PENCRYPTION_CERTIFICATE = ^ENCRYPTION_CERTIFICATE;
137
{$EXTERNALSYM PENCRYPTION_CERTIFICATE}
138
_ENCRYPTION_CERTIFICATE = record
139
cbTotalLength: DWORD;
141
pCertBlob: PEFS_CERTIFICATE_BLOB;
143
{$EXTERNALSYM _ENCRYPTION_CERTIFICATE}
144
ENCRYPTION_CERTIFICATE = _ENCRYPTION_CERTIFICATE;
145
{$EXTERNALSYM ENCRYPTION_CERTIFICATE}
146
TEncryptionCertificate = ENCRYPTION_CERTIFICATE;
147
PEncryptionCertificate = PENCRYPTION_CERTIFICATE;
151
{$EXTERNALSYM MAX_SID_SIZE}
154
PENCRYPTION_CERTIFICATE_HASH = ^ENCRYPTION_CERTIFICATE_HASH;
155
{$EXTERNALSYM PENCRYPTION_CERTIFICATE_HASH}
156
_ENCRYPTION_CERTIFICATE_HASH = record
157
cbTotalLength: DWORD;
159
pHash: PEFS_HASH_BLOB;
160
lpDisplayInformation: LPWSTR;
162
{$EXTERNALSYM _ENCRYPTION_CERTIFICATE_HASH}
163
ENCRYPTION_CERTIFICATE_HASH = _ENCRYPTION_CERTIFICATE_HASH;
164
{$EXTERNALSYM ENCRYPTION_CERTIFICATE_HASH}
165
TEncryptionCertificateHash = ENCRYPTION_CERTIFICATE_HASH;
166
PEncryptionCertificateHash = PENCRYPTION_CERTIFICATE_HASH;
168
PPENCRYPTION_CERTIFICATE_HASH = ^PENCRYPTION_CERTIFICATE_HASH;
169
{$NODEFINE PPENCRYPTION_CERTIFICATE_HASH}
171
PENCRYPTION_CERTIFICATE_HASH_LIST = ^ENCRYPTION_CERTIFICATE_HASH_LIST;
172
{$EXTERNALSYM PENCRYPTION_CERTIFICATE_HASH_LIST}
173
_ENCRYPTION_CERTIFICATE_HASH_LIST = record
175
pUsers: PPENCRYPTION_CERTIFICATE_HASH;
177
{$EXTERNALSYM _ENCRYPTION_CERTIFICATE_HASH_LIST}
178
ENCRYPTION_CERTIFICATE_HASH_LIST = _ENCRYPTION_CERTIFICATE_HASH_LIST;
179
{$EXTERNALSYM ENCRYPTION_CERTIFICATE_HASH_LIST}
180
TEncryptionCertificateHashList = ENCRYPTION_CERTIFICATE_HASH_LIST;
181
PEncryptionCertificateHashList = PENCRYPTION_CERTIFICATE_HASH_LIST;
183
PPENCRYPTION_CERTIFICATE = ^PENCRYPTION_CERTIFICATE;
184
{$NODEFINE PPENCRYPTION_CERTIFICATE}
186
PENCRYPTION_CERTIFICATE_LIST = ^ENCRYPTION_CERTIFICATE_LIST;
187
{$EXTERNALSYM PENCRYPTION_CERTIFICATE_LIST}
188
_ENCRYPTION_CERTIFICATE_LIST = record
190
pUsers: PPENCRYPTION_CERTIFICATE;
192
{$EXTERNALSYM _ENCRYPTION_CERTIFICATE_LIST}
193
ENCRYPTION_CERTIFICATE_LIST = _ENCRYPTION_CERTIFICATE_LIST;
194
{$EXTERNALSYM ENCRYPTION_CERTIFICATE_LIST}
195
TEncryptionCertificateList = ENCRYPTION_CERTIFICATE_LIST;
196
PEncryptionCertificateList = PENCRYPTION_CERTIFICATE_LIST;
198
PPENCRYPTION_CERTIFICATE_HASH_LIST = ^PENCRYPTION_CERTIFICATE_HASH_LIST;
199
{$NODEFINE PPENCRYPTION_CERTIFICATE_HASH_LIST}
201
function QueryUsersOnEncryptedFile(lpFileName: LPCWSTR;
202
var pUsers: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
203
{$EXTERNALSYM QueryUsersOnEncryptedFile}
205
function QueryRecoveryAgentsOnEncryptedFile(lpFileName: LPCWSTR;
206
var pRecoveryAgents: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
207
{$EXTERNALSYM QueryRecoveryAgentsOnEncryptedFile}
209
function RemoveUsersFromEncryptedFile(lpFileName: LPCWSTR;
210
pHashes: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
211
{$EXTERNALSYM RemoveUsersFromEncryptedFile}
213
function AddUsersToEncryptedFile(lpFileName: LPCWSTR;
214
pUsers: PENCRYPTION_CERTIFICATE_LIST): DWORD; stdcall;
215
{$EXTERNALSYM AddUsersToEncryptedFile}
217
function SetUserFileEncryptionKey(pEncryptionCertificate: PENCRYPTION_CERTIFICATE): DWORD; stdcall;
218
{$EXTERNALSYM SetUserFileEncryptionKey}
220
procedure FreeEncryptionCertificateHashList(pHashes: PENCRYPTION_CERTIFICATE_HASH_LIST); stdcall;
221
{$EXTERNALSYM FreeEncryptionCertificateHashList}
223
function EncryptionDisable(DirPath: LPCWSTR; Disable: BOOL): BOOL; stdcall;
224
{$EXTERNALSYM EncryptionDisable}
226
function DuplicateEncryptionInfoFile(SrcFileName, DstFileName: LPCWSTR; dwCreationDistribution,
227
dwAttributes: DWORD; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): DWORD; stdcall;
228
{$EXTERNALSYM DuplicateEncryptionInfoFile}
233
advapi32 = 'advapi32.dll';
235
{$IFDEF DYNAMIC_LINK}
238
_QueryUsersOnEncryptedFile: Pointer;
240
function QueryUsersOnEncryptedFile;
242
GetProcedureAddress(_QueryUsersOnEncryptedFile, advapi32, 'QueryUsersOnEncryptedFile');
246
JMP [_QueryUsersOnEncryptedFile]
251
_QueryRecoveryAgentsOnEncrFile: Pointer;
253
function QueryRecoveryAgentsOnEncryptedFile;
255
GetProcedureAddress(_QueryRecoveryAgentsOnEncrFile, advapi32, 'QueryRecoveryAgentsOnEncryptedFile');
259
JMP [_QueryRecoveryAgentsOnEncrFile]
264
_RemoveUsersFromEncryptedFile: Pointer;
266
function RemoveUsersFromEncryptedFile;
268
GetProcedureAddress(_RemoveUsersFromEncryptedFile, advapi32, 'RemoveUsersFromEncryptedFile');
272
JMP [_RemoveUsersFromEncryptedFile]
277
_AddUsersToEncryptedFile: Pointer;
279
function AddUsersToEncryptedFile;
281
GetProcedureAddress(_AddUsersToEncryptedFile, advapi32, 'AddUsersToEncryptedFile');
285
JMP [_AddUsersToEncryptedFile]
290
_SetUserFileEncryptionKey: Pointer;
292
function SetUserFileEncryptionKey;
294
GetProcedureAddress(_SetUserFileEncryptionKey, advapi32, 'SetUserFileEncryptionKey');
298
JMP [_SetUserFileEncryptionKey]
303
_FreeEncrCertificateHashList: Pointer;
305
procedure FreeEncryptionCertificateHashList;
307
GetProcedureAddress(_FreeEncrCertificateHashList, advapi32, 'FreeEncryptionCertificateHashList');
311
JMP [_FreeEncrCertificateHashList]
316
_EncryptionDisable: Pointer;
318
function EncryptionDisable;
320
GetProcedureAddress(_EncryptionDisable, advapi32, 'EncryptionDisable');
324
JMP [_EncryptionDisable]
329
_DuplicateEncryptionInfoFile: Pointer;
331
function DuplicateEncryptionInfoFile;
333
GetProcedureAddress(_DuplicateEncryptionInfoFile, advapi32, 'DuplicateEncryptionInfoFile');
337
JMP [_DuplicateEncryptionInfoFile]
343
function QueryUsersOnEncryptedFile; external advapi32 name 'QueryUsersOnEncryptedFile';
344
function QueryRecoveryAgentsOnEncryptedFile; external advapi32 name 'QueryRecoveryAgentsOnEncryptedFile';
345
function RemoveUsersFromEncryptedFile; external advapi32 name 'RemoveUsersFromEncryptedFile';
346
function AddUsersToEncryptedFile; external advapi32 name 'AddUsersToEncryptedFile';
347
function SetUserFileEncryptionKey; external advapi32 name 'SetUserFileEncryptionKey';
348
procedure FreeEncryptionCertificateHashList; external advapi32 name 'FreeEncryptionCertificateHashList';
349
function EncryptionDisable; external advapi32 name 'EncryptionDisable';
350
function DuplicateEncryptionInfoFile; external advapi32 name 'DuplicateEncryptionInfoFile';
352
{$ENDIF DYNAMIC_LINK}
1
{******************************************************************************}
3
{ Encrypting File System API interface Unit for Object Pascal }
5
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
6
{ Corporation. All Rights Reserved. }
8
{ The original file is: winefs.h, released June 2000. The original Pascal }
9
{ code is: WinEFS.pas, released December 2000. The initial developer of the }
10
{ Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
12
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
13
{ Marcel van Brakel. All Rights Reserved. }
15
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
17
{ You may retrieve the latest version of this file at the Project JEDI }
18
{ APILIB home page, located at http://jedi-apilib.sourceforge.net }
20
{ The contents of this file are used with permission, subject to the Mozilla }
21
{ Public License Version 1.1 (the "License"); you may not use this file except }
22
{ in compliance with the License. You may obtain a copy of the License at }
23
{ http://www.mozilla.org/MPL/MPL-1.1.html }
25
{ Software distributed under the License is distributed on an "AS IS" basis, }
26
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
27
{ the specific language governing rights and limitations under the License. }
29
{ Alternatively, the contents of this file may be used under the terms of the }
30
{ GNU Lesser General Public License (the "LGPL License"), in which case the }
31
{ provisions of the LGPL License are applicable instead of those above. }
32
{ If you wish to allow use of your version of this file only under the terms }
33
{ of the LGPL License and not to allow others to use your version of this file }
34
{ under the MPL, indicate your decision by deleting the provisions above and }
35
{ replace them with the notice and other provisions required by the LGPL }
36
{ License. If you do not delete the provisions above, a recipient may use }
37
{ your version of this file under either the MPL or the LGPL License. }
39
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
41
{******************************************************************************}
49
{$HPPEMIT '#include "WinEFS.h"'}
51
{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE_HASH *PPENCRYPTION_CERTIFICATE_HASH'}
52
{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE *PPENCRYPTION_CERTIFICATE'}
53
{$HPPEMIT 'typedef PENCRYPTION_CERTIFICATE_HASH_LIST *PPENCRYPTION_CERTIFICATE_HASH_LIST'}
61
JwaWinBase, JwaWinNT, JwaWinType;
68
// Encoded Certificate
72
PEFS_CERTIFICATE_BLOB = ^EFS_CERTIFICATE_BLOB;
73
{$EXTERNALSYM PEFS_CERTIFICATE_BLOB}
74
_CERTIFICATE_BLOB = record
75
dwCertEncodingType: DWORD;
79
{$EXTERNALSYM _CERTIFICATE_BLOB}
80
EFS_CERTIFICATE_BLOB = _CERTIFICATE_BLOB;
81
{$EXTERNALSYM EFS_CERTIFICATE_BLOB}
82
TEfsCertificateBlob = EFS_CERTIFICATE_BLOB;
83
PEfsCertificateBlob = PEFS_CERTIFICATE_BLOB;
89
PEFS_HASH_BLOB = ^EFS_HASH_BLOB;
90
{$EXTERNALSYM PEFS_HASH_BLOB}
91
_EFS_HASH_BLOB = record
95
{$EXTERNALSYM _EFS_HASH_BLOB}
96
EFS_HASH_BLOB = _EFS_HASH_BLOB;
97
{$EXTERNALSYM EFS_HASH_BLOB}
98
TEfsHashBlob = EFS_HASH_BLOB;
99
PEfsHashBlob = PEFS_HASH_BLOB;
105
_EFS_RPC_BLOB = record
109
{$EXTERNALSYM _EFS_RPC_BLOB}
110
EFS_RPC_BLOB = _EFS_RPC_BLOB;
111
{$EXTERNALSYM EFS_RPC_BLOB}
112
PEFS_RPC_BLOB = ^EFS_RPC_BLOB;
113
{$EXTERNALSYM PEFS_RPC_BLOB}
114
TEfsRpcBlob = EFS_RPC_BLOB;
115
PEfsRpcBlob = PEFS_RPC_BLOB;
117
_EFS_KEY_INFO = record
123
{$EXTERNALSYM _EFS_KEY_INFO}
124
EFS_KEY_INFO = _EFS_KEY_INFO;
125
{$EXTERNALSYM EFS_KEY_INFO}
126
PEFS_KEY_INFO = ^EFS_KEY_INFO;
127
{$EXTERNALSYM PEFS_KEY_INFO}
128
TEfsKeyInfo = EFS_KEY_INFO;
129
PEfsKeyInfo = PEFS_KEY_INFO;
132
// Input to add a user to an encrypted file
135
PENCRYPTION_CERTIFICATE = ^ENCRYPTION_CERTIFICATE;
136
{$EXTERNALSYM PENCRYPTION_CERTIFICATE}
137
_ENCRYPTION_CERTIFICATE = record
138
cbTotalLength: DWORD;
140
pCertBlob: PEFS_CERTIFICATE_BLOB;
142
{$EXTERNALSYM _ENCRYPTION_CERTIFICATE}
143
ENCRYPTION_CERTIFICATE = _ENCRYPTION_CERTIFICATE;
144
{$EXTERNALSYM ENCRYPTION_CERTIFICATE}
145
TEncryptionCertificate = ENCRYPTION_CERTIFICATE;
146
PEncryptionCertificate = PENCRYPTION_CERTIFICATE;
150
{$EXTERNALSYM MAX_SID_SIZE}
153
PENCRYPTION_CERTIFICATE_HASH = ^ENCRYPTION_CERTIFICATE_HASH;
154
{$EXTERNALSYM PENCRYPTION_CERTIFICATE_HASH}
155
_ENCRYPTION_CERTIFICATE_HASH = record
156
cbTotalLength: DWORD;
158
pHash: PEFS_HASH_BLOB;
159
lpDisplayInformation: LPWSTR;
161
{$EXTERNALSYM _ENCRYPTION_CERTIFICATE_HASH}
162
ENCRYPTION_CERTIFICATE_HASH = _ENCRYPTION_CERTIFICATE_HASH;
163
{$EXTERNALSYM ENCRYPTION_CERTIFICATE_HASH}
164
TEncryptionCertificateHash = ENCRYPTION_CERTIFICATE_HASH;
165
PEncryptionCertificateHash = PENCRYPTION_CERTIFICATE_HASH;
167
PPENCRYPTION_CERTIFICATE_HASH = ^PENCRYPTION_CERTIFICATE_HASH;
168
{$NODEFINE PPENCRYPTION_CERTIFICATE_HASH}
170
PENCRYPTION_CERTIFICATE_HASH_LIST = ^ENCRYPTION_CERTIFICATE_HASH_LIST;
171
{$EXTERNALSYM PENCRYPTION_CERTIFICATE_HASH_LIST}
172
_ENCRYPTION_CERTIFICATE_HASH_LIST = record
174
pUsers: PPENCRYPTION_CERTIFICATE_HASH;
176
{$EXTERNALSYM _ENCRYPTION_CERTIFICATE_HASH_LIST}
177
ENCRYPTION_CERTIFICATE_HASH_LIST = _ENCRYPTION_CERTIFICATE_HASH_LIST;
178
{$EXTERNALSYM ENCRYPTION_CERTIFICATE_HASH_LIST}
179
TEncryptionCertificateHashList = ENCRYPTION_CERTIFICATE_HASH_LIST;
180
PEncryptionCertificateHashList = PENCRYPTION_CERTIFICATE_HASH_LIST;
182
PPENCRYPTION_CERTIFICATE = ^PENCRYPTION_CERTIFICATE;
183
{$NODEFINE PPENCRYPTION_CERTIFICATE}
185
PENCRYPTION_CERTIFICATE_LIST = ^ENCRYPTION_CERTIFICATE_LIST;
186
{$EXTERNALSYM PENCRYPTION_CERTIFICATE_LIST}
187
_ENCRYPTION_CERTIFICATE_LIST = record
189
pUsers: PPENCRYPTION_CERTIFICATE;
191
{$EXTERNALSYM _ENCRYPTION_CERTIFICATE_LIST}
192
ENCRYPTION_CERTIFICATE_LIST = _ENCRYPTION_CERTIFICATE_LIST;
193
{$EXTERNALSYM ENCRYPTION_CERTIFICATE_LIST}
194
TEncryptionCertificateList = ENCRYPTION_CERTIFICATE_LIST;
195
PEncryptionCertificateList = PENCRYPTION_CERTIFICATE_LIST;
197
PPENCRYPTION_CERTIFICATE_HASH_LIST = ^PENCRYPTION_CERTIFICATE_HASH_LIST;
198
{$NODEFINE PPENCRYPTION_CERTIFICATE_HASH_LIST}
200
function QueryUsersOnEncryptedFile(lpFileName: LPCWSTR;
201
var pUsers: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
202
{$EXTERNALSYM QueryUsersOnEncryptedFile}
204
function QueryRecoveryAgentsOnEncryptedFile(lpFileName: LPCWSTR;
205
var pRecoveryAgents: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
206
{$EXTERNALSYM QueryRecoveryAgentsOnEncryptedFile}
208
function RemoveUsersFromEncryptedFile(lpFileName: LPCWSTR;
209
pHashes: PENCRYPTION_CERTIFICATE_HASH_LIST): DWORD; stdcall;
210
{$EXTERNALSYM RemoveUsersFromEncryptedFile}
212
function AddUsersToEncryptedFile(lpFileName: LPCWSTR;
213
pUsers: PENCRYPTION_CERTIFICATE_LIST): DWORD; stdcall;
214
{$EXTERNALSYM AddUsersToEncryptedFile}
216
function SetUserFileEncryptionKey(pEncryptionCertificate: PENCRYPTION_CERTIFICATE): DWORD; stdcall;
217
{$EXTERNALSYM SetUserFileEncryptionKey}
219
procedure FreeEncryptionCertificateHashList(pHashes: PENCRYPTION_CERTIFICATE_HASH_LIST); stdcall;
220
{$EXTERNALSYM FreeEncryptionCertificateHashList}
222
function EncryptionDisable(DirPath: LPCWSTR; Disable: BOOL): BOOL; stdcall;
223
{$EXTERNALSYM EncryptionDisable}
225
function DuplicateEncryptionInfoFile(SrcFileName, DstFileName: LPCWSTR; dwCreationDistribution,
226
dwAttributes: DWORD; lpSecurityAttributes: LPSECURITY_ATTRIBUTES): DWORD; stdcall;
227
{$EXTERNALSYM DuplicateEncryptionInfoFile}
232
advapi32 = 'advapi32.dll';
234
{$IFDEF DYNAMIC_LINK}
237
_QueryUsersOnEncryptedFile: Pointer;
239
function QueryUsersOnEncryptedFile;
241
GetProcedureAddress(_QueryUsersOnEncryptedFile, advapi32, 'QueryUsersOnEncryptedFile');
245
JMP [_QueryUsersOnEncryptedFile]
250
_QueryRecoveryAgentsOnEncrFile: Pointer;
252
function QueryRecoveryAgentsOnEncryptedFile;
254
GetProcedureAddress(_QueryRecoveryAgentsOnEncrFile, advapi32, 'QueryRecoveryAgentsOnEncryptedFile');
258
JMP [_QueryRecoveryAgentsOnEncrFile]
263
_RemoveUsersFromEncryptedFile: Pointer;
265
function RemoveUsersFromEncryptedFile;
267
GetProcedureAddress(_RemoveUsersFromEncryptedFile, advapi32, 'RemoveUsersFromEncryptedFile');
271
JMP [_RemoveUsersFromEncryptedFile]
276
_AddUsersToEncryptedFile: Pointer;
278
function AddUsersToEncryptedFile;
280
GetProcedureAddress(_AddUsersToEncryptedFile, advapi32, 'AddUsersToEncryptedFile');
284
JMP [_AddUsersToEncryptedFile]
289
_SetUserFileEncryptionKey: Pointer;
291
function SetUserFileEncryptionKey;
293
GetProcedureAddress(_SetUserFileEncryptionKey, advapi32, 'SetUserFileEncryptionKey');
297
JMP [_SetUserFileEncryptionKey]
302
_FreeEncrCertificateHashList: Pointer;
304
procedure FreeEncryptionCertificateHashList;
306
GetProcedureAddress(_FreeEncrCertificateHashList, advapi32, 'FreeEncryptionCertificateHashList');
310
JMP [_FreeEncrCertificateHashList]
315
_EncryptionDisable: Pointer;
317
function EncryptionDisable;
319
GetProcedureAddress(_EncryptionDisable, advapi32, 'EncryptionDisable');
323
JMP [_EncryptionDisable]
328
_DuplicateEncryptionInfoFile: Pointer;
330
function DuplicateEncryptionInfoFile;
332
GetProcedureAddress(_DuplicateEncryptionInfoFile, advapi32, 'DuplicateEncryptionInfoFile');
336
JMP [_DuplicateEncryptionInfoFile]
342
function QueryUsersOnEncryptedFile; external advapi32 name 'QueryUsersOnEncryptedFile';
343
function QueryRecoveryAgentsOnEncryptedFile; external advapi32 name 'QueryRecoveryAgentsOnEncryptedFile';
344
function RemoveUsersFromEncryptedFile; external advapi32 name 'RemoveUsersFromEncryptedFile';
345
function AddUsersToEncryptedFile; external advapi32 name 'AddUsersToEncryptedFile';
346
function SetUserFileEncryptionKey; external advapi32 name 'SetUserFileEncryptionKey';
347
procedure FreeEncryptionCertificateHashList; external advapi32 name 'FreeEncryptionCertificateHashList';
348
function EncryptionDisable; external advapi32 name 'EncryptionDisable';
349
function DuplicateEncryptionInfoFile; external advapi32 name 'DuplicateEncryptionInfoFile';
351
{$ENDIF DYNAMIC_LINK}