winnt.h: Implement RtlSecureZeroMemory.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2017-02-13 08:17:57 +00:00 committed by Alexandre Julliard
parent 8db78fdd1b
commit d5292b1fcf
2 changed files with 9 additions and 0 deletions

View File

@ -2778,6 +2778,7 @@ WINBASEAPI UINT WINAPI _lwrite(HFILE,LPCSTR,UINT);
#define MoveMemory RtlMoveMemory
#define ZeroMemory RtlZeroMemory
#define CopyMemory RtlCopyMemory
#define SecureZeroMemory RtlSecureZeroMemory
/* Wine internal functions */

View File

@ -5436,6 +5436,14 @@ typedef enum _CM_ERROR_CONTROL_TYPE
#define RtlFillMemory(Destination, Length, Fill) memset((Destination),(Fill),(Length))
#define RtlZeroMemory(Destination, Length) memset((Destination),0,(Length))
static FORCEINLINE void *RtlSecureZeroMemory(void *buffer, SIZE_T length)
{
volatile char *ptr = buffer;
while (length--) *ptr++ = 0;
return buffer;
}
#include <guiddef.h>
typedef struct _OBJECT_TYPE_LIST {