Author: hpoussin Date: Wed Jun 7 21:24:49 2006 New Revision: 22271
URL: http://svn.reactos.ru/svn/reactos?rev=22271&view=rev Log: - Implement FileEncryptionStatusA - Fix FileEncryptionStatusW prototype - Fix EncryptionDisable stub
Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c
Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/advapi32/crypt/cry... ============================================================================== --- trunk/reactos/dll/win32/advapi32/crypt/crypt.c (original) +++ trunk/reactos/dll/win32/advapi32/crypt/crypt.c Wed Jun 7 21:24:49 2006 @@ -1981,25 +1981,42 @@ * @unimplemented */ BOOL WINAPI FileEncryptionStatusW ( - LPCWSTR lpcwstr, - LPDWORD lpdword + LPCWSTR lpFileName, + LPDWORD lpStatus ) { - DPRINT1("%s() not implemented!\n", __FUNCTION__); - return ERROR_CALL_NOT_IMPLEMENTED; + DPRINT1("%s(%S) not implemented!\n", __FUNCTION__, lpFileName); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; }
/* - * @unimplemented + * @implemented */ BOOL WINAPI FileEncryptionStatusA ( - LPCSTR lpcstr, - LPDWORD lpdword + LPCSTR lpFileName, + LPDWORD lpStatus ) { - DPRINT1("%s() not implemented!\n", __FUNCTION__); - return ERROR_CALL_NOT_IMPLEMENTED; + UNICODE_STRING FileName; + NTSTATUS Status; + BOOL ret = FALSE; + + FileName.Buffer = NULL; + + Status = RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName); + if (!NT_SUCCESS(Status)) + { + SetLastError(RtlNtStatusToDosError(Status)); + goto cleanup; + } + ret = FileEncryptionStatusW(FileName.Buffer, lpStatus); + +cleanup: + if (FileName.Buffer != NULL) + RtlFreeUnicodeString(&FileName); + return ret; }
/* @@ -2048,7 +2065,8 @@ ) { DPRINT1("%s() not implemented!\n", __FUNCTION__); - return ERROR_CALL_NOT_IMPLEMENTED; -} - - + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +