33static const char regpath_root[] =
"Software\\Microsoft\\PCHealth\\ErrorReporting";
46 if (!pOpenProcessToken)
49 pOpenProcessToken = (
void*)
GetProcAddress(hadvapi32,
"OpenProcessToken");
50 pCheckTokenMembership = (
void*)
GetProcAddress(hadvapi32,
"CheckTokenMembership");
51 if (!pCheckTokenMembership || !pOpenProcessToken)
54 trace(
"missing pOpenProcessToken or CheckTokenMembership\n");
61 0, 0, 0, 0, 0, 0, &
Group) ||
62 !pCheckTokenMembership(
NULL,
Group, &IsInGroup))
64 trace(
"Could not check if the current user is an administrator\n");
72 0, 0, 0, 0, 0, 0, &
Group) ||
73 !pCheckTokenMembership(
NULL,
Group, &IsInGroup))
75 trace(
"Could not check if the current user is a power user\n");
112 skip(
"Not enough access rights\n");
137 ok(!
res,
"AddERExcludedApplicationA should have failed got %d\n",
res);
static SID_IDENTIFIER_AUTHORITY NtAuthority
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegDeleteValueA(HKEY hKey, LPCSTR lpValueName)
BOOL WINAPI GetTokenInformation(HANDLE TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, LPVOID TokenInformation, DWORD TokenInformationLength, PDWORD ReturnLength)
BOOL WINAPI AllocateAndInitializeSid(PSID_IDENTIFIER_AUTHORITY pIdentifierAuthority, BYTE nSubAuthorityCount, DWORD nSubAuthority0, DWORD nSubAuthority1, DWORD nSubAuthority2, DWORD nSubAuthority3, DWORD nSubAuthority4, DWORD nSubAuthority5, DWORD nSubAuthority6, DWORD nSubAuthority7, PSID *pSid)
#define GetProcAddress(x, y)
#define GetCurrentProcess()
#define ERROR_ACCESS_DENIED
BOOL WINAPI AddERExcludedApplicationA(LPCSTR lpAppFileName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
GLuint GLuint GLsizei GLenum type
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
static const char regpath_root[]
static BOOL is_process_limited(void)
static void test_AddERExcludedApplicationA(void)
static const char regpath_exclude[]
DWORD WINAPI GetLastError(void)
enum _TOKEN_ELEVATION_TYPE TOKEN_ELEVATION_TYPE
@ TokenElevationTypeLimited
@ TokenElevationTypeDefault
#define HKEY_LOCAL_MACHINE
#define SECURITY_BUILTIN_DOMAIN_RID
#define SECURITY_NT_AUTHORITY
#define DOMAIN_ALIAS_RID_POWER_USERS
#define DOMAIN_ALIAS_RID_ADMINS