winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
July 2007
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
957 discussions
Start a n
N
ew thread
Eric Pouech : ntdll: Implemented ActivationContextDetailedInformation option in RtlQueryInformationActivationContext .
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 5e125e7dbfdc40e079bdb9a887a66e0ec5c30973 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e125e7dbfdc40e079bdb9a88…
Author: Eric Pouech <eric.pouech(a)wanadoo.fr> Date: Wed Jul 25 18:44:11 2007 +0200 ntdll: Implemented ActivationContextDetailedInformation option in RtlQueryInformationActivationContext. --- dlls/ntdll/actctx.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 53 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 7068424..fadcf73 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -2192,6 +2192,7 @@ NTSTATUS WINAPI RtlQueryInformationActivationContext( ULONG flags, HANDLE handle ULONG class, PVOID buffer, SIZE_T bufsize, SIZE_T *retlen ) { + ACTIVATION_CONTEXT *actctx; NTSTATUS status; TRACE("%08x %p %p %u %p %ld %p\n", flags, handle, @@ -2215,6 +2216,58 @@ NTSTATUS WINAPI RtlQueryInformationActivationContext( ULONG flags, HANDLE handle break; case ActivationContextDetailedInformation: + { + ACTIVATION_CONTEXT_DETAILED_INFORMATION *acdi = buffer; + struct assembly *assembly = NULL; + SIZE_T len, manifest_len = 0, config_len = 0, appdir_len = 0; + LPWSTR ptr; + + if (!(actctx = check_actctx(handle))) return STATUS_INVALID_PARAMETER; + + if (actctx->num_assemblies) assembly = actctx->assemblies; + + if (assembly && assembly->manifest.info) + manifest_len = strlenW(assembly->manifest.info) + 1; + if (actctx->config.info) config_len = strlenW(actctx->config.info) + 1; + if (actctx->appdir.info) appdir_len = strlenW(actctx->appdir.info) + 1; + len = sizeof(*acdi) + (manifest_len + config_len + appdir_len) * sizeof(WCHAR); + + if (retlen) *retlen = len; + if (!buffer || bufsize < len) return STATUS_BUFFER_TOO_SMALL; + + acdi->dwFlags = 0; + acdi->ulFormatVersion = assembly ? 1 : 0; /* FIXME */ + acdi->ulAssemblyCount = actctx->num_assemblies; + acdi->ulRootManifestPathType = assembly ? assembly->manifest.type : 0 /* FIXME */; + acdi->ulRootManifestPathChars = assembly && assembly->manifest.info ? manifest_len - 1 : 0; + acdi->ulRootConfigurationPathType = actctx->config.type; + acdi->ulRootConfigurationPathChars = actctx->config.info ? config_len - 1 : 0; + acdi->ulAppDirPathType = actctx->appdir.type; + acdi->ulAppDirPathChars = actctx->appdir.info ? appdir_len - 1 : 0; + ptr = (LPWSTR)(acdi + 1); + if (manifest_len) + { + acdi->lpRootManifestPath = ptr; + memcpy(ptr, assembly->manifest.info, manifest_len * sizeof(WCHAR)); + ptr += manifest_len; + } + else acdi->lpRootManifestPath = NULL; + if (config_len) + { + acdi->lpRootConfigurationPath = ptr; + memcpy(ptr, actctx->config.info, config_len * sizeof(WCHAR)); + ptr += config_len; + } + else acdi->lpRootConfigurationPath = NULL; + if (appdir_len) + { + acdi->lpAppDirPath = ptr; + memcpy(ptr, actctx->appdir.info, appdir_len * sizeof(WCHAR)); + } + else acdi->lpAppDirPath = NULL; + } + break; + case AssemblyDetailedInformationInActivationContext: case FileInformationInAssemblyOfAssemblyInActivationContext: default:
1
0
0
0
Alexandre Julliard : ntdll: Initial implementation of RtlQueryInformationActivationContext.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 3a71513d991fe6b818d92eb3c5435b472b216a0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3a71513d991fe6b818d92eb3c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 25 18:17:36 2007 +0200 ntdll: Initial implementation of RtlQueryInformationActivationContext. Partially based on a patch by Eric Pouech. --- dlls/kernel32/actctx.c | 14 ++++++--- dlls/ntdll/actctx.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/ntdll.spec | 2 +- include/winternl.h | 2 + 4 files changed, 86 insertions(+), 6 deletions(-) diff --git a/dlls/kernel32/actctx.c b/dlls/kernel32/actctx.c index 84c29cd..2d1e11c 100644 --- a/dlls/kernel32/actctx.c +++ b/dlls/kernel32/actctx.c @@ -293,9 +293,13 @@ BOOL WINAPI QueryActCtxW(DWORD dwFlags, HANDLE hActCtx, PVOID pvSubInst, ULONG ulClass, PVOID pvBuff, SIZE_T cbBuff, SIZE_T *pcbLen) { - FIXME("%08x %p %p %u %p %ld %p\n", dwFlags, hActCtx, - pvSubInst, ulClass, pvBuff, cbBuff, pcbLen); - /* this makes Adobe Photoshop 7.0 happy */ - SetLastError( ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; + NTSTATUS status; + + if ((status = RtlQueryInformationActivationContext( dwFlags, hActCtx, pvSubInst, ulClass, + pvBuff, cbBuff, pcbLen ))) + { + SetLastError(RtlNtStatusToDosError(status)); + return FALSE; + } + return TRUE; } diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index f7b0b43..7068424 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -1893,6 +1893,37 @@ static NTSTATUS parse_depend_manifests(struct actctx_loader* acl) return status; } +/* find the appropriate activation context for RtlQueryInformationActivationContext */ +static NTSTATUS find_query_actctx( HANDLE *handle, DWORD flags ) +{ + NTSTATUS status = STATUS_SUCCESS; + + if (flags & QUERY_ACTCTX_FLAG_USE_ACTIVE_ACTCTX) + { + if (NtCurrentTeb()->ActivationContextStack.ActiveFrame) + *handle = NtCurrentTeb()->ActivationContextStack.ActiveFrame->ActivationContext; + } + else if (flags & (QUERY_ACTCTX_FLAG_ACTCTX_IS_ADDRESS|QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE)) + { + ULONG magic; + LDR_MODULE *pldr; + + LdrLockLoaderLock( 0, NULL, &magic ); + if (!LdrFindEntryForAddress( *handle, &pldr )) + { + if ((flags & QUERY_ACTCTX_FLAG_ACTCTX_IS_HMODULE) && *handle != pldr->BaseAddress) + status = STATUS_DLL_NOT_FOUND; + else + *handle = pldr->ActivationContext; + } + else status = STATUS_DLL_NOT_FOUND; + LdrUnlockLoaderLock( 0, magic ); + } + else if (!*handle) *handle = process_actctx; + + return status; +} + /* initialize the activation context for the current process */ void actctx_init(void) { @@ -2149,3 +2180,46 @@ BOOLEAN WINAPI RtlIsActivationContextActive( HANDLE handle ) if (frame->ActivationContext == handle) return TRUE; return FALSE; } + + +/*********************************************************************** + * RtlQueryInformationActivationContext (NTDLL.@) + * + * Get information about an activation context. + * FIXME: function signature/prototype may be wrong + */ +NTSTATUS WINAPI RtlQueryInformationActivationContext( ULONG flags, HANDLE handle, PVOID subinst, + ULONG class, PVOID buffer, + SIZE_T bufsize, SIZE_T *retlen ) +{ + NTSTATUS status; + + TRACE("%08x %p %p %u %p %ld %p\n", flags, handle, + subinst, class, buffer, bufsize, retlen); + + if ((status = find_query_actctx( &handle, flags ))) return status; + + switch (class) + { + case ActivationContextBasicInformation: + { + ACTIVATION_CONTEXT_BASIC_INFORMATION *info = buffer; + + if (retlen) *retlen = sizeof(*info); + if (!info || bufsize < sizeof(*info)) return STATUS_BUFFER_TOO_SMALL; + + info->hActCtx = handle; + info->dwFlags = 0; /* FIXME */ + if (!(flags & QUERY_ACTCTX_FLAG_NO_ADDREF)) RtlAddRefActivationContext( handle ); + } + break; + + case ActivationContextDetailedInformation: + case AssemblyDetailedInformationInActivationContext: + case FileInformationInAssemblyOfAssemblyInActivationContext: + default: + FIXME( "class %u not implemented\n", class ); + return STATUS_NOT_IMPLEMENTED; + } + return STATUS_SUCCESS; +} diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 62e89c7..6f05412 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -767,7 +767,7 @@ @ stdcall RtlQueryEnvironmentVariable_U(ptr ptr ptr) @ stub RtlQueryHeapInformation @ stdcall RtlQueryInformationAcl(ptr ptr long long) -@ stub RtlQueryInformationActivationContext +@ stdcall RtlQueryInformationActivationContext(long long ptr ptr long ptr long ptr) @ stub RtlQueryInformationActiveActivationContext @ stub RtlQueryInterfaceMemoryStream @ stub RtlQueryProcessBackTraceInformation diff --git a/include/winternl.h b/include/winternl.h index 372e4d4..8ad8329 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2195,10 +2195,12 @@ BOOLEAN WINAPI RtlPrefixUnicodeString(const UNICODE_STRING*,const UNICODE_STRI NTSTATUS WINAPI RtlQueryAtomInAtomTable(RTL_ATOM_TABLE,RTL_ATOM,ULONG*,ULONG*,WCHAR*,ULONG*); NTSTATUS WINAPI RtlQueryEnvironmentVariable_U(PWSTR,PUNICODE_STRING,PUNICODE_STRING); NTSTATUS WINAPI RtlQueryInformationAcl(PACL,LPVOID,DWORD,ACL_INFORMATION_CLASS); +NTSTATUS WINAPI RtlQueryInformationActivationContext(ULONG,HANDLE,PVOID,ULONG,PVOID,SIZE_T,SIZE_T*); NTSTATUS WINAPI RtlQueryProcessDebugInformation(ULONG,ULONG,PDEBUG_BUFFER); NTSTATUS WINAPI RtlQueryRegistryValues(ULONG, PCWSTR, PRTL_QUERY_REGISTRY_TABLE, PVOID, PVOID); NTSTATUS WINAPI RtlQueryTimeZoneInformation(RTL_TIME_ZONE_INFORMATION*); NTSTATUS WINAPI RtlQueueWorkItem(PRTL_WORK_ITEM_ROUTINE,PVOID,ULONG); + void WINAPI RtlRaiseException(PEXCEPTION_RECORD); void WINAPI RtlRaiseStatus(NTSTATUS); ULONG WINAPI RtlRandom(PULONG);
1
0
0
0
Alexandre Julliard : ntdll: Fix return status when failing to load the associated manifest for a module .
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 5b844fe84429caaeacb53ebfb13699aedad70ba1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5b844fe84429caaeacb53ebfb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 25 18:10:17 2007 +0200 ntdll: Fix return status when failing to load the associated manifest for a module. --- dlls/ntdll/actctx.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index e712911..f7b0b43 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -1629,7 +1629,7 @@ static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl, if (resid != 1) sprintfW( name.Buffer + strlenW(name.Buffer), fmtW, resid ); strcatW( name.Buffer, dotManifestW ); if (!RtlDosPathNameToNtPathName_U( name.Buffer, &nameW, NULL, NULL )) - status = STATUS_NO_SUCH_FILE; + status = STATUS_RESOURCE_DATA_NOT_FOUND; RtlFreeUnicodeString( &name ); } if (status) return status; @@ -1645,12 +1645,12 @@ static NTSTATUS get_manifest_in_associated_manifest( struct actctx_loader* acl, RtlInitUnicodeString( &nameW, buffer ); } - status = open_nt_file( &file, &nameW ); - if (status == STATUS_SUCCESS) + if (!open_nt_file( &file, &nameW )) { status = get_manifest_in_manifest_file( acl, ai, nameW.Buffer, directory, file ); NtClose( file ); } + else status = STATUS_RESOURCE_DATA_NOT_FOUND; RtlFreeUnicodeString( &nameW ); return status; } @@ -1987,7 +1987,7 @@ NTSTATUS WINAPI RtlCreateActivationContext( HANDLE *handle, const void *ptr ) { status = get_manifest_in_module( &acl, NULL, NULL, directory, pActCtx->hModule, pActCtx->lpResourceName, lang ); - if (status) + if (status && status != STATUS_SXS_CANT_GEN_ACTCTX) /* FIXME: what to do if pActCtx->lpSource is set */ status = get_manifest_in_associated_manifest( &acl, NULL, NULL, directory, pActCtx->hModule, pActCtx->lpResourceName ); @@ -1996,7 +1996,7 @@ NTSTATUS WINAPI RtlCreateActivationContext( HANDLE *handle, const void *ptr ) { status = get_manifest_in_pe_file( &acl, NULL, nameW.Buffer, directory, file, pActCtx->lpResourceName, lang ); - if (status) + if (status && status != STATUS_SXS_CANT_GEN_ACTCTX) status = get_manifest_in_associated_manifest( &acl, NULL, nameW.Buffer, directory, NULL, pActCtx->lpResourceName ); }
1
0
0
0
Alexandre Julliard : ntdll: Improve some activation context traces.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 3b5963c98de2fa36e72df5f2d695f32c8f063ecf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3b5963c98de2fa36e72df5f2d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Jul 26 11:05:09 2007 +0200 ntdll: Improve some activation context traces. --- dlls/ntdll/actctx.c | 30 ++++++++++++++++++++++++------ 1 files changed, 24 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 1ab49ed..e712911 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -269,6 +269,11 @@ static inline const char* debugstr_xmlstr(const xmlstr_t* str) return debugstr_an(str->ptr, str->len); } +static inline const char* debugstr_version(const struct version *ver) +{ + return wine_dbg_sprintf("%u.%u.%u.%u", ver->major, ver->minor, ver->build, ver->revision); +} + static struct assembly *add_assembly(ACTIVATION_CONTEXT *actctx, enum assembly_type at) { struct assembly *assembly; @@ -774,8 +779,6 @@ static BOOL parse_assembly_identity_elem(xmlbuf_t* xmlbuf, ACTIVATION_CONTEXT* a xmlstr_t attr_name, attr_value; BOOL end = FALSE, error; - TRACE("\n"); - while (next_xml_attr(xmlbuf, &attr_name, &attr_value, &error, &end)) { if (xmlstr_cmp(&attr_name, NAME_ATTR)) @@ -816,6 +819,9 @@ static BOOL parse_assembly_identity_elem(xmlbuf_t* xmlbuf, ACTIVATION_CONTEXT* a } } + TRACE( "name=%s version=%s arch=%s\n", + debugstr_w(ai->name), debugstr_version(&ai->version), debugstr_w(ai->arch) ); + if (error || end) return end; return parse_expect_elem(xmlbuf, ELEM_END(ASSEMBLYIDENTITY_ELEM)) && parse_end_element(xmlbuf); } @@ -1097,7 +1103,8 @@ static BOOL parse_dependent_assembly_elem(xmlbuf_t* xmlbuf, struct actctx_loader !parse_assembly_identity_elem(xmlbuf, acl->actctx, &ai)) return FALSE; - TRACE( "adding %s\n", debugstr_w(ai.name) ); + TRACE( "adding name=%s version=%s arch=%s\n", + debugstr_w(ai.name), debugstr_version(&ai.version), debugstr_w(ai.arch) ); /* store the newly found identity for later loading */ if (!add_dependent_assembly_id(acl, &ai)) return FALSE; @@ -1128,8 +1135,6 @@ static BOOL parse_dependency_elem(xmlbuf_t* xmlbuf, struct actctx_loader* acl) xmlstr_t attr_name, attr_value, elem; BOOL end = FALSE, ret = TRUE, error, optional = FALSE; - TRACE("\n"); - while (next_xml_attr(xmlbuf, &attr_name, &attr_value, &error, &end)) { if (xmlstr_cmp(&attr_name, OPTIONAL_ATTR)) @@ -1463,7 +1468,17 @@ static NTSTATUS get_manifest_in_module( struct actctx_loader* acl, struct assemb const IMAGE_RESOURCE_DATA_ENTRY* entry = NULL; void *ptr; - TRACE( "looking for res %s in module %p %s\n", debugstr_w(resname), hModule, debugstr_w(filename) ); + if (TRACE_ON(actctx)) + { + if (!filename && !get_module_filename( hModule, &nameW, 0 )) + { + TRACE( "looking for res %s in module %p %s\n", debugstr_w(resname), + hModule, debugstr_w(nameW.Buffer) ); + RtlFreeUnicodeString( &nameW ); + } + else TRACE( "looking for res %s in module %p %s\n", debugstr_w(resname), + hModule, debugstr_w(filename) ); + } if (!resname) return STATUS_INVALID_PARAMETER; @@ -1792,6 +1807,9 @@ static NTSTATUS lookup_assembly(struct actctx_loader* acl, UNICODE_STRING nameW; HANDLE file; + TRACE( "looking for name=%s version=%s arch=%s\n", + debugstr_w(ai->name), debugstr_version(&ai->version), debugstr_w(ai->arch) ); + if ((status = lookup_winsxs(acl, ai)) != STATUS_NO_SUCH_FILE) return status; /* FIXME: add support for language specific lookup */
1
0
0
0
Alexandre Julliard : ntdll: Store the base directory for an assembly ( based on a patch by Eric Pouech).
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: ad0d2b90ee7d027d140e4447ea0c2de97e8d30a7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ad0d2b90ee7d027d140e4447e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 25 17:02:11 2007 +0200 ntdll: Store the base directory for an assembly (based on a patch by Eric Pouech). --- dlls/ntdll/actctx.c | 98 ++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 73 insertions(+), 25 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=ad0d2b90ee7d027d140e4…
1
0
0
0
Alexandre Julliard : ntdll: Create the per-module activation context at module load time.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 4156a716b01c0ebd8ac7dba11806d574fa2eb7f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4156a716b01c0ebd8ac7dba11…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 25 16:50:32 2007 +0200 ntdll: Create the per-module activation context at module load time. --- dlls/ntdll/loader.c | 33 +++++++++++++++++++++++++++++++++ include/winternl.h | 1 + 2 files changed, 34 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 207d391..700b673 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -48,6 +48,10 @@ WINE_DECLARE_DEBUG_CHANNEL(snoop); WINE_DECLARE_DEBUG_CHANNEL(loaddll); WINE_DECLARE_DEBUG_CHANNEL(imports); +/* we don't want to include winuser.h */ +#define RT_MANIFEST ((ULONG_PTR)24) +#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID ((ULONG_PTR)2) + typedef DWORD (CALLBACK *DLLENTRYPROC)(HMODULE,DWORD,LPVOID); static int process_detaching = 0; /* set on process detach to avoid deadlocks with thread detach */ @@ -578,6 +582,32 @@ done: } +/*********************************************************************** + * create_module_activation_context + */ +static NTSTATUS create_module_activation_context( LDR_MODULE *module ) +{ + NTSTATUS status; + LDR_RESOURCE_INFO info; + const IMAGE_RESOURCE_DATA_ENTRY *entry; + + info.Type = RT_MANIFEST; + info.Name = ISOLATIONAWARE_MANIFEST_RESOURCE_ID; + info.Language = 0; + if (!(status = LdrFindResource_U( module->BaseAddress, &info, 3, &entry ))) + { + ACTCTXW ctx; + ctx.cbSize = sizeof(ctx); + ctx.lpSource = NULL; + ctx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID | ACTCTX_FLAG_HMODULE_VALID; + ctx.hModule = module->BaseAddress; + ctx.lpResourceName = (LPCWSTR)ISOLATIONAWARE_MANIFEST_RESOURCE_ID; + status = RtlCreateActivationContext( &module->ActivationContext, &ctx ); + } + return status; +} + + /**************************************************************** * fixup_imports * @@ -594,6 +624,7 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path ) if (!(wm->ldr.Flags & LDR_DONT_RESOLVE_REFS)) return STATUS_SUCCESS; /* already done */ wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS; + create_module_activation_context( &wm->ldr ); if (!(imports = RtlImageDirectoryEntryToData( wm->ldr.BaseAddress, TRUE, IMAGE_DIRECTORY_ENTRY_IMPORT, &size ))) @@ -651,6 +682,7 @@ static WINE_MODREF *alloc_module( HMODULE hModule, LPCWSTR filename ) wm->ldr.SectionHandle = NULL; wm->ldr.CheckSum = 0; wm->ldr.TimeDateStamp = 0; + wm->ldr.ActivationContext = 0; RtlCreateUnicodeString( &wm->ldr.FullDllName, filename ); if ((p = strrchrW( wm->ldr.FullDllName.Buffer, '\\' ))) p++; @@ -1983,6 +2015,7 @@ static void free_modref( WINE_MODREF *wm ) } SERVER_END_REQ; + RtlReleaseActivationContext( wm->ldr.ActivationContext ); NtUnmapViewOfSection( NtCurrentProcess(), wm->ldr.BaseAddress ); if (wm->ldr.Flags & LDR_WINE_INTERNAL) wine_dll_unload( wm->ldr.SectionHandle ); if (cached_modref == wm) cached_modref = NULL; diff --git a/include/winternl.h b/include/winternl.h index bd9508f..372e4d4 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2357,6 +2357,7 @@ typedef struct _LDR_MODULE HANDLE SectionHandle; ULONG CheckSum; ULONG TimeDateStamp; + HANDLE ActivationContext; } LDR_MODULE, *PLDR_MODULE; /* those defines are (some of the) regular LDR_MODULE.Flags values */
1
0
0
0
Alexandre Julliard : ntdll: Create the process activation context at initialization time.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 270f725526ebe3bde8458b8eee44b2ea63cee3f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=270f725526ebe3bde8458b8ee…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 25 16:48:40 2007 +0200 ntdll: Create the process activation context at initialization time. --- dlls/ntdll/actctx.c | 17 +++++++++++++++++ dlls/ntdll/loader.c | 1 + dlls/ntdll/ntdll_misc.h | 1 + 3 files changed, 19 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 1e2e101..2f2e28b 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -227,6 +227,8 @@ struct actctx_loader static const WCHAR dotManifestW[] = {'.','m','a','n','i','f','e','s','t',0}; +static ACTIVATION_CONTEXT system_actctx = { ACTCTX_MAGIC, 1 }; +static ACTIVATION_CONTEXT *process_actctx = &system_actctx; static WCHAR *strdupW(const WCHAR* str) { @@ -1827,6 +1829,21 @@ static NTSTATUS parse_depend_manifests(struct actctx_loader* acl) return status; } +/* initialize the activation context for the current process */ +void actctx_init(void) +{ + ACTCTXW ctx; + HANDLE handle; + + ctx.cbSize = sizeof(ctx); + ctx.lpSource = NULL; + ctx.dwFlags = ACTCTX_FLAG_RESOURCE_NAME_VALID | ACTCTX_FLAG_HMODULE_VALID; + ctx.hModule = NtCurrentTeb()->Peb->ImageBaseAddress; + ctx.lpResourceName = (LPCWSTR)CREATEPROCESS_MANIFEST_RESOURCE_ID; + + if (!RtlCreateActivationContext( &handle, &ctx )) process_actctx = check_actctx(handle); +} + /*********************************************************************** * RtlCreateActivationContext (NTDLL.@) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index ca06e89..207d391 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2166,6 +2166,7 @@ void WINAPI LdrInitializeThunk( ULONG unknown1, ULONG unknown2, ULONG unknown3, RtlEnterCriticalSection( &loader_section ); + actctx_init(); load_path = NtCurrentTeb()->Peb->ProcessParameters->DllPath.Buffer; if ((status = fixup_imports( wm, load_path )) != STATUS_SUCCESS) goto error; if ((status = alloc_process_tls()) != STATUS_SUCCESS) goto error; diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h index 8f41ff8..05df507 100644 --- a/dlls/ntdll/ntdll_misc.h +++ b/dlls/ntdll/ntdll_misc.h @@ -49,6 +49,7 @@ extern size_t get_signal_stack_total_size(void); extern void version_init( const WCHAR *appname ); extern void debug_init(void); extern HANDLE thread_init(void); +extern void actctx_init(void); extern void virtual_init(void); extern void virtual_init_threading(void);
1
0
0
0
Alexandre Julliard : ntdll: Don' t add an empty assembly when creating an activation context.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: 82e1aac81d776c203c3e0509f9fb7c7e53921906 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=82e1aac81d776c203c3e0509f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 25 16:47:34 2007 +0200 ntdll: Don't add an empty assembly when creating an activation context. --- dlls/ntdll/actctx.c | 12 ------------ 1 files changed, 0 insertions(+), 12 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 81e4eaa..1e2e101 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -1840,7 +1840,6 @@ NTSTATUS WINAPI RtlCreateActivationContext( HANDLE *handle, const void *ptr ) const ACTCTXW *pActCtx = ptr; /* FIXME: not the right structure */ ACTIVATION_CONTEXT *actctx; UNICODE_STRING nameW; - struct assembly *assembly; ULONG lang = 0; NTSTATUS status = STATUS_NO_MEMORY; HANDLE file = 0; @@ -1857,17 +1856,6 @@ NTSTATUS WINAPI RtlCreateActivationContext( HANDLE *handle, const void *ptr ) actctx->magic = ACTCTX_MAGIC; actctx->ref_count = 1; - - if (!(assembly = add_assembly( actctx, APPLICATION_MANIFEST ))) goto error; - if (!(assembly->id.name = RtlAllocateHeap( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WCHAR) ))) - goto error; - assembly->id.version.major = 1; - assembly->id.version.minor = 0; - assembly->id.version.build = 0; - assembly->id.version.revision = 0; - assembly->manifest.type = ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE; - assembly->manifest.info = NULL; - actctx->config.type = ACTIVATION_CONTEXT_PATH_TYPE_NONE; actctx->config.info = NULL; actctx->appdir.type = ACTIVATION_CONTEXT_PATH_TYPE_WIN32_FILE;
1
0
0
0
Alexandre Julliard : ntdll: Check existing dependencies in activation context before adding a new one.
by Alexandre Julliard
26 Jul '07
26 Jul '07
Module: wine Branch: master Commit: fc97dec8d66a5a2002a849e4c454b13debde7a2f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fc97dec8d66a5a2002a849e4c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Jul 25 16:46:03 2007 +0200 ntdll: Check existing dependencies in activation context before adding a new one. --- dlls/ntdll/actctx.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 49 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c index 08383e3..81e4eaa 100644 --- a/dlls/ntdll/actctx.c +++ b/dlls/ntdll/actctx.c @@ -394,10 +394,58 @@ static void free_entity_array(struct entity_array *array) RtlFreeHeap( GetProcessHeap(), 0, array->base ); } +static BOOL is_matching_string( const WCHAR *str1, const WCHAR *str2 ) +{ + if (!str1) return !str2; + return str2 && !strcmpiW( str1, str2 ); +} + +static BOOL is_matching_identity( const struct assembly_identity *id1, + const struct assembly_identity *id2 ) +{ + if (!is_matching_string( id1->name, id2->name )) return FALSE; + if (!is_matching_string( id1->arch, id2->arch )) return FALSE; + if (!is_matching_string( id1->public_key, id2->public_key )) return FALSE; + + if (id1->language && id2->language && strcmpiW( id1->language, id2->language )) + { + static const WCHAR wildcardW[] = {'*',0}; + if (strcmpW( wildcardW, id1->language ) && strcmpW( wildcardW, id2->language )) + return FALSE; + } + if (id1->version.major != id2->version.major) return FALSE; + if (id1->version.minor != id2->version.minor) return FALSE; + if (id1->version.build > id2->version.build) return FALSE; + if (id1->version.build == id2->version.build && + id1->version.revision > id2->version.revision) return FALSE; + return TRUE; +} + static BOOL add_dependent_assembly_id(struct actctx_loader* acl, struct assembly_identity* ai) { - /* FIXME: should check that the passed ai isn't already in the list */ + unsigned int i; + + /* check if we already have that assembly */ + + for (i = 0; i < acl->actctx->num_assemblies; i++) + if (is_matching_identity( ai, &acl->actctx->assemblies[i].id )) + { + TRACE( "reusing existing assembly for %s arch %s version %u.%u.%u.%u\n", + debugstr_w(ai->name), debugstr_w(ai->arch), ai->version.major, ai->version.minor, + ai->version.build, ai->version.revision ); + return TRUE; + } + + for (i = 0; i < acl->num_dependencies; i++) + if (is_matching_identity( ai, &acl->dependencies[i] )) + { + TRACE( "reusing existing dependency for %s arch %s version %u.%u.%u.%u\n", + debugstr_w(ai->name), debugstr_w(ai->arch), ai->version.major, ai->version.minor, + ai->version.build, ai->version.revision ); + return TRUE; + } + if (acl->num_dependencies == acl->allocated_dependencies) { void *ptr;
1
0
0
0
appdb/ ./account.php include/application.php i ...
by WineHQ
26 Jul '07
26 Jul '07
ChangeSet ID: 31277 CVSROOT: /opt/cvs-commit Module name: appdb Changes by: wineowner(a)winehq.org 2007/07/25 22:47:35 Modified files: . : account.php include : application.php downloadurl.php screenshot.php unit_test : run_tests.php test_appData.php test_application.php test_common.php test_filter.php test_image.php test_maintainer.php test_maintainer_notify.php test_om_objects.php test_testData.php test_url.php test_user.php Log message: Chris Morgan <cmorgan(a)alum.wpi.edu> Unit test cleanups. Fixes tests so they don't leave left over entries in the database. Add a check to ensure that row counts in most tables are unchanged from the start and end of the tests. Refactor some code. Patch:
http://cvs.winehq.org/patch.py?id=31277
Old revision New revision Changes Path 1.37 1.38 +1 -1 appdb/account.php 1.119 1.120 +5 -3 appdb/include/application.php 1.21 1.22 +3 -4 appdb/include/downloadurl.php 1.74 1.75 +4 -0 appdb/include/screenshot.php 1.15 1.16 +128 -0 appdb/unit_test/run_tests.php 1.3 1.4 +15 -9 appdb/unit_test/test_appData.php 1.6 1.7 +27 -50 appdb/unit_test/test_application.php 1.2 1.3 +73 -4 appdb/unit_test/test_common.php 1.2 1.3 +10 -11 appdb/unit_test/test_filter.php 1.4 1.5 +29 -29 appdb/unit_test/test_image.php 1.11 1.12 +157 -82 appdb/unit_test/test_maintainer.php 1.1 1.2 +5 -3 appdb/unit_test/test_maintainer_notify.php 1.18 1.19 +32 -14 appdb/unit_test/test_om_objects.php 1.1 1.2 +6 -3 appdb/unit_test/test_testData.php 1.3 1.4 +8 -8 appdb/unit_test/test_url.php 1.10 1.11 +1 -22 appdb/unit_test/test_user.php
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
96
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Results per page:
10
25
50
100
200