From: Austin English Subject: advapi32: add stubs for *EncryptedFileRaw* functions Message-Id: Date: Wed, 13 Aug 2014 14:39:37 -0500 Fixes https://bugs.winehq.org/show_bug.cgi?id=37100 -- -Austin
Fixes https://bugs.winehq.org/show_bug.cgi?id=37100

--
-Austin
From 8ea99d037f893f38322a70d6af9485ec4783f9e7 Mon Sep 17 00:00:00 2001 From: Austin English Date: Wed, 13 Aug 2014 14:37:08 -0500 Subject: [PATCH] advapi32: add stubs for *EncryptedFileRaw* functions --- dlls/advapi32/advapi32.spec | 10 +++++----- dlls/advapi32/crypt.c | 29 +++++++++++++++++++++++++++++ include/winbase.h | 26 ++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 5 deletions(-) diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index b4bf440..120294a 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -84,7 +84,7 @@ @ stdcall ClearEventLogA (long str) @ stdcall ClearEventLogW (long wstr) # @ stub CloseCodeAuthzLevel -# @ stub CloseEncryptedFileRaw +@ stub CloseEncryptedFileRaw(ptr) @ stdcall CloseEventLog (long) @ stdcall CloseServiceHandle(long) # @ stub CloseThreadWaitChainSession @@ -507,8 +507,8 @@ @ stdcall ObjectPrivilegeAuditAlarmW(wstr ptr long long ptr long) @ stdcall OpenBackupEventLogA (str str) @ stdcall OpenBackupEventLogW (wstr wstr) -# @ stub OpenEncryptedFileRawA -# @ stub OpenEncryptedFileRawW +@ stub OpenEncryptedFileRawA(str long ptr) +@ stub OpenEncryptedFileRawW(wstr long ptr) @ stdcall OpenEventLogA (str str) @ stdcall OpenEventLogW (wstr wstr) @ stdcall OpenProcessToken(long long ptr) @@ -566,7 +566,7 @@ @ stdcall QueryTraceW(int64 wstr ptr) # @ stub QueryUsersOnEncryptedFile @ stdcall QueryWindows31FilesMigration(long) -# @ stub ReadEncryptedFileRaw +@ stub ReadEncryptedFileRaw(ptr ptr ptr) @ stdcall ReadEventLogA (long long long ptr long ptr ptr) @ stdcall ReadEventLogW (long long long ptr long ptr ptr) @ stdcall RegCloseKey(long) @@ -825,4 +825,4 @@ # @ stub WmiSetSingleItemA # @ stub WmiSetSingleItemW # @ stub Wow64Win32ApiEntry -# @ stub WriteEncryptedFileRaw +@ stub WriteEncryptedFileRaw(ptr ptr ptr) diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c index 2c5e411..8b4a3db 100644 --- a/dlls/advapi32/crypt.c +++ b/dlls/advapi32/crypt.c @@ -2259,6 +2259,35 @@ BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, const BYTE *pbSignature, DW return result; } +DWORD WINAPI OpenEncryptedFileRawA(LPCSTR filename, ULONG flags, PVOID *context) +{ + FIXME("(%s, %x, %p): stub\n", debugstr_a(filename), flags, context); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +DWORD WINAPI OpenEncryptedFileRawW(LPCWSTR filename, ULONG flags, PVOID *context) +{ + FIXME("(%s, %x, %p): stub\n", debugstr_w(filename), flags, context); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +DWORD WINAPI ReadEncryptedFileRaw(PFE_EXPORT_FUNC export, PVOID callback, PVOID context) +{ + FIXME("(%p, %p, %p): stub\n", export, callback, context); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC import, PVOID callback, PVOID context) +{ + FIXME("(%p, %p, %p): stub\n", import, callback, context); + return ERROR_CALL_NOT_IMPLEMENTED; +} + +void WINAPI CloseEncryptedFileRaw(PVOID context) +{ + FIXME("(%p): stub\n", context); +} + /****************************************************************************** * SystemFunction030 (ADVAPI32.@) * diff --git a/include/winbase.h b/include/winbase.h index 3cbddc6..443534e 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -704,6 +704,26 @@ typedef struct _TIME_ZONE_INFORMATION{ #define FILE_READ_ONLY 8 #define FILE_DIR_DISALOWED 9 +typedef DWORD (WINAPI *PFE_EXPORT_FUNC) +( + PBYTE pbData, + PVOID pvCallbackContext, + ULONG ulLength +) ; + +typedef DWORD WINAPI (*PFE_IMPORT_FUNC) +( + PBYTE pbData, + PVOID pvCallbackContext, + ULONG ulLength +) ; + +/* OpenRaw flags */ +#define CREATE_FOR_IMPORT (1) +#define CREATE_FOR_DIR (2) +#define OVERWRITE_HIDDEN (4) +#define EFSRPC_SECURE_ONLY (8) + /* File creation flags */ #define FILE_FLAG_WRITE_THROUGH 0x80000000 @@ -1584,6 +1604,7 @@ WINBASEAPI BOOL WINAPI ChangeTimerQueueTimer(HANDLE,HANDLE,ULONG,ULONG); WINADVAPI BOOL WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL); WINBASEAPI BOOL WINAPI ClearCommBreak(HANDLE); WINBASEAPI BOOL WINAPI ClearCommError(HANDLE,LPDWORD,LPCOMSTAT); +WINADVAPI VOID WINAPI CloseEncryptedFileRaw(PVOID); WINADVAPI BOOL WINAPI ClearEventLogA(HANDLE,LPCSTR); WINADVAPI BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR); #define ClearEventLog WINELIB_NAME_AW(ClearEventLog) @@ -2204,6 +2225,9 @@ WINADVAPI BOOL WINAPI ObjectPrivilegeAuditAlarmW(LPCWSTR,LPVOID,HANDLE,D WINADVAPI HANDLE WINAPI OpenBackupEventLogA(LPCSTR,LPCSTR); WINADVAPI HANDLE WINAPI OpenBackupEventLogW(LPCWSTR,LPCWSTR); #define OpenBackupEventLog WINELIB_NAME_AW(OpenBackupEventLog) +WINADVAPI DWORD WINAPI OpenEncryptedFileRawA(LPCSTR,ULONG,PVOID *); +WINADVAPI DWORD WINAPI OpenEncryptedFileRawW(LPCWSTR,ULONG,PVOID *); +#define OpenEncryptedFileRaw WINELIB_NAME_AW(OpenEncryptedFileRaw) WINBASEAPI HANDLE WINAPI OpenEventA(DWORD,BOOL,LPCSTR); WINBASEAPI HANDLE WINAPI OpenEventW(DWORD,BOOL,LPCWSTR); #define OpenEvent WINELIB_NAME_AW(OpenEvent) @@ -2262,6 +2286,7 @@ WINADVAPI BOOL WINAPI ReadEventLogA(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWOR WINADVAPI BOOL WINAPI ReadEventLogW(HANDLE,DWORD,DWORD,LPVOID,DWORD,DWORD *,DWORD *); #define ReadEventLog WINELIB_NAME_AW(ReadEventLog) WINBASEAPI BOOL WINAPI ReadDirectoryChangesW(HANDLE,LPVOID,DWORD,BOOL,DWORD,LPDWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); +WINADVAPI DWORD WINAPI ReadEncryptedFileRaw(PFE_EXPORT_FUNC export, PVOID callback, PVOID context); WINBASEAPI BOOL WINAPI ReadFile(HANDLE,LPVOID,DWORD,LPDWORD,LPOVERLAPPED); WINBASEAPI BOOL WINAPI ReadFileEx(HANDLE,LPVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); WINBASEAPI BOOL WINAPI ReadFileScatter(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED); @@ -2446,6 +2471,7 @@ WINBASEAPI UINT WINAPI WinExec(LPCSTR,UINT); WINBASEAPI BOOL WINAPI Wow64DisableWow64FsRedirection(PVOID*); WINBASEAPI BOOLEAN WINAPI Wow64EnableWow64FsRedirection(BOOLEAN); WINBASEAPI BOOL WINAPI Wow64RevertWow64FsRedirection(PVOID); +WINADVAPI DWORD WINAPI WriteEncryptedFileRaw(PFE_IMPORT_FUNC,PVOID,PVOID); WINBASEAPI BOOL WINAPI WriteFile(HANDLE,LPCVOID,DWORD,LPDWORD,LPOVERLAPPED); WINBASEAPI BOOL WINAPI WriteFileEx(HANDLE,LPCVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); WINBASEAPI BOOL WINAPI WriteFileGather(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED); -- 2.0.4