Wine-devel
Threads by month
- ----- 2026 -----
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
December 2020
- 68 participants
- 416 discussions
03 Dec '20
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ntdll/actctx.c | 532 ++++++++++++++++----------------------------
1 file changed, 194 insertions(+), 338 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index faccd21d4b1..5db464a383e 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -565,125 +565,25 @@ struct actctx_loader
static const xmlstr_t empty_xmlstr;
#ifdef __i386__
-static const WCHAR current_archW[] = {'x','8','6',0};
+static const WCHAR current_archW[] = L"x86";
#elif defined __x86_64__
-static const WCHAR current_archW[] = {'a','m','d','6','4',0};
+static const WCHAR current_archW[] = L"amd64";
#elif defined __arm__
-static const WCHAR current_archW[] = {'a','r','m',0};
+static const WCHAR current_archW[] = L"arm";
#elif defined __aarch64__
-static const WCHAR current_archW[] = {'a','r','m','6','4',0};
+static const WCHAR current_archW[] = L"arm64";
#else
-static const WCHAR current_archW[] = {'n','o','n','e',0};
+static const WCHAR current_archW[] = L"none";
#endif
-static const WCHAR asmv1W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','1',0};
-static const WCHAR asmv2W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','2',0};
-static const WCHAR asmv3W[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','a','s','m','.','v','3',0};
-static const WCHAR assemblyW[] = {'a','s','s','e','m','b','l','y',0};
-static const WCHAR assemblyIdentityW[] = {'a','s','s','e','m','b','l','y','I','d','e','n','t','i','t','y',0};
-static const WCHAR bindingRedirectW[] = {'b','i','n','d','i','n','g','R','e','d','i','r','e','c','t',0};
-static const WCHAR clrClassW[] = {'c','l','r','C','l','a','s','s',0};
-static const WCHAR clrSurrogateW[] = {'c','l','r','S','u','r','r','o','g','a','t','e',0};
-static const WCHAR comClassW[] = {'c','o','m','C','l','a','s','s',0};
-static const WCHAR comInterfaceExternalProxyStubW[] = {'c','o','m','I','n','t','e','r','f','a','c','e','E','x','t','e','r','n','a','l','P','r','o','x','y','S','t','u','b',0};
-static const WCHAR comInterfaceProxyStubW[] = {'c','o','m','I','n','t','e','r','f','a','c','e','P','r','o','x','y','S','t','u','b',0};
-static const WCHAR dependencyW[] = {'d','e','p','e','n','d','e','n','c','y',0};
-static const WCHAR dependentAssemblyW[] = {'d','e','p','e','n','d','e','n','t','A','s','s','e','m','b','l','y',0};
-static const WCHAR descriptionW[] = {'d','e','s','c','r','i','p','t','i','o','n',0};
-static const WCHAR fileW[] = {'f','i','l','e',0};
-static const WCHAR hashW[] = {'h','a','s','h',0};
-static const WCHAR noInheritW[] = {'n','o','I','n','h','e','r','i','t',0};
-static const WCHAR noInheritableW[] = {'n','o','I','n','h','e','r','i','t','a','b','l','e',0};
-static const WCHAR typelibW[] = {'t','y','p','e','l','i','b',0};
-static const WCHAR windowClassW[] = {'w','i','n','d','o','w','C','l','a','s','s',0};
-
-static const WCHAR clsidW[] = {'c','l','s','i','d',0};
-static const WCHAR hashalgW[] = {'h','a','s','h','a','l','g',0};
-static const WCHAR helpdirW[] = {'h','e','l','p','d','i','r',0};
-static const WCHAR iidW[] = {'i','i','d',0};
-static const WCHAR languageW[] = {'l','a','n','g','u','a','g','e',0};
-static const WCHAR manifestVersionW[] = {'m','a','n','i','f','e','s','t','V','e','r','s','i','o','n',0};
-static const WCHAR nameW[] = {'n','a','m','e',0};
-static const WCHAR neutralW[] = {'n','e','u','t','r','a','l',0};
-static const WCHAR newVersionW[] = {'n','e','w','V','e','r','s','i','o','n',0};
-static const WCHAR oldVersionW[] = {'o','l','d','V','e','r','s','i','o','n',0};
-static const WCHAR optionalW[] = {'o','p','t','i','o','n','a','l',0};
-static const WCHAR processorArchitectureW[] = {'p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e',0};
-static const WCHAR progidW[] = {'p','r','o','g','i','d',0};
-static const WCHAR publicKeyTokenW[] = {'p','u','b','l','i','c','K','e','y','T','o','k','e','n',0};
-static const WCHAR threadingmodelW[] = {'t','h','r','e','a','d','i','n','g','M','o','d','e','l',0};
-static const WCHAR tlbidW[] = {'t','l','b','i','d',0};
-static const WCHAR typeW[] = {'t','y','p','e',0};
-static const WCHAR versionW[] = {'v','e','r','s','i','o','n',0};
-static const WCHAR xmlnsW[] = {'x','m','l','n','s',0};
-static const WCHAR versionedW[] = {'v','e','r','s','i','o','n','e','d',0};
-static const WCHAR yesW[] = {'y','e','s',0};
-static const WCHAR noW[] = {'n','o',0};
-static const WCHAR restrictedW[] = {'R','E','S','T','R','I','C','T','E','D',0};
-static const WCHAR controlW[] = {'C','O','N','T','R','O','L',0};
-static const WCHAR hiddenW[] = {'H','I','D','D','E','N',0};
-static const WCHAR hasdiskimageW[] = {'H','A','S','D','I','S','K','I','M','A','G','E',0};
-static const WCHAR flagsW[] = {'f','l','a','g','s',0};
-static const WCHAR miscstatusW[] = {'m','i','s','c','S','t','a','t','u','s',0};
-static const WCHAR miscstatusiconW[] = {'m','i','s','c','S','t','a','t','u','s','I','c','o','n',0};
-static const WCHAR miscstatuscontentW[] = {'m','i','s','c','S','t','a','t','u','s','C','o','n','t','e','n','t',0};
-static const WCHAR miscstatusthumbnailW[] = {'m','i','s','c','S','t','a','t','u','s','T','h','u','m','b','n','a','i','l',0};
-static const WCHAR miscstatusdocprintW[] = {'m','i','s','c','S','t','a','t','u','s','D','o','c','P','r','i','n','t',0};
-static const WCHAR baseInterfaceW[] = {'b','a','s','e','I','n','t','e','r','f','a','c','e',0};
-static const WCHAR nummethodsW[] = {'n','u','m','M','e','t','h','o','d','s',0};
-static const WCHAR proxyStubClsid32W[] = {'p','r','o','x','y','S','t','u','b','C','l','s','i','d','3','2',0};
-static const WCHAR runtimeVersionW[] = {'r','u','n','t','i','m','e','V','e','r','s','i','o','n',0};
-static const WCHAR mscoreeW[] = {'M','S','C','O','R','E','E','.','D','L','L',0};
-static const WCHAR mscoree2W[] = {'m','s','c','o','r','e','e','.','d','l','l',0};
-
-static const WCHAR activatewhenvisibleW[] = {'a','c','t','i','v','a','t','e','w','h','e','n','v','i','s','i','b','l','e',0};
-static const WCHAR actslikebuttonW[] = {'a','c','t','s','l','i','k','e','b','u','t','t','o','n',0};
-static const WCHAR actslikelabelW[] = {'a','c','t','s','l','i','k','e','l','a','b','e','l',0};
-static const WCHAR alignableW[] = {'a','l','i','g','n','a','b','l','e',0};
-static const WCHAR alwaysrunW[] = {'a','l','w','a','y','s','r','u','n',0};
-static const WCHAR canlinkbyole1W[] = {'c','a','n','l','i','n','k','b','y','o','l','e','1',0};
-static const WCHAR cantlinkinsideW[] = {'c','a','n','t','l','i','n','k','i','n','s','i','d','e',0};
-static const WCHAR ignoreactivatewhenvisibleW[] = {'i','g','n','o','r','e','a','c','t','i','v','a','t','e','w','h','e','n','v','i','s','i','b','l','e',0};
-static const WCHAR imemodeW[] = {'i','m','e','m','o','d','e',0};
-static const WCHAR insertnotreplaceW[] = {'i','n','s','e','r','t','n','o','t','r','e','p','l','a','c','e',0};
-static const WCHAR insideoutW[] = {'i','n','s','i','d','e','o','u','t',0};
-static const WCHAR invisibleatruntimeW[] = {'i','n','v','i','s','i','b','l','e','a','t','r','u','n','t','i','m','e',0};
-static const WCHAR islinkobjectW[] = {'i','s','l','i','n','k','o','b','j','e','c','t',0};
-static const WCHAR nouiactivateW[] = {'n','o','u','i','a','c','t','i','v','a','t','e',0};
-static const WCHAR onlyiconicW[] = {'o','n','l','y','i','c','o','n','i','c',0};
-static const WCHAR recomposeonresizeW[] = {'r','e','c','o','m','p','o','s','e','o','n','r','e','s','i','z','e',0};
-static const WCHAR renderingisdeviceindependentW[] = {'r','e','n','d','e','r','i','n','g','i','s','d','e','v','i','c','e','i','n','d','e','p','e','n','d','e','n','t',0};
-static const WCHAR setclientsitefirstW[] = {'s','e','t','c','l','i','e','n','t','s','i','t','e','f','i','r','s','t',0};
-static const WCHAR simpleframeW[] = {'s','i','m','p','l','e','f','r','a','m','e',0};
-static const WCHAR staticW[] = {'s','t','a','t','i','c',0};
-static const WCHAR supportsmultilevelundoW[] = {'s','u','p','p','o','r','t','s','m','u','l','t','i','l','e','v','e','l','u','n','d','o',0};
-static const WCHAR wantstomenumergeW[] = {'w','a','n','t','s','t','o','m','e','n','u','m','e','r','g','e',0};
-
-static const WCHAR compatibilityW[] = {'c','o','m','p','a','t','i','b','i','l','i','t','y',0};
-static const WCHAR compatibilityNSW[] = {'u','r','n',':','s','c','h','e','m','a','s','-','m','i','c','r','o','s','o','f','t','-','c','o','m',':','c','o','m','p','a','t','i','b','i','l','i','t','y','.','v','1',0};
-static const WCHAR applicationW[] = {'a','p','p','l','i','c','a','t','i','o','n',0};
-static const WCHAR supportedOSW[] = {'s','u','p','p','o','r','t','e','d','O','S',0};
-static const WCHAR IdW[] = {'I','d',0};
-static const WCHAR requestedExecutionLevelW[] = {'r','e','q','u','e','s','t','e','d','E','x','e','c','u','t','i','o','n','L','e','v','e','l',0};
-static const WCHAR requestedPrivilegesW[] = {'r','e','q','u','e','s','t','e','d','P','r','i','v','i','l','e','g','e','s',0};
-static const WCHAR securityW[] = {'s','e','c','u','r','i','t','y',0};
-static const WCHAR trustInfoW[] = {'t','r','u','s','t','I','n','f','o',0};
-static const WCHAR windowsSettingsW[] = {'w','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR autoElevateW[] = {'a','u','t','o','E','l','e','v','a','t','e',0};
-static const WCHAR disableThemingW[] = {'d','i','s','a','b','l','e','T','h','e','m','i','n','g',0};
-static const WCHAR disableWindowFilteringW[] = {'d','i','s','a','b','l','e','W','i','n','d','o','w','F','i','l','t','e','r','i','n','g',0};
-static const WCHAR windowsSettings2005NSW[] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','0','5','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR windowsSettings2011NSW[] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','1','1','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR windowsSettings2016NSW[] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','1','6','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR windowsSettings2017NSW[] = {'h','t','t','p',':','/','/','s','c','h','e','m','a','s','.','m','i','c','r','o','s','o','f','t','.','c','o','m','/','S','M','I','/','2','0','1','7','/','W','i','n','d','o','w','s','S','e','t','t','i','n','g','s',0};
-static const WCHAR dpiAwareW[] = {'d','p','i','A','w','a','r','e',0};
-static const WCHAR dpiAwarenessW[] = {'d','p','i','A','w','a','r','e','n','e','s','s',0};
-static const WCHAR gdiScalingW[] = {'g','d','i','S','c','a','l','i','n','g',0};
-static const WCHAR highResolutionScrollingAwareW[] = {'h','i','g','h','R','e','s','o','l','u','t','i','o','n','S','c','r','o','l','l','i','n','g','A','w','a','r','e',0};
-static const WCHAR longPathAwareW[] = {'l','o','n','g','P','a','t','h','A','w','a','r','e',0};
-static const WCHAR magicFutureSettingW[] = {'m','a','g','i','c','F','u','t','u','r','e','S','e','t','t','i','n','g',0};
-static const WCHAR printerDriverIsolationW[] = {'p','r','i','n','t','e','r','D','r','i','v','e','r','I','s','o','l','a','t','i','o','n',0};
-static const WCHAR ultraHighResolutionScrollingAwareW[] = {'u','l','t','r','a','H','i','g','h','R','e','s','o','l','u','t','i','o','n','S','c','r','o','l','l','i','n','g','A','w','a','r','e',0};
+static const WCHAR asmv1W[] = L"urn:schemas-microsoft-com:asm.v1";
+static const WCHAR asmv2W[] = L"urn:schemas-microsoft-com:asm.v2";
+static const WCHAR asmv3W[] = L"urn:schemas-microsoft-com:asm.v3";
+static const WCHAR compatibilityNSW[] = L"urn:schemas-microsoft-com:compatibility.v1";
+static const WCHAR windowsSettings2005NSW[] = L"http://schemas.microsoft.com/SMI/2005/WindowsSettings";
+static const WCHAR windowsSettings2011NSW[] = L"http://schemas.microsoft.com/SMI/2011/WindowsSettings";
+static const WCHAR windowsSettings2016NSW[] = L"http://schemas.microsoft.com/SMI/2016/WindowsSettings";
+static const WCHAR windowsSettings2017NSW[] = L"http://schemas.microsoft.com/SMI/2017/WindowsSettings";
struct olemisc_entry
{
@@ -693,35 +593,30 @@ struct olemisc_entry
static const struct olemisc_entry olemisc_values[] =
{
- { activatewhenvisibleW, OLEMISC_ACTIVATEWHENVISIBLE },
- { actslikebuttonW, OLEMISC_ACTSLIKEBUTTON },
- { actslikelabelW, OLEMISC_ACTSLIKELABEL },
- { alignableW, OLEMISC_ALIGNABLE },
- { alwaysrunW, OLEMISC_ALWAYSRUN },
- { canlinkbyole1W, OLEMISC_CANLINKBYOLE1 },
- { cantlinkinsideW, OLEMISC_CANTLINKINSIDE },
- { ignoreactivatewhenvisibleW, OLEMISC_IGNOREACTIVATEWHENVISIBLE },
- { imemodeW, OLEMISC_IMEMODE },
- { insertnotreplaceW, OLEMISC_INSERTNOTREPLACE },
- { insideoutW, OLEMISC_INSIDEOUT },
- { invisibleatruntimeW, OLEMISC_INVISIBLEATRUNTIME },
- { islinkobjectW, OLEMISC_ISLINKOBJECT },
- { nouiactivateW, OLEMISC_NOUIACTIVATE },
- { onlyiconicW, OLEMISC_ONLYICONIC },
- { recomposeonresizeW, OLEMISC_RECOMPOSEONRESIZE },
- { renderingisdeviceindependentW, OLEMISC_RENDERINGISDEVICEINDEPENDENT },
- { setclientsitefirstW, OLEMISC_SETCLIENTSITEFIRST },
- { simpleframeW, OLEMISC_SIMPLEFRAME },
- { staticW, OLEMISC_STATIC },
- { supportsmultilevelundoW, OLEMISC_SUPPORTSMULTILEVELUNDO },
- { wantstomenumergeW, OLEMISC_WANTSTOMENUMERGE }
+ { L"activatewhenvisible", OLEMISC_ACTIVATEWHENVISIBLE },
+ { L"actslikebutton", OLEMISC_ACTSLIKEBUTTON },
+ { L"actslikelabel", OLEMISC_ACTSLIKELABEL },
+ { L"alignable", OLEMISC_ALIGNABLE },
+ { L"alwaysrun", OLEMISC_ALWAYSRUN },
+ { L"canlinkbyole1", OLEMISC_CANLINKBYOLE1 },
+ { L"cantlinkinside", OLEMISC_CANTLINKINSIDE },
+ { L"ignoreactivatewhenvisible", OLEMISC_IGNOREACTIVATEWHENVISIBLE },
+ { L"imemode", OLEMISC_IMEMODE },
+ { L"insertnotreplace", OLEMISC_INSERTNOTREPLACE },
+ { L"insideout", OLEMISC_INSIDEOUT },
+ { L"invisibleatruntime", OLEMISC_INVISIBLEATRUNTIME },
+ { L"islinkobject", OLEMISC_ISLINKOBJECT },
+ { L"nouiactivate", OLEMISC_NOUIACTIVATE },
+ { L"onlyiconic", OLEMISC_ONLYICONIC },
+ { L"recomposeonresize", OLEMISC_RECOMPOSEONRESIZE },
+ { L"renderingisdeviceindependent", OLEMISC_RENDERINGISDEVICEINDEPENDENT },
+ { L"setclientsitefirst", OLEMISC_SETCLIENTSITEFIRST },
+ { L"simpleframe", OLEMISC_SIMPLEFRAME },
+ { L"static", OLEMISC_STATIC },
+ { L"supportsmultilevelundo", OLEMISC_SUPPORTSMULTILEVELUNDO },
+ { L"wantstomenumerge", OLEMISC_WANTSTOMENUMERGE }
};
-static const WCHAR xmlW[] = {'?','x','m','l',0};
-static const WCHAR dotManifestW[] = {'.','m','a','n','i','f','e','s','t',0};
-static const WCHAR version_formatW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
-static const WCHAR wildcardW[] = {'*',0};
-
static ACTIVATION_CONTEXT system_actctx = { ACTCTX_MAGIC, 1 };
static ACTIVATION_CONTEXT *process_actctx = &system_actctx;
@@ -1008,7 +903,7 @@ static BOOL is_matching_identity( const struct assembly_identity *id1,
if (id1->language && id2->language && !is_matching_string( id1->language, id2->language ))
{
- if (wcscmp( wildcardW, id1->language ) && wcscmp( wildcardW, id2->language ))
+ if (wcscmp( L"*", id1->language ) && wcscmp( L"*", id2->language ))
return FALSE;
}
if (id1->version.major != id2->version.major) return FALSE;
@@ -1078,14 +973,11 @@ static void free_depend_manifests(struct actctx_loader* acl)
static WCHAR *build_assembly_dir(struct assembly_identity* ai)
{
- static const WCHAR undW[] = {'_',0};
- static const WCHAR noneW[] = {'n','o','n','e',0};
- static const WCHAR mskeyW[] = {'d','e','a','d','b','e','e','f',0};
-
- const WCHAR *arch = ai->arch ? ai->arch : noneW;
- const WCHAR *key = ai->public_key ? ai->public_key : noneW;
- const WCHAR *lang = ai->language ? ai->language : noneW;
- const WCHAR *name = ai->name ? ai->name : noneW;
+ static const WCHAR mskeyW[] = L"deadbeef";
+ const WCHAR *arch = ai->arch ? ai->arch : L"none";
+ const WCHAR *key = ai->public_key ? ai->public_key : L"none";
+ const WCHAR *lang = ai->language ? ai->language : L"none";
+ const WCHAR *name = ai->name ? ai->name : L"none";
SIZE_T size = (wcslen(arch) + 1 + wcslen(name) + 1 + wcslen(key) + 24 + 1 +
wcslen(lang) + 1) * sizeof(WCHAR) + sizeof(mskeyW);
WCHAR *ret;
@@ -1093,16 +985,16 @@ static WCHAR *build_assembly_dir(struct assembly_identity* ai)
if (!(ret = RtlAllocateHeap( GetProcessHeap(), 0, size ))) return NULL;
wcscpy( ret, arch );
- wcscat( ret, undW );
+ wcscat( ret, L"_" );
wcscat( ret, name );
- wcscat( ret, undW );
+ wcscat( ret, L"_" );
wcscat( ret, key );
- wcscat( ret, undW );
- swprintf( ret + wcslen(ret), size - wcslen(ret), version_formatW,
+ wcscat( ret, L"_" );
+ swprintf( ret + wcslen(ret), size - wcslen(ret), L"%u.%u.%u.%u",
ai->version.major, ai->version.minor, ai->version.build, ai->version.revision );
- wcscat( ret, undW );
+ wcscat( ret, L"_" );
wcscat( ret, lang );
- wcscat( ret, undW );
+ wcscat( ret, L"_" );
wcscat( ret, mskeyW );
return ret;
}
@@ -1123,35 +1015,26 @@ static inline void append_string( WCHAR *buffer, const WCHAR *prefix, const WCHA
static WCHAR *build_assembly_id( const struct assembly_identity *ai )
{
- static const WCHAR archW[] =
- {',','p','r','o','c','e','s','s','o','r','A','r','c','h','i','t','e','c','t','u','r','e','=',0};
- static const WCHAR public_keyW[] =
- {',','p','u','b','l','i','c','K','e','y','T','o','k','e','n','=',0};
- static const WCHAR typeW[] =
- {',','t','y','p','e','=',0};
- static const WCHAR versionW[] =
- {',','v','e','r','s','i','o','n','=',0};
-
WCHAR version[64], *ret;
SIZE_T size = 0;
- swprintf( version, ARRAY_SIZE(version), version_formatW,
+ swprintf( version, ARRAY_SIZE(version), L"%u.%u.%u.%u",
ai->version.major, ai->version.minor, ai->version.build, ai->version.revision );
if (ai->name) size += wcslen(ai->name) * sizeof(WCHAR);
- if (ai->arch) size += wcslen(archW) + wcslen(ai->arch) + 2;
- if (ai->public_key) size += wcslen(public_keyW) + wcslen(ai->public_key) + 2;
- if (ai->type) size += wcslen(typeW) + wcslen(ai->type) + 2;
- size += wcslen(versionW) + wcslen(version) + 2;
+ if (ai->arch) size += wcslen(L",processorArchitecture=") + wcslen(ai->arch) + 2;
+ if (ai->public_key) size += wcslen(L",publicKeyToken=") + wcslen(ai->public_key) + 2;
+ if (ai->type) size += wcslen(L",type=") + wcslen(ai->type) + 2;
+ size += wcslen(L",version=") + wcslen(version) + 2;
if (!(ret = RtlAllocateHeap( GetProcessHeap(), 0, (size + 1) * sizeof(WCHAR) )))
return NULL;
if (ai->name) wcscpy( ret, ai->name );
else *ret = 0;
- append_string( ret, archW, ai->arch );
- append_string( ret, public_keyW, ai->public_key );
- append_string( ret, typeW, ai->type );
- append_string( ret, versionW, version );
+ append_string( ret, L",processorArchitecture=", ai->arch );
+ append_string( ret, L",publicKeyToken=", ai->public_key );
+ append_string( ret, L",type=", ai->type );
+ append_string( ret, L",version=", version );
return ret;
}
@@ -1222,15 +1105,15 @@ static BOOL set_error( xmlbuf_t *xmlbuf )
static BOOL is_xmlns_attr( const struct xml_attr *attr )
{
- const int len = wcslen( xmlnsW );
+ const int len = wcslen( L"xmlns" );
if (attr->name.len < len) return FALSE;
- if (wcsncmp( attr->name.ptr, xmlnsW, len )) return FALSE;
+ if (wcsncmp( attr->name.ptr, L"xmlns", len )) return FALSE;
return (attr->name.len == len || attr->name.ptr[len] == ':');
}
static void push_xmlns( xmlbuf_t *xmlbuf, const struct xml_attr *attr )
{
- const int len = wcslen( xmlnsW );
+ const int len = wcslen( L"xmlns" );
struct xml_attr *ns;
if (xmlbuf->ns_pos == MAX_NAMESPACES - 1)
@@ -1527,27 +1410,27 @@ static void parse_assembly_identity_elem(xmlbuf_t *xmlbuf, ACTIVATION_CONTEXT *a
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, nameW))
+ if (xml_attr_cmp(&attr, L"name"))
{
if (!(ai->name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, typeW))
+ else if (xml_attr_cmp(&attr, L"type"))
{
if (!(ai->type = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, versionW))
+ else if (xml_attr_cmp(&attr, L"version"))
{
if (!parse_version(&attr.value, &ai->version)) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, processorArchitectureW))
+ else if (xml_attr_cmp(&attr, L"processorArchitecture"))
{
if (!(ai->arch = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, publicKeyTokenW))
+ else if (xml_attr_cmp(&attr, L"publicKeyToken"))
{
if (!(ai->public_key = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, languageW))
+ else if (xml_attr_cmp(&attr, L"language"))
{
if (!(ai->language = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
@@ -1565,19 +1448,14 @@ static void parse_assembly_identity_elem(xmlbuf_t *xmlbuf, ACTIVATION_CONTEXT *a
static enum comclass_threadingmodel parse_com_class_threadingmodel(xmlstr_t *value)
{
- static const WCHAR apartW[] = {'A','p','a','r','t','m','e','n','t',0};
- static const WCHAR neutralW[] = {'N','e','u','t','r','a','l',0};
- static const WCHAR freeW[] = {'F','r','e','e',0};
- static const WCHAR bothW[] = {'B','o','t','h',0};
-
if (value->len == 0) return ThreadingModel_No;
- if (xmlstr_cmp(value, apartW))
+ if (xmlstr_cmp(value, L"Apartment"))
return ThreadingModel_Apartment;
- else if (xmlstr_cmp(value, freeW))
+ else if (xmlstr_cmp(value, L"Free"))
return ThreadingModel_Free;
- else if (xmlstr_cmp(value, bothW))
+ else if (xmlstr_cmp(value, L"Both"))
return ThreadingModel_Both;
- else if (xmlstr_cmp(value, neutralW))
+ else if (xmlstr_cmp(value, L"Neutral"))
return ThreadingModel_Neutral;
else
return ThreadingModel_No;
@@ -1686,43 +1564,43 @@ static void parse_com_class_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll, st
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, clsidW))
+ if (xml_attr_cmp(&attr, L"clsid"))
{
if (!(entity->u.comclass.clsid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, progidW))
+ else if (xml_attr_cmp(&attr, L"progid"))
{
if (!(entity->u.comclass.progid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, tlbidW))
+ else if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.comclass.tlbid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, threadingmodelW))
+ else if (xml_attr_cmp(&attr, L"threadingModel"))
{
entity->u.comclass.model = parse_com_class_threadingmodel(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatusW))
+ else if (xml_attr_cmp(&attr, L"miscStatus"))
{
entity->u.comclass.miscstatus = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatuscontentW))
+ else if (xml_attr_cmp(&attr, L"miscStatusContent"))
{
entity->u.comclass.miscstatuscontent = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatusthumbnailW))
+ else if (xml_attr_cmp(&attr, L"miscStatusThumbnail"))
{
entity->u.comclass.miscstatusthumbnail = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatusiconW))
+ else if (xml_attr_cmp(&attr, L"miscStatusIcon"))
{
entity->u.comclass.miscstatusicon = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, miscstatusdocprintW))
+ else if (xml_attr_cmp(&attr, L"miscStatusDocPrint"))
{
entity->u.comclass.miscstatusdocprint = parse_com_class_misc(&attr.value);
}
- else if (xml_attr_cmp(&attr, descriptionW))
+ else if (xml_attr_cmp(&attr, L"description"))
{
/* not stored */
}
@@ -1740,7 +1618,7 @@ static void parse_com_class_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll, st
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, progidW, asmv1W))
+ if (xml_elem_cmp(&elem, L"progid", asmv1W))
{
parse_com_class_progid(xmlbuf, entity, &elem);
}
@@ -1818,34 +1696,34 @@ static void parse_cominterface_proxy_stub_elem( xmlbuf_t *xmlbuf, struct dll_red
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, iidW))
+ if (xml_attr_cmp(&attr, L"iid"))
{
if (!(entity->u.ifaceps.iid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, nameW))
+ else if (xml_attr_cmp(&attr, L"name"))
{
if (!(entity->u.ifaceps.name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, baseInterfaceW))
+ else if (xml_attr_cmp(&attr, L"baseInterface"))
{
if (!(entity->u.ifaceps.base = xmlstrdupW(&attr.value))) set_error( xmlbuf );
entity->u.ifaceps.mask |= BaseIface;
}
- else if (xml_attr_cmp(&attr, nummethodsW))
+ else if (xml_attr_cmp(&attr, L"numMethods"))
{
if (!(parse_nummethods(&attr.value, entity))) set_error( xmlbuf );
entity->u.ifaceps.mask |= NumMethods;
}
- else if (xml_attr_cmp(&attr, tlbidW))
+ else if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.ifaceps.tlib = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, proxyStubClsid32W))
+ else if (xml_attr_cmp(&attr, L"proxyStubClsid32"))
{
if (!(psclsid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
/* not used */
- else if (xml_attr_cmp(&attr, threadingmodelW))
+ else if (xml_attr_cmp(&attr, L"threadingModel"))
{
}
else if (!is_xmlns_attr( &attr ))
@@ -1876,13 +1754,13 @@ static BOOL parse_typelib_flags(const xmlstr_t *value, struct entity *entity)
start = str;
while (*str != ',' && (i++ < value->len)) str++;
- if (!wcsnicmp(start, restrictedW, str-start))
+ if (!wcsnicmp(start, L"RESTRICTED", str-start))
*flags |= LIBFLAG_FRESTRICTED;
- else if (!wcsnicmp(start, controlW, str-start))
+ else if (!wcsnicmp(start, L"CONTROL", str-start))
*flags |= LIBFLAG_FCONTROL;
- else if (!wcsnicmp(start, hiddenW, str-start))
+ else if (!wcsnicmp(start, L"HIDDEN", str-start))
*flags |= LIBFLAG_FHIDDEN;
- else if (!wcsnicmp(start, hasdiskimageW, str-start))
+ else if (!wcsnicmp(start, L"HASDISKIMAGE", str-start))
*flags |= LIBFLAG_FHASDISKIMAGE;
else
{
@@ -1943,19 +1821,19 @@ static void parse_typelib_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, tlbidW))
+ if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.typelib.tlbid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, versionW))
+ else if (xml_attr_cmp(&attr, L"version"))
{
if (!parse_typelib_version(&attr.value, entity)) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, helpdirW))
+ else if (xml_attr_cmp(&attr, L"helpdir"))
{
if (!(entity->u.typelib.helpdir = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, flagsW))
+ else if (xml_attr_cmp(&attr, L"flags"))
{
if (!parse_typelib_flags(&attr.value, entity)) set_error( xmlbuf );
}
@@ -1976,12 +1854,11 @@ static inline int aligned_string_len(int len)
static int get_assembly_version(struct assembly *assembly, WCHAR *ret)
{
- static const WCHAR fmtW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
struct assembly_version *ver = &assembly->id.version;
WCHAR buff[25];
if (!ret) ret = buff;
- return swprintf(ret, ARRAY_SIZE(buff), fmtW, ver->major, ver->minor, ver->build, ver->revision);
+ return swprintf(ret, ARRAY_SIZE(buff), L"%u.%u.%u.%u", ver->major, ver->minor, ver->build, ver->revision);
}
static void parse_window_class_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll,
@@ -2001,11 +1878,11 @@ static void parse_window_class_elem( xmlbuf_t *xmlbuf, struct dll_redirect *dll,
entity->u.class.versioned = TRUE;
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, versionedW))
+ if (xml_attr_cmp(&attr, L"versioned"))
{
- if (xmlstr_cmpi(&attr.value, noW))
+ if (xmlstr_cmpi(&attr.value, L"no"))
entity->u.class.versioned = FALSE;
- else if (!xmlstr_cmpi(&attr.value, yesW))
+ else if (!xmlstr_cmpi(&attr.value, L"yes"))
set_error( xmlbuf );
}
else if (!is_xmlns_attr( &attr ))
@@ -2035,11 +1912,11 @@ static void parse_binding_redirect_elem( xmlbuf_t *xmlbuf, const struct xml_elem
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, oldVersionW))
+ if (xml_attr_cmp(&attr, L"oldVersion"))
{
FIXME("Not stored yet %s\n", debugstr_xml_attr(&attr));
}
- else if (xml_attr_cmp(&attr, newVersionW))
+ else if (xml_attr_cmp(&attr, L"newVersion"))
{
FIXME("Not stored yet %s\n", debugstr_xml_attr(&attr));
}
@@ -2093,29 +1970,29 @@ static void parse_com_interface_external_proxy_stub_elem(xmlbuf_t *xmlbuf,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, iidW))
+ if (xml_attr_cmp(&attr, L"iid"))
{
if (!(entity->u.ifaceps.iid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, nameW))
+ else if (xml_attr_cmp(&attr, L"name"))
{
if (!(entity->u.ifaceps.name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, baseInterfaceW))
+ else if (xml_attr_cmp(&attr, L"baseInterface"))
{
if (!(entity->u.ifaceps.base = xmlstrdupW(&attr.value))) set_error( xmlbuf );
entity->u.ifaceps.mask |= BaseIface;
}
- else if (xml_attr_cmp(&attr, nummethodsW))
+ else if (xml_attr_cmp(&attr, L"numMethods"))
{
if (!(parse_nummethods(&attr.value, entity))) set_error( xmlbuf );
entity->u.ifaceps.mask |= NumMethods;
}
- else if (xml_attr_cmp(&attr, proxyStubClsid32W))
+ else if (xml_attr_cmp(&attr, L"proxyStubClsid32"))
{
if (!(entity->u.ifaceps.ps32 = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, tlbidW))
+ else if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.ifaceps.tlib = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
@@ -2146,27 +2023,27 @@ static void parse_clr_class_elem( xmlbuf_t* xmlbuf, struct assembly* assembly,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, nameW))
+ if (xml_attr_cmp(&attr, L"name"))
{
if (!(entity->u.comclass.name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, clsidW))
+ else if (xml_attr_cmp(&attr, L"clsid"))
{
if (!(entity->u.comclass.clsid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, progidW))
+ else if (xml_attr_cmp(&attr, L"progid"))
{
if (!(entity->u.comclass.progid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, tlbidW))
+ else if (xml_attr_cmp(&attr, L"tlbid"))
{
if (!(entity->u.comclass.tlbid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, threadingmodelW))
+ else if (xml_attr_cmp(&attr, L"threadingModel"))
{
entity->u.comclass.model = parse_com_class_threadingmodel(&attr.value);
}
- else if (xml_attr_cmp(&attr, runtimeVersionW))
+ else if (xml_attr_cmp(&attr, L"runtimeVersion"))
{
if (!(entity->u.comclass.version = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
@@ -2183,7 +2060,7 @@ static void parse_clr_class_elem( xmlbuf_t* xmlbuf, struct assembly* assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, progidW, asmv1W))
+ if (xml_elem_cmp(&elem, L"progid", asmv1W))
{
parse_com_class_progid(xmlbuf, entity, &elem);
}
@@ -2213,15 +2090,15 @@ static void parse_clr_surrogate_elem( xmlbuf_t *xmlbuf, struct assembly *assembl
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, nameW))
+ if (xml_attr_cmp(&attr, L"name"))
{
if (!(entity->u.clrsurrogate.name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, clsidW))
+ else if (xml_attr_cmp(&attr, L"clsid"))
{
if (!(entity->u.clrsurrogate.clsid = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, runtimeVersionW))
+ else if (xml_attr_cmp(&attr, L"runtimeVersion"))
{
if (!(entity->u.clrsurrogate.version = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
@@ -2248,11 +2125,8 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade
while (next_xml_attr(xmlbuf, &attr, &end))
{
- static const WCHAR allowDelayedBindingW[] = {'a','l','l','o','w','D','e','l','a','y','e','d','B','i','n','d','i','n','g',0};
- static const WCHAR trueW[] = {'t','r','u','e',0};
-
- if (xml_attr_cmp(&attr, allowDelayedBindingW))
- ai.delayed = xmlstr_cmp(&attr.value, trueW);
+ if (xml_attr_cmp(&attr, L"allowDelayedBinding"))
+ ai.delayed = xmlstr_cmp(&attr.value, L"true");
else if (!is_xmlns_attr( &attr ))
WARN("unknown attr %s\n", debugstr_xml_attr(&attr));
}
@@ -2261,11 +2135,11 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, assemblyIdentityW, asmv1W))
+ if (xml_elem_cmp(&elem, L"assemblyIdentity", asmv1W))
{
parse_assembly_identity_elem(xmlbuf, acl->actctx, &ai, &elem);
/* store the newly found identity for later loading */
- if (ai.arch && !wcscmp(ai.arch, wildcardW))
+ if (ai.arch && !wcscmp(ai.arch, L"*"))
{
RtlFreeHeap( GetProcessHeap(), 0, ai.arch );
ai.arch = strdupW( current_archW );
@@ -2274,7 +2148,7 @@ static void parse_dependent_assembly_elem( xmlbuf_t *xmlbuf, struct actctx_loade
debugstr_w(ai.name), debugstr_version(&ai.version), debugstr_w(ai.arch) );
if (!add_dependent_assembly_id(acl, &ai)) set_error( xmlbuf );
}
- else if (xml_elem_cmp(&elem, bindingRedirectW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"bindingRedirect", asmv1W))
{
parse_binding_redirect_elem(xmlbuf, &elem);
}
@@ -2296,9 +2170,9 @@ static void parse_dependency_elem( xmlbuf_t *xmlbuf, struct actctx_loader *acl,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, optionalW))
+ if (xml_attr_cmp(&attr, L"optional"))
{
- optional = xmlstr_cmpi( &attr.value, yesW );
+ optional = xmlstr_cmpi( &attr.value, L"yes" );
TRACE("optional=%s\n", debugstr_xmlstr(&attr.value));
}
else if (!is_xmlns_attr( &attr ))
@@ -2311,7 +2185,7 @@ static void parse_dependency_elem( xmlbuf_t *xmlbuf, struct actctx_loader *acl,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, dependentAssemblyW, asmv1W))
+ if (xml_elem_cmp(&elem, L"dependentAssembly", asmv1W))
{
parse_dependent_assembly_elem(xmlbuf, acl, &elem, optional);
}
@@ -2355,19 +2229,18 @@ static void parse_file_elem( xmlbuf_t* xmlbuf, struct assembly* assembly,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, nameW))
+ if (xml_attr_cmp(&attr, L"name"))
{
if (!(dll->name = xmlstrdupW(&attr.value))) set_error( xmlbuf );
TRACE("name=%s\n", debugstr_xmlstr(&attr.value));
}
- else if (xml_attr_cmp(&attr, hashW))
+ else if (xml_attr_cmp(&attr, L"hash"))
{
if (!(dll->hash = xmlstrdupW(&attr.value))) set_error( xmlbuf );
}
- else if (xml_attr_cmp(&attr, hashalgW))
+ else if (xml_attr_cmp(&attr, L"hashalg"))
{
- static const WCHAR sha1W[] = {'S','H','A','1',0};
- if (!xmlstr_cmpi(&attr.value, sha1W))
+ if (!xmlstr_cmpi(&attr.value, L"SHA1"))
FIXME("hashalg should be SHA1, got %s\n", debugstr_xmlstr(&attr.value));
}
else if (!is_xmlns_attr( &attr ))
@@ -2384,24 +2257,24 @@ static void parse_file_elem( xmlbuf_t* xmlbuf, struct assembly* assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, comClassW, asmv1W))
+ if (xml_elem_cmp(&elem, L"comClass", asmv1W))
{
parse_com_class_elem(xmlbuf, dll, acl, &elem);
}
- else if (xml_elem_cmp(&elem, comInterfaceProxyStubW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"comInterfaceProxyStub", asmv1W))
{
parse_cominterface_proxy_stub_elem(xmlbuf, dll, acl, &elem);
}
- else if (xml_elem_cmp(&elem, hashW, asmv2W))
+ else if (xml_elem_cmp(&elem, L"hash", asmv2W))
{
WARN("asmv2:hash (undocumented) not supported\n");
parse_unknown_elem(xmlbuf, &elem);
}
- else if (xml_elem_cmp(&elem, typelibW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"typelib", asmv1W))
{
parse_typelib_elem(xmlbuf, dll, acl, &elem);
}
- else if (xml_elem_cmp(&elem, windowClassW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"windowClass", asmv1W))
{
parse_window_class_elem(xmlbuf, dll, acl, &elem);
}
@@ -2421,7 +2294,7 @@ static void parse_supportedos_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, IdW))
+ if (xml_attr_cmp(&attr, L"Id"))
{
COMPATIBILITY_CONTEXT_ELEMENT *compat;
UNICODE_STRING str;
@@ -2460,7 +2333,7 @@ static void parse_compatibility_application_elem(xmlbuf_t *xmlbuf, struct assemb
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, supportedOSW, compatibilityNSW))
+ if (xml_elem_cmp(&elem, L"supportedOS", compatibilityNSW))
{
parse_supportedos_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2479,7 +2352,7 @@ static void parse_compatibility_elem(xmlbuf_t *xmlbuf, struct assembly *assembly
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, applicationW, compatibilityNSW))
+ if (xml_elem_cmp(&elem, L"application", compatibilityNSW))
{
parse_compatibility_application_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2534,17 +2407,17 @@ static void parse_windows_settings_elem( xmlbuf_t *xmlbuf, struct assembly *asse
while (next_xml_elem( xmlbuf, &elem, parent ))
{
- if (xml_elem_cmp( &elem, autoElevateW, windowsSettings2005NSW ) ||
- xml_elem_cmp( &elem, disableThemingW, windowsSettings2005NSW ) ||
- xml_elem_cmp( &elem, disableWindowFilteringW, windowsSettings2011NSW ) ||
- xml_elem_cmp( &elem, dpiAwareW, windowsSettings2005NSW ) ||
- xml_elem_cmp( &elem, dpiAwarenessW, windowsSettings2016NSW ) ||
- xml_elem_cmp( &elem, gdiScalingW, windowsSettings2017NSW ) ||
- xml_elem_cmp( &elem, highResolutionScrollingAwareW, windowsSettings2017NSW ) ||
- xml_elem_cmp( &elem, longPathAwareW, windowsSettings2016NSW ) ||
- xml_elem_cmp( &elem, magicFutureSettingW, windowsSettings2017NSW ) ||
- xml_elem_cmp( &elem, printerDriverIsolationW, windowsSettings2011NSW ) ||
- xml_elem_cmp( &elem, ultraHighResolutionScrollingAwareW, windowsSettings2017NSW ))
+ if (xml_elem_cmp( &elem, L"autoElevate", windowsSettings2005NSW ) ||
+ xml_elem_cmp( &elem, L"disableTheming", windowsSettings2005NSW ) ||
+ xml_elem_cmp( &elem, L"disableWindowFiltering", windowsSettings2011NSW ) ||
+ xml_elem_cmp( &elem, L"dpiAware", windowsSettings2005NSW ) ||
+ xml_elem_cmp( &elem, L"dpiAwareness", windowsSettings2016NSW ) ||
+ xml_elem_cmp( &elem, L"gdiScaling", windowsSettings2017NSW ) ||
+ xml_elem_cmp( &elem, L"highResolutionScrollingAware", windowsSettings2017NSW ) ||
+ xml_elem_cmp( &elem, L"longPathAware", windowsSettings2016NSW ) ||
+ xml_elem_cmp( &elem, L"magicFutureSetting", windowsSettings2017NSW ) ||
+ xml_elem_cmp( &elem, L"printerDriverIsolation", windowsSettings2011NSW ) ||
+ xml_elem_cmp( &elem, L"ultraHighResolutionScrollingAware", windowsSettings2017NSW ))
{
parse_settings_elem( xmlbuf, assembly, acl, &elem );
}
@@ -2563,7 +2436,7 @@ static void parse_application_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
while (next_xml_elem( xmlbuf, &elem, parent ))
{
- if (xml_elem_cmp( &elem, windowsSettingsW, asmv3W ))
+ if (xml_elem_cmp( &elem, L"windowsSettings", asmv3W ))
{
parse_windows_settings_elem( xmlbuf, assembly, acl, &elem );
}
@@ -2578,14 +2451,6 @@ static void parse_application_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
static void parse_requested_execution_level_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
struct actctx_loader *acl, const struct xml_elem *parent )
{
- static const WCHAR levelW[] = {'l','e','v','e','l',0};
- static const WCHAR asInvokerW[] = {'a','s','I','n','v','o','k','e','r',0};
- static const WCHAR requireAdministratorW[] = {'r','e','q','u','i','r','e','A','d','m','i','n','i','s','t','r','a','t','o','r',0};
- static const WCHAR highestAvailableW[] = {'h','i','g','h','e','s','t','A','v','a','i','l','a','b','l','e',0};
- static const WCHAR uiAccessW[] = {'u','i','A','c','c','e','s','s',0};
- static const WCHAR falseW[] = {'f','a','l','s','e',0};
- static const WCHAR trueW[] = {'t','r','u','e',0};
-
struct xml_elem elem;
struct xml_attr attr;
BOOL end = FALSE;
@@ -2595,22 +2460,22 @@ static void parse_requested_execution_level_elem( xmlbuf_t *xmlbuf, struct assem
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, levelW))
+ if (xml_attr_cmp(&attr, L"level"))
{
- if (xmlstr_cmpi(&attr.value, asInvokerW))
+ if (xmlstr_cmpi(&attr.value, L"asInvoker"))
assembly->run_level = ACTCTX_RUN_LEVEL_AS_INVOKER;
- else if (xmlstr_cmpi(&attr.value, highestAvailableW))
+ else if (xmlstr_cmpi(&attr.value, L"highestAvailable"))
assembly->run_level = ACTCTX_RUN_LEVEL_HIGHEST_AVAILABLE;
- else if (xmlstr_cmpi(&attr.value, requireAdministratorW))
+ else if (xmlstr_cmpi(&attr.value, L"requireAdministrator"))
assembly->run_level = ACTCTX_RUN_LEVEL_REQUIRE_ADMIN;
else
FIXME("unknown execution level: %s\n", debugstr_xmlstr(&attr.value));
}
- else if (xml_attr_cmp(&attr, uiAccessW))
+ else if (xml_attr_cmp(&attr, L"uiAccess"))
{
- if (xmlstr_cmpi(&attr.value, falseW))
+ if (xmlstr_cmpi(&attr.value, L"false"))
assembly->ui_access = FALSE;
- else if (xmlstr_cmpi(&attr.value, trueW))
+ else if (xmlstr_cmpi(&attr.value, L"true"))
assembly->ui_access = TRUE;
else
FIXME("unknown uiAccess value: %s\n", debugstr_xmlstr(&attr.value));
@@ -2635,7 +2500,7 @@ static void parse_requested_privileges_elem( xmlbuf_t *xmlbuf, struct assembly *
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, requestedExecutionLevelW, asmv1W))
+ if (xml_elem_cmp(&elem, L"requestedExecutionLevel", asmv1W))
{
parse_requested_execution_level_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2654,7 +2519,7 @@ static void parse_security_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, requestedPrivilegesW, asmv1W))
+ if (xml_elem_cmp(&elem, L"requestedPrivileges", asmv1W))
{
parse_requested_privileges_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2673,7 +2538,7 @@ static void parse_trust_info_elem( xmlbuf_t *xmlbuf, struct assembly *assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (xml_elem_cmp(&elem, securityW, asmv1W))
+ if (xml_elem_cmp(&elem, L"security", asmv1W))
{
parse_security_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2697,10 +2562,9 @@ static void parse_assembly_elem( xmlbuf_t *xmlbuf, struct assembly* assembly,
while (next_xml_attr(xmlbuf, &attr, &end))
{
- if (xml_attr_cmp(&attr, manifestVersionW))
+ if (xml_attr_cmp(&attr, L"manifestVersion"))
{
- static const WCHAR v10W[] = {'1','.','0',0};
- if (!xmlstr_cmp(&attr.value, v10W))
+ if (!xmlstr_cmp(&attr.value, L"1.0"))
{
FIXME("wrong version %s\n", debugstr_xmlstr(&attr.value));
break;
@@ -2721,44 +2585,44 @@ static void parse_assembly_elem( xmlbuf_t *xmlbuf, struct assembly* assembly,
while (next_xml_elem(xmlbuf, &elem, parent))
{
- if (assembly->type == APPLICATION_MANIFEST && xml_elem_cmp(&elem, noInheritW, asmv1W))
+ if (assembly->type == APPLICATION_MANIFEST && xml_elem_cmp(&elem, L"noInherit", asmv1W))
{
parse_noinherit_elem(xmlbuf, &elem);
assembly->no_inherit = TRUE;
}
- else if (xml_elem_cmp(&elem, noInheritableW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"noInheritable", asmv1W))
{
parse_noinheritable_elem(xmlbuf, &elem);
}
- else if (xml_elem_cmp(&elem, descriptionW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"description", asmv1W))
{
parse_description_elem(xmlbuf, &elem);
}
- else if (xml_elem_cmp(&elem, comInterfaceExternalProxyStubW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"comInterfaceExternalProxyStub", asmv1W))
{
parse_com_interface_external_proxy_stub_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, dependencyW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"dependency", asmv1W))
{
parse_dependency_elem(xmlbuf, acl, &elem);
}
- else if (xml_elem_cmp(&elem, fileW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"file", asmv1W))
{
parse_file_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, clrClassW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"clrClass", asmv1W))
{
parse_clr_class_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, clrSurrogateW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"clrSurrogate", asmv1W))
{
parse_clr_surrogate_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, trustInfoW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"trustInfo", asmv1W))
{
parse_trust_info_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, assemblyIdentityW, asmv1W))
+ else if (xml_elem_cmp(&elem, L"assemblyIdentity", asmv1W))
{
parse_assembly_identity_elem(xmlbuf, acl->actctx, &assembly->id, &elem);
@@ -2787,11 +2651,11 @@ static void parse_assembly_elem( xmlbuf_t *xmlbuf, struct assembly* assembly,
}
}
}
- else if (xml_elem_cmp(&elem, compatibilityW, compatibilityNSW))
+ else if (xml_elem_cmp(&elem, L"compatibility", compatibilityNSW))
{
parse_compatibility_elem(xmlbuf, assembly, acl, &elem);
}
- else if (xml_elem_cmp(&elem, applicationW, asmv3W))
+ else if (xml_elem_cmp(&elem, L"application", asmv3W))
{
parse_application_elem(xmlbuf, assembly, acl, &elem);
}
@@ -2820,11 +2684,11 @@ static NTSTATUS parse_manifest_buffer( struct actctx_loader* acl, struct assembl
if (!next_xml_elem(xmlbuf, &elem, &parent)) return STATUS_SXS_CANT_GEN_ACTCTX;
- if (xmlstr_cmp(&elem.name, xmlW) &&
+ if (xmlstr_cmp(&elem.name, L"?xml") &&
(!parse_xml_header(xmlbuf) || !next_xml_elem(xmlbuf, &elem, &parent)))
return STATUS_SXS_CANT_GEN_ACTCTX;
- if (!xml_elem_cmp(&elem, assemblyW, asmv1W))
+ if (!xml_elem_cmp(&elem, L"assembly", asmv1W))
{
FIXME("root element is %s, not <assembly>\n", debugstr_xml_elem(&elem));
return STATUS_SXS_CANT_GEN_ACTCTX;
@@ -3080,7 +2944,6 @@ static NTSTATUS get_manifest_in_manifest_file( struct actctx_loader* acl, struct
static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl, struct assembly_identity* ai,
LPCWSTR filename, LPCWSTR directory, HMODULE module, LPCWSTR resname )
{
- static const WCHAR fmtW[] = { '.','%','l','u',0 };
WCHAR *buffer;
NTSTATUS status;
UNICODE_STRING nameW;
@@ -3095,10 +2958,10 @@ static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl,
{
UNICODE_STRING name;
- if (!(status = get_module_filename( module, &name, sizeof(dotManifestW) + 10*sizeof(WCHAR) )))
+ if (!(status = get_module_filename( module, &name, sizeof(L".manifest") + 10*sizeof(WCHAR) )))
{
- if (resid != 1) swprintf( name.Buffer + wcslen(name.Buffer), 10, fmtW, resid );
- wcscat( name.Buffer, dotManifestW );
+ if (resid != 1) swprintf( name.Buffer + wcslen(name.Buffer), 10, L".%lu", resid );
+ wcscat( name.Buffer, L".manifest" );
if (!RtlDosPathNameToNtPathName_U( name.Buffer, &nameW, NULL, NULL ))
status = STATUS_RESOURCE_DATA_NOT_FOUND;
RtlFreeUnicodeString( &name );
@@ -3108,11 +2971,11 @@ static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl,
else
{
if (!(buffer = RtlAllocateHeap( GetProcessHeap(), 0,
- (wcslen(filename) + 10) * sizeof(WCHAR) + sizeof(dotManifestW) )))
+ (wcslen(filename) + 10) * sizeof(WCHAR) + sizeof(L".manifest") )))
return STATUS_NO_MEMORY;
wcscpy( buffer, filename );
- if (resid != 1) swprintf( buffer + wcslen(buffer), 10, fmtW, resid );
- wcscat( buffer, dotManifestW );
+ if (resid != 1) swprintf( buffer + wcslen(buffer), 10, L".%lu", resid );
+ wcscat( buffer, L".manifest" );
RtlInitUnicodeString( &nameW, buffer );
}
@@ -3128,9 +2991,7 @@ static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl,
static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
{
- static const WCHAR lookup_fmtW[] =
- {'%','s','_','%','s','_','%','s','_','%','u','.','%','u','.','*','.','*','_',
- '%','s','_','*','.','m','a','n','i','f','e','s','t',0};
+ static const WCHAR lookup_fmtW[] = L"%s_%s_%s_%u.%u.*.*_%s_*.manifest";
static const WCHAR wine_trailerW[] = {'d','e','a','d','b','e','e','f','.','m','a','n','i','f','e','s','t'};
WCHAR *lookup, *ret = NULL;
@@ -3140,7 +3001,7 @@ static WCHAR *lookup_manifest_file( HANDLE dir, struct assembly_identity *ai )
unsigned int data_pos = 0, data_len, len;
char buffer[8192];
- if (!lang || !wcsicmp( lang, neutralW )) lang = wildcardW;
+ if (!lang || !wcsicmp( lang, L"neutral" )) lang = L"*";
len = wcslen(ai->arch) + wcslen(ai->name) + wcslen(ai->public_key) + wcslen(lang) + 20 + ARRAY_SIZE(lookup_fmtW);
if (!(lookup = RtlAllocateHeap( GetProcessHeap(), 0, len * sizeof(WCHAR) ))) return NULL;
@@ -3217,17 +3078,14 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
WCHAR *path, *file = NULL;
HANDLE handle;
- static const WCHAR manifest_dirW[] =
- {'\\','w','i','n','s','x','s','\\','m','a','n','i','f','e','s','t','s',0};
-
if (!ai->arch || !ai->name || !ai->public_key) return STATUS_NO_SUCH_FILE;
- if (!(path = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(manifest_dirW) +
+ if (!(path = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(L"\\winsxs\\manifests") +
wcslen(windows_dir) * sizeof(WCHAR) )))
return STATUS_NO_MEMORY;
wcscpy( path, windows_dir );
- wcscat( path, manifest_dirW );
+ wcscat( path, L"\\winsxs\\manifests" );
if (!RtlDosPathNameToNtPathName_U( path, &path_us, NULL, NULL ))
{
@@ -3285,7 +3143,6 @@ static NTSTATUS lookup_winsxs(struct actctx_loader* acl, struct assembly_identit
static NTSTATUS lookup_assembly(struct actctx_loader* acl,
struct assembly_identity* ai)
{
- static const WCHAR dotDllW[] = {'.','d','l','l',0};
unsigned int i;
WCHAR *buffer, *p, *directory;
NTSTATUS status;
@@ -3305,7 +3162,7 @@ static NTSTATUS lookup_assembly(struct actctx_loader* acl,
nameW.Buffer = NULL;
if (!(buffer = RtlAllocateHeap( GetProcessHeap(), 0,
- (len + 2 * wcslen(ai->name) + 2) * sizeof(WCHAR) + sizeof(dotManifestW) )))
+ (len + 2 * wcslen(ai->name) + 2) * sizeof(WCHAR) + sizeof(L".manifest") )))
return STATUS_NO_MEMORY;
if (!(directory = build_assembly_dir( ai )))
@@ -3336,7 +3193,7 @@ static NTSTATUS lookup_assembly(struct actctx_loader* acl,
wcscpy( p, ai->name );
p += wcslen(p);
- wcscpy( p, dotDllW );
+ wcscpy( p, L".dll" );
if (RtlDosPathNameToNtPathName_U( buffer, &nameW, NULL, NULL ))
{
status = open_nt_file( &file, &nameW );
@@ -3351,7 +3208,7 @@ static NTSTATUS lookup_assembly(struct actctx_loader* acl,
RtlFreeUnicodeString( &nameW );
}
- wcscpy( p, dotManifestW );
+ wcscpy( p, L".manifest" );
if (RtlDosPathNameToNtPathName_U( buffer, &nameW, NULL, NULL ))
{
status = open_nt_file( &file, &nameW );
@@ -3684,7 +3541,6 @@ static NTSTATUS build_wndclass_section(ACTIVATION_CONTEXT* actctx, struct strsec
struct entity *entity = &dll->entities.base[k];
if (entity->kind == ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION)
{
- static const WCHAR exclW[] = {'!',0};
ULONG versioned_len, module_len;
UNICODE_STRING str;
WCHAR *ptrW;
@@ -3733,7 +3589,7 @@ static NTSTATUS build_wndclass_section(ACTIVATION_CONTEXT* actctx, struct strsec
if (entity->u.class.versioned)
{
get_assembly_version(assembly, ptrW);
- wcscat(ptrW, exclW);
+ wcscat(ptrW, L"!");
wcscat(ptrW, entity->u.class.name);
}
else
@@ -4037,7 +3893,7 @@ static void get_comserver_datalen(const struct entity_array *entities, const str
*len += aligned_string_len(str_len*sizeof(WCHAR));
/* module name is forced to mscoree.dll, and stored two times with different case */
- *module_len += sizeof(mscoreeW) + sizeof(mscoree2W);
+ *module_len += sizeof(L"MSCOREE.DLL") + sizeof(L"mscoree.dll");
}
else
{
@@ -4076,7 +3932,7 @@ static void add_comserver_record(const struct guidsection_header *section, const
else
progid_len = 0;
- module_len = dll ? wcslen(dll->name)*sizeof(WCHAR) : wcslen(mscoreeW)*sizeof(WCHAR);
+ module_len = dll ? wcslen(dll->name)*sizeof(WCHAR) : wcslen(L"MSCOREE.DLL")*sizeof(WCHAR);
/* setup new index entry */
RtlInitUnicodeString(&str, entity->u.comclass.clsid);
@@ -4142,7 +3998,7 @@ static void add_comserver_record(const struct guidsection_header *section, const
clrdata->size = sizeof(*clrdata);
clrdata->res[0] = 0;
clrdata->res[1] = 2; /* FIXME: unknown field */
- clrdata->module_len = wcslen(mscoreeW)*sizeof(WCHAR);
+ clrdata->module_len = wcslen(L"MSCOREE.DLL")*sizeof(WCHAR);
clrdata->module_offset = *module_offset + data->name_len + sizeof(WCHAR);
clrdata->name_len = wcslen(entity->u.comclass.name)*sizeof(WCHAR);
clrdata->name_offset = clrdata->size;
@@ -4155,11 +4011,11 @@ static void add_comserver_record(const struct guidsection_header *section, const
/* module name */
ptrW = (WCHAR*)((BYTE*)section + clrdata->module_offset);
- memcpy(ptrW, mscoree2W, clrdata->module_len);
+ memcpy(ptrW, L"mscoree.dll", clrdata->module_len);
ptrW[clrdata->module_len/sizeof(WCHAR)] = 0;
ptrW = (WCHAR*)((BYTE*)section + data->name_offset);
- memcpy(ptrW, mscoreeW, data->name_len);
+ memcpy(ptrW, L"MSCOREE.DLL", data->name_len);
ptrW[data->name_len/sizeof(WCHAR)] = 0;
/* class name */
--
2.26.2
1
0
[PATCH 1/2] ntdll: Print the correct debug string and not a random global variable.
by Michael Stefaniuc 03 Dec '20
by Michael Stefaniuc 03 Dec '20
03 Dec '20
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/ntdll/actctx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index b99d1655d22..faccd21d4b1 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -3533,7 +3533,7 @@ static struct string_index *find_string_index(const struct strsection_header *se
break;
}
else
- WARN("hash collision 0x%08x, %s, %s\n", hash, debugstr_us(name), debugstr_w(nameW));
+ WARN("hash collision 0x%08x, %s, %s\n", hash, debugstr_us(name), debugstr_us(&str));
}
iter++;
}
@@ -3794,7 +3794,7 @@ static NTSTATUS find_window_class(ACTIVATION_CONTEXT* actctx, const UNICODE_STRI
break;
}
else
- WARN("hash collision 0x%08x, %s, %s\n", hash, debugstr_us(name), debugstr_w(nameW));
+ WARN("hash collision 0x%08x, %s, %s\n", hash, debugstr_us(name), debugstr_us(&str));
}
iter++;
}
--
2.26.2
1
0
From: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
tools/makedep.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
1
0
03 Dec '20
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
dlls/crtdll/crtdll.spec | 168 +++----
dlls/msvcr100/msvcr100.spec | 372 +++++++-------
dlls/msvcr110/msvcr110.spec | 372 +++++++-------
dlls/msvcr120/msvcr120.spec | 372 +++++++-------
dlls/msvcr70/msvcr70.spec | 236 ++++-----
dlls/msvcr71/msvcr71.spec | 236 ++++-----
dlls/msvcr80/msvcr80.spec | 372 +++++++-------
dlls/msvcr90/msvcr90.spec | 372 +++++++-------
dlls/msvcrt/errno.c | 9 +-
dlls/msvcrt/exit.c | 2 +-
dlls/msvcrt/file.c | 932 ++++++++++++++++++------------------
dlls/msvcrt/msvcrt.h | 14 -
dlls/msvcrt/msvcrt.spec | 308 ++++++------
dlls/msvcrt/process.c | 27 +-
dlls/msvcrt/scanf.h | 24 +-
dlls/msvcrtd/msvcrtd.spec | 230 ++++-----
dlls/ucrtbase/ucrtbase.spec | 616 ++++++++++++------------
include/msvcrt/io.h | 2 +-
include/msvcrt/stdio.h | 2 +
19 files changed, 2336 insertions(+), 2330 deletions(-)
1
0
03 Dec '20
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
dlls/crtdll/crtdll.spec | 30 +++----
dlls/msvcr100/msvcr100.spec | 80 +++++++++---------
dlls/msvcr110/msvcr110.spec | 80 +++++++++---------
dlls/msvcr120/msvcr120.spec | 80 +++++++++---------
dlls/msvcr70/msvcr70.spec | 68 +++++++--------
dlls/msvcr71/msvcr71.spec | 68 +++++++--------
dlls/msvcr80/msvcr80.spec | 80 +++++++++---------
dlls/msvcr90/msvcr90.spec | 80 +++++++++---------
dlls/msvcrt/dir.c | 141 ++++++++++++++++---------------
dlls/msvcrt/file.c | 6 +-
dlls/msvcrt/msvcrt.h | 1 -
dlls/msvcrt/msvcrt.spec | 94 ++++++++++-----------
dlls/msvcrtd/msvcrtd.spec | 60 +++++++-------
dlls/ucrtbase/ucrtbase.spec | 160 ++++++++++++++++++------------------
14 files changed, 519 insertions(+), 509 deletions(-)
1
0
03 Dec '20
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
dlls/crtdll/crtdll.spec | 96 ++---
dlls/msvcr100/msvcr100.spec | 206 +++++-----
dlls/msvcr110/msvcr110.spec | 230 +++++------
dlls/msvcr120/msvcr120.spec | 420 ++++++++++----------
dlls/msvcr70/msvcr70.spec | 98 ++---
dlls/msvcr71/msvcr71.spec | 98 ++---
dlls/msvcr80/msvcr80.spec | 202 +++++-----
dlls/msvcr90/msvcr90.spec | 200 +++++-----
dlls/msvcrt/math.c | 634 +++++++++++++++---------------
dlls/msvcrt/msvcrt.h | 3 -
dlls/msvcrt/msvcrt.spec | 214 +++++-----
dlls/msvcrt/printf.h | 6 +-
dlls/msvcrt/string.c | 2 +-
dlls/msvcrtd/msvcrtd.spec | 96 ++---
dlls/ucrtbase/ucrtbase.spec | 750 ++++++++++++++++++------------------
include/msvcrt/math.h | 31 +-
16 files changed, 1649 insertions(+), 1637 deletions(-)
1
0
03 Dec '20
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
dlls/crtdll/crtdll.spec | 102 ++---
dlls/msvcr100/msvcr100.spec | 334 +++++++--------
dlls/msvcr110/msvcr110.spec | 334 +++++++--------
dlls/msvcr120/msvcr120.spec | 358 ++++++++--------
dlls/msvcr70/msvcr70.spec | 122 +++---
dlls/msvcr71/msvcr71.spec | 130 +++---
dlls/msvcr80/msvcr80.spec | 334 +++++++--------
dlls/msvcr90/msvcr90.spec | 334 +++++++--------
dlls/msvcrt/console.c | 2 +-
dlls/msvcrt/data.c | 16 +-
dlls/msvcrt/dir.c | 36 +-
dlls/msvcrt/environ.c | 16 +-
dlls/msvcrt/errno.c | 12 +-
dlls/msvcrt/exit.c | 6 +-
dlls/msvcrt/file.c | 28 +-
dlls/msvcrt/locale.c | 28 +-
dlls/msvcrt/main.c | 2 +-
dlls/msvcrt/math.c | 14 +-
dlls/msvcrt/mbcs.c | 20 +-
dlls/msvcrt/msvcrt.h | 32 --
dlls/msvcrt/msvcrt.spec | 316 +++++++-------
dlls/msvcrt/printf.h | 6 +-
dlls/msvcrt/process.c | 36 +-
dlls/msvcrt/scanf.h | 2 +-
dlls/msvcrt/string.c | 4 +-
dlls/msvcrt/time.c | 14 +-
dlls/msvcrt/undname.c | 2 +-
dlls/msvcrt/wcs.c | 683 +++++++++++++++----------------
dlls/msvcrtd/msvcrtd.spec | 108 ++---
dlls/ucrtbase/ucrtbase.spec | 452 ++++++++++----------
include/msvcrt/corecrt_wctype.h | 9 +
include/msvcrt/corecrt_wstdio.h | 5 +-
include/msvcrt/corecrt_wstdlib.h | 2 +
include/msvcrt/stdio.h | 10 +
34 files changed, 1949 insertions(+), 1960 deletions(-)
1
0
03 Dec '20
Signed-off-by: Piotr Caban <piotr(a)codeweavers.com>
---
dlls/crtdll/crtdll.spec | 35 +++--
dlls/msvcr100/msvcr100.spec | 96 ++++++------
dlls/msvcr110/msvcr110.spec | 96 ++++++------
dlls/msvcr120/msvcr120.spec | 96 ++++++------
dlls/msvcr70/msvcr70.spec | 64 ++++----
dlls/msvcr71/msvcr71.spec | 63 ++++----
dlls/msvcr80/msvcr80.spec | 96 ++++++------
dlls/msvcr90/msvcr90.spec | 96 ++++++------
dlls/msvcrt/file.c | 3 +-
dlls/msvcrt/msvcrt.spec | 117 +++++++-------
dlls/msvcrt/time.c | 301 +++++++++++-------------------------
dlls/msvcrtd/msvcrtd.spec | 50 +++---
dlls/ucrtbase/ucrtbase.spec | 170 ++++++++++----------
13 files changed, 598 insertions(+), 685 deletions(-)
1
0
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/urlmon/axinstall.c | 37 ++++++----------
dlls/urlmon/bindctx.c | 2 +-
dlls/urlmon/binding.c | 13 +++---
dlls/urlmon/bindprot.c | 8 +---
dlls/urlmon/file.c | 3 +-
dlls/urlmon/format.c | 2 +-
dlls/urlmon/http.c | 9 +---
dlls/urlmon/internet.c | 12 ++---
dlls/urlmon/mimefilter.c | 9 ++--
dlls/urlmon/sec_mgr.c | 93 ++++++++++++---------------------------
dlls/urlmon/session.c | 57 ++++++------------------
dlls/urlmon/umon.c | 8 +---
dlls/urlmon/uri.c | 40 ++++++-----------
dlls/urlmon/urlmon_main.c | 4 +-
14 files changed, 89 insertions(+), 208 deletions(-)
diff --git a/dlls/urlmon/axinstall.c b/dlls/urlmon/axinstall.c
index 3f10902ddd2..2a8c2c45760 100644
--- a/dlls/urlmon/axinstall.c
+++ b/dlls/urlmon/axinstall.c
@@ -30,12 +30,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
-static const WCHAR ctxW[] = {'c','t','x',0};
-static const WCHAR cab_extW[] = {'.','c','a','b',0};
-static const WCHAR infW[] = {'i','n','f',0};
-static const WCHAR dllW[] = {'d','l','l',0};
-static const WCHAR ocxW[] = {'o','c','x',0};
-
enum install_type {
INSTALL_UNKNOWN,
INSTALL_DLL,
@@ -97,19 +91,19 @@ static HRESULT extract_cab_file(install_ctx_t *ctx)
/* NOTE: Assume that file_name contains ".cab" extension */
ptr = ctx->install_file+path_len+1+file_len-3;
- memcpy(ptr, infW, sizeof(infW));
+ memcpy(ptr, L"inf", sizeof(L"inf"));
if(file_exists(ctx->install_file)) {
ctx->install_type = INSTALL_INF;
return S_OK;
}
- memcpy(ptr, dllW, sizeof(dllW));
+ memcpy(ptr, L"dll", sizeof(L"dll"));
if(file_exists(ctx->install_file)) {
ctx->install_type = INSTALL_DLL;
return S_OK;
}
- memcpy(ptr, ocxW, sizeof(ocxW));
+ memcpy(ptr, L"ocx", sizeof(L"ocx"));
if(file_exists(ctx->install_file)) {
ctx->install_type = INSTALL_DLL;
return S_OK;
@@ -183,18 +177,16 @@ static HRESULT process_hook_section(install_ctx_t *ctx, const WCHAR *sect_name)
DWORD len;
HRESULT hres;
- static const WCHAR runW[] = {'r','u','n',0};
-
len = GetPrivateProfileStringW(sect_name, NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
if(!len)
return S_OK;
for(key = buf; *key; key += lstrlenW(key)+1) {
- if(!wcsicmp(key, runW)) {
+ if(!wcsicmp(key, L"run")) {
WCHAR *cmd;
size_t size;
- len = GetPrivateProfileStringW(sect_name, runW, NULL, val, ARRAY_SIZE(val), ctx->install_file);
+ len = GetPrivateProfileStringW(sect_name, L"run", NULL, val, ARRAY_SIZE(val), ctx->install_file);
TRACE("Run %s\n", debugstr_w(val));
@@ -226,17 +218,14 @@ static HRESULT install_inf_file(install_ctx_t *ctx)
DWORD len;
HRESULT hres;
- static const WCHAR setup_hooksW[] = {'S','e','t','u','p',' ','H','o','o','k','s',0};
- static const WCHAR add_codeW[] = {'A','d','d','.','C','o','d','e',0};
-
- len = GetPrivateProfileStringW(setup_hooksW, NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
+ len = GetPrivateProfileStringW(L"Setup Hooks", NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
if(len) {
default_install = FALSE;
for(key = buf; *key; key += lstrlenW(key)+1) {
TRACE("[Setup Hooks] key: %s\n", debugstr_w(key));
- len = GetPrivateProfileStringW(setup_hooksW, key, NULL, sect_name, ARRAY_SIZE(sect_name),
+ len = GetPrivateProfileStringW(L"Setup Hooks", key, NULL, sect_name, ARRAY_SIZE(sect_name),
ctx->install_file);
if(!len) {
WARN("Could not get key value\n");
@@ -249,14 +238,14 @@ static HRESULT install_inf_file(install_ctx_t *ctx)
}
}
- len = GetPrivateProfileStringW(add_codeW, NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
+ len = GetPrivateProfileStringW(L"Add.Code", NULL, NULL, buf, ARRAY_SIZE(buf), ctx->install_file);
if(len) {
default_install = FALSE;
for(key = buf; *key; key += lstrlenW(key)+1) {
TRACE("[Add.Code] key: %s\n", debugstr_w(key));
- len = GetPrivateProfileStringW(add_codeW, key, NULL, sect_name, ARRAY_SIZE(sect_name),
+ len = GetPrivateProfileStringW(L"Add.Code", key, NULL, sect_name, ARRAY_SIZE(sect_name),
ctx->install_file);
if(!len) {
WARN("Could not get key value\n");
@@ -354,7 +343,7 @@ static BOOL init_warning_dialog(HWND hwnd, install_ctx_t *ctx)
BSTR display_uri;
HRESULT hres;
- if(!SetPropW(hwnd, ctxW, ctx))
+ if(!SetPropW(hwnd, L"ctx", ctx))
return FALSE;
hres = IUri_GetDisplayUri(ctx->uri, &display_uri);
@@ -384,7 +373,7 @@ static INT_PTR WINAPI warning_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
case WM_COMMAND:
switch(wparam) {
case ID_AXINSTALL_INSTALL_BTN: {
- install_ctx_t *ctx = GetPropW(hwnd, ctxW);
+ install_ctx_t *ctx = GetPropW(hwnd, L"ctx");
if(ctx)
ctx->cancel = FALSE;
EndDialog(hwnd, 0);
@@ -395,7 +384,7 @@ static INT_PTR WINAPI warning_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
return FALSE;
}
case WM_TIMER:
- update_counter(GetPropW(hwnd, ctxW), hwnd);
+ update_counter(GetPropW(hwnd, L"ctx"), hwnd);
return TRUE;
}
@@ -460,7 +449,7 @@ static HRESULT install_file(install_ctx_t *ctx, const WCHAR *cache_file)
if(!ext)
ext = ptr;
- if(!wcsicmp(ext, cab_extW)) {
+ if(!wcsicmp(ext, L".cab")) {
hres = install_cab_file(ctx);
}else {
FIXME("Unsupported extension %s\n", debugstr_w(ext));
diff --git a/dlls/urlmon/bindctx.c b/dlls/urlmon/bindctx.c
index 61917518c09..406232467c3 100644
--- a/dlls/urlmon/bindctx.c
+++ b/dlls/urlmon/bindctx.c
@@ -23,7 +23,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
-static WCHAR bscb_holderW[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };
+static WCHAR bscb_holderW[] = L"_BSCB_Holder_";
extern IID IID_IBindStatusCallbackHolder;
diff --git a/dlls/urlmon/binding.c b/dlls/urlmon/binding.c
index e90d4daf346..d35052dfdf6 100644
--- a/dlls/urlmon/binding.c
+++ b/dlls/urlmon/binding.c
@@ -26,8 +26,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
-static WCHAR cbinding_contextW[] = {'C','B','i','n','d','i','n','g',' ','C','o','n','t','e','x','t',0};
-static WCHAR bscb_holderW[] = { '_','B','S','C','B','_','H','o','l','d','e','r','_',0 };
+static WCHAR cbinding_contextW[] = L"CBinding Context";
+static WCHAR bscb_holderW[] = L"_BSCB_Holder_";
typedef struct {
IUnknown IUnknown_iface;
@@ -197,7 +197,6 @@ static LPWSTR get_mime_clsid(LPCWSTR mime, CLSID *clsid)
static const WCHAR mime_keyW[] =
{'M','I','M','E','\\','D','a','t','a','b','a','s','e','\\',
'C','o','n','t','e','n','t',' ','T','y','p','e','\\'};
- static const WCHAR clsidW[] = {'C','L','S','I','D',0};
len = lstrlenW(mime)+1;
key_name = heap_alloc(sizeof(mime_keyW) + len*sizeof(WCHAR));
@@ -213,7 +212,7 @@ static LPWSTR get_mime_clsid(LPCWSTR mime, CLSID *clsid)
size = 50*sizeof(WCHAR);
ret = heap_alloc(size);
- res = RegQueryValueExW(hkey, clsidW, NULL, &type, (LPBYTE)ret, &size);
+ res = RegQueryValueExW(hkey, L"CLSID", NULL, &type, (BYTE*)ret, &size);
RegCloseKey(hkey);
if(res != ERROR_SUCCESS) {
WARN("Could not get CLSID: %08x\n", res);
@@ -1239,13 +1238,11 @@ static HRESULT WINAPI InternetBindInfo_GetBindString(IInternetBindInfo *iface,
switch(ulStringType) {
case BINDSTRING_ACCEPT_MIMES: {
- static const WCHAR wszMimes[] = {'*','/','*',0};
-
if(!ppwzStr || !pcElFetched)
return E_INVALIDARG;
- ppwzStr[0] = CoTaskMemAlloc(sizeof(wszMimes));
- memcpy(ppwzStr[0], wszMimes, sizeof(wszMimes));
+ ppwzStr[0] = CoTaskMemAlloc(sizeof(L"*/*"));
+ memcpy(ppwzStr[0], L"*/*", sizeof(L"*/*"));
*pcElFetched = 1;
return S_OK;
}
diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c
index e9c97e8a9db..2e58884b199 100644
--- a/dlls/urlmon/bindprot.c
+++ b/dlls/urlmon/bindprot.c
@@ -83,10 +83,6 @@ static LRESULT WINAPI notif_wnd_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM
return DefWindowProcW(hwnd, msg, wParam, lParam);
}
-static const WCHAR wszURLMonikerNotificationWindow[] =
- {'U','R','L',' ','M','o','n','i','k','e','r',' ',
- 'N','o','t','i','f','i','c','a','t','i','o','n',' ','W','i','n','d','o','w',0};
-
static ATOM notif_wnd_class;
static BOOL WINAPI register_notif_wnd_class(INIT_ONCE *once, void *param, void **context)
@@ -94,7 +90,7 @@ static BOOL WINAPI register_notif_wnd_class(INIT_ONCE *once, void *param, void *
static WNDCLASSEXW wndclass = {
sizeof(wndclass), 0, notif_wnd_proc, 0, 0,
NULL, NULL, NULL, NULL, NULL,
- wszURLMonikerNotificationWindow, NULL
+ L"URL Moniker Notification Window", NULL
};
wndclass.hInstance = hProxyDll;
@@ -128,7 +124,7 @@ HWND get_notif_hwnd(void)
return NULL;
tls_data->notif_hwnd = CreateWindowExW(0, MAKEINTRESOURCEW(notif_wnd_class),
- wszURLMonikerNotificationWindow, 0, 0, 0, 0, 0, HWND_MESSAGE,
+ L"URL Moniker Notification Window", 0, 0, 0, 0, 0, HWND_MESSAGE,
NULL, hProxyDll, NULL);
if(tls_data->notif_hwnd)
tls_data->notif_hwnd_cnt++;
diff --git a/dlls/urlmon/file.c b/dlls/urlmon/file.c
index d634085b766..f2a8d983251 100644
--- a/dlls/urlmon/file.c
+++ b/dlls/urlmon/file.c
@@ -264,7 +264,6 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
DWORD grfBINDF = 0;
DWORD scheme, size;
LPWSTR mime = NULL;
- WCHAR null_char = 0;
BSTR ext;
HRESULT hres;
@@ -301,7 +300,7 @@ static HRESULT WINAPI FileProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
return S_OK;
}
- IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, &null_char);
+ IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_SENDINGREQUEST, L"");
size = 0;
hres = CoInternetParseIUri(pUri, PARSE_PATH_FROM_URL, 0, path, ARRAY_SIZE(path), &size, 0);
diff --git a/dlls/urlmon/format.c b/dlls/urlmon/format.c
index 6967c3b4f39..c9e528ce35a 100644
--- a/dlls/urlmon/format.c
+++ b/dlls/urlmon/format.c
@@ -21,7 +21,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
-static WCHAR wszEnumFORMATETC[] = {'_','E','n','u','m','F','O','R','M','A','T','E','T','C','_',0};
+static WCHAR wszEnumFORMATETC[] = L"_EnumFORMATETC_";
typedef struct {
IEnumFORMATETC IEnumFORMATETC_iface;
diff --git a/dlls/urlmon/http.c b/dlls/urlmon/http.c
index cf7a0b78231..bee226bd474 100644
--- a/dlls/urlmon/http.c
+++ b/dlls/urlmon/http.c
@@ -65,8 +65,7 @@ static inline HttpProtocol *impl_from_IWinInetHttpInfo(IWinInetHttpInfo *iface)
return CONTAINING_RECORD(iface, HttpProtocol, IWinInetHttpInfo_iface);
}
-static const WCHAR default_headersW[] = {
- 'A','c','c','e','p','t','-','E','n','c','o','d','i','n','g',':',' ','g','z','i','p',',',' ','d','e','f','l','a','t','e',0};
+static const WCHAR default_headersW[] = L"Accept-Encoding: gzip, deflate";
static LPWSTR query_http_info(HttpProtocol *This, DWORD option)
{
@@ -512,9 +511,6 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot)
BOOL res;
HRESULT hres;
- static const WCHAR wszDefaultContentType[] =
- {'t','e','x','t','/','h','t','m','l',0};
-
if(!This->http_negotiate) {
WARN("Expected IHttpNegotiate pointer to be non-NULL\n");
return S_OK;
@@ -572,8 +568,7 @@ static HRESULT HttpProtocol_start_downloading(Protocol *prot)
WARN("HttpQueryInfo failed: %d\n", GetLastError());
IInternetProtocolSink_ReportProgress(This->base.protocol_sink,
(This->base.bindf & BINDF_FROMURLMON)
- ? BINDSTATUS_MIMETYPEAVAILABLE : BINDSTATUS_RAWMIMETYPE,
- wszDefaultContentType);
+ ? BINDSTATUS_MIMETYPEAVAILABLE : BINDSTATUS_RAWMIMETYPE, L"text/html");
}
content_length = query_http_info(This, HTTP_QUERY_CONTENT_LENGTH);
diff --git a/dlls/urlmon/internet.c b/dlls/urlmon/internet.c
index ed95c069e22..20a11be306e 100644
--- a/dlls/urlmon/internet.c
+++ b/dlls/urlmon/internet.c
@@ -26,11 +26,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
static const WCHAR feature_control_keyW[] =
- {'S','o','f','t','w','a','r','e','\\',
- 'M','i','c','r','o','s','o','f','t','\\',
- 'I','n','t','e','r','n','e','t',' ','E','x','p','l','o','r','e','r','\\',
- 'M','a','i','n','\\',
- 'F','e','a','t','u','r','e','C','o','n','t','r','o','l',0};
+ L"Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl";
static CRITICAL_SECTION process_features_cs;
static CRITICAL_SECTION_DEBUG process_features_cs_dbg =
@@ -489,8 +485,6 @@ static BOOL get_feature_from_reg(HKEY feature_control, LPCWSTR feature_name, LPC
HKEY feature;
DWORD res;
- static const WCHAR wildcardW[] = {'*',0};
-
res = RegOpenKeyW(feature_control, feature_name, &feature);
if(res != ERROR_SUCCESS)
return FALSE;
@@ -499,7 +493,7 @@ static BOOL get_feature_from_reg(HKEY feature_control, LPCWSTR feature_name, LPC
res = RegQueryValueExW(feature, process_name, NULL, &type, (BYTE*)&value, &size);
if(res != ERROR_SUCCESS || type != REG_DWORD) {
size = sizeof(DWORD);
- res = RegQueryValueExW(feature, wildcardW, NULL, &type, (BYTE*)&value, &size);
+ res = RegQueryValueExW(feature, L"*", NULL, &type, (BYTE*)&value, &size);
}
RegCloseKey(feature);
@@ -507,7 +501,7 @@ static BOOL get_feature_from_reg(HKEY feature_control, LPCWSTR feature_name, LPC
return FALSE;
if(type != REG_DWORD) {
- WARN("Unexpected registry value type %d (expected REG_DWORD) for %s\n", type, debugstr_w(wildcardW));
+ WARN("Unexpected registry value type %d (expected REG_DWORD) for %s\n", type, debugstr_w(L"*"));
return FALSE;
}
diff --git a/dlls/urlmon/mimefilter.c b/dlls/urlmon/mimefilter.c
index 44b9e92994a..6ee0da5b119 100644
--- a/dlls/urlmon/mimefilter.c
+++ b/dlls/urlmon/mimefilter.c
@@ -428,14 +428,12 @@ HRESULT find_mime_from_ext(const WCHAR *ext, WCHAR **ret)
WCHAR mime[64];
HKEY hkey;
- static const WCHAR content_typeW[] = {'C','o','n','t','e','n','t',' ','T','y','p','e','\0'};
-
res = RegOpenKeyW(HKEY_CLASSES_ROOT, ext, &hkey);
if(res != ERROR_SUCCESS)
return HRESULT_FROM_WIN32(res);
size = sizeof(mime);
- res = RegQueryValueExW(hkey, content_typeW, NULL, NULL, (LPBYTE)mime, &size);
+ res = RegQueryValueExW(hkey, L"Content Type", NULL, NULL, (BYTE*)mime, &size);
RegCloseKey(hkey);
if(res != ERROR_SUCCESS)
return HRESULT_FROM_WIN32(res);
@@ -482,9 +480,8 @@ static HRESULT find_mime_from_url(const WCHAR *url, WCHAR **ret)
return hres;
}
-static const WCHAR text_plainW[] = {'t','e','x','t','/','p','l','a','i','n','\0'};
-static const WCHAR app_octetstreamW[] = {'a','p','p','l','i','c','a','t','i','o','n','/',
- 'o','c','t','e','t','-','s','t','r','e','a','m','\0'};
+static const WCHAR text_plainW[] = L"text/plain";
+static const WCHAR app_octetstreamW[] = L"application/octet-stream";
static const struct {
const WCHAR *mime;
diff --git a/dlls/urlmon/sec_mgr.c b/dlls/urlmon/sec_mgr.c
index af6cf212bd4..60672930ebc 100644
--- a/dlls/urlmon/sec_mgr.c
+++ b/dlls/urlmon/sec_mgr.c
@@ -33,35 +33,12 @@
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
-
-static const WCHAR currentlevelW[] = {'C','u','r','r','e','n','t','L','e','v','e','l',0};
-static const WCHAR descriptionW[] = {'D','e','s','c','r','i','p','t','i','o','n',0};
-static const WCHAR displaynameW[] = {'D','i','s','p','l','a','y','N','a','m','e',0};
-static const WCHAR fileW[] = {'f','i','l','e',0};
-static const WCHAR flagsW[] = {'F','l','a','g','s',0};
-static const WCHAR iconW[] = {'I','c','o','n',0};
-static const WCHAR minlevelW[] = {'M','i','n','L','e','v','e','l',0};
-static const WCHAR recommendedlevelW[] = {'R','e','c','o','m','m','e','n','d','e','d',
- 'L','e','v','e','l',0};
-static const WCHAR wszZonesKey[] = {'S','o','f','t','w','a','r','e','\\',
- 'M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s','\\',
- 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
- 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\',
- 'Z','o','n','e','s','\\',0};
-static const WCHAR zone_map_keyW[] = {'S','o','f','t','w','a','r','e','\\',
- 'M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s','\\',
- 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
- 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\',
- 'Z','o','n','e','M','a','p',0};
-static const WCHAR wszZoneMapDomainsKey[] = {'S','o','f','t','w','a','r','e','\\',
- 'M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s','\\',
- 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
- 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\',
- 'Z','o','n','e','M','a','p','\\',
- 'D','o','m','a','i','n','s',0};
+static const WCHAR wszZonesKey[] =
+ L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\";
+static const WCHAR zone_map_keyW[] =
+ L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap";
+static const WCHAR wszZoneMapDomainsKey[] =
+ L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\Domains";
static inline BOOL is_drive_path(const WCHAR *path)
{
@@ -135,13 +112,7 @@ static HRESULT get_zone_from_reg(LPCWSTR schema, DWORD *zone)
HKEY hkey;
static const WCHAR wszZoneMapProtocolKey[] =
- {'S','o','f','t','w','a','r','e','\\',
- 'M','i','c','r','o','s','o','f','t','\\',
- 'W','i','n','d','o','w','s','\\',
- 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\',
- 'I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s','\\',
- 'Z','o','n','e','M','a','p','\\',
- 'P','r','o','t','o','c','o','l','D','e','f','a','u','l','t','s',0};
+ L"Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ZoneMap\\ProtocolDefaults";
res = RegOpenKeyW(HKEY_CURRENT_USER, wszZoneMapProtocolKey, &hkey);
if(res != ERROR_SUCCESS) {
@@ -262,8 +233,6 @@ static BOOL matches_domain_pattern(LPCWSTR pattern, LPCWSTR str, BOOL implicit_w
static BOOL get_zone_for_scheme(HKEY key, LPCWSTR schema, DWORD *zone)
{
- static const WCHAR wildcardW[] = {'*',0};
-
DWORD res;
DWORD size = sizeof(DWORD);
DWORD type;
@@ -278,12 +247,12 @@ static BOOL get_zone_for_scheme(HKEY key, LPCWSTR schema, DWORD *zone)
/* Try to get the zone for the wildcard scheme. */
size = sizeof(DWORD);
- res = RegQueryValueExW(key, wildcardW, NULL, &type, (BYTE*)zone, &size);
+ res = RegQueryValueExW(key, L"*", NULL, &type, (BYTE*)zone, &size);
if(res != ERROR_SUCCESS)
return FALSE;
if(type != REG_DWORD) {
- WARN("Unexpected value type %d for value %s, expected REG_DWORD\n", type, debugstr_w(wildcardW));
+ WARN("Unexpected value type %d for value %s, expected REG_DWORD\n", type, debugstr_w(L"*"));
return FALSE;
}
@@ -528,7 +497,7 @@ static HRESULT map_security_uri_to_zone(IUri *uri, DWORD *zone)
if(FAILED(hres))
return hres;
- if(!wcsicmp(scheme, fileW)) {
+ if(!wcsicmp(scheme, L"file")) {
BSTR path;
WCHAR *ptr, *path_start, root[20];
@@ -639,12 +608,10 @@ static HRESULT map_uri_to_zone(IUri *uri, DWORD *zone, IUri **ret_uri)
static HRESULT open_zone_key(HKEY parent_key, DWORD zone, HKEY *hkey)
{
- static const WCHAR wszFormat[] = {'%','s','%','u',0};
-
WCHAR key_name[ARRAY_SIZE(wszZonesKey) + 12];
DWORD res;
- wsprintfW(key_name, wszFormat, wszZonesKey, zone);
+ wsprintfW(key_name, L"%s%u", wszZonesKey, zone);
res = RegOpenKeyW(parent_key, key_name, hkey);
@@ -688,9 +655,7 @@ static HRESULT get_action_policy(DWORD zone, DWORD action, BYTE *policy, DWORD s
WCHAR action_str[16];
DWORD len = size;
- static const WCHAR formatW[] = {'%','X',0};
-
- wsprintfW(action_str, formatW, action);
+ wsprintfW(action_str, L"%X", action);
res = RegQueryValueExW(hkey, action_str, NULL, NULL, policy, &len);
if(res == ERROR_MORE_DATA) {
@@ -1425,13 +1390,13 @@ static HRESULT WINAPI ZoneMgrImpl_GetZoneAttributes(IInternetZoneManagerEx2* ifa
if (FAILED(hr))
TRACE("Zone %d not in HKLM\n", dwZone);
- get_string_from_reg(hcu, hklm, displaynameW, pZoneAttributes->szDisplayName, MAX_ZONE_PATH);
- get_string_from_reg(hcu, hklm, descriptionW, pZoneAttributes->szDescription, MAX_ZONE_DESCRIPTION);
- get_string_from_reg(hcu, hklm, iconW, pZoneAttributes->szIconPath, MAX_ZONE_PATH);
- get_dword_from_reg(hcu, hklm, minlevelW, &pZoneAttributes->dwTemplateMinLevel);
- get_dword_from_reg(hcu, hklm, currentlevelW, &pZoneAttributes->dwTemplateCurrentLevel);
- get_dword_from_reg(hcu, hklm, recommendedlevelW, &pZoneAttributes->dwTemplateRecommended);
- get_dword_from_reg(hcu, hklm, flagsW, &pZoneAttributes->dwFlags);
+ get_string_from_reg(hcu, hklm, L"DisplayName", pZoneAttributes->szDisplayName, MAX_ZONE_PATH);
+ get_string_from_reg(hcu, hklm, L"Description", pZoneAttributes->szDescription, MAX_ZONE_DESCRIPTION);
+ get_string_from_reg(hcu, hklm, L"Icon", pZoneAttributes->szIconPath, MAX_ZONE_PATH);
+ get_dword_from_reg(hcu, hklm, L"MinLevel", &pZoneAttributes->dwTemplateMinLevel);
+ get_dword_from_reg(hcu, hklm, L"CurrentLevel", &pZoneAttributes->dwTemplateCurrentLevel);
+ get_dword_from_reg(hcu, hklm, L"RecommendedLevel", &pZoneAttributes->dwTemplateRecommended);
+ get_dword_from_reg(hcu, hklm, L"Flags", &pZoneAttributes->dwFlags);
RegCloseKey(hklm);
RegCloseKey(hcu);
@@ -1459,25 +1424,25 @@ static HRESULT WINAPI ZoneMgrImpl_SetZoneAttributes(IInternetZoneManagerEx2* ifa
return S_OK; /* IE6 returned E_FAIL here */
/* cbSize is ignored */
- RegSetValueExW(hcu, displaynameW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szDisplayName,
+ RegSetValueExW(hcu, L"DisplayName", 0, REG_SZ, (BYTE*)pZoneAttributes->szDisplayName,
(lstrlenW(pZoneAttributes->szDisplayName)+1)* sizeof(WCHAR));
- RegSetValueExW(hcu, descriptionW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szDescription,
+ RegSetValueExW(hcu, L"Description", 0, REG_SZ, (BYTE*)pZoneAttributes->szDescription,
(lstrlenW(pZoneAttributes->szDescription)+1)* sizeof(WCHAR));
- RegSetValueExW(hcu, iconW, 0, REG_SZ, (LPBYTE) pZoneAttributes->szIconPath,
+ RegSetValueExW(hcu, L"Icon", 0, REG_SZ, (BYTE*)pZoneAttributes->szIconPath,
(lstrlenW(pZoneAttributes->szIconPath)+1)* sizeof(WCHAR));
- RegSetValueExW(hcu, minlevelW, 0, REG_DWORD,
+ RegSetValueExW(hcu, L"MinLevel", 0, REG_DWORD,
(const BYTE*) &pZoneAttributes->dwTemplateMinLevel, sizeof(DWORD));
- RegSetValueExW(hcu, currentlevelW, 0, REG_DWORD,
+ RegSetValueExW(hcu, L"CurrentLevel", 0, REG_DWORD,
(const BYTE*) &pZoneAttributes->dwTemplateCurrentLevel, sizeof(DWORD));
- RegSetValueExW(hcu, recommendedlevelW, 0, REG_DWORD,
+ RegSetValueExW(hcu, L"RecommendedLevel", 0, REG_DWORD,
(const BYTE*) &pZoneAttributes->dwTemplateRecommended, sizeof(DWORD));
- RegSetValueExW(hcu, flagsW, 0, REG_DWORD, (const BYTE*) &pZoneAttributes->dwFlags, sizeof(DWORD));
+ RegSetValueExW(hcu, L"Flags", 0, REG_DWORD, (const BYTE*) &pZoneAttributes->dwFlags, sizeof(DWORD));
RegCloseKey(hcu);
return S_OK;
@@ -2048,7 +2013,7 @@ HRESULT WINAPI CoInternetGetSecurityUrlEx(IUri *pUri, IUri **ppSecUri, PSUACTION
const WCHAR *tmp = ret_url;
/* Check and see if a "//" is after the scheme name. */
- tmp += ARRAY_SIZE(fileW);
+ tmp += ARRAY_SIZE(L"file");
if(*tmp != '/' || *(tmp+1) != '/')
hres = E_INVALIDARG;
}
@@ -2083,11 +2048,9 @@ BOOL WINAPI IsInternetESCEnabledLocal(void)
DWORD type, size, val;
HKEY zone_map;
- static const WCHAR iehardenW[] = {'I','E','H','a','r','d','e','n',0};
-
if(RegOpenKeyExW(HKEY_CURRENT_USER, zone_map_keyW, 0, KEY_QUERY_VALUE, &zone_map) == ERROR_SUCCESS) {
size = sizeof(DWORD);
- if(RegQueryValueExW(zone_map, iehardenW, NULL, &type, (BYTE*)&val, &size) == ERROR_SUCCESS)
+ if(RegQueryValueExW(zone_map, L"IEHarden", NULL, &type, (BYTE*)&val, &size) == ERROR_SUCCESS)
esc_enabled = type == REG_DWORD && val != 0;
RegCloseKey(zone_map);
}
diff --git a/dlls/urlmon/session.c b/dlls/urlmon/session.c
index 523511d2db7..5154bdb61f8 100644
--- a/dlls/urlmon/session.c
+++ b/dlls/urlmon/session.c
@@ -52,13 +52,6 @@ static CRITICAL_SECTION_DEBUG session_cs_dbg =
};
static CRITICAL_SECTION session_cs = { &session_cs_dbg, -1, 0, 0, 0, 0 };
-static const WCHAR internet_settings_keyW[] =
- {'S','O','F','T','W','A','R','E',
- '\\','M','i','c','r','o','s','o','f','t',
- '\\','W','i','n','d','o','w','s',
- '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n',
- '\\','I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s',0};
-
static name_space *find_name_space(LPCWSTR protocol)
{
name_space *iter;
@@ -82,7 +75,6 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
static const WCHAR wszProtocolsKey[] =
{'P','R','O','T','O','C','O','L','S','\\','H','a','n','d','l','e','r','\\'};
- static const WCHAR wszCLSID[] = {'C','L','S','I','D',0};
wszKey = heap_alloc(sizeof(wszProtocolsKey)+(schema_len+1)*sizeof(WCHAR));
memcpy(wszKey, wszProtocolsKey, sizeof(wszProtocolsKey));
@@ -96,7 +88,7 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
}
size = sizeof(str_clsid);
- res = RegQueryValueExW(hkey, wszCLSID, NULL, &type, (LPBYTE)str_clsid, &size);
+ res = RegQueryValueExW(hkey, L"CLSID", NULL, &type, (BYTE*)str_clsid, &size);
RegCloseKey(hkey);
if(res != ERROR_SUCCESS || type != REG_SZ) {
WARN("Could not get protocol CLSID res=%d\n", res);
@@ -249,10 +241,6 @@ HRESULT get_protocol_handler(IUri *uri, CLSID *clsid, IClassFactory **ret)
IInternetProtocol *get_mime_filter(LPCWSTR mime)
{
- static const WCHAR filtersW[] = {'P','r','o','t','o','c','o','l','s',
- '\\','F','i','l','t','e','r',0 };
- static const WCHAR CLSIDW[] = {'C','L','S','I','D',0};
-
IClassFactory *cf = NULL;
IInternetProtocol *ret;
mime_filter *iter;
@@ -283,7 +271,7 @@ IInternetProtocol *get_mime_filter(LPCWSTR mime)
return ret;
}
- res = RegOpenKeyW(HKEY_CLASSES_ROOT, filtersW, &hlist);
+ res = RegOpenKeyW(HKEY_CLASSES_ROOT, L"Protocols\\Filter", &hlist);
if(res != ERROR_SUCCESS) {
TRACE("Could not open MIME filters key\n");
return NULL;
@@ -295,7 +283,7 @@ IInternetProtocol *get_mime_filter(LPCWSTR mime)
return NULL;
size = sizeof(clsidw);
- res = RegQueryValueExW(hfilter, CLSIDW, NULL, &type, (LPBYTE)clsidw, &size);
+ res = RegQueryValueExW(hfilter, L"CLSID", NULL, &type, (BYTE*)clsidw, &size);
CloseHandle(hfilter);
if(res!=ERROR_SUCCESS || type!=REG_SZ) {
WARN("Could not get filter CLSID for %s\n", debugstr_w(mime));
@@ -505,13 +493,11 @@ static BOOL get_url_encoding(HKEY root, DWORD *encoding)
DWORD size = sizeof(DWORD), res, type;
HKEY hkey;
- static const WCHAR wszUrlEncoding[] = {'U','r','l','E','n','c','o','d','i','n','g',0};
-
- res = RegOpenKeyW(root, internet_settings_keyW, &hkey);
+ res = RegOpenKeyW(root, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings", &hkey);
if(res != ERROR_SUCCESS)
return FALSE;
- res = RegQueryValueExW(hkey, wszUrlEncoding, NULL, &type, (LPBYTE)encoding, &size);
+ res = RegQueryValueExW(hkey, L"UrlEncoding", NULL, &type, (BYTE*)encoding, &size);
RegCloseKey(hkey);
return res == ERROR_SUCCESS;
@@ -529,39 +515,21 @@ static void ensure_useragent(void)
BOOL is_wow;
HKEY key;
- static const WCHAR formatW[] =
- {'M','o','z','i','l','l','a','/','4','.','0',
- ' ','(','c','o','m','p','a','t','i','b','l','e',';',
- ' ','M','S','I','E',' ','8','.','0',';',
- ' ','W','i','n','d','o','w','s',' ','%','s','%','d','.','%','d',';',
- ' ','%','s','T','r','i','d','e','n','t','/','5','.','0',0};
- static const WCHAR post_platform_keyW[] =
- {'S','O','F','T','W','A','R','E',
- '\\','M','i','c','r','o','s','o','f','t',
- '\\','W','i','n','d','o','w','s',
- '\\','C','u','r','r','e','n','t','V','e','r','s','i','o','n',
- '\\','I','n','t','e','r','n','e','t',' ','S','e','t','t','i','n','g','s',
- '\\','5','.','0','\\','U','s','e','r',' ','A','g','e','n','t',
- '\\','P','o','s','t',' ','P','l','a','t','f','o','r','m',0};
- static const WCHAR ntW[] = {'N','T',' ',0};
- static const WCHAR win64W[] = {'W','i','n','6','4',';',' ','x','6','4',';',' ',0};
- static const WCHAR wow64W[] = {'W','O','W','6','4',';',' ',0};
- static const WCHAR emptyW[] = {0};
-
if(user_agent)
return;
GetVersionExW(&info);
- is_nt = info.dwPlatformId == VER_PLATFORM_WIN32_NT ? ntW : emptyW;
+ is_nt = info.dwPlatformId == VER_PLATFORM_WIN32_NT ? L"NT " : L"";
if(sizeof(void*) == 8)
- os_type = win64W;
+ os_type = L"Win64; x64; ";
else if(IsWow64Process(GetCurrentProcess(), &is_wow) && is_wow)
- os_type = wow64W;
+ os_type = L"WOW64; ";
else
- os_type = emptyW;
+ os_type = L"";
- swprintf(buf, ARRAY_SIZE(buf), formatW, is_nt, info.dwMajorVersion, info.dwMinorVersion, os_type);
+ swprintf(buf, ARRAY_SIZE(buf), L"Mozilla/4.0 (compatible; MSIE 8.0; Windows %s%d.%d; %sTrident/5.0",
+ is_nt, info.dwMajorVersion, info.dwMinorVersion, os_type);
len = lstrlenW(buf);
size = len+40;
@@ -571,7 +539,8 @@ static void ensure_useragent(void)
memcpy(ret, buf, len*sizeof(WCHAR));
- res = RegOpenKeyW(HKEY_LOCAL_MACHINE, post_platform_keyW, &key);
+ res = RegOpenKeyW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\"
+ "Internet Settings\\5.0\\User Agent\\Post Platform", &key);
if(res == ERROR_SUCCESS) {
DWORD value_len;
diff --git a/dlls/urlmon/umon.c b/dlls/urlmon/umon.c
index 14273efee99..e51b2f07d26 100644
--- a/dlls/urlmon/umon.c
+++ b/dlls/urlmon/umon.c
@@ -858,10 +858,7 @@ HRESULT WINAPI URLDownloadToCacheFileW(LPUNKNOWN lpUnkCaller, LPCWSTR szURL, LPW
HRESULT hr;
LPWSTR ext;
- static WCHAR header[] = {
- 'H','T','T','P','/','1','.','0',' ','2','0','0',' ',
- 'O','K','\\','r','\\','n','\\','r','\\','n',0
- };
+ static WCHAR header[] = L"HTTP/1.0 200 OK\\r\\n\\r\\n";
TRACE("(%p, %s, %p, %d, %d, %p)\n", lpUnkCaller, debugstr_w(szURL),
szFileName, dwBufLength, dwReserved, pBSC);
@@ -932,11 +929,10 @@ HRESULT WINAPI HlinkSimpleNavigateToString( LPCWSTR szTarget,
if (grfHLNF == HLNF_OPENINNEWWINDOW)
{
SHELLEXECUTEINFOW sei;
- static const WCHAR openW[] = { 'o', 'p', 'e', 'n', 0 };
memset(&sei, 0, sizeof(sei));
sei.cbSize = sizeof(sei);
- sei.lpVerb = openW;
+ sei.lpVerb = L"open";
sei.nShow = SW_SHOWNORMAL;
sei.fMask = SEE_MASK_FLAG_NO_UI | SEE_MASK_NO_CONSOLE;
sei.lpFile = szTarget;
diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c
index cf901dfd8b7..91247b689b8 100644
--- a/dlls/urlmon/uri.c
+++ b/dlls/urlmon/uri.c
@@ -699,8 +699,6 @@ static BSTR pre_process_uri(LPCWSTR uri) {
* address.
*/
static DWORD ui2ipv4(WCHAR *dest, UINT address) {
- static const WCHAR formatW[] =
- {'%','u','.','%','u','.','%','u','.','%','u',0};
DWORD ret = 0;
UCHAR digits[4];
@@ -711,22 +709,21 @@ static DWORD ui2ipv4(WCHAR *dest, UINT address) {
if(!dest) {
WCHAR tmp[16];
- ret = swprintf(tmp, ARRAY_SIZE(tmp), formatW, digits[0], digits[1], digits[2], digits[3]);
+ ret = swprintf(tmp, ARRAY_SIZE(tmp), L"%u.%u.%u.%u", digits[0], digits[1], digits[2], digits[3]);
} else
- ret = swprintf(dest, 16, formatW, digits[0], digits[1], digits[2], digits[3]);
+ ret = swprintf(dest, 16, L"%u.%u.%u.%u", digits[0], digits[1], digits[2], digits[3]);
return ret;
}
static DWORD ui2str(WCHAR *dest, UINT value) {
- static const WCHAR formatW[] = {'%','u',0};
DWORD ret = 0;
if(!dest) {
WCHAR tmp[11];
- ret = swprintf(tmp, ARRAY_SIZE(tmp), formatW, value);
+ ret = swprintf(tmp, ARRAY_SIZE(tmp), L"%u", value);
} else
- ret = swprintf(dest, 11, formatW, value);
+ ret = swprintf(dest, 11, L"%u", value);
return ret;
}
@@ -970,14 +967,11 @@ static BOOL parse_scheme_type(parse_data *data) {
* Returns TRUE if it was able to successfully parse the information.
*/
static BOOL parse_scheme(const WCHAR **ptr, parse_data *data, DWORD flags, DWORD extras) {
- static const WCHAR fileW[] = {'f','i','l','e',0};
- static const WCHAR wildcardW[] = {'*',0};
-
/* First check to see if the uri could implicitly be a file path. */
if(is_implicit_file_path(*ptr)) {
if(flags & Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME) {
- data->scheme = fileW;
- data->scheme_len = lstrlenW(fileW);
+ data->scheme = L"file";
+ data->scheme_len = lstrlenW(L"file");
data->has_implicit_scheme = TRUE;
TRACE("(%p %p %x): URI is an implicit file path.\n", ptr, data, flags);
@@ -996,8 +990,8 @@ static BOOL parse_scheme(const WCHAR **ptr, parse_data *data, DWORD flags, DWORD
* c) an invalid URI.
*/
if(flags & Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME) {
- data->scheme = wildcardW;
- data->scheme_len = lstrlenW(wildcardW);
+ data->scheme = L"*";
+ data->scheme_len = lstrlenW(L"*");
data->has_implicit_scheme = TRUE;
TRACE("(%p %p %x): URI is an implicit wildcard scheme.\n", ptr, data, flags);
@@ -1510,7 +1504,6 @@ static BOOL parse_authority(const WCHAR **ptr, parse_data *data, DWORD flags) {
/* Attempts to parse the path information of a hierarchical URI. */
static BOOL parse_path_hierarchical(const WCHAR **ptr, parse_data *data, DWORD flags) {
const WCHAR *start = *ptr;
- static const WCHAR slash[] = {'/',0};
const BOOL is_file = data->scheme_type == URL_SCHEME_FILE;
if(is_path_delim(data->scheme_type, **ptr)) {
@@ -1519,7 +1512,7 @@ static BOOL parse_path_hierarchical(const WCHAR **ptr, parse_data *data, DWORD f
data->path_len = 0;
} else if(!(flags & Uri_CREATE_NO_CANONICALIZE)) {
/* If the path component is empty, then a '/' is added. */
- data->path = slash;
+ data->path = L"/";
data->path_len = 1;
}
} else {
@@ -1972,14 +1965,12 @@ static BOOL canonicalize_userinfo(const parse_data *data, Uri *uri, DWORD flags,
*/
static BOOL canonicalize_reg_name(const parse_data *data, Uri *uri,
DWORD flags, BOOL computeOnly) {
- static const WCHAR localhostW[] =
- {'l','o','c','a','l','h','o','s','t',0};
const WCHAR *ptr;
const BOOL known_scheme = data->scheme_type != URL_SCHEME_UNKNOWN;
if(data->scheme_type == URL_SCHEME_FILE &&
- data->host_len == lstrlenW(localhostW)) {
- if(!StrCmpNIW(data->host, localhostW, data->host_len)) {
+ data->host_len == lstrlenW(L"localhost")) {
+ if(!StrCmpNIW(data->host, L"localhost", data->host_len)) {
uri->host_start = -1;
uri->host_len = 0;
uri->host_type = Uri_HOST_UNKNOWN;
@@ -3147,8 +3138,7 @@ static HRESULT validate_scheme_name(const UriBuilder *builder, parse_data *data,
ptr = builder->uri->canon_uri+builder->uri->scheme_start;
expected_len = builder->uri->scheme_len;
} else {
- static const WCHAR nullW[] = {0};
- ptr = nullW;
+ ptr = L"";
expected_len = 0;
}
@@ -3317,8 +3307,7 @@ static HRESULT validate_path(const UriBuilder *builder, parse_data *data, DWORD
ptr = builder->uri->canon_uri+builder->uri->path_start;
expected_len = builder->uri->path_len;
} else {
- static const WCHAR nullW[] = {0};
- ptr = nullW;
+ ptr = L"";
check_len = FALSE;
expected_len = -1;
}
@@ -6131,8 +6120,7 @@ static HRESULT combine_uri(Uri *base, Uri *relative, DWORD flags, IUri **result,
/* Just set the path as a '/' if the base didn't have
* one and if it's a hierarchical URI.
*/
- static const WCHAR slashW[] = {'/',0};
- data.path = slashW;
+ data.path = L"/";
data.path_len = 1;
}
diff --git a/dlls/urlmon/urlmon_main.c b/dlls/urlmon/urlmon_main.c
index 5d598830fdf..1af4d38ac81 100644
--- a/dlls/urlmon/urlmon_main.c
+++ b/dlls/urlmon/urlmon_main.c
@@ -453,9 +453,7 @@ static HRESULT register_inf(BOOL doregister)
HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
HMODULE hAdvpack;
- static const WCHAR wszAdvpack[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
-
- hAdvpack = LoadLibraryW(wszAdvpack);
+ hAdvpack = LoadLibraryW(L"advpack.dll");
pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
return pRegInstall(hProxyDll, doregister ? "RegisterDll" : "UnregisterDll", NULL);
--
2.26.2
2
1
Signed-off-by: Jeff Smith <whydoubt(a)gmail.com>
---
v2 - Fix some logic errors and suboptimal code.
dlls/jscript/decode.c | 12 ++++++------
dlls/jscript/function.c | 19 +++++++++----------
dlls/jscript/jsutils.c | 6 +++---
dlls/jscript/parser.y | 4 +---
dlls/jscript/string.c | 4 +---
5 files changed, 20 insertions(+), 25 deletions(-)
diff --git a/dlls/jscript/decode.c b/dlls/jscript/decode.c
index 283aa2ed947..6a87d55e0e0 100644
--- a/dlls/jscript/decode.c
+++ b/dlls/jscript/decode.c
@@ -113,14 +113,14 @@ HRESULT decode_source(WCHAR *code)
const WCHAR *src = code;
WCHAR *dst = code;
- static const WCHAR decode_beginW[] = {'#','@','~','^'};
- static const WCHAR decode_endW[] = {'^','#','~','@'};
+ static const WCHAR decode_beginW[] = L"#@~^";
+ static const WCHAR decode_endW[] = L"^#~@";
while(*src) {
- if(!wcsncmp(src, decode_beginW, ARRAY_SIZE(decode_beginW))) {
+ if(!wcsncmp(src, decode_beginW, ARRAY_SIZE(decode_beginW)-1)) {
DWORD len, i, j=0, csum, s=0;
- src += ARRAY_SIZE(decode_beginW);
+ src += ARRAY_SIZE(decode_beginW) - 1;
if(!decode_dword(src, &len))
return JS_E_INVALID_CHAR;
@@ -165,9 +165,9 @@ HRESULT decode_source(WCHAR *code)
return JS_E_INVALID_CHAR;
src += 8;
- if(wcsncmp(src, decode_endW, ARRAY_SIZE(decode_endW)))
+ if(wcsncmp(src, decode_endW, ARRAY_SIZE(decode_endW)-1))
return JS_E_INVALID_CHAR;
- src += ARRAY_SIZE(decode_endW);
+ src += ARRAY_SIZE(decode_endW) - 1;
}else {
*dst++ = *src++;
}
diff --git a/dlls/jscript/function.c b/dlls/jscript/function.c
index 9f6aa4b4ec6..7a6dd4b61f3 100644
--- a/dlls/jscript/function.c
+++ b/dlls/jscript/function.c
@@ -620,17 +620,16 @@ static HRESULT NativeFunction_toString(FunctionInstance *func, jsstr_t **ret)
jsstr_t *str;
WCHAR *ptr;
- static const WCHAR native_prefixW[] = {'\n','f','u','n','c','t','i','o','n',' '};
- static const WCHAR native_suffixW[] =
- {'(',')',' ','{','\n',' ',' ',' ',' ','[','n','a','t','i','v','e',' ','c','o','d','e',']','\n','}','\n'};
+ static const WCHAR native_prefixW[] = L"\nfunction ";
+ static const WCHAR native_suffixW[] = L"() {\n [native code]\n}\n";
name_len = function->name ? lstrlenW(function->name) : 0;
- str = jsstr_alloc_buf(ARRAY_SIZE(native_prefixW) + ARRAY_SIZE(native_suffixW) + name_len, &ptr);
+ str = jsstr_alloc_buf(ARRAY_SIZE(native_prefixW) + ARRAY_SIZE(native_suffixW) + name_len - 2, &ptr);
if(!str)
return E_OUTOFMEMORY;
memcpy(ptr, native_prefixW, sizeof(native_prefixW));
- ptr += ARRAY_SIZE(native_prefixW);
+ ptr += ARRAY_SIZE(native_prefixW) - 1;
memcpy(ptr, function->name, name_len*sizeof(WCHAR));
ptr += name_len;
memcpy(ptr, native_suffixW, sizeof(native_suffixW));
@@ -912,8 +911,8 @@ static HRESULT construct_function(script_ctx_t *ctx, unsigned argc, jsval_t *arg
int j = 0;
HRESULT hres = S_OK;
- static const WCHAR function_anonymousW[] = {'f','u','n','c','t','i','o','n',' ','a','n','o','n','y','m','o','u','s','('};
- static const WCHAR function_beginW[] = {')',' ','{','\n'};
+ static const WCHAR function_anonymousW[] = L"function anonymous(";
+ static const WCHAR function_beginW[] = L") {\n";
static const WCHAR function_endW[] = L"\n}";
if(argc) {
@@ -932,11 +931,11 @@ static HRESULT construct_function(script_ctx_t *ctx, unsigned argc, jsval_t *arg
}
if(SUCCEEDED(hres)) {
- len += ARRAY_SIZE(function_anonymousW) + ARRAY_SIZE(function_beginW) + ARRAY_SIZE(function_endW);
+ len += ARRAY_SIZE(function_anonymousW) + ARRAY_SIZE(function_beginW) + ARRAY_SIZE(function_endW) - 2;
str = heap_alloc(len*sizeof(WCHAR));
if(str) {
memcpy(str, function_anonymousW, sizeof(function_anonymousW));
- ptr = str + ARRAY_SIZE(function_anonymousW);
+ ptr = str + ARRAY_SIZE(function_anonymousW) - 1;
if(argc > 1) {
while(1) {
ptr += jsstr_flush(params[j], ptr);
@@ -947,7 +946,7 @@ static HRESULT construct_function(script_ctx_t *ctx, unsigned argc, jsval_t *arg
}
}
memcpy(ptr, function_beginW, sizeof(function_beginW));
- ptr += ARRAY_SIZE(function_beginW);
+ ptr += ARRAY_SIZE(function_beginW) - 1;
if(argc)
ptr += jsstr_flush(params[argc-1], ptr);
memcpy(ptr, function_endW, sizeof(function_endW));
diff --git a/dlls/jscript/jsutils.c b/dlls/jscript/jsutils.c
index 56e8306ba21..a2ac53f64b9 100644
--- a/dlls/jscript/jsutils.c
+++ b/dlls/jscript/jsutils.c
@@ -494,7 +494,7 @@ static HRESULT str_to_number(jsstr_t *str, double *ret)
BOOL neg = FALSE;
DOUBLE d = 0.0;
- static const WCHAR infinityW[] = {'I','n','f','i','n','i','t','y'};
+ static const WCHAR infinityW[] = L"Infinity";
ptr = jsstr_flatten(str);
if(!ptr)
@@ -510,8 +510,8 @@ static HRESULT str_to_number(jsstr_t *str, double *ret)
ptr++;
}
- if(!wcsncmp(ptr, infinityW, ARRAY_SIZE(infinityW))) {
- ptr += ARRAY_SIZE(infinityW);
+ if(!wcsncmp(ptr, infinityW, ARRAY_SIZE(infinityW)-1)) {
+ ptr += ARRAY_SIZE(infinityW) - 1;
while(*ptr && iswspace(*ptr))
ptr++;
diff --git a/dlls/jscript/parser.y b/dlls/jscript/parser.y
index 6016be6cfd8..ba81668dbb3 100644
--- a/dlls/jscript/parser.y
+++ b/dlls/jscript/parser.y
@@ -1573,14 +1573,12 @@ HRESULT script_parse(script_ctx_t *ctx, struct _compiler_ctx_t *compiler, byteco
heap_pool_t *mark;
HRESULT hres;
- const WCHAR html_tagW[] = {'<','/','s','c','r','i','p','t','>',0};
-
parser_ctx = heap_alloc_zero(sizeof(parser_ctx_t));
if(!parser_ctx)
return E_OUTOFMEMORY;
parser_ctx->error_loc = -1;
- parser_ctx->is_html = delimiter && !wcsicmp(delimiter, html_tagW);
+ parser_ctx->is_html = delimiter && !wcsicmp(delimiter, L"</script>");
parser_ctx->begin = parser_ctx->ptr = code->source;
parser_ctx->end = parser_ctx->begin + lstrlenW(parser_ctx->begin);
diff --git a/dlls/jscript/string.c b/dlls/jscript/string.c
index 3dd40e6744f..a8bd77dc398 100644
--- a/dlls/jscript/string.c
+++ b/dlls/jscript/string.c
@@ -888,9 +888,7 @@ static HRESULT String_replace(script_ctx_t *ctx, vdisp_t *jsthis, WORD flags, un
if(FAILED(hres))
break;
}else {
- static const WCHAR undefinedW[] = {'u','n','d','e','f','i','n','e','d'};
-
- hres = strbuf_append(&ret, undefinedW, ARRAY_SIZE(undefinedW));
+ hres = strbuf_append(&ret, L"undefined", ARRAY_SIZE(L"undefined")-1);
if(FAILED(hres))
break;
}
--
2.23.0
2
3