diff --git a/dlls/advapi32/advapi32.spec b/dlls/advapi32/advapi32.spec index e870a5d3e2a..eb1f5463357 100644 --- a/dlls/advapi32/advapi32.spec +++ b/dlls/advapi32/advapi32.spec @@ -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 diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index 70e2da40e7a..6891feea2a0 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -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.@] */ diff --git a/include/winsafer.h b/include/winsafer.h index 4855f53bda7..25654846d9f 100644 --- a/include/winsafer.h +++ b/include/winsafer.h @@ -30,6 +30,32 @@ extern "C" { DECLARE_HANDLE(SAFER_LEVEL_HANDLE); +#define SAFER_MAX_HASH_SIZE 64 + +#include +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 + #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