2 * Test for the default activation context that is active in every process.
4 * Copyright 2017 Giannis Adamopoulos
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #include "wine/test.h"
30 START_TEST(DefaultActCtx
)
34 PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION details
= (PACTIVATION_CONTEXT_ASSEMBLY_DETAILED_INFORMATION
)buffer
;
35 PACTIVATION_CONTEXT_DETAILED_INFORMATION info
= (PACTIVATION_CONTEXT_DETAILED_INFORMATION
)buffer
;
38 ACTCTX_SECTION_KEYED_DATA KeyedData
= { 0 };
40 res
= QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX
,
43 ActivationContextDetailedInformation
,
47 ok(res
== TRUE
, "Expected success\n");
50 ok(info
->lpRootManifestPath
== NULL
, "Expected null lpRootManifestPath, got %S\n", info
->lpRootManifestPath
);
51 ok(info
->lpRootConfigurationPath
== NULL
, "Expected null lpRootConfigurationPath, got %S\n", info
->lpRootConfigurationPath
);
52 ok(info
->lpAppDirPath
== NULL
, "Expected null lpAppDirPath, got %S\n", info
->lpAppDirPath
);
53 ok(info
->ulAssemblyCount
== 0, "Expected 0 assemblies\n");
57 skip("ActivationContextDetailedInformation failed\n");
62 res
= QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX
,
65 AssemblyDetailedInformationInActivationContext
,
69 ok(res
== TRUE
, "Expected success\n");
72 ok(details
->lpAssemblyEncodedAssemblyIdentity
== NULL
, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details
->lpAssemblyEncodedAssemblyIdentity
);
73 ok(details
->lpAssemblyManifestPath
== NULL
, "Expected null lpAssemblyManifestPath, got %S\n", details
->lpAssemblyManifestPath
);
74 ok(details
->lpAssemblyPolicyPath
== NULL
, "Expected null lpAssemblyPolicyPath, got %S\n", details
->lpAssemblyPolicyPath
);
75 ok(details
->lpAssemblyDirectoryName
== NULL
, "Expected null lpAssemblyDirectoryName, got %S\n", details
->lpAssemblyDirectoryName
);
79 skip("AssemblyDetailedInformationInActivationContext failed\n");
83 res
= QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX
,
86 AssemblyDetailedInformationInActivationContext
,
90 ok(res
== TRUE
, "Expected success\n"); /* This is FALSE in win10 */
93 ok(details
->lpAssemblyEncodedAssemblyIdentity
== NULL
, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details
->lpAssemblyEncodedAssemblyIdentity
);
94 ok(details
->lpAssemblyManifestPath
== NULL
, "Expected null lpAssemblyManifestPath, got %S\n", details
->lpAssemblyManifestPath
);
95 ok(details
->lpAssemblyPolicyPath
== NULL
, "Expected null lpAssemblyPolicyPath, got %S\n", details
->lpAssemblyPolicyPath
);
96 ok(details
->lpAssemblyDirectoryName
== NULL
, "Expected null lpAssemblyDirectoryName, got %S\n", details
->lpAssemblyDirectoryName
);
100 skip("AssemblyDetailedInformationInActivationContext failed\n");
103 res
= GetCurrentActCtx (&h
);
104 ok(res
== TRUE
, "Expected success\n");
105 ok(h
== NULL
, "Expected null current context\n");
107 KeyedData
.cbSize
= sizeof(KeyedData
);
108 res
= FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX
,
110 ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION
,
111 L
"Microsoft.Windows.SysyemCompatible",
113 ok(res
== FALSE
, "Expected failure\n");
115 KeyedData
.cbSize
= sizeof(KeyedData
);
116 res
= FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX
,
118 ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION
,
119 L
"System Default Context",
121 ok(res
== FALSE
, "Expected failure\n");
123 KeyedData
.cbSize
= sizeof(KeyedData
);
124 res
= FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX
,
126 ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION
,
127 L
"Microsoft.Windows.Common-Controls",
129 ok(res
== TRUE
, "Expected success\n");
132 ok(KeyedData
.hActCtx
== NULL
, "Expected null handle for common control context\n");
133 ok(KeyedData
.ulAssemblyRosterIndex
!= 0, "%lu\n", KeyedData
.ulAssemblyRosterIndex
);
137 skip("ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION failed\n");