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 2006
----- 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
5 participants
857 discussions
Start a n
N
ew thread
Robert Shearman : oleaut32: Improve dump_DispParms.
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: 40556ae08f5808eef8ad5a109e5109939231c6e4 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=40556ae08f5808eef8ad5a1…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon Jul 31 16:44:06 2006 +0100 oleaut32: Improve dump_DispParms. --- dlls/oleaut32/typelib.c | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 0e58ae8..e648735 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -1242,15 +1242,19 @@ void dump_Variant(const VARIANT * pvar) static void dump_DispParms(const DISPPARAMS * pdp) { - int index = 0; + int index; TRACE("args=%u named args=%u\n", pdp->cArgs, pdp->cNamedArgs); - while (index < pdp->cArgs) - { + if (pdp->cNamedArgs) + TRACE("named args:\n"); + for (index = 0; index < pdp->cNamedArgs; index++) + TRACE( "\t0x%lx\n", pdp->rgdispidNamedArgs[index] ); + + if (pdp->cArgs) + TRACE("args:\n"); + for (index = 0; index < pdp->cArgs; index++) dump_Variant( &pdp->rgvarg[index] ); - ++index; - } } static void dump_TypeInfo(const ITypeInfoImpl * pty)
1
0
0
0
Robert Shearman : oleaut32: Add some validation for the DISPPARAMS structure in ITypeInfo::Invoke.
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: 33582cc69e67dda776dd8c05758115584f41aa4c URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=33582cc69e67dda776dd8c0…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon Jul 31 16:44:02 2006 +0100 oleaut32: Add some validation for the DISPPARAMS structure in ITypeInfo::Invoke. --- dlls/oleaut32/tests/typelib.c | 9 +++++++++ dlls/oleaut32/typelib.c | 14 ++++++++++++++ 2 files changed, 23 insertions(+), 0 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index 30fa962..852d08d 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -461,6 +461,15 @@ static void test_TypeInfo(void) hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_PROPERTYGET, &dispparams, NULL, NULL, NULL); ok(hr == DISP_E_MEMBERNOTFOUND, "ITypeInfo_Invoke should have returned DISP_E_MEMBERNOTFOUND instead of 0x%08lx\n", hr); + /* test NULL dispparams */ + hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, NULL, NULL, NULL, NULL); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); + + /* test dispparams->cNamedArgs being bigger than dispparams->cArgs */ + dispparams.cNamedArgs = 1; + hr = ITypeInfo_Invoke(pTypeInfo, (void *)0xdeadbeef, dispidMember, DISPATCH_METHOD, &dispparams, NULL, NULL, NULL); + ok(hr == E_INVALIDARG, "ITypeInfo_Invoke should have returned E_INVALIDARG instead of 0x%08lx\n", hr); + ITypeInfo_Release(pTypeInfo); hr = ITypeLib_GetTypeInfoOfGuid(pTypeLib, &IID_IDispatch, &pTypeInfo); diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c index 3ba1b4e..0e58ae8 100644 --- a/dlls/oleaut32/typelib.c +++ b/dlls/oleaut32/typelib.c @@ -5218,8 +5218,22 @@ static HRESULT WINAPI ITypeInfo_fnInvoke TRACE("(%p)(%p,id=%ld,flags=0x%08x,%p,%p,%p,%p)\n", This,pIUnk,memid,wFlags,pDispParams,pVarResult,pExcepInfo,pArgErr ); + + if (!pDispParams) + { + ERR("NULL pDispParams not allowed\n"); + return E_INVALIDARG; + } + dump_DispParms(pDispParams); + if (pDispParams->cNamedArgs > pDispParams->cArgs) + { + ERR("named argument array cannot be bigger than argument array (%d/%d)\n", + pDispParams->cNamedArgs, pDispParams->cArgs); + return E_INVALIDARG; + } + /* we do this instead of using GetFuncDesc since it will return a fake * FUNCDESC for dispinterfaces and we want the real function description */ for (pFuncInfo = This->funclist; pFuncInfo; pFuncInfo=pFuncInfo->next)
1
0
0
0
Robert Shearman : ole32: Implement OleNoteObjectVisible as described by MSDN.
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: e3e42985ec6a703b933096b8abc7c181d8bc0a4e URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=e3e42985ec6a703b933096b…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon Jul 31 16:43:50 2006 +0100 ole32: Implement OleNoteObjectVisible as described by MSDN. --- dlls/ole32/ole2.c | 10 ++++++++++ dlls/ole32/ole32.spec | 2 +- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git a/dlls/ole32/ole2.c b/dlls/ole32/ole2.c index d0f4a78..576873d 100644 --- a/dlls/ole32/ole2.c +++ b/dlls/ole32/ole2.c @@ -2389,6 +2389,16 @@ BOOL WINAPI OleIsRunning(LPOLEOBJECT pOb } /*********************************************************************** + * OleNoteObjectVisible [OLE32.@] + */ +HRESULT WINAPI OleNoteObjectVisible(LPUNKNOWN pUnknown, BOOL bVisible) +{ + TRACE("(%p, %s)\n", pUnknown, bVisible ? "TRUE" : "FALSE"); + return CoLockObjectExternal(pUnknown, bVisible, TRUE); +} + + +/*********************************************************************** * OLE_FreeClipDataArray [internal] * * NOTES: diff --git a/dlls/ole32/ole32.spec b/dlls/ole32/ole32.spec index 87605ca..5c26b31 100644 --- a/dlls/ole32/ole32.spec +++ b/dlls/ole32/ole32.spec @@ -200,7 +200,7 @@ @ stdcall OleLoadFromStream(ptr ptr ptr) @ stdcall OleLockRunning(ptr long long) @ stdcall OleMetafilePictFromIconAndLabel(long ptr ptr long) -@ stub OleNoteObjectVisible +@ stdcall OleNoteObjectVisible(ptr long) @ stdcall OleQueryCreateFromData(ptr) @ stdcall OleQueryLinkFromData(ptr) @ stdcall OleRegEnumFormatEtc(ptr long ptr)
1
0
0
0
Robert Shearman : ole32: Remove a check on the share mode for the NULL filename case as the check is already done earlier in StgCreateDocfile .
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: 1a5cd3ca9bb4fc56221b9b0b74edf255a6826ee3 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=1a5cd3ca9bb4fc56221b9b0…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Mon Jul 31 16:43:46 2006 +0100 ole32: Remove a check on the share mode for the NULL filename case as the check is already done earlier in StgCreateDocfile. --- dlls/ole32/storage32.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index fd252d8..f827251 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -5661,9 +5661,6 @@ HRESULT WINAPI StgCreateDocfile( WCHAR tempPath[MAX_PATH]; static const WCHAR prefix[] = { 'S', 'T', 'O', 0 }; - if (STGM_SHARE_MODE(grfMode) != STGM_SHARE_EXCLUSIVE) - goto end; - memset(tempPath, 0, sizeof(tempPath)); memset(tempFileName, 0, sizeof(tempFileName));
1
0
0
0
Alexandre Julliard : ntdll: Move the calling of the process entry point back to kernel32.
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: 6f7b1f646389f850bc48abf79271037455fc91c6 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=6f7b1f646389f850bc48abf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 31 21:25:29 2006 +0200 ntdll: Move the calling of the process entry point back to kernel32. Apparently some copy protection stuff relies on that. This reverts commit 50fca716fddf5af03b4c91ae5e950daff5fbdf2a. --- dlls/kernel/process.c | 17 +++++++++++++++++ dlls/ntdll/loader.c | 15 ++------------- include/winternl.h | 2 +- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/dlls/kernel/process.c b/dlls/kernel/process.c index a2ab351..7092d2c 100644 --- a/dlls/kernel/process.c +++ b/dlls/kernel/process.c @@ -60,6 +60,7 @@ #endif WINE_DEFAULT_DEBUG_CHANNEL(process); WINE_DECLARE_DEBUG_CHANNEL(file); +WINE_DECLARE_DEBUG_CHANNEL(relay); typedef struct { @@ -802,7 +803,23 @@ static void start_process( void *arg ) { __TRY { + PEB *peb = NtCurrentTeb()->Peb; + IMAGE_NT_HEADERS *nt; + LPTHREAD_START_ROUTINE entry; + LdrInitializeThunk( 0, 0, 0, 0 ); + + nt = RtlImageNtHeader( peb->ImageBaseAddress ); + entry = (LPTHREAD_START_ROUTINE)((char *)peb->ImageBaseAddress + + nt->OptionalHeader.AddressOfEntryPoint); + + if (TRACE_ON(relay)) + DPRINTF( "%04lx:Starting process %s (entryproc=%p)\n", GetCurrentThreadId(), + debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry ); + + SetLastError( 0 ); /* clear error code */ + if (peb->BeingDebugged) DbgBreakPoint(); + ExitProcess( entry( peb ) ); } __EXCEPT(UnhandledExceptionFilter) { diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index d3a3d78..184f64f 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -2094,8 +2094,6 @@ void WINAPI LdrInitializeThunk( ULONG un LPCWSTR load_path; PEB *peb = NtCurrentTeb()->Peb; IMAGE_NT_HEADERS *nt = RtlImageNtHeader( peb->ImageBaseAddress ); - LPTHREAD_START_ROUTINE entry = (LPTHREAD_START_ROUTINE)((char *)peb->ImageBaseAddress + - nt->OptionalHeader.AddressOfEntryPoint); if (main_exe_file) NtClose( main_exe_file ); /* at this point the main module is created */ @@ -2128,7 +2126,7 @@ void WINAPI LdrInitializeThunk( ULONG un SERVER_START_REQ( init_process_done ) { req->module = peb->ImageBaseAddress; - req->entry = entry; + req->entry = (char *)peb->ImageBaseAddress + nt->OptionalHeader.AddressOfEntryPoint; req->gui = (nt->OptionalHeader.Subsystem != IMAGE_SUBSYSTEM_WINDOWS_CUI); status = wine_server_call( req ); } @@ -2153,16 +2151,7 @@ void WINAPI LdrInitializeThunk( ULONG un RtlLeaveCriticalSection( &loader_section ); if (nt->FileHeader.Characteristics & IMAGE_FILE_LARGE_ADDRESS_AWARE) VIRTUAL_UseLargeAddressSpace(); - - if (TRACE_ON(relay)) - DPRINTF( "%04lx:Starting process %s (entryproc=%p)\n", GetCurrentThreadId(), - debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry ); - - RtlSetLastWin32ErrorAndNtStatusFromNtStatus( STATUS_SUCCESS ); /* clear error code */ - if (peb->BeingDebugged) DbgBreakPoint(); - status = entry( peb ); - LdrShutdownProcess(); - NtTerminateProcess( GetCurrentProcess(), status ); + return; error: ERR( "Main exe initialization for %s failed, status %lx\n", diff --git a/include/winternl.h b/include/winternl.h index c8aa3ed..5177348 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -1726,7 +1726,7 @@ NTSTATUS WINAPI LdrFindResourceDirector NTSTATUS WINAPI LdrFindResource_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DATA_ENTRY**); NTSTATUS WINAPI LdrGetDllHandle(ULONG, ULONG, const UNICODE_STRING*, HMODULE*); NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE, const ANSI_STRING*, ULONG, void**); -void DECLSPEC_NORETURN WINAPI LdrInitializeThunk(ULONG,ULONG,ULONG,ULONG); +void WINAPI LdrInitializeThunk(ULONG,ULONG,ULONG,ULONG); NTSTATUS WINAPI LdrLoadDll(LPCWSTR, DWORD, const UNICODE_STRING*, HMODULE*); void WINAPI LdrShutdownProcess(void); void WINAPI LdrShutdownThread(void);
1
0
0
0
Alexandre Julliard : ntdll: Set initial module refcount to 1 to avoid unloading during imports fixup.
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: d16c7f96c9cbc1da90bc0246321b2de0e0e4b4af URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=d16c7f96c9cbc1da90bc024…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 31 21:03:01 2006 +0200 ntdll: Set initial module refcount to 1 to avoid unloading during imports fixup. --- dlls/ntdll/loader.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 0ca8f2a..d3a3d78 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -640,7 +640,7 @@ static WINE_MODREF *alloc_module( HMODUL wm->ldr.EntryPoint = NULL; wm->ldr.SizeOfImage = nt->OptionalHeader.SizeOfImage; wm->ldr.Flags = LDR_DONT_RESOLVE_REFS; - wm->ldr.LoadCount = 0; + wm->ldr.LoadCount = 1; wm->ldr.TlsIndex = -1; wm->ldr.SectionHandle = NULL; wm->ldr.CheckSum = 0;
1
0
0
0
Alexandre Julliard : preloader: Added support for the new style DT_GNU_HASH symbol table.
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: 30a3866b78baf978e18197ff714c09346c51665d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=30a3866b78baf978e18197f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 31 21:02:38 2006 +0200 preloader: Added support for the new style DT_GNU_HASH symbol table. --- loader/preloader.c | 59 +++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 46 insertions(+), 13 deletions(-) diff --git a/loader/preloader.c b/loader/preloader.c index 52f4cc1..7140f3a 100644 --- a/loader/preloader.c +++ b/loader/preloader.c @@ -131,6 +131,10 @@ #ifndef AT_SYSINFO_EHDR #define AT_SYSINFO_EHDR 33 #endif +#ifndef DT_GNU_HASH +#define DT_GNU_HASH 0x6ffffef5 +#endif + static unsigned int page_size, page_mask; static char *preloader_start, *preloader_end; @@ -758,6 +762,13 @@ static unsigned int elf_hash( const char return hash; } +static unsigned int gnu_hash( const char *name ) +{ + unsigned int h = 5381; + while (*name) h = h * 33 + (unsigned char)*name++; + return h; +} + /* * Find a symbol in the symbol table of the executable loaded */ @@ -767,7 +778,9 @@ static void *find_symbol( const ElfW(Phd const ElfW(Phdr) *ph; const ElfW(Sym) *symtab = NULL; const Elf_Symndx *hashtab = NULL; + const Elf32_Word *gnu_hashtab = NULL; const char *strings = NULL; + Elf_Symndx idx; /* check the values */ #ifdef DUMP_SYMS @@ -799,6 +812,8 @@ #endif symtab = (const ElfW(Sym) *)dyn->d_un.d_ptr; if( dyn->d_tag == DT_HASH ) hashtab = (const Elf_Symndx *)dyn->d_un.d_ptr; + if( dyn->d_tag == DT_GNU_HASH ) + gnu_hashtab = (const Elf32_Word *)dyn->d_un.d_ptr; #ifdef DUMP_SYMS wld_printf("%x %x\n", dyn->d_tag, dyn->d_un.d_ptr ); #endif @@ -807,28 +822,46 @@ #endif if( (!symtab) || (!strings) ) return NULL; - if (hashtab) + if (gnu_hashtab) /* new style hash table */ + { + const unsigned int hash = gnu_hash(var); + const Elf32_Word nbuckets = gnu_hashtab[0]; + const Elf32_Word symbias = gnu_hashtab[1]; + const Elf32_Word nwords = gnu_hashtab[2]; + const ElfW(Addr) *bitmask = (const ElfW(Addr) *)(gnu_hashtab + 4); + const Elf32_Word *buckets = (const Elf32_Word *)(bitmask + nwords); + const Elf32_Word *chains = buckets + nbuckets - symbias; + + if (!(idx = buckets[hash % nbuckets])) return NULL; + do + { + if ((chains[idx] & ~1u) == (hash & ~1u) && + symtab[idx].st_info == ELF32_ST_INFO( STB_GLOBAL, type ) && + !wld_strcmp( strings + symtab[idx].st_name, var )) + goto found; + } while (!(chains[idx++] & 1u)); + } + else if (hashtab) /* old style hash table */ { - Elf_Symndx nbuckets = hashtab[0]; - unsigned int hash = elf_hash(var) % nbuckets; + const unsigned int hash = elf_hash(var); + const Elf_Symndx nbuckets = hashtab[0]; const Elf_Symndx *buckets = hashtab + 2; - const Elf_Symndx *chains = buckets + nbuckets; - Elf_Symndx idx = buckets[hash]; + const Elf_Symndx *chains = buckets + nbuckets; - while (idx != STN_UNDEF) + for (idx = buckets[hash % nbuckets]; idx != STN_UNDEF; idx = chains[idx]) { if (symtab[idx].st_info == ELF32_ST_INFO( STB_GLOBAL, type ) && !wld_strcmp( strings + symtab[idx].st_name, var )) - { -#ifdef DUMP_SYMS - wld_printf("Found %s -> %x\n", strings + symtab[idx].st_name, symtab[idx].st_value ); -#endif - return (void*)symtab[idx].st_value; - } - idx = chains[idx]; + goto found; } } return NULL; + +found: +#ifdef DUMP_SYMS + wld_printf("Found %s -> %x\n", strings + symtab[idx].st_name, symtab[idx].st_value ); +#endif + return (void *)symtab[idx].st_value; } /*
1
0
0
0
Alexandre Julliard : preloader: Fixed type checking in symbol lookup.
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: 51d84822228322e71b300862ee28947384d9abfb URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=51d84822228322e71b30086…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 31 16:44:40 2006 +0200 preloader: Fixed type checking in symbol lookup. --- loader/preloader.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/loader/preloader.c b/loader/preloader.c index d372ed7..52f4cc1 100644 --- a/loader/preloader.c +++ b/loader/preloader.c @@ -761,7 +761,7 @@ static unsigned int elf_hash( const char /* * Find a symbol in the symbol table of the executable loaded */ -static void *find_symbol( const ElfW(Phdr) *phdr, int num, const char *var ) +static void *find_symbol( const ElfW(Phdr) *phdr, int num, const char *var, int type ) { const ElfW(Dyn) *dyn = NULL; const ElfW(Phdr) *ph; @@ -817,7 +817,7 @@ #endif while (idx != STN_UNDEF) { - if( ( ELF32_ST_BIND(symtab[idx].st_info) == STT_OBJECT ) && + if (symtab[idx].st_info == ELF32_ST_INFO( STB_GLOBAL, type ) && !wld_strcmp( strings + symtab[idx].st_name, var )) { #ifdef DUMP_SYMS @@ -991,7 +991,7 @@ #endif /* store pointer to the preload info into the appropriate main binary variable */ wine_main_preload_info = find_symbol( main_binary_map.l_phdr, main_binary_map.l_phnum, - "wine_main_preload_info" ); + "wine_main_preload_info", STT_OBJECT ); if (wine_main_preload_info) *wine_main_preload_info = preload_info; else wld_printf( "wine_main_preload_info not found\n" );
1
0
0
0
Alexandre Julliard : preloader: Properly use the ELF hash table when looking up a symbol.
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: 8aab67d23805b65956c589297ff1ff76f0e0aa8f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=8aab67d23805b65956c5892…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jul 31 15:48:32 2006 +0200 preloader: Properly use the ELF hash table when looking up a symbol. --- loader/preloader.c | 37 ++++++++++++++++++++++++++++++------- 1 files changed, 30 insertions(+), 7 deletions(-) diff --git a/loader/preloader.c b/loader/preloader.c index 46e96a5..d372ed7 100644 --- a/loader/preloader.c +++ b/loader/preloader.c @@ -745,6 +745,19 @@ #endif } +static unsigned int elf_hash( const char *name ) +{ + unsigned int hi, hash = 0; + while (*name) + { + hash = (hash << 4) + (unsigned char)*name++; + hi = hash & 0xf0000000; + hash ^= hi; + hash ^= hi >> 24; + } + return hash; +} + /* * Find a symbol in the symbol table of the executable loaded */ @@ -753,8 +766,8 @@ static void *find_symbol( const ElfW(Phd const ElfW(Dyn) *dyn = NULL; const ElfW(Phdr) *ph; const ElfW(Sym) *symtab = NULL; + const Elf_Symndx *hashtab = NULL; const char *strings = NULL; - uint32_t i, symtabend = 0; /* check the values */ #ifdef DUMP_SYMS @@ -785,7 +798,7 @@ #endif if( dyn->d_tag == DT_SYMTAB ) symtab = (const ElfW(Sym) *)dyn->d_un.d_ptr; if( dyn->d_tag == DT_HASH ) - symtabend = *((const uint32_t *)dyn->d_un.d_ptr + 1); + hashtab = (const Elf_Symndx *)dyn->d_un.d_ptr; #ifdef DUMP_SYMS wld_printf("%x %x\n", dyn->d_tag, dyn->d_un.d_ptr ); #endif @@ -794,15 +807,25 @@ #endif if( (!symtab) || (!strings) ) return NULL; - for (i = 0; i < symtabend; i++) + if (hashtab) { - if( ( ELF32_ST_BIND(symtab[i].st_info) == STT_OBJECT ) && - ( 0 == wld_strcmp( strings+symtab[i].st_name, var ) ) ) + Elf_Symndx nbuckets = hashtab[0]; + unsigned int hash = elf_hash(var) % nbuckets; + const Elf_Symndx *buckets = hashtab + 2; + const Elf_Symndx *chains = buckets + nbuckets; + Elf_Symndx idx = buckets[hash]; + + while (idx != STN_UNDEF) { + if( ( ELF32_ST_BIND(symtab[idx].st_info) == STT_OBJECT ) && + !wld_strcmp( strings + symtab[idx].st_name, var )) + { #ifdef DUMP_SYMS - wld_printf("Found %s -> %x\n", strings+symtab[i].st_name, symtab[i].st_value ); + wld_printf("Found %s -> %x\n", strings + symtab[idx].st_name, symtab[idx].st_value ); #endif - return (void*)symtab[i].st_value; + return (void*)symtab[idx].st_value; + } + idx = chains[idx]; } } return NULL;
1
0
0
0
Jacek Caban : shdocvw: Added WebBrowser::Invoke implementation.
by Alexandre Julliard
31 Jul '06
31 Jul '06
Module: wine Branch: refs/heads/master Commit: d4da27aec3dca99c3b33fa329db6c257b0ce35fc URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=d4da27aec3dca99c3b33fa3…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Jul 31 13:27:22 2006 +0200 shdocvw: Added WebBrowser::Invoke implementation. --- dlls/shdocvw/shdocvw.h | 1 + dlls/shdocvw/shdocvw_main.c | 26 ++++++++++++++++++++++++++ dlls/shdocvw/webbrowser.c | 15 ++++++++++++--- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index 17ac8e7..2f9f9cc 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -212,6 +212,7 @@ extern void register_iewindow_class(void extern void unregister_iewindow_class(void); HRESULT register_class_object(BOOL); +HRESULT get_typeinfo(ITypeInfo**); /* memory allocation functions */ diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c index 57b4993..ab962a1 100644 --- a/dlls/shdocvw/shdocvw_main.c +++ b/dlls/shdocvw/shdocvw_main.c @@ -40,6 +40,30 @@ LONG SHDOCVW_refCount = 0; HINSTANCE shdocvw_hinstance = 0; static HMODULE SHDOCVW_hshell32 = 0; +static ITypeInfo *wb_typeinfo = NULL; + +HRESULT get_typeinfo(ITypeInfo **typeinfo) +{ + ITypeLib *typelib; + HRESULT hres; + + if(wb_typeinfo) { + *typeinfo = wb_typeinfo; + return S_OK; + } + + hres = LoadRegTypeLib(&LIBID_SHDocVw, 1, 1, LOCALE_SYSTEM_DEFAULT, &typelib); + if(FAILED(hres)) { + ERR("LoadRegTypeLib failed: %08lx\n", hres); + return hres; + } + + hres = ITypeLib_GetTypeInfoOfGuid(typelib, &IID_IWebBrowser2, &wb_typeinfo); + ITypeLib_Release(typelib); + + *typeinfo = wb_typeinfo; + return hres; +} /************************************************************************* * SHDOCVW DllMain @@ -56,6 +80,8 @@ BOOL WINAPI DllMain(HINSTANCE hinst, DWO case DLL_PROCESS_DETACH: if (SHDOCVW_hshell32) FreeLibrary(SHDOCVW_hshell32); unregister_iewindow_class(); + if(wb_typeinfo) + ITypeInfo_Release(wb_typeinfo); break; } return TRUE; diff --git a/dlls/shdocvw/webbrowser.c b/dlls/shdocvw/webbrowser.c index 2755bdd..6d46132 100644 --- a/dlls/shdocvw/webbrowser.c +++ b/dlls/shdocvw/webbrowser.c @@ -172,9 +172,18 @@ static HRESULT WINAPI WebBrowser_Invoke( EXCEPINFO *pExepInfo, UINT *puArgErr) { WebBrowser *This = WEBBROWSER_THIS(iface); - FIXME("(%p)->(%ld %s %ld %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), + ITypeInfo *typeinfo; + HRESULT hres; + + TRACE("(%p)->(%ld %s %ld %08x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr); - return E_NOTIMPL; + + hres = get_typeinfo(&typeinfo); + if(FAILED(hres)) + return hres; + + return ITypeInfo_Invoke(typeinfo, WEBBROWSER2(This), dispIdMember, wFlags, pDispParams, + pVarResult, pExepInfo, puArgErr); } /* IWebBrowser methods */ @@ -923,7 +932,7 @@ static HRESULT WebBrowser_Create(INT ver WebBrowser *ret; HRESULT hres; - TRACE("(%p %s %p)\n", pOuter, debugstr_guid(riid), ppv); + TRACE("(%p %s %p) version=%d\n", pOuter, debugstr_guid(riid), ppv, version); ret = shdocvw_alloc(sizeof(WebBrowser));
1
0
0
0
← Newer
1
2
3
4
5
...
86
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
Results per page:
10
25
50
100
200