From 481a67e887470874c4c000315bb5a0f3ddd915ea Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Sat, 17 Apr 2004 00:23:50 +0000 Subject: [PATCH] Documentation for SystemFunction040 and SystemFunction041 has become available, so stub them out in case applications use them. --- dlls/advapi32/advapi32.spec | 4 ++-- dlls/advapi32/crypt.c | 40 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index 83b197a655d..b816e418d8f 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -315,8 +315,8 @@ @ stub SystemFunction034 @ stub SystemFunction035 @ stub SystemFunction036 -@ stub SystemFunction040 -@ stub SystemFunction041 +@ stdcall SystemFunction040(ptr long long) # RtlEncryptMemory +@ stdcall SystemFunction041(ptr long long) # RtlDecryptMemory @ stub TraceEvent @ stub TraceEventInstance @ stub TraceMessage diff --git a/dlls/advapi32/crypt.c b/dlls/advapi32/crypt.c index 18b72608c56..03631978de4 100644 --- a/dlls/advapi32/crypt.c +++ b/dlls/advapi32/crypt.c @@ -39,6 +39,8 @@ #include "winbase.h" #include "winuser.h" #include "wine/debug.h" +#include "winternl.h" +#include "ntstatus.h" WINE_DEFAULT_DEBUG_CHANNEL(crypt); @@ -1344,3 +1346,41 @@ BOOL WINAPI CryptVerifySignatureA (HCRYPTHASH hHash, BYTE *pbSignature, DWORD dw return prov->pFuncs->pCPVerifySignature(prov->hPrivate, hash->hPrivate, pbSignature, dwSigLen, key->hPrivate, NULL, dwFlags); } + + +/* + These functions have nearly identical prototypes to CryptProtectMemory and CryptUnprotectMemory, + in crypt32.dll. + */ + +/****************************************************************************** + * SystemFunction040 (ADVAPI32.@) + * + * PARAMS: + * memory : pointer to memory to encrypt + * length : length of region to encrypt, in bytes. must be multiple of RTL_ENCRYPT_MEMORY_SIZE + * flags : RTL_ENCRYPT_OPTION_SAME_PROCESS | RTL_ENCRYPT_OPTION_CROSS_PROCESS, | RTL_ENCRYPT_OPTION_SAME_LOGON + * control whether other processes are able to decrypt the memory. The same value must be given + * when decrypting the memory. + */ +NTSTATUS WINAPI SystemFunction040(PVOID memory, ULONG length, ULONG flags) /* RtlEncryptMemory */ +{ + FIXME("(%p, %lx, %lx): stub [RtlEncryptMemory]\n", memory, length, flags); + return STATUS_SUCCESS; +} + +/****************************************************************************** + * SystemFunction041 (ADVAPI32.@) + * + * PARAMS: + * memory : pointer to memory to decrypt + * length : length of region to decrypt, in bytes. must be multiple of RTL_ENCRYPT_MEMORY_SIZE + * flags : RTL_ENCRYPT_OPTION_SAME_PROCESS | RTL_ENCRYPT_OPTION_CROSS_PROCESS, | RTL_ENCRYPT_OPTION_SAME_LOGON + * control whether other processes are able to decrypt the memory. The same value must be given + * when encrypting the memory. + */ +NTSTATUS WINAPI SystemFunction041(PVOID memory, ULONG length, ULONG flags) /* RtlDecryptMemory */ +{ + FIXME("(%p, %lx, %lx): stub [RtlDecryptMemory]\n", memory, length, flags); + return STATUS_SUCCESS; +}