ReactOS  0.4.14-dev-1314-gacf135d
efs.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS system libraries
4  * FILE: dlls/win32/advapi32/misc/efs.c
5  * PURPOSE: Encrypted File System support
6  * PROGRAMMER: Christoph_vW
7  */
8 
9 #include <advapi32.h>
10 
11 #include <winefs.h>
12 
14 
15 /*
16  * @unimplemented
17  */
20  PENCRYPTION_CERTIFICATE_LIST pencryption_certificate_list)
21 {
22  FIXME("%s() not implemented!\n", __FUNCTION__);
24 }
25 
26 
27 /*
28  * @implemented
29  */
33 {
35  BOOL ret;
36 
38  {
40  return FALSE;
41  }
42 
44 
45  if (FileName.Buffer != NULL)
47  return ret;
48 }
49 
50 
51 /*
52  * @unimplemented
53  */
57 {
58  FIXME("%s(%S) not implemented!\n", __FUNCTION__, lpFileName);
59  return TRUE;
60 }
61 
62 
63 /*
64  * @implemented
65  */
68 {
70  BOOL ret;
71 
73  {
75  return FALSE;
76  }
77 
78  ret = EncryptFileW(FileName.Buffer);
79 
80  if (FileName.Buffer != NULL)
82  return ret;
83 }
84 
85 
86 /*
87  * @unimplemented
88  */
91 {
92  FIXME("%s() not implemented!\n", __FUNCTION__);
93  return TRUE;
94 }
95 
96 
97 /*
98  * @unimplemented
99  */
100 BOOL WINAPI
102  BOOL Disable)
103 {
104  FIXME("%s() not implemented!\n", __FUNCTION__);
106  return FALSE;
107 }
108 
109 
110 /*
111  * @implemented
112  */
113 BOOL WINAPI
115  LPDWORD lpStatus)
116 {
118  BOOL ret = FALSE;
119 
120  TRACE("(%s, %p)\n", lpFileName, lpStatus);
121 
122  FileName.Buffer = NULL;
123 
125  {
127  goto cleanup;
128  }
129 
130  ret = FileEncryptionStatusW(FileName.Buffer, lpStatus);
131 
132 cleanup:
133  if (FileName.Buffer != NULL)
135 
136  return ret;
137 }
138 
139 /*
140  * @unimplemented
141  */
142 BOOL WINAPI
144  LPDWORD lpStatus)
145 {
146  FIXME("%s(%S) not implemented!\n", __FUNCTION__, lpFileName);
147 
148  if (!lpStatus)
149  return FALSE;
150 
151  *lpStatus = FILE_SYSTEM_NOT_SUPPORT;
152 
153  return TRUE;
154 }
155 
156 
157 /*
158  * @unimplemented
159  */
160 VOID WINAPI
162 {
163  FIXME("%s() not implemented!\n", __FUNCTION__);
164  return;
165 }
166 
167 
168 /*
169  * @unimplemented
170  */
173  PENCRYPTION_CERTIFICATE_HASH_LIST* pencryption_certificate_hash_list)
174 {
175  FIXME("%s() not implemented!\n", __FUNCTION__);
177 }
178 
179 
180 /*
181  * @unimplemented
182  */
185  PENCRYPTION_CERTIFICATE_HASH_LIST* pencryption_certificate_hash_list)
186 {
187  FIXME("%s() not implemented!\n", __FUNCTION__);
189 }
190 
191 
192 /*
193  * @unimplemented
194  */
197  PENCRYPTION_CERTIFICATE_HASH_LIST pencryption_certificate_hash_list)
198 {
199  FIXME("%s() not implemented!\n", __FUNCTION__);
201 }
202 
203 /* EOF */
DWORD WINAPI QueryRecoveryAgentsOnEncryptedFile(LPCWSTR lpctstr, PENCRYPTION_CERTIFICATE_HASH_LIST *pencryption_certificate_hash_list)
Definition: efs.c:172
#define TRUE
Definition: types.h:120
WINE_DEFAULT_DEBUG_CHANNEL(advapi)
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
BOOL WINAPI DecryptFileA(LPCSTR lpFileName, DWORD dwReserved)
Definition: efs.c:31
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
BOOL WINAPI FileEncryptionStatusA(LPCSTR lpFileName, LPDWORD lpStatus)
Definition: efs.c:114
DWORD WINAPI QueryUsersOnEncryptedFile(LPCWSTR lpctstr, PENCRYPTION_CERTIFICATE_HASH_LIST *pencryption_certificate_hash_list)
Definition: efs.c:184
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
unsigned int BOOL
Definition: ntddk_ex.h:94
DWORD WINAPI AddUsersToEncryptedFile(LPCWSTR lpcwstr, PENCRYPTION_CERTIFICATE_LIST pencryption_certificate_list)
Definition: efs.c:19
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define FILE_SYSTEM_NOT_SUPPORT
Definition: winbase.h:31
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
const char * LPCSTR
Definition: xmlstorage.h:183
BOOL WINAPI EncryptionDisable(LPCWSTR DirPath, BOOL Disable)
Definition: efs.c:101
#define TRACE(s)
Definition: solgame.cpp:4
#define WINAPI
Definition: msvc.h:6
unsigned long DWORD
Definition: ntddk_ex.h:95
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define SetLastError(x)
Definition: compat.h:417
int ret
BOOL WINAPI EncryptFileW(LPCWSTR lpFileName)
Definition: efs.c:90
struct _FileName FileName
Definition: fatprocs.h:884
VOID WINAPI FreeEncryptionCertificateHashList(PENCRYPTION_CERTIFICATE_HASH_LIST pencryption_certificate_hash_list)
Definition: efs.c:161
BOOL WINAPI DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved)
Definition: efs.c:55
uint32_t * LPDWORD
Definition: typedefs.h:58
BOOL WINAPI FileEncryptionStatusW(LPCWSTR lpFileName, LPDWORD lpStatus)
Definition: efs.c:143
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
char * cleanup(char *str)
Definition: wpickclick.c:99
DWORD WINAPI RemoveUsersFromEncryptedFile(LPCWSTR lpcwstr, PENCRYPTION_CERTIFICATE_HASH_LIST pencryption_certificate_hash_list)
Definition: efs.c:196
BOOL WINAPI EncryptFileA(LPCSTR lpFileName)
Definition: efs.c:67
#define __FUNCTION__
Definition: types.h:112
_In_ LPCSTR lpFileName
Definition: winbase.h:3034