ReactOS 0.4.15-dev-7924-g5949c20
SaferIdentifyLevel.c File Reference
#include "precomp.h"
#include <winsafer.h>
Include dependency graph for SaferIdentifyLevel.c:

Go to the source code of this file.

Macros

#define SaferIdentifyLevel(c, p, h, r)   SaferIdentifyLevel(c, (PSAFER_CODE_PROPERTIES)(p), h, r)
 

Functions

 START_TEST (SaferIdentifyLevel)
 

Macro Definition Documentation

◆ SaferIdentifyLevel

#define SaferIdentifyLevel (   c,
  p,
  h,
  r 
)    SaferIdentifyLevel(c, (PSAFER_CODE_PROPERTIES)(p), h, r)

Definition at line 12 of file SaferIdentifyLevel.c.

Function Documentation

◆ START_TEST()

START_TEST ( SaferIdentifyLevel  )

Definition at line 14 of file SaferIdentifyLevel.c.

15{
16 BOOL ret;
18 SAFER_LEVEL_HANDLE handle;
20
21 StartSeh()
22 SetLastError(0xbadbad00);
25 ok(ret == FALSE, "ret = %d\n", ret);
26 ok(error == ERROR_NOACCESS, "error = %lu\n", error);
28
29 StartSeh()
32
33 StartSeh()
35 SetLastError(0xbadbad00);
38 ok(ret == FALSE, "ret = %d\n", ret);
39 ok(error == ERROR_BAD_LENGTH, "error = %lu\n", error);
41
42 StartSeh()
44 SetLastError(0xbadbad00);
47 ok(ret == FALSE, "ret = %d\n", ret);
48 ok(error == ERROR_NOACCESS, "error = %lu\n", error);
50
51 StartSeh()
54 SetLastError(0xbadbad00);
57 ok(ret == FALSE, "ret = %d\n", ret);
59 ok(error == ERROR_BAD_LENGTH, "error = %lu\n", error);
63
64 /* Struct sizes */
65 StartSeh()
69 SetLastError(0xbadbad00);
72 ok(ret == TRUE, "ret = %d\n", ret);
74 ok(error == 0xbadbad00, "error = %lu\n", error);
76 {
78 ok(ret == TRUE, "ret = %d\n", ret);
79 }
81
82 StartSeh()
86 SetLastError(0xbadbad00);
89 ok(ret == FALSE, "ret = %d\n", ret);
91 ok(error == ERROR_BAD_LENGTH, "error = %lu\n", error);
95
96 /* Test SaferCloseLevel too */
97 StartSeh()
100 ok(ret == FALSE, "ret = %d\n", ret);
103
104 StartSeh()
107 ok(ret == FALSE, "ret = %d\n", ret);
110
111 StartSeh()
114 ok(ret == FALSE, "ret = %d\n", ret);
117}
#define InvalidPointer
#define SaferIdentifyLevel(c, p, h, r)
#define StartSeh()
Definition: _sntprintf.h:16
#define EndSeh(ExpectedStatus)
Definition: _sntprintf.h:17
#define ok(value,...)
Definition: atltest.h:57
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define SetLastError(x)
Definition: compat.h:752
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble n
Definition: glext.h:7729
GLfloat GLfloat p
Definition: glext.h:8902
#define d
Definition: ke_i.h:81
if(dx< 0)
Definition: linetemp.h:194
#define error(str)
Definition: mkdosfs.c:1605
#define STATUS_ACCESS_VIOLATION
Definition: ntstatus.h:242
BOOL WINAPI SaferCloseLevel(_In_ SAFER_LEVEL_HANDLE hLevelHandle)
Definition: safer.c:80
#define STATUS_SUCCESS
Definition: shellext.h:65
static const WCHAR props[]
Definition: wbemdisp.c:288
int ret
#define ZeroMemory
Definition: winbase.h:1712
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define ERROR_BAD_LENGTH
Definition: winerror.h:127
#define ERROR_NOACCESS
Definition: winerror.h:578
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList