home *** CD-ROM | disk | FTP | other *** search
/ Magazyn Internet 2000 May / MICD_2000_05.iso / CBuilder5 / INSTALL / DATA1.CAB / Program_Built_Files / Include / winefs.h < prev    next >
C/C++ Source or Header  |  2000-02-01  |  4KB  |  196 lines

  1. //+---------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright (C) Microsoft Corporation, 1992-1999.
  5. //
  6. //  File:       winefs.h
  7. //
  8. //  Contents:   EFS Data and prototypes.
  9. //
  10. //----------------------------------------------------------------------------
  11.  
  12. #ifndef __WINEFS_H__
  13. #pragma option push -b -a8 -pc -A- /*P_O_Push*/
  14. #define __WINEFS_H__
  15.  
  16. #if _MSC_VER > 1000
  17. #pragma once
  18. #endif
  19.  
  20.  
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24.  
  25. //+---------------------------------------------------------------------------------/
  26. //                                                                                  /
  27. //                                                                                  /
  28. //                          Data Structures                                         /
  29. //                                                                                  /
  30. //                                                                                  /
  31. //----------------------------------------------------------------------------------/
  32.  
  33.  
  34. //
  35. //  Encoded Certificate
  36. //
  37.  
  38.  
  39. typedef struct _CERTIFICATE_BLOB {
  40.  
  41.     DWORD   dwCertEncodingType;
  42.  
  43.     DWORD   cbData;
  44.  
  45. #ifdef MIDL_PASS
  46.     [size_is(cbData)]
  47. #endif // MIDL_PASS
  48.     PBYTE    pbData;
  49.  
  50. } EFS_CERTIFICATE_BLOB, *PEFS_CERTIFICATE_BLOB;
  51.  
  52.  
  53. //
  54. //  Certificate Hash
  55. //
  56.  
  57. typedef struct _EFS_HASH_BLOB {
  58.  
  59.     DWORD   cbData;
  60.  
  61. #ifdef MIDL_PASS
  62.     [size_is(cbData)]
  63. #endif // MIDL_PASS
  64.     PBYTE    pbData;
  65.  
  66. } EFS_HASH_BLOB, *PEFS_HASH_BLOB;
  67.  
  68.  
  69.  
  70. //
  71. // Input to add a user to an encrypted file
  72. //
  73.  
  74.  
  75. typedef struct _ENCRYPTION_CERTIFICATE {
  76.     DWORD cbTotalLength;
  77.     SID * pUserSid;
  78.     PEFS_CERTIFICATE_BLOB pCertBlob;
  79. } ENCRYPTION_CERTIFICATE, *PENCRYPTION_CERTIFICATE;
  80.  
  81. #define MAX_SID_SIZE 256
  82.  
  83.  
  84. typedef struct _ENCRYPTION_CERTIFICATE_HASH {
  85.     DWORD cbTotalLength;
  86.     SID * pUserSid;
  87.     PEFS_HASH_BLOB  pHash;
  88.  
  89. #ifdef MIDL_PASS
  90.     [string]
  91. #endif // MIDL_PASS
  92.     LPWSTR lpDisplayInformation;
  93.  
  94. } ENCRYPTION_CERTIFICATE_HASH, *PENCRYPTION_CERTIFICATE_HASH;
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. typedef struct _ENCRYPTION_CERTIFICATE_HASH_LIST {
  103.     DWORD nCert_Hash;
  104. #ifdef MIDL_PASS
  105.     [size_is(nCert_Hash)]
  106. #endif // MIDL_PASS
  107.      PENCRYPTION_CERTIFICATE_HASH * pUsers;
  108. } ENCRYPTION_CERTIFICATE_HASH_LIST, *PENCRYPTION_CERTIFICATE_HASH_LIST;
  109.  
  110.  
  111.  
  112. typedef struct _ENCRYPTION_CERTIFICATE_LIST {
  113.     DWORD nUsers;
  114. #ifdef MIDL_PASS
  115.     [size_is(nUsers)]
  116. #endif // MIDL_PASS
  117.      PENCRYPTION_CERTIFICATE * pUsers;
  118. } ENCRYPTION_CERTIFICATE_LIST, *PENCRYPTION_CERTIFICATE_LIST;
  119.  
  120.  
  121.  
  122.  
  123. //+---------------------------------------------------------------------------------/
  124. //                                                                                  /
  125. //                                                                                  /
  126. //                               Prototypes                                         /
  127. //                                                                                  /
  128. //                                                                                  /
  129. //----------------------------------------------------------------------------------/
  130.  
  131.  
  132. WINADVAPI
  133. DWORD
  134. WINAPI
  135. QueryUsersOnEncryptedFile(
  136.      IN LPCWSTR lpFileName,
  137.      OUT PENCRYPTION_CERTIFICATE_HASH_LIST * pUsers
  138.     );
  139.  
  140.  
  141. WINADVAPI
  142. DWORD
  143. WINAPI
  144. QueryRecoveryAgentsOnEncryptedFile(
  145.      IN LPCWSTR lpFileName,
  146.      OUT PENCRYPTION_CERTIFICATE_HASH_LIST * pRecoveryAgents
  147.     );
  148.  
  149.  
  150. WINADVAPI
  151. DWORD
  152. WINAPI
  153. RemoveUsersFromEncryptedFile(
  154.      IN LPCWSTR lpFileName,
  155.      IN PENCRYPTION_CERTIFICATE_HASH_LIST pHashes
  156.     );
  157.  
  158. WINADVAPI
  159. DWORD
  160. WINAPI
  161. AddUsersToEncryptedFile(
  162.      IN LPCWSTR lpFileName,
  163.      IN PENCRYPTION_CERTIFICATE_LIST pUsers
  164.     );
  165.  
  166. WINADVAPI
  167. DWORD
  168. WINAPI
  169. SetUserFileEncryptionKey(
  170.     IN PENCRYPTION_CERTIFICATE pEncryptionCertificate
  171.     );
  172.  
  173.  
  174. WINADVAPI
  175. VOID
  176. WINAPI
  177. FreeEncryptionCertificateHashList(
  178.     IN PENCRYPTION_CERTIFICATE_HASH_LIST pHashes
  179.     );
  180.  
  181. WINADVAPI
  182. BOOL
  183. WINAPI
  184. EncryptionDisable(
  185.     IN LPCWSTR DirPath,
  186.     IN BOOL Disable
  187.     );
  188.  
  189.  
  190. #ifdef __cplusplus
  191. }       // Balance extern "C" above
  192. #endif
  193.  
  194. #pragma option pop /*P_O_Pop*/
  195. #endif // __WINEFS_H__
  196.