ReactOS  0.4.15-dev-309-g7c8d563
DefaultActCtx.c File Reference
#include "precomp.h"
Include dependency graph for DefaultActCtx.c:

Go to the source code of this file.

Functions

 START_TEST (DefaultActCtx)
 

Function Documentation

◆ START_TEST()

START_TEST ( DefaultActCtx  )

Definition at line 23 of file DefaultActCtx.c.

24 {
25  DWORD buffer[256];
26  BOOL res;
27  PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION details = (PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION)buffer;
28  PACTIVATION_CONTEXT_DETAILED_INFORMATION info = (PACTIVATION_CONTEXT_DETAILED_INFORMATION)buffer;
29  HANDLE h;
30  DWORD i;
31  ACTCTX_SECTION_KEYED_DATA KeyedData = { 0 };
32 
33  res = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
34  NULL,
35  NULL,
36  ActivationContextDetailedInformation,
37  &buffer,
38  sizeof(buffer),
39  NULL);
40  ok(res == TRUE, "Expected success\n");
41  if(res)
42  {
43  ok(info->lpRootManifestPath == NULL, "Expected null lpRootManifestPath, got %S\n", info->lpRootManifestPath);
44  ok(info->lpRootConfigurationPath == NULL, "Expected null lpRootConfigurationPath, got %S\n", info->lpRootConfigurationPath);
45  ok(info->lpAppDirPath == NULL, "Expected null lpAppDirPath, got %S\n", info->lpAppDirPath);
46  ok(info->ulAssemblyCount == 0, "Expected 0 assemblies\n");
47  }
48  else
49  {
50  skip("ActivationContextDetailedInformation failed\n");
51  }
52 
53 
54  i = 0;
55  res = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
56  NULL,
57  &i,
58  AssemblyDetailedInformationInActivationContext,
59  &buffer,
60  sizeof(buffer),
61  NULL);
62  ok(res == TRUE, "Expected success\n");
63  if (res)
64  {
65  ok(details->lpAssemblyEncodedAssemblyIdentity == NULL, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details->lpAssemblyEncodedAssemblyIdentity);
66  ok(details->lpAssemblyManifestPath == NULL, "Expected null lpAssemblyManifestPath, got %S\n", details->lpAssemblyManifestPath);
67  ok(details->lpAssemblyPolicyPath == NULL, "Expected null lpAssemblyPolicyPath, got %S\n", details->lpAssemblyPolicyPath);
68  ok(details->lpAssemblyDirectoryName == NULL, "Expected null lpAssemblyDirectoryName, got %S\n", details->lpAssemblyDirectoryName);
69  }
70  else
71  {
72  skip("AssemblyDetailedInformationInActivationContext failed\n");
73  }
74 
75  i = 1;
76  res = QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX,
77  NULL,
78  &i,
79  AssemblyDetailedInformationInActivationContext,
80  &buffer,
81  sizeof(buffer),
82  NULL);
83  ok(res == TRUE, "Expected success\n"); /* This is FALSE in win10 */
84  if (res)
85  {
86  ok(details->lpAssemblyEncodedAssemblyIdentity == NULL, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details->lpAssemblyEncodedAssemblyIdentity);
87  ok(details->lpAssemblyManifestPath == NULL, "Expected null lpAssemblyManifestPath, got %S\n", details->lpAssemblyManifestPath);
88  ok(details->lpAssemblyPolicyPath == NULL, "Expected null lpAssemblyPolicyPath, got %S\n", details->lpAssemblyPolicyPath);
89  ok(details->lpAssemblyDirectoryName == NULL, "Expected null lpAssemblyDirectoryName, got %S\n", details->lpAssemblyDirectoryName);
90  }
91  else
92  {
93  skip("AssemblyDetailedInformationInActivationContext failed\n");
94  }
95 
96  res = GetCurrentActCtx (&h);
97  ok(res == TRUE, "Expected success\n");
98  ok(h == NULL, "Expected null current context\n");
99 
100  KeyedData.cbSize = sizeof(KeyedData);
101  res = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX,
102  NULL,
103  ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
104  L"Microsoft.Windows.SysyemCompatible",
105  &KeyedData);
106  ok(res == FALSE, "Expected failure\n");
107 
108  KeyedData.cbSize = sizeof(KeyedData);
109  res = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX,
110  NULL,
111  ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
112  L"System Default Context",
113  &KeyedData);
114  ok(res == FALSE, "Expected failure\n");
115 
116  KeyedData.cbSize = sizeof(KeyedData);
117  res = FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX,
118  NULL,
119  ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION,
120  L"Microsoft.Windows.Common-Controls",
121  &KeyedData);
122  ok(res == TRUE, "Expected success\n");
123  if (res)
124  {
125  ok(KeyedData.hActCtx == NULL, "Expected null handle for common control context\n");
126  ok(KeyedData.ulAssemblyRosterIndex != 0, "%lu\n", KeyedData.ulAssemblyRosterIndex);
127  }
128  else
129  {
130  skip("ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION failed\n");
131  }
132 
133 }
#define TRUE
Definition: types.h:120
BOOL WINAPI GetCurrentActCtx(OUT PHANDLE phActCtx)
Definition: actctx.c:298
BOOL WINAPI QueryActCtxW(IN DWORD dwFlags, IN HANDLE hActCtx, IN PVOID pvSubInstance, IN ULONG ulInfoClass, IN PVOID pvBuffer, IN SIZE_T cbBuffer, IN OUT SIZE_T *pcbWrittenOrRequired OPTIONAL)
Definition: actctx.c:328
GLuint buffer
Definition: glext.h:5915
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
BOOL WINAPI FindActCtxSectionStringW(DWORD dwFlags, const GUID *lpExtGuid, ULONG ulId, LPCWSTR lpSearchStr, PACTCTX_SECTION_KEYED_DATA pInfo)
Definition: actctx.c:156
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 GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
unsigned long DWORD
Definition: ntddk_ex.h:95
static const WCHAR L[]
Definition: oid.c:1250
#define ok(value,...)
Definition: atltest.h:57
#define skip(...)
Definition: atltest.h:64
GLuint res
Definition: glext.h:9613
int details
Definition: msacm.c:1365