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
, "\n");
48 ok(info
->lpRootManifestPath
== NULL
, "Expected null lpRootManifestPath, got %S\n", info
->lpRootManifestPath
);
49 ok(info
->lpRootConfigurationPath
== NULL
, "Expected null lpRootConfigurationPath, got %S\n", info
->lpRootConfigurationPath
);
50 ok(info
->lpAppDirPath
== NULL
, "Expected null lpAppDirPath, got %S\n", info
->lpAppDirPath
);
51 ok(info
->ulAssemblyCount
== 0, "\n");
54 res
= QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX
,
57 AssemblyDetailedInformationInActivationContext
,
61 ok(res
== TRUE
, "\n");
62 ok(details
->lpAssemblyEncodedAssemblyIdentity
== NULL
, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details
->lpAssemblyEncodedAssemblyIdentity
);
63 ok(details
->lpAssemblyManifestPath
== NULL
, "Expected null lpAssemblyManifestPath, got %S\n", details
->lpAssemblyManifestPath
);
64 ok(details
->lpAssemblyPolicyPath
== NULL
, "Expected null lpAssemblyPolicyPath, got %S\n", details
->lpAssemblyPolicyPath
);
65 ok(details
->lpAssemblyDirectoryName
== NULL
, "Expected null lpAssemblyDirectoryName, got %S\n", details
->lpAssemblyDirectoryName
);
68 res
= QueryActCtxW(QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX
,
71 AssemblyDetailedInformationInActivationContext
,
75 ok(res
== TRUE
, "\n"); /* This is FALSE in win10 */
76 ok(details
->lpAssemblyEncodedAssemblyIdentity
== NULL
, "Expected null lpAssemblyEncodedAssemblyIdentity, got %S\n", details
->lpAssemblyEncodedAssemblyIdentity
);
77 ok(details
->lpAssemblyManifestPath
== NULL
, "Expected null lpAssemblyManifestPath, got %S\n", details
->lpAssemblyManifestPath
);
78 ok(details
->lpAssemblyPolicyPath
== NULL
, "Expected null lpAssemblyPolicyPath, got %S\n", details
->lpAssemblyPolicyPath
);
79 ok(details
->lpAssemblyDirectoryName
== NULL
, "Expected null lpAssemblyDirectoryName, got %S\n", details
->lpAssemblyDirectoryName
);
81 res
= GetCurrentActCtx (&h
);
82 ok(res
== TRUE
, "\n");
85 KeyedData
.cbSize
= sizeof(KeyedData
);
86 res
= FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX
,
88 ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION
,
89 L
"Microsoft.Windows.SysyemCompatible",
91 ok(res
== FALSE
, "\n");
93 KeyedData
.cbSize
= sizeof(KeyedData
);
94 res
= FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX
,
96 ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION
,
97 L
"System Default Context",
99 ok(res
== FALSE
, "\n");
101 KeyedData
.cbSize
= sizeof(KeyedData
);
102 res
= FindActCtxSectionStringW(FIND_ACTCTX_SECTION_KEY_RETURN_HACTCTX
,
104 ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION
,
105 L
"Microsoft.Windows.Common-Controls",
107 ok(res
== TRUE
, "\n");
108 ok(KeyedData
.hActCtx
== NULL
, "Expected null handle for common control context\n");
109 ok(KeyedData
.ulAssemblyRosterIndex
!= 0, "%d\n", KeyedData
.ulAssemblyRosterIndex
);
110 //ok(wcsstr(details-> , L"SystemCompative"