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
December 2009
----- 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
1233 discussions
Start a n
N
ew thread
Eric Pouech : dbghelp: For mingw32 (stabs debug info), parse the FileHeader 's symbol table to offset properly the global variables.
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 185e5daed64acfe2dcf18578ef5ae88b9429b87b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=185e5daed64acfe2dcf18578e…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Wed Dec 9 20:55:27 2009 +0100 dbghelp: For mingw32 (stabs debug info), parse the FileHeader's symbol table to offset properly the global variables. --- dlls/dbghelp/pe_module.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 64 insertions(+), 0 deletions(-) diff --git a/dlls/dbghelp/pe_module.c b/dlls/dbghelp/pe_module.c index 44a4d6a..3b9cceb 100644 --- a/dlls/dbghelp/pe_module.c +++ b/dlls/dbghelp/pe_module.c @@ -36,6 +36,69 @@ WINE_DEFAULT_DEBUG_CHANNEL(dbghelp); /****************************************************************** + * pe_load_symbol_table + * + * Use the COFF symbol table (if any) from the IMAGE_FILE_HEADER to set the absolute address + * of global symbols. + * Mingw32 requires this for stabs debug information as address for global variables isn't filled in + * (this is similar to what is done in elf_module.c when using the .symtab ELF section) + */ +static BOOL pe_load_symbol_table(struct module* module, IMAGE_NT_HEADERS* nth, void* mapping) +{ + const IMAGE_SYMBOL* isym; + int i, numsym, naux; + const char* strtable; + char tmp[9]; + const char* name; + struct hash_table_iter hti; + void* ptr; + struct symt_data* sym; + const IMAGE_SECTION_HEADER* sect; + + numsym = nth->FileHeader.NumberOfSymbols; + if (!nth->FileHeader.PointerToSymbolTable || !numsym) + return TRUE; + isym = (const IMAGE_SYMBOL*)((char*)mapping + nth->FileHeader.PointerToSymbolTable); + /* FIXME: no way to get strtable size */ + strtable = (const char*)&isym[numsym]; + sect = IMAGE_FIRST_SECTION(nth); + + for (i = 0; i < numsym; i+= naux, isym += naux) + { + if (isym->StorageClass == IMAGE_SYM_CLASS_EXTERNAL && + isym->SectionNumber > 0 && isym->SectionNumber <= nth->FileHeader.NumberOfSections) + { + if (isym->N.Name.Short) + { + name = memcpy(tmp, isym->N.ShortName, 8); + tmp[8] = '\0'; + } + else name = strtable + isym->N.Name.Long; + if (name[0] == '_') name++; + hash_table_iter_init(&module->ht_symbols, &hti, name); + while ((ptr = hash_table_iter_up(&hti))) + { + sym = GET_ENTRY(ptr, struct symt_data, hash_elt); + if (sym->symt.tag == SymTagData && + (sym->kind == DataIsGlobal || sym->kind == DataIsFileStatic) && + !strcmp(sym->hash_elt.name, name)) + { + TRACE("Changing absolute address for %d.%s: %lx -> %s\n", + isym->SectionNumber, name, sym->u.var.offset, + wine_dbgstr_longlong(module->module.BaseOfImage + + sect[isym->SectionNumber - 1].VirtualAddress + isym->Value)); + sym->u.var.offset = module->module.BaseOfImage + + sect[isym->SectionNumber - 1].VirtualAddress + isym->Value; + break; + } + } + } + naux = isym->NumberOfAuxSymbols + 1; + } + return TRUE; +} + +/****************************************************************** * pe_load_stabs * * look for stabs information in PE header (it's how the mingw compiler provides @@ -74,6 +137,7 @@ static BOOL pe_load_stabs(const struct process* pcs, struct module* module, RtlImageRvaToVa(nth, mapping, stabstr, NULL), stabstrsize, NULL, NULL); + if (ret) pe_load_symbol_table(module, nth, mapping); } TRACE("%s the STABS debug info\n", ret ? "successfully loaded" : "failed to load");
1
0
0
0
Eric Pouech : winedump: Dump PE symbols table if any.
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 2271a8d417fa5ac1c51d554811b5d420d92dfea5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2271a8d417fa5ac1c51d55481…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Wed Dec 9 20:55:18 2009 +0100 winedump: Dump PE symbols table if any. --- tools/winedump/main.c | 7 +++++++ tools/winedump/pe.c | 20 ++++++++++++++++++++ tools/winedump/winedump.h | 3 +++ 3 files changed, 30 insertions(+), 0 deletions(-) diff --git a/tools/winedump/main.c b/tools/winedump/main.c index 3524a1e..d5f39b5 100644 --- a/tools/winedump/main.c +++ b/tools/winedump/main.c @@ -187,9 +187,15 @@ static void do_dumpall(const char *arg) { globals.do_dumpheader = 1; globals.do_dump_rawdata = 1; + globals.do_symbol_table = 1; globals.dumpsect = "ALL"; } +static void do_symtable(const char* arg) +{ + globals.do_symbol_table = 1; +} + struct my_option { const char *name; @@ -222,6 +228,7 @@ static const struct my_option option_table[] = { {"-f", DUMP, 0, do_dumphead, "-f Dumps file header information"}, {"-G", DUMP, 0, do_rawdebug, "-G Dumps raw debug information"}, {"-j", DUMP, 1, do_dumpsect, "-j sect_name Dumps only the content of section sect_name (import, export, debug, resource, tls, clr)"}, + {"-t", DUMP, 0, do_symtable, "-t Dumps symbol table"}, {"-x", DUMP, 0, do_dumpall, "-x Dumps everything"}, {NULL, NONE, 0, NULL, NULL} }; diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index 9761215..a79593c 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -1399,6 +1399,24 @@ static void dump_debug(void) dump_stabs(stabs, szstabs, stabstr, szstr); } +static void dump_symbol_table(void) +{ + const IMAGE_SYMBOL* sym; + int numsym; + const char* strtable; + + numsym = PE_nt_headers->FileHeader.NumberOfSymbols; + if (!PE_nt_headers->FileHeader.PointerToSymbolTable || !numsym) + return; + sym = (const IMAGE_SYMBOL*)PRD(PE_nt_headers->FileHeader.PointerToSymbolTable, + sizeof(*sym) * numsym); + if (!sym) return; + /* FIXME: no way to get strtable size */ + strtable = (const char*)&sym[numsym]; + + dump_coff_symbol_table(sym, numsym, IMAGE_FIRST_SECTION(PE_nt_headers)); +} + enum FileSig get_kind_exec(void) { const WORD* pw; @@ -1468,6 +1486,8 @@ void pe_dump(void) if (all || !strcmp(globals.dumpsect, "except")) dump_dir_exceptions(); } + if (globals.do_symbol_table) + dump_symbol_table(); if (globals.do_debug) dump_debug(); } diff --git a/tools/winedump/winedump.h b/tools/winedump/winedump.h index 15a8cdb..9ad20a5 100644 --- a/tools/winedump/winedump.h +++ b/tools/winedump/winedump.h @@ -123,6 +123,7 @@ typedef struct __globals int do_dumpheader; /* -f */ int do_dump_rawdata; /* -x */ int do_debug; /* -G == 1, -g == 2 */ + int do_symbol_table; /* -t */ /* Option arguments: spec mode */ int start_ordinal; /* -s */ @@ -263,6 +264,8 @@ void codeview_dump_linetab2(const char* linetab, DWORD size, const ch void dump_stabs(const void* pv_stabs, unsigned szstabs, const char* stabstr, unsigned szstr); void dump_codeview(unsigned long ptr, unsigned long len); void dump_coff(unsigned long coffbase, unsigned long len, const void* sect_map); +void dump_coff_symbol_table(const IMAGE_SYMBOL *coff_symbols, unsigned num_sym, + const IMAGE_SECTION_HEADER *sectHead); void dump_frame_pointer_omission(unsigned long base, unsigned long len); FILE *open_file (const char *name, const char *ext, const char *mode);
1
0
0
0
Eric Pouech : winedump: Rewrote a bit the COFF symbol table stuff.
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 947f2456a930b28d69c29ff3c3037e0f6276d1bd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=947f2456a930b28d69c29ff3c…
Author: Eric Pouech <eric.pouech(a)orange.fr> Date: Wed Dec 9 20:55:07 2009 +0100 winedump: Rewrote a bit the COFF symbol table stuff. --- tools/winedump/debug.c | 106 ++++++++++++++++++++++++----------------------- 1 files changed, 54 insertions(+), 52 deletions(-) diff --git a/tools/winedump/debug.c b/tools/winedump/debug.c index be8150f..4f2cedf 100644 --- a/tools/winedump/debug.c +++ b/tools/winedump/debug.c @@ -512,70 +512,72 @@ static const char *get_coff_name( const IMAGE_SYMBOL *coff_sym, const char *coff return nampnt; } -void dump_coff(unsigned long coffbase, unsigned long len, const void* pmt) +static const char* storage_class(BYTE sc) +{ + static char tmp[7]; + switch (sc) + { + case IMAGE_SYM_CLASS_STATIC: return "static"; + case IMAGE_SYM_CLASS_EXTERNAL: return "extrnl"; + case IMAGE_SYM_CLASS_LABEL: return "label "; + } + sprintf(tmp, "#%d", sc); + return tmp; +} + +void dump_coff_symbol_table(const IMAGE_SYMBOL *coff_symbols, unsigned num_sym, + const IMAGE_SECTION_HEADER *sectHead) { - const IMAGE_COFF_SYMBOLS_HEADER *coff = PRD(coffbase, len); const IMAGE_SYMBOL *coff_sym; - const IMAGE_SYMBOL *coff_symbols = - (const IMAGE_SYMBOL *) ((const char *)coff + coff->LvaToFirstSymbol); - const char *coff_strtab = (const char *) (coff_symbols + coff->NumberOfSymbols); - const IMAGE_SECTION_HEADER *sectHead = pmt; + const char *coff_strtab = (const char *) (coff_symbols + num_sym); unsigned int i; const char *nampnt; int naux; - printf("\nDebug table: COFF format. modbase %p, coffbase %p\n", PRD(0, 0), coff); - printf(" ID | seg:offs [ abs ] | symbol/function name\n"); - for(i=0; i < coff->NumberOfSymbols; i++ ) + printf("\nDebug table: COFF format.\n"); + printf(" ID | seg:offs [ abs ] | Kind | symbol/function name\n"); + for (i=0; i < num_sym; i++) { - coff_sym = coff_symbols + i; - naux = coff_sym->NumberOfAuxSymbols; - - if( coff_sym->StorageClass == IMAGE_SYM_CLASS_FILE ) - { - printf("file %s\n", (const char *) (coff_sym + 1)); - i += naux; - continue; - } - - if( (coff_sym->StorageClass == IMAGE_SYM_CLASS_STATIC) - && (naux == 0) - && (coff_sym->SectionNumber == 1) ) - { - DWORD base = sectHead[coff_sym->SectionNumber - 1].VirtualAddress; - /* - * This is a normal static function when naux == 0. - * Just register it. The current file is the correct - * one in this instance. - */ - nampnt = get_coff_name( coff_sym, coff_strtab ); - - printf("%05d | %02d:%08x [%08x] | %s\n", i, coff_sym->SectionNumber - 1, coff_sym->Value - base, coff_sym->Value, nampnt); - i += naux; - continue; - } + coff_sym = coff_symbols + i; + naux = coff_sym->NumberOfAuxSymbols; - if( (coff_sym->StorageClass == IMAGE_SYM_CLASS_EXTERNAL) - && ISFCN(coff_sym->Type) - && (coff_sym->SectionNumber > 0) ) + switch (coff_sym->StorageClass) { - DWORD base = sectHead[coff_sym->SectionNumber - 1].VirtualAddress; - - nampnt = get_coff_name( coff_sym, coff_strtab ); + case IMAGE_SYM_CLASS_FILE: + printf("file %s\n", (const char *) (coff_sym + 1)); + break; + case IMAGE_SYM_CLASS_STATIC: + case IMAGE_SYM_CLASS_EXTERNAL: + case IMAGE_SYM_CLASS_LABEL: + if (coff_sym->SectionNumber > 0) + { + DWORD base = sectHead[coff_sym->SectionNumber - 1].VirtualAddress; + nampnt = get_coff_name( coff_sym, coff_strtab ); - /* FIXME: add code to find out the file this symbol belongs to, - * see winedbg */ - printf("%05d | %02d:%08x [%08x] | %s\n", i, coff_sym->SectionNumber - 1, coff_sym->Value - base, coff_sym->Value, nampnt); - i += naux; - continue; - } + printf("%05d | %02d:%08x [%08x] | %s | %s\n", + i, coff_sym->SectionNumber - 1, coff_sym->Value, + base + coff_sym->Value, + storage_class(coff_sym->StorageClass), nampnt); + } + break; + default: + printf("%05d | %s\n", i, storage_class(coff_sym->StorageClass)); + } + /* + * For now, skip past the aux entries. + */ + i += naux; + } +} - /* - * For now, skip past the aux entries. - */ - i += naux; +void dump_coff(unsigned long coffbase, unsigned long len, const void* pmt) +{ + const IMAGE_COFF_SYMBOLS_HEADER *coff = PRD(coffbase, len); + const IMAGE_SYMBOL *coff_symbols = + (const IMAGE_SYMBOL *) ((const char *)coff + coff->LvaToFirstSymbol); + const IMAGE_SECTION_HEADER *sectHead = pmt; - } + dump_coff_symbol_table(coff_symbols, coff->NumberOfSymbols, sectHead); } void dump_codeview(unsigned long base, unsigned long len)
1
0
0
0
Vincent Povirk : ole32: Remove the ancestorStorage attribute.
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 8b3ff9d179e71b1ab87427d5a14383b46b35f8f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8b3ff9d179e71b1ab87427d5a…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Nov 30 17:22:58 2009 -0600 ole32: Remove the ancestorStorage attribute. --- dlls/ole32/storage32.c | 15 +-------------- dlls/ole32/storage32.h | 5 ----- 2 files changed, 1 insertions(+), 19 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 2812555..eaddcbf 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -2459,12 +2459,6 @@ static HRESULT StorageImpl_Construct( This->base.ref = 1; This->base.create = create; - /* - * This is the top-level storage so initialize the ancestor pointer - * to this. - */ - This->base.ancestorStorage = This; - This->base.reverted = 0; This->hFile = hFile; @@ -3822,12 +3816,10 @@ SmallBlockChainStream* Storage32Impl_BigBlocksToSmallBlocks( static void StorageInternalImpl_Invalidate( StorageInternalImpl *This ) { - if (This->base.ancestorStorage) + if (!This->base.reverted) { TRACE("Storage invalidated (stg=%p)\n", This); - This->base.ancestorStorage = NULL; - This->base.reverted = 1; This->parentStorage = NULL; @@ -4388,11 +4380,6 @@ static StorageInternalImpl* StorageInternalImpl_Construct( newStorage->base.baseVtbl = &StorageInternalImpl_BaseVtbl; newStorage->base.openFlags = (openFlags & ~STGM_CREATE); - /* - * Keep the ancestor storage pointer but do not nail a reference to it. - */ - newStorage->base.ancestorStorage = parentStorage->ancestorStorage; - newStorage->base.reverted = 0; newStorage->parentStorage = parentStorage; diff --git a/dlls/ole32/storage32.h b/dlls/ole32/storage32.h index ff526bf..c68c6ea 100644 --- a/dlls/ole32/storage32.h +++ b/dlls/ole32/storage32.h @@ -214,11 +214,6 @@ struct StorageBaseImpl LONG ref; /* - * Ancestor storage (top level) - */ - StorageImpl* ancestorStorage; - - /* * TRUE if this object has been invalidated */ int reverted;
1
0
0
0
Vincent Povirk : ole32: Make IEnumSTATSTGImpl reference the parent storage.
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 5d39c31bff8266a097ea658dfd751276c4b3496a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5d39c31bff8266a097ea658df…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Nov 30 17:17:13 2009 -0600 ole32: Make IEnumSTATSTGImpl reference the parent storage. --- dlls/ole32/storage32.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 2465863..2812555 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -234,7 +234,7 @@ struct IEnumSTATSTGImpl * since we want to cast this in an IEnumSTATSTG pointer */ LONG ref; /* Reference count */ - StorageImpl* parentStorage; /* Reference to the parent storage */ + StorageBaseImpl* parentStorage; /* Reference to the parent storage */ DirRef storageDirEntry; /* Directory entry of the storage to enumerate */ /* @@ -250,7 +250,7 @@ struct IEnumSTATSTGImpl }; -static IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(StorageImpl* This, DirRef storageDirEntry); +static IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct(StorageBaseImpl* This, DirRef storageDirEntry); static void IEnumSTATSTGImpl_Destroy(IEnumSTATSTGImpl* This); static void IEnumSTATSTGImpl_PushSearchNode(IEnumSTATSTGImpl* This, DirRef nodeToPush); static DirRef IEnumSTATSTGImpl_PopSearchNode(IEnumSTATSTGImpl* This, BOOL remove); @@ -642,7 +642,7 @@ static HRESULT WINAPI StorageBaseImpl_EnumElements( return STG_E_REVERTED; newEnum = IEnumSTATSTGImpl_Construct( - This->ancestorStorage, + This, This->storageDirEntry); if (newEnum!=0) @@ -4034,14 +4034,14 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Next( /* * Read the entry from the storage. */ - StorageImpl_ReadDirEntry(This->parentStorage, + StorageBaseImpl_ReadDirEntry(This->parentStorage, currentSearchNode, ¤tEntry); /* * Copy the information to the return buffer. */ - StorageUtl_CopyDirEntryToSTATSTG(&This->parentStorage->base, + StorageUtl_CopyDirEntryToSTATSTG(This->parentStorage, currentReturnStruct, ¤tEntry, STATFLAG_DEFAULT); @@ -4096,7 +4096,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Skip( /* * Read the entry from the storage. */ - StorageImpl_ReadDirEntry(This->parentStorage, + StorageBaseImpl_ReadDirEntry(This->parentStorage, currentSearchNode, ¤tEntry); @@ -4138,7 +4138,7 @@ static HRESULT WINAPI IEnumSTATSTGImpl_Reset( /* * Read the storage entry from the top-level storage. */ - hr = StorageImpl_ReadDirEntry( + hr = StorageBaseImpl_ReadDirEntry( This->parentStorage, This->storageDirEntry, &storageEntry); @@ -4232,7 +4232,7 @@ static void IEnumSTATSTGImpl_PushSearchNode( /* * Read the storage entry from the top-level storage. */ - hr = StorageImpl_ReadDirEntry( + hr = StorageBaseImpl_ReadDirEntry( This->parentStorage, nodeToPush, &storageEntry); @@ -4284,7 +4284,7 @@ static const IEnumSTATSTGVtbl IEnumSTATSTGImpl_Vtbl = */ static IEnumSTATSTGImpl* IEnumSTATSTGImpl_Construct( - StorageImpl* parentStorage, + StorageBaseImpl* parentStorage, DirRef storageDirEntry) { IEnumSTATSTGImpl* newEnumeration;
1
0
0
0
Vincent Povirk : ole32: Make findElement take a StorageBaseImpl.
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 43184aaf52f29a02ab3babe35cc47dfdde92b0b3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=43184aaf52f29a02ab3babe35…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Nov 30 17:13:33 2009 -0600 ole32: Make findElement take a StorageBaseImpl. --- dlls/ole32/storage32.c | 22 +++++++++++----------- 1 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index d0b0461..2465863 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -196,7 +196,7 @@ static LONG entryNameCmp( const OLECHAR *name2); static DirRef findElement( - StorageImpl *storage, + StorageBaseImpl *storage, DirRef storageEntry, const OLECHAR *name, DirEntry *data); @@ -447,7 +447,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream( * Search for the element with the given name */ streamEntryRef = findElement( - This->ancestorStorage, + This, This->storageDirEntry, pwcsName, ¤tEntry); @@ -571,7 +571,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage( *ppstg = NULL; storageEntryRef = findElement( - This->ancestorStorage, + This, This->storageDirEntry, pwcsName, ¤tEntry); @@ -736,7 +736,7 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement( if (This->reverted) return STG_E_REVERTED; - currentEntryRef = findElement(This->ancestorStorage, + currentEntryRef = findElement(This, This->storageDirEntry, pwcsNewName, ¤tEntry); @@ -752,7 +752,7 @@ static HRESULT WINAPI StorageBaseImpl_RenameElement( /* * Search for the old element name */ - currentEntryRef = findElement(This->ancestorStorage, + currentEntryRef = findElement(This, This->storageDirEntry, pwcsOldName, ¤tEntry); @@ -858,7 +858,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream( *ppstm = 0; - currentEntryRef = findElement(This->ancestorStorage, + currentEntryRef = findElement(This, This->storageDirEntry, pwcsName, ¤tEntry); @@ -1040,7 +1040,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStorage( return STG_E_ACCESSDENIED; } - currentEntryRef = findElement(This->ancestorStorage, + currentEntryRef = findElement(This, This->storageDirEntry, pwcsName, ¤tEntry); @@ -1412,13 +1412,13 @@ static HRESULT insertIntoTree( * * Find and read the element of a storage with the given name. */ -static DirRef findElement(StorageImpl *storage, DirRef storageEntry, +static DirRef findElement(StorageBaseImpl *storage, DirRef storageEntry, const OLECHAR *name, DirEntry *data) { DirRef currentEntry; /* Read the storage entry to find the root of the tree. */ - StorageImpl_ReadDirEntry(storage, storageEntry, data); + StorageBaseImpl_ReadDirEntry(storage, storageEntry, data); currentEntry = data->dirRootEntry; @@ -1426,7 +1426,7 @@ static DirRef findElement(StorageImpl *storage, DirRef storageEntry, { LONG cmp; - StorageImpl_ReadDirEntry(storage, currentEntry, data); + StorageBaseImpl_ReadDirEntry(storage, currentEntry, data); cmp = entryNameCmp(name, data->name); @@ -1779,7 +1779,7 @@ static HRESULT WINAPI StorageBaseImpl_DestroyElement( return STG_E_ACCESSDENIED; entryToDeleteRef = findElement( - This->ancestorStorage, + This, This->storageDirEntry, pwcsName, &entryToDelete);
1
0
0
0
Vincent Povirk : ole32: Don' t use ancestorStorage to decide if a storage is transacted.
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 55b3a6e59f81013bb9f39bd57d2b6b5f103dabbc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55b3a6e59f81013bb9f39bd57…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Nov 30 17:10:49 2009 -0600 ole32: Don't use ancestorStorage to decide if a storage is transacted. --- dlls/ole32/storage32.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/ole32/storage32.c b/dlls/ole32/storage32.c index 266d677..d0b0461 100644 --- a/dlls/ole32/storage32.c +++ b/dlls/ole32/storage32.c @@ -435,7 +435,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStream( * Check that we're compatible with the parent's storage mode, but * only if we are not in transacted mode */ - if(!(This->ancestorStorage->base.openFlags & STGM_TRANSACTED)) { + if(!(This->openFlags & STGM_TRANSACTED)) { if ( STGM_ACCESS_MODE( grfMode ) > STGM_ACCESS_MODE( This->openFlags ) ) { res = STG_E_ACCESSDENIED; @@ -560,7 +560,7 @@ static HRESULT WINAPI StorageBaseImpl_OpenStorage( * Check that we're compatible with the parent's storage mode, * but only if we are not transacted */ - if(!(This->ancestorStorage->base.openFlags & STGM_TRANSACTED)) { + if(!(This->openFlags & STGM_TRANSACTED)) { if ( STGM_ACCESS_MODE( grfMode ) > STGM_ACCESS_MODE( This->openFlags ) ) { res = STG_E_ACCESSDENIED; @@ -848,7 +848,7 @@ static HRESULT WINAPI StorageBaseImpl_CreateStream( * Check that we're compatible with the parent's storage mode * if not in transacted mode */ - if(!(This->ancestorStorage->base.openFlags & STGM_TRANSACTED)) { + if(!(This->openFlags & STGM_TRANSACTED)) { if ( STGM_ACCESS_MODE( grfMode ) > STGM_ACCESS_MODE( This->openFlags ) ) return STG_E_ACCESSDENIED; }
1
0
0
0
Vincent Povirk : ole32: Add a test for modifying read-only substorage objects.
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 1a12141d8691df7df2a9526b097347b058154646 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=1a12141d8691df7df2a9526b0…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Fri Dec 4 15:32:16 2009 -0600 ole32: Add a test for modifying read-only substorage objects. --- dlls/ole32/tests/storage32.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/dlls/ole32/tests/storage32.c b/dlls/ole32/tests/storage32.c index b5ecf22..b658a46 100644 --- a/dlls/ole32/tests/storage32.c +++ b/dlls/ole32/tests/storage32.c @@ -1348,7 +1348,7 @@ static void test_parent_free(void) static void test_nonroot_transacted(void) { - IStorage *stg = NULL, *stg2 = NULL; + IStorage *stg = NULL, *stg2 = NULL, *stg3 = NULL; HRESULT r; IStream *stm = NULL; static const WCHAR stgname[] = { 'P','E','R','M','S','T','G',0 }; @@ -1398,7 +1398,26 @@ static void test_nonroot_transacted(void) IStorage_Release(stg2); } - IStream_Release(stg); + /* create a read-only transacted substorage */ + r = IStorage_OpenStorage(stg, stgname, NULL, STGM_READ | STGM_SHARE_EXCLUSIVE | STGM_TRANSACTED, NULL, 0, &stg2); + ok(r==S_OK, "IStorage->OpenStorage failed, hr=%08x\n", r); + + if (r == S_OK) + { + /* The storage can be modified. */ + r = IStorage_CreateStorage(stg2, stgname, STGM_READWRITE | STGM_SHARE_EXCLUSIVE, 0, 0, &stg3); + todo_wine ok(r==S_OK, "IStorage->CreateStorage failed, hr=%08x\n", r); + if (r == S_OK) + IStream_Release(stg3); + + /* But changes cannot be committed. */ + r = IStorage_Commit(stg2, 0); + todo_wine ok(r==STG_E_ACCESSDENIED, "IStorage->Commit should fail, hr=%08x\n", r); + + IStorage_Release(stg2); + } + + IStorage_Release(stg); /* create a non-transacted file */ r = StgCreateDocfile( filename, STGM_CREATE | STGM_SHARE_EXCLUSIVE |
1
0
0
0
Alexandre Julliard : ntdll: Search the whole filesystem under the starting directory when opening files by id .
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 6509044087ad5588d9f5904fb6237c84102bebf3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6509044087ad5588d9f5904fb…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 9 23:34:45 2009 +0100 ntdll: Search the whole filesystem under the starting directory when opening files by id. --- dlls/ntdll/directory.c | 190 ++++++++++++++++++++++++++++++++++++----------- dlls/ntdll/tests/file.c | 21 +++++- 2 files changed, 166 insertions(+), 45 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=6509044087ad5588d9f59…
1
0
0
0
Alexandre Julliard : clock: Convert to Unicode.
by Alexandre Julliard
10 Dec '09
10 Dec '09
Module: wine Branch: master Commit: 58b007b0b7731f4b8ec6182a34e06205a8b09111 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58b007b0b7731f4b8ec6182a3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Wed Dec 9 18:53:35 2009 +0100 clock: Convert to Unicode. --- programs/clock/Makefile.in | 1 + programs/clock/main.c | 77 ++++++++++++++++++++++--------------------- programs/clock/main.h | 2 +- programs/clock/winclock.c | 29 ++++++++-------- programs/clock/winclock.h | 2 +- 5 files changed, 56 insertions(+), 55 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=58b007b0b7731f4b8ec61…
1
0
0
0
← Newer
1
...
78
79
80
81
82
83
84
...
124
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
Results per page:
10
25
50
100
200