advapi32: Add a stub implementation of SaferIdentifyLevel.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2019-03-06 10:14:27 +01:00 committed by Alexandre Julliard
parent 98ea906b96
commit 8021d449f4
3 changed files with 40 additions and 3 deletions

View File

@ -717,7 +717,7 @@
@ stdcall SaferCreateLevel(long long long ptr ptr)
# @ stub SaferGetLevelInformation
@ stdcall SaferGetPolicyInformation(long long long ptr ptr ptr)
# @ stub SaferIdentifyLevel
@ stdcall SaferIdentifyLevel(long ptr ptr ptr)
# @ stub SaferRecordEventLogEntry
@ stdcall SaferSetLevelInformation(ptr long ptr long)
# @ stub SaferSetPolicyInformation

View File

@ -6184,6 +6184,17 @@ BOOL WINAPI SaferGetPolicyInformation(DWORD scope, SAFER_POLICY_INFO_CLASS class
return FALSE;
}
/******************************************************************************
* SaferIdentifyLevel [ADVAPI32.@]
*/
BOOL WINAPI SaferIdentifyLevel(DWORD count, SAFER_CODE_PROPERTIES *properties, SAFER_LEVEL_HANDLE *handle,
void *reserved)
{
FIXME("(%u %p %p %p) stub\n", count, properties, handle, reserved);
*handle = (SAFER_LEVEL_HANDLE)0xdeadbeef;
return TRUE;
}
/******************************************************************************
* SaferSetLevelInformation [ADVAPI32.@]
*/

View File

@ -30,6 +30,32 @@ extern "C" {
DECLARE_HANDLE(SAFER_LEVEL_HANDLE);
#define SAFER_MAX_HASH_SIZE 64
#include <pshpack8.h>
typedef struct _SAFER_CODE_PROPERTIES_V2 {
DWORD cbSize;
DWORD dwCheckFlags;
LPCWSTR ImagePath;
HANDLE hImageFileHandle;
DWORD UrlZoneId;
BYTE ImageHash[SAFER_MAX_HASH_SIZE];
DWORD dwImageHashSize;
LARGE_INTEGER ImageSize;
ALG_ID HashAlgorithm;
LPBYTE pByteBlock;
HWND hWndParent;
DWORD dwWVTUIChoice;
LPCWSTR PackageMoniker;
LPCWSTR PackagePublisher;
LPCWSTR PackageName;
ULONG64 PackageVersion;
BOOL PackageIsFramework;
} SAFER_CODE_PROPERTIES_V2, *PSAFER_CODE_PROPERTIES_V2;
typedef SAFER_CODE_PROPERTIES_V2 SAFER_CODE_PROPERTIES, *PSAFER_CODE_PROPERTIES;
#include <poppack.h>
#define SAFER_SCOPEID_MACHINE 1
#define SAFER_SCOPEID_USER 2
@ -41,8 +67,6 @@ DECLARE_HANDLE(SAFER_LEVEL_HANDLE);
#define SAFER_LEVEL_OPEN 1
WINADVAPI BOOL WINAPI SaferCreateLevel(DWORD,DWORD,DWORD,SAFER_LEVEL_HANDLE*,LPVOID);
typedef enum _SAFER_POLICY_INFO_CLASS {
SaferPolicyLevelList = 1,
SaferPolicyEnableTransparentEnforcement,
@ -70,7 +94,9 @@ typedef enum _SAFER_OBJECT_INFO_CLASS {
SaferObjectExtendedError
} SAFER_OBJECT_INFO_CLASS;
WINADVAPI BOOL WINAPI SaferCreateLevel(DWORD,DWORD,DWORD,SAFER_LEVEL_HANDLE*,LPVOID);
WINADVAPI BOOL WINAPI SaferGetPolicyInformation(DWORD,SAFER_POLICY_INFO_CLASS,DWORD,PVOID,PDWORD,LPVOID);
WINADVAPI BOOL WINAPI SaferIdentifyLevel(DWORD,PSAFER_CODE_PROPERTIES,SAFER_LEVEL_HANDLE*,LPVOID);
WINADVAPI BOOL WINAPI SaferSetLevelInformation(SAFER_LEVEL_HANDLE,SAFER_OBJECT_INFO_CLASS,LPVOID,DWORD);
#ifdef __cplusplus