ReactOS.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
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
List overview
Download
Ros-diffs
December 2008
----- 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
ros-diffs@reactos.org
31 participants
710 discussions
Start a n
N
ew thread
[sserapion] 38334: Re-add telnet since it builds(or will build).
by sserapion@svn.reactos.org
Author: sserapion Date: Wed Dec 24 16:01:45 2008 New Revision: 38334 URL:
http://svn.reactos.org/svn/reactos?rev=38334&view=rev
Log: Re-add telnet since it builds(or will build). Modified: branches/ros-amd64-bringup/reactos/base/applications/network/network.rbuild Modified: branches/ros-amd64-bringup/reactos/base/applications/network/network.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/base/…
============================================================================== --- branches/ros-amd64-bringup/reactos/base/applications/network/network.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/base/applications/network/network.rbuild [iso-8859-1] Wed Dec 24 16:01:45 2008 @@ -28,7 +28,9 @@ <directory name="route"> <xi:include href="route/route.rbuild" /> </directory> - + <directory name="telnet"> + <xi:include href="telnet/telnet.rbuild" /> + </directory> <directory name="tracert"> <xi:include href="tracert/tracert.rbuild" /> </directory>
16 years
1
0
0
0
[tkreuzer] 38333: #define _alloca() to __builtin_alloca(), that's the only way it will work properly on x64 anyway.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Dec 24 14:55:01 2008 New Revision: 38333 URL:
http://svn.reactos.org/svn/reactos?rev=38333&view=rev
Log: #define _alloca() to __builtin_alloca(), that's the only way it will work properly on x64 anyway. Modified: branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h Modified: branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/crt/mingw32/intrin_x86.h [iso-8859-1] Wed Dec 24 14:55:01 2008 @@ -70,6 +70,10 @@ #define _AddressOfReturnAddress() (&(((void **)(__builtin_frame_address(0)))[1])) /* TODO: __getcallerseflags but how??? */ +/* Maybe the same for x86? */ +#ifdef _x86_64 +#define _alloca(s) __builtin_alloca(s) +#endif /*** Atomic operations ***/
16 years
1
0
0
0
[tkreuzer] 38332: Delete broken _alloca implementation, before someone actually starts using it ; -)
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Dec 24 14:26:23 2008 New Revision: 38332 URL:
http://svn.reactos.org/svn/reactos?rev=38332&view=rev
Log: Delete broken _alloca implementation, before someone actually starts using it ;-) Removed: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/_alloca.S Removed: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/_alloca.S URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/_alloca.S [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/arch/amd64/_alloca.S (removed) @@ -1,36 +1,0 @@ -/* stuff needed for libgcc on win32. */ -.intel_syntax noprefix - -/*#ifdef L_chkstk*/ -#ifdef WIN32 - - .global ___chkstk - .global __alloca -___chkstk: -__alloca: - push rcx /* save temp */ - mov rcx, rsp /* get sp */ - add rcx, 8 /* and point to return addr */ - -probe: - cmp rax, 0x1000 /* > 4k ?*/ - jb done - - sub rcx, 0x1000 /* yes, move pointer down 4k*/ - or qword ptr [rcx], 0x0 /* probe there */ - sub rax, 0x1000 /* decrement count */ - jmp probe /* and do it again */ - -done: - sub rcx, rax - or qword ptr [rcx], 0x0 /* less that 4k, just peek here */ - - mov rax, rsp - mov rsp, rcx /* decrement stack */ - - mov rcx, [rax] /* recover saved temp */ - mov rax, [rax + 8]/* get return address */ - jmp [rax] - - -#endif
16 years
1
0
0
0
[tkreuzer] 38331: Add more IMAGE_SCN_ flags
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Dec 24 12:03:55 2008 New Revision: 38331 URL:
http://svn.reactos.org/svn/reactos?rev=38331&view=rev
Log: Add more IMAGE_SCN_ flags Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rsym/rsym.h [iso-8859-1] Wed Dec 24 12:03:55 2008 @@ -14,9 +14,26 @@ #define IMAGE_DIRECTORY_ENTRY_BASERELOC 5 #define IMAGE_SCN_TYPE_NOLOAD 0x00000002 +#define IMAGE_SCN_TYPE_NO_PAD 0x00000008 +#define IMAGE_SCN_CNT_CODE 0x00000020 +#define IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040 +#define IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080 +#define IMAGE_SCN_LNK_OTHER 0x00000100 +#define IMAGE_SCN_LNK_INFO 0x00000200 #define IMAGE_SCN_LNK_REMOVE 0x00000800 +#define IMAGE_SCN_NO_DEFER_SPEC_EXC 0x00004000 +#define IMAGE_SCN_GPREL 0x00008000 +#define IMAGE_SCN_MEM_PURGEABLE 0x00020000 +#define IMAGE_SCN_MEM_LOCKED 0x00040000 +#define IMAGE_SCN_MEM_PRELOAD 0x00080000 +#define IMAGE_SCN_LNK_NRELOC_OVFL 0x01000000 +#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 +#define IMAGE_SCN_MEM_NOT_CACHED 0x04000000 +#define IMAGE_SCN_MEM_NOT_PAGED 0x08000000 +#define IMAGE_SCN_MEM_SHARED 0x10000000 +#define IMAGE_SCN_MEM_EXECUTE 0x20000000 #define IMAGE_SCN_MEM_READ 0x40000000 -#define IMAGE_SCN_MEM_DISCARDABLE 0x02000000 +#define IMAGE_SCN_MEM_WRITE 0x80000000 #define IMAGE_NUMBEROF_DIRECTORY_ENTRIES 16
16 years
1
0
0
0
[tkreuzer] 38330: rsym64: Fix a bunch bugs, cleanup code. Now it can strip sections at any position, so if eh_frame is not at the end, we only waste a little address space, and we got plenty of that.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Dec 24 12:02:47 2008 New Revision: 38330 URL:
http://svn.reactos.org/svn/reactos?rev=38330&view=rev
Log: rsym64: Fix a bunch bugs, cleanup code. Now it can strip sections at any position, so if eh_frame is not at the end, we only waste a little address space, and we got plenty of that. Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.h Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.c [iso-8859-1] Wed Dec 24 12:02:47 2008 @@ -318,9 +318,6 @@ return cCodes; } -#define GetSectionPointer(Info, i) \ - ((void*)(Info->FilePtr + Info->SectionHeaders[i].PointerToRawData)) - #define GetxdataSize(cFuncs, cUWOP, cScopes) \ ( cFuncs * (sizeof(UNWIND_INFO) + 2 + 4 + 4) \ + cUWOP * sizeof(UNWIND_CODE) \ @@ -369,14 +366,6 @@ cbSize += c * sizeof(UNWIND_CODE); Info->SizeOfProlog = State.Location - FunctionStart; } -// else if - // if is scope - // if is first scope - // align 4 - // emit gcc_specific handler - // create pointer to C_SCOPE_TABLE - // - } cbSize = ROUND_UP(cbSize, 4); @@ -396,7 +385,7 @@ File->cUWOP = 0; State.FramePtr = 0; - p = GetSectionPointer(File, File->eh_frame.idx); + p = File->eh_frame.p; pmax = (char*)p + File->eh_frame.psh->Misc.VirtualSize; for (; p->Length && (char*)p < pmax; p = NextCIE(p)) { @@ -444,7 +433,7 @@ FileAlignment = File->OptionalHeader->FileAlignment; /* Get pointer to eh_frame section */ - eh_frame = GetSectionPointer(File, File->eh_frame.idx); + eh_frame = File->eh_frame.p; g_ehframep = (ULONG)eh_frame; /* Get sizes */ @@ -452,16 +441,24 @@ // printf("cFuncs = %ld, cUWOPS = %ld, cScopes = %ld\n", // File->cFuncs, File->cUWOP, File->cScopes); - /* Allocate .pdata buffer */ - File->pdata.idx = File->UsedSections; - pshp = File->pdata.psh = &File->SectionHeaders[File->pdata.idx]; + /* Initialize section header for .pdata */ + i = File->pdata.idx = File->UsedSections; + pshp = File->pdata.psh = &File->NewSectionHeaders[i]; memcpy(pshp->Name, ".pdata", 7); pshp->Misc.VirtualSize = (File->cFuncs + 1) * sizeof(RUNTIME_FUNCTION); - pshp->VirtualAddress = File->SectionHeaders[File->pdata.idx - 1].VirtualAddress + - File->SectionHeaders[File->pdata.idx - 1].SizeOfRawData; + pshp->VirtualAddress = File->NewSectionHeaders[i - 1].VirtualAddress + + File->NewSectionHeaders[i - 1].SizeOfRawData; pshp->SizeOfRawData = ROUND_UP(pshp->Misc.VirtualSize, FileAlignment); - pshp->PointerToRawData = File->SectionHeaders[File->pdata.idx - 1].PointerToRawData + - File->SectionHeaders[File->pdata.idx - 1].SizeOfRawData; + pshp->PointerToRawData = File->NewSectionHeaders[i - 1].PointerToRawData + + File->NewSectionHeaders[i - 1].SizeOfRawData; + pshp->PointerToRelocations = 0; + pshp->PointerToLinenumbers = 0; + pshp->NumberOfRelocations = 0; + pshp->NumberOfLinenumbers = 0; + pshp->Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_NOT_PAGED | + IMAGE_SCN_CNT_INITIALIZED_DATA; + + /* Allocate .pdata buffer */ pdata = File->pdata.p = malloc(pshp->SizeOfRawData); memset(File->pdata.p, pshp->SizeOfRawData, 0); @@ -470,16 +467,24 @@ Dir->VirtualAddress = pshp->VirtualAddress; Dir->Size = pshp->Misc.VirtualSize; - /* Allocate .xdata buffer */ + /* Initialize section header for .xdata */ File->xdata.idx = File->pdata.idx + 1; - pshx = File->xdata.psh = &File->SectionHeaders[File->xdata.idx]; + pshx = File->xdata.psh = &File->NewSectionHeaders[File->xdata.idx]; memcpy(pshx->Name, ".xdata", 7); pshx->Misc.VirtualSize = GetxdataSize(File->cFuncs, File->cUWOP, File->cScopes); pshx->VirtualAddress = pshp->VirtualAddress + pshp->SizeOfRawData; pshx->SizeOfRawData = ROUND_UP(pshx->Misc.VirtualSize, FileAlignment); pshx->PointerToRawData = pshp->PointerToRawData + pshp->SizeOfRawData; + pshx->PointerToRelocations = 0; + pshx->PointerToLinenumbers = 0; + pshx->NumberOfRelocations = 0; + pshx->NumberOfLinenumbers = 0; + pshx->Characteristics = IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_NOT_PAGED | + IMAGE_SCN_CNT_INITIALIZED_DATA; + + /* Allocate .xdata buffer */ File->xdata.p = malloc(pshx->SizeOfRawData); - memset(File->pdata.p, pshx->SizeOfRawData, 0); + memset(File->xdata.p, pshx->SizeOfRawData, 0); i = 0; Offset = File->eh_frame.psh->VirtualAddress; @@ -522,7 +527,7 @@ DWORD i; DWORD checksum = Start; - for (i = 0; i < (cbSize + 1) / sizeof(WORD); i += 1) + for (i = 0; i < (cbSize + 1) / sizeof(WORD); i++) { checksum += Ptr[i]; checksum = (checksum + (checksum >> 16)) & 0xffff; @@ -534,8 +539,11 @@ void WriteOutFile(FILE *handle, PFILE_INFO File) { - int ret, Size, Pos; - DWORD Checksum; + int ret, Size, Pos = 0; + DWORD CheckSum; + ULONG i, Alignment; + + Alignment = File->OptionalHeader->FileAlignment; /* Update section count */ File->FileHeader->NumberOfSections = File->UsedSections + 2; // FIXME!!! @@ -545,18 +553,60 @@ + File->xdata.psh->SizeOfRawData; File->OptionalHeader->SizeOfImage = Size; - /* Calculate size of file beginning */ - Size = File->SectionHeaders[File->UsedSections].PointerToRawData; - /* Recalculate checksum */ - Checksum = CalculateChecksum(0, File->FilePtr, Size); - Checksum = CalculateChecksum(Checksum, File->pdata.p, File->pdata.psh->Misc.VirtualSize); - Checksum = CalculateChecksum(Checksum, File->xdata.p, File->xdata.psh->Misc.VirtualSize); - File->OptionalHeader->CheckSum = Checksum + Size + File->pdata.psh->Misc.VirtualSize; - - /* Write file beginning */ + CheckSum = CalculateChecksum(0, File->FilePtr, File->HeaderSize); + for (i = 0; i < File->AllSections; i++) + { + if (File->UseSection[i]) + { + Size = File->SectionHeaders[i].SizeOfRawData; + if (Size) + { + void *p; + p = File->FilePtr + File->SectionHeaders[i].PointerToRawData; + CheckSum = CalculateChecksum(CheckSum, p, Size); + } + } + } + Size = File->pdata.psh->Misc.VirtualSize; + CheckSum = CalculateChecksum(CheckSum, File->pdata.p, Size); + Size = File->xdata.psh->Misc.VirtualSize; + CheckSum = CalculateChecksum(CheckSum, File->xdata.p, Size); + CheckSum += File->HeaderSize; + CheckSum += File->pdata.psh->Misc.VirtualSize; + CheckSum += File->xdata.psh->Misc.VirtualSize; + File->OptionalHeader->CheckSum = CheckSum; + + /* Write file header */ + Size = File->HeaderSize; ret = fwrite(File->DosHeader, 1, Size, handle); Pos = Size; + + /* Write Section headers */ + Size = File->NewSectionHeaderSize; + ret = fwrite(File->NewSectionHeaders, 1, Size, handle); + Pos += Size; + + /* Fill up to next alignement */ + Size = ROUND_UP(Pos, Alignment) - Pos; + ret = fwrite(File->AlignBuf, 1, Size, handle); + Pos += Size; + + /* Write sections */ + for (i = 0; i < File->AllSections; i++) + { + if (File->UseSection[i]) + { + void *p; + Size = File->SectionHeaders[i].SizeOfRawData; + if (Size) + { + p = File->FilePtr + File->SectionHeaders[i].PointerToRawData; + ret = fwrite(p, 1, Size, handle); + Pos += Size; + } + } + } /* Write .pdata section */ Size = File->pdata.psh->SizeOfRawData; @@ -575,11 +625,13 @@ ParsePEHeaders(PFILE_INFO File) { DWORD OldChecksum, Checksum; + ULONG Alignment, CurrentPos; int i; /* Check if MZ header exists */ File->DosHeader = (PIMAGE_DOS_HEADER)File->FilePtr; - if ((File->DosHeader->e_magic != IMAGE_DOS_MAGIC) || File->DosHeader->e_lfanew == 0L) + if ((File->DosHeader->e_magic != IMAGE_DOS_MAGIC) || + (File->DosHeader->e_lfanew == 0L)) { perror("Input file is not a PE image.\n"); return -1; @@ -587,7 +639,9 @@ /* Locate PE file header */ File->FileHeader = (PIMAGE_FILE_HEADER)(File->FilePtr + - File->DosHeader->e_lfanew + sizeof(ULONG)); + File->DosHeader->e_lfanew + sizeof(ULONG)); + + /* Check for x64 image */ if (File->FileHeader->Machine != IMAGE_FILE_MACHINE_AMD64) { perror("Input file is not an x64 image.\n"); @@ -596,13 +650,12 @@ /* Locate optional header */ File->OptionalHeader = (PIMAGE_OPTIONAL_HEADER64)(File->FileHeader + 1); - File->ImageBase = File->OptionalHeader->ImageBase; /* Check if checksum is correct */ OldChecksum = File->OptionalHeader->CheckSum; File->OptionalHeader->CheckSum = 0; - Checksum = CalculateChecksum(0, File->FilePtr, File->cbInFileSize) - + File->cbInFileSize; + Checksum = CalculateChecksum(0, File->FilePtr, File->cbInFileSize); + Checksum += File->cbInFileSize; if (Checksum != OldChecksum) { fprintf(stderr, "Input file has incorrect PE checksum: 0x%lx (calculated: 0x%lx)\n", @@ -625,36 +678,64 @@ return -1; } + /* Create some shortcuts */ + File->ImageBase = File->OptionalHeader->ImageBase; File->Symbols = File->FilePtr + File->FileHeader->PointerToSymbolTable; File->Strings = (char*)File->Symbols + File->FileHeader->NumberOfSymbols * 18; /* Check section names */ File->AllSections = File->FileHeader->NumberOfSections; + Alignment = File->OptionalHeader->FileAlignment; + File->NewSectionHeaders = malloc((File->AllSections+2) * sizeof(IMAGE_SECTION_HEADER)); + File->UsedSections = 0; File->eh_frame.idx = -1; + CurrentPos = File->SectionHeaders[0].PointerToRawData; +// CurrentPos = ROUND_UP(File->HeaderSize, Alignment); + + /* Allocate array of chars, specifiying wheter to copy the section */ + File->UseSection = malloc(File->AllSections); + for (i = 0; i < File->AllSections; i++) { char *pName = (char*)File->SectionHeaders[i].Name; + File->UseSection[i] = 1; /* Check for long name */ if (pName[0] == '/') { unsigned long index = strtoul(pName+1, 0, 10); pName = File->Strings + index; - } - else - { - /* Mark last section with a short name */ - File->UsedSections = i + 1; - } - + + // Hack, simply remove all sections with long names + File->UseSection[i] = 0; + } + + /* Chek if we have the eh_frame section */ if (strcmp(pName, ".eh_frame") == 0) { + File->eh_frame.psh = &File->SectionHeaders[i]; File->eh_frame.idx = i; - File->eh_frame.psh = &File->SectionHeaders[i]; - File->eh_frame.p = GetSectionPointer(File, i); - } - - } + File->eh_frame.p = File->FilePtr + File->eh_frame.psh->PointerToRawData; + } + + if (File->UseSection[i]) + { + /* Copy section header */ + File->NewSectionHeaders[File->UsedSections] = + File->SectionHeaders[i]; + /* Fix Offset into File */ + File->NewSectionHeaders[File->UsedSections].PointerToRawData = + File->SectionHeaders[i].PointerToRawData ? CurrentPos : 0; + CurrentPos += File->NewSectionHeaders[File->UsedSections].SizeOfRawData; + + /* Increase number of used sections */ + File->UsedSections++; + } + } + + /* This is the actual size of the new section headers */ + File->NewSectionHeaderSize = + (File->UsedSections+2) * sizeof(IMAGE_SECTION_HEADER); if (File->eh_frame.idx == -1) { Modified: branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/tools…
============================================================================== --- branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/tools/rsym/rsym64.h [iso-8859-1] Wed Dec 24 12:02:47 2008 @@ -97,6 +97,13 @@ USHORT FrameOffset; } UNWIND_CODE, *PUNWIND_CODE; +enum +{ + UNW_FLAG_EHANDLER = 0x01, + UNW_FLAG_UHANDLER = 0x02, + UNW_FLAG_CHAININFO = 0x03, +}; + typedef struct _UNWIND_INFO { UBYTE Version:3; @@ -148,11 +155,14 @@ PIMAGE_FILE_HEADER FileHeader; PIMAGE_OPTIONAL_HEADER64 OptionalHeader; PIMAGE_SECTION_HEADER SectionHeaders; + PIMAGE_SECTION_HEADER NewSectionHeaders; + ULONG NewSectionHeaderSize; PIMAGE_BASE_RELOCATION Relocations; void *Symbols; char *Strings; ULONG64 ImageBase; ULONG HeaderSize; + char *UseSection; /* Sections */ ULONG AllSections;
16 years
1
0
0
0
[sginsberg] 38329: - Welcome to Winetests -Wno-format, goodbye format warnings.
by sginsberg@svn.reactos.org
Author: sginsberg Date: Wed Dec 24 10:52:58 2008 New Revision: 38329 URL:
http://svn.reactos.org/svn/reactos?rev=38329&view=rev
Log: - Welcome to Winetests -Wno-format, goodbye format warnings. Modified: trunk/rostests/winetests/advapi32/advapi32.rbuild trunk/rostests/winetests/advpack/advpack.rbuild trunk/rostests/winetests/browseui/browseui.rbuild trunk/rostests/winetests/cabinet/cabinet.rbuild trunk/rostests/winetests/comcat/comcat.rbuild trunk/rostests/winetests/comctl32/comctl32.rbuild trunk/rostests/winetests/comdlg32/comdlg32.rbuild trunk/rostests/winetests/gdi32/gdi32.rbuild trunk/rostests/winetests/gdiplus/gdiplus.rbuild trunk/rostests/winetests/hlink/hlink.rbuild trunk/rostests/winetests/icmp/icmp.rbuild trunk/rostests/winetests/imm32/imm32.rbuild trunk/rostests/winetests/kernel32/kernel32.rbuild trunk/rostests/winetests/lz32/lz32.rbuild trunk/rostests/winetests/mapi32/mapi32.rbuild trunk/rostests/winetests/mlang/mlang.rbuild trunk/rostests/winetests/msacm32/msacm32.rbuild trunk/rostests/winetests/mshtml/mshtml.rbuild trunk/rostests/winetests/msi/msi.rbuild trunk/rostests/winetests/mstask/mstask.rbuild trunk/rostests/winetests/msvcrt/msvcrt.rbuild trunk/rostests/winetests/netapi32/netapi32.rbuild trunk/rostests/winetests/ntdll/ntdll.rbuild trunk/rostests/winetests/odbccp32/odbccp32.rbuild trunk/rostests/winetests/ole32/ole32.rbuild trunk/rostests/winetests/oleaut32/oleaut32.rbuild trunk/rostests/winetests/powrprof/powrprof.rbuild trunk/rostests/winetests/psapi/psapi.rbuild trunk/rostests/winetests/riched20/riched20.rbuild trunk/rostests/winetests/riched32/riched32.rbuild trunk/rostests/winetests/rpcrt4/rpcrt4.rbuild trunk/rostests/winetests/rsabase/rsabase.rbuild trunk/rostests/winetests/rsaenh/rsaenh.rbuild trunk/rostests/winetests/schannel/schannel.rbuild trunk/rostests/winetests/setupapi/setupapi.rbuild trunk/rostests/winetests/shell32/shell32.rbuild trunk/rostests/winetests/shlwapi/shlwapi.rbuild trunk/rostests/winetests/urlmon/urlmon.rbuild trunk/rostests/winetests/user32/user32.rbuild trunk/rostests/winetests/usp10/usp10.rbuild trunk/rostests/winetests/uxtheme/uxtheme.rbuild trunk/rostests/winetests/version/version.rbuild trunk/rostests/winetests/winhttp/winhttp.rbuild trunk/rostests/winetests/wininet/wininet.rbuild Modified: trunk/rostests/winetests/advapi32/advapi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advapi32/advapi…
============================================================================== --- trunk/rostests/winetests/advapi32/advapi32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/advapi32/advapi32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="advapi32_winetest" type="win32cui" installbase="bin" installname="advapi32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="advapi32_winetest">.</include> <define name="__USE_W32API" /> <library>advapi32</library> Modified: trunk/rostests/winetests/advpack/advpack.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/advpack/advpack…
============================================================================== --- trunk/rostests/winetests/advpack/advpack.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/advpack/advpack.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="advpack_winetest" type="win32cui" installbase="bin" installname="advpack_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="advpack_winetest">.</include> <file>advpack.c</file> <file>files.c</file> Modified: trunk/rostests/winetests/browseui/browseui.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/browseui/browse…
============================================================================== --- trunk/rostests/winetests/browseui/browseui.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/browseui/browseui.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="browseui_winetest" type="win32cui" installbase="bin" installname="browseui_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="browseui_winetest">.</include> <library>wine</library> <library>ole32</library> Modified: trunk/rostests/winetests/cabinet/cabinet.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/cabinet/cabinet…
============================================================================== --- trunk/rostests/winetests/cabinet/cabinet.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/cabinet/cabinet.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="cabinet_winetest" type="win32cui" installbase="bin" installname="cabinet_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="cabinet_winetest">.</include> <file>extract.c</file> <file>fdi.c</file> Modified: trunk/rostests/winetests/comcat/comcat.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comcat/comcat.r…
============================================================================== --- trunk/rostests/winetests/comcat/comcat.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/comcat/comcat.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="comcat_winetest" type="win32cui" installbase="bin" installname="comcat_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="comcat_winetest">.</include> <file>comcat.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/comctl32/comctl32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comctl32/comctl…
============================================================================== --- trunk/rostests/winetests/comctl32/comctl32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/comctl32/comctl32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="comctl32_winetest" type="win32cui" installbase="bin" installname="comctl32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="comctl32_winetest">.</include> <file>comboex.c</file> <file>datetime.c</file> Modified: trunk/rostests/winetests/comdlg32/comdlg32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/comdlg32/comdlg…
============================================================================== --- trunk/rostests/winetests/comdlg32/comdlg32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/comdlg32/comdlg32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="comdlg32_winetest" type="win32cui" installbase="bin" installname="comdlg32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="comdlg32_winetest">.</include> <file>filedlg.c</file> <file>printdlg.c</file> Modified: trunk/rostests/winetests/gdi32/gdi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdi32/gdi32.rbu…
============================================================================== --- trunk/rostests/winetests/gdi32/gdi32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/gdi32/gdi32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="gdi32_winetest" type="win32cui" installbase="bin" installname="gdi32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="gdi32_winetest">.</include> <define name="__USE_W32API" /> <library>ntdll</library> Modified: trunk/rostests/winetests/gdiplus/gdiplus.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/gdiplus/gdiplus…
============================================================================== --- trunk/rostests/winetests/gdiplus/gdiplus.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/gdiplus/gdiplus.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="gdiplus_winetest" type="win32cui" installbase="bin" installname="gdiplus_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="gdiplus_winetest">.</include> <file>brush.c</file> <file>customlinecap.c</file> Modified: trunk/rostests/winetests/hlink/hlink.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/hlink/hlink.rbu…
============================================================================== --- trunk/rostests/winetests/hlink/hlink.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/hlink/hlink.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="hlink_winetest" type="win32cui" installbase="bin" installname="hlink_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="hlink_winetest">.</include> <file>hlink.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/icmp/icmp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/icmp/icmp.rbuil…
============================================================================== --- trunk/rostests/winetests/icmp/icmp.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/icmp/icmp.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="icmp_winetest" type="win32cui" installbase="bin" installname="icmp_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="icmp_winetest">.</include> <define name="__USE_W32API" /> <library>kernel32</library> Modified: trunk/rostests/winetests/imm32/imm32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/imm32/imm32.rbu…
============================================================================== --- trunk/rostests/winetests/imm32/imm32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/imm32/imm32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="imm32_winetest" type="win32cui" installbase="bin" installname="imm32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="imm32_winetest">.</include> <file>imm32.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/kernel32/kernel32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/kernel32/kernel…
============================================================================== --- trunk/rostests/winetests/kernel32/kernel32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/kernel32/kernel32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="kernel32_winetest" type="win32cui" installbase="bin" installname="kernel32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="kernel32_winetest">.</include> <define name="__USE_W32API" /> <library>ntdll</library> Modified: trunk/rostests/winetests/lz32/lz32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/lz32/lz32.rbuil…
============================================================================== --- trunk/rostests/winetests/lz32/lz32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/lz32/lz32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="lz32_winetest" type="win32cui" installbase="bin" installname="lz32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="lz32_winetest">.</include> <file>lzexpand_main.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/mapi32/mapi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mapi32/mapi32.r…
============================================================================== --- trunk/rostests/winetests/mapi32/mapi32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/mapi32/mapi32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="mapi32_winetest" type="win32cui" installbase="bin" installname="mapi32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="mapi32_winetest">.</include> <file>imalloc.c</file> <file>prop.c</file> Modified: trunk/rostests/winetests/mlang/mlang.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mlang/mlang.rbu…
============================================================================== --- trunk/rostests/winetests/mlang/mlang.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/mlang/mlang.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="mlang_winetest" type="win32cui" installbase="bin" installname="mlang_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="mlang_winetest">.</include> <file>mlang.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/msacm32/msacm32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msacm32/msacm32…
============================================================================== --- trunk/rostests/winetests/msacm32/msacm32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/msacm32/msacm32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="msacm32_winetest" type="win32cui" installbase="bin" installname="msacm32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="msacm32_winetest">.</include> <library>wine</library> <library>kernel32</library> Modified: trunk/rostests/winetests/mshtml/mshtml.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mshtml/mshtml.r…
============================================================================== --- trunk/rostests/winetests/mshtml/mshtml.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/mshtml/mshtml.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="mshtml_winetest" type="win32cui" installbase="bin" installname="mshtml_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="mshtml_winetest">.</include> <file>dom.c</file> <file>htmldoc.c</file> Modified: trunk/rostests/winetests/msi/msi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msi/msi.rbuild?…
============================================================================== --- trunk/rostests/winetests/msi/msi.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/msi/msi.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="msi_winetest" type="win32cui" installbase="bin" installname="msi_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="msi_winetest">.</include> <file>automation.c</file> <file>db.c</file> Modified: trunk/rostests/winetests/mstask/mstask.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/mstask/mstask.r…
============================================================================== --- trunk/rostests/winetests/mstask/mstask.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/mstask/mstask.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="mstask_winetest" type="win32cui" installbase="bin" installname="mstask_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="mstask_winetest">.</include> <file>task.c</file> <file>task_scheduler.c</file> Modified: trunk/rostests/winetests/msvcrt/msvcrt.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/msvcrt/msvcrt.r…
============================================================================== --- trunk/rostests/winetests/msvcrt/msvcrt.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/msvcrt/msvcrt.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="msvcrt_winetest" type="win32cui" installbase="bin" installname="msvcrt_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="msvcrt_winetest">.</include> <include base="msvcrt">include/reactos/wine/msvcrt</include> <define name="__USE_W32API" /> Modified: trunk/rostests/winetests/netapi32/netapi32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/netapi32/netapi…
============================================================================== --- trunk/rostests/winetests/netapi32/netapi32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/netapi32/netapi32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="netapi32_winetest" type="win32cui" installbase="bin" installname="netapi32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="netapi32_winetest">.</include> <file>access.c</file> <file>apibuf.c</file> Modified: trunk/rostests/winetests/ntdll/ntdll.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ntdll/ntdll.rbu…
============================================================================== --- trunk/rostests/winetests/ntdll/ntdll.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/ntdll/ntdll.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="ntdll_winetest" type="win32cui" installbase="bin" installname="ntdll_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="ntdll_winetest">.</include> <define name="__USE_W32API" /> <library>kernel32</library> Modified: trunk/rostests/winetests/odbccp32/odbccp32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/odbccp32/odbccp…
============================================================================== --- trunk/rostests/winetests/odbccp32/odbccp32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/odbccp32/odbccp32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="odbccp32_winetest" type="win32cui" installbase="bin" installname="odbccp32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="odbccp32_winetest">.</include> <file>misc.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/ole32/ole32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/ole32/ole32.rbu…
============================================================================== --- trunk/rostests/winetests/ole32/ole32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/ole32/ole32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="ole32_winetest" type="win32cui" installbase="bin" installname="ole32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="ole32_winetest">.</include> <file>clipboard.c</file> <file>compobj.c</file> Modified: trunk/rostests/winetests/oleaut32/oleaut32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/oleaut32/oleaut…
============================================================================== --- trunk/rostests/winetests/oleaut32/oleaut32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/oleaut32/oleaut32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="oleaut32_winetest" type="win32cui" installbase="bin" installname="oleaut32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="oleaut32_winetest">.</include> <library>wine</library> <library>oleaut32</library> Modified: trunk/rostests/winetests/powrprof/powrprof.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/powrprof/powrpr…
============================================================================== --- trunk/rostests/winetests/powrprof/powrprof.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/powrprof/powrprof.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -1,4 +1,5 @@ <module name="powrprof_winetest" type="win32cui" installbase="bin" installname="powrprof_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="powrprof_winetest">.</include> <define name="__USE_W32API" /> <define name="UNICODE" /> Modified: trunk/rostests/winetests/psapi/psapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/psapi/psapi.rbu…
============================================================================== --- trunk/rostests/winetests/psapi/psapi.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/psapi/psapi.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="psapi_winetest" type="win32cui" installbase="bin" installname="psapi_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="psapi_winetest">.</include> <define name="__USE_W32API" /> <library>kernel32</library> Modified: trunk/rostests/winetests/riched20/riched20.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched20/riched…
============================================================================== --- trunk/rostests/winetests/riched20/riched20.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/riched20/riched20.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="riched20_winetest" type="win32cui" installbase="bin" installname="riched20_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="riched20_winetest">.</include> <file>editor.c</file> <file>richole.c</file> Modified: trunk/rostests/winetests/riched32/riched32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/riched32/riched…
============================================================================== --- trunk/rostests/winetests/riched32/riched32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/riched32/riched32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="riched32_winetest" type="win32cui" installbase="bin" installname="riched32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="riched32_winetest">.</include> <file>editor.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/rpcrt4/rpcrt4.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rpcrt4/rpcrt4.r…
============================================================================== --- trunk/rostests/winetests/rpcrt4/rpcrt4.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/rpcrt4/rpcrt4.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -8,6 +8,7 @@ <file>server.idl</file> </module> <module name="rpcrt4_winetest" type="win32cui" installbase="bin" installname="rpcrt4_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="rpcrt4_winetest">.</include> <include root="intermediate" base="rpcrt4_winetest">.</include> <define name="__USE_W32API" /> Modified: trunk/rostests/winetests/rsabase/rsabase.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rsabase/rsabase…
============================================================================== --- trunk/rostests/winetests/rsabase/rsabase.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/rsabase/rsabase.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -1,6 +1,7 @@ <?xml version="1.0"?> <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <module name="rsabase_winetest" type="win32cui" installbase="bin" installname="rsabase_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="rsabase_winetest">.</include> <library>wine</library> <library>advapi32</library> Modified: trunk/rostests/winetests/rsaenh/rsaenh.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/rsaenh/rsaenh.r…
============================================================================== --- trunk/rostests/winetests/rsaenh/rsaenh.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/rsaenh/rsaenh.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="rsaenh_winetest" type="win32cui" installbase="bin" installname="rsaenh_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="rsaenh_winetest">.</include> <file>rsaenh.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/schannel/schannel.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/schannel/schann…
============================================================================== --- trunk/rostests/winetests/schannel/schannel.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/schannel/schannel.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="schannel_winetest" type="win32cui" installbase="bin" installname="schannel_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="schannel_winetest">.</include> <library>wine</library> <library>kernel32</library> Modified: trunk/rostests/winetests/setupapi/setupapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/setupapi/setupa…
============================================================================== --- trunk/rostests/winetests/setupapi/setupapi.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/setupapi/setupapi.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="setupapi_winetest" type="win32cui" installbase="bin" installname="setupapi_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="setupapi_winetest">.</include> <define name="__USE_W32API" /> <library>ntdll</library> Modified: trunk/rostests/winetests/shell32/shell32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/shell32…
============================================================================== --- trunk/rostests/winetests/shell32/shell32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/shell32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="shell32_winetest" type="win32cui" installbase="bin" installname="shell32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="shell32_winetest">.</include> <library>wine</library> <library>shell32</library> Modified: trunk/rostests/winetests/shlwapi/shlwapi.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shlwapi/shlwapi…
============================================================================== --- trunk/rostests/winetests/shlwapi/shlwapi.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/shlwapi/shlwapi.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="shlwapi_winetest" type="win32cui" installbase="bin" installname="shlwapi_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="shlwapi_winetest">.</include> <file>clist.c</file> <file>clsid.c</file> Modified: trunk/rostests/winetests/urlmon/urlmon.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/urlmon/urlmon.r…
============================================================================== --- trunk/rostests/winetests/urlmon/urlmon.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/urlmon/urlmon.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="urlmon_winetest" type="win32cui" installbase="bin" installname="urlmon_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="urlmon_winetest">.</include> <file>generated.c</file> <file>misc.c</file> Modified: trunk/rostests/winetests/user32/user32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/user32/user32.r…
============================================================================== --- trunk/rostests/winetests/user32/user32.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/user32/user32.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="user32_winetest" type="win32cui" installbase="bin" installname="user32_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="user32_winetest">.</include> <include base="ReactOS">include/reactos/wine</include> <define name="__USE_W32API" /> Modified: trunk/rostests/winetests/usp10/usp10.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/usp10/usp10.rbu…
============================================================================== --- trunk/rostests/winetests/usp10/usp10.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/usp10/usp10.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="usp10_winetest" type="win32cui" installbase="bin" installname="usp10_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="usp10_winetest">.</include> <file>usp10.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/uxtheme/uxtheme.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/uxtheme/uxtheme…
============================================================================== --- trunk/rostests/winetests/uxtheme/uxtheme.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/uxtheme/uxtheme.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="uxtheme_winetest" type="win32cui" installbase="bin" installname="uxtheme_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="uxtheme_winetest">.</include> <file>system.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/version/version.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/version/version…
============================================================================== --- trunk/rostests/winetests/version/version.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/version/version.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="version_winetest" type="win32cui" installbase="bin" installname="version_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="version_winetest">.</include> <file>info.c</file> <file>install.c</file> Modified: trunk/rostests/winetests/winhttp/winhttp.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/winhttp/winhttp…
============================================================================== --- trunk/rostests/winetests/winhttp/winhttp.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/winhttp/winhttp.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="winhttp_winetest" type="win32cui" installbase="bin" installname="winhttp_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="winhttp_winetest">.</include> <file>notification.c</file> <file>testlist.c</file> Modified: trunk/rostests/winetests/wininet/wininet.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/wininet/wininet…
============================================================================== --- trunk/rostests/winetests/wininet/wininet.rbuild [iso-8859-1] (original) +++ trunk/rostests/winetests/wininet/wininet.rbuild [iso-8859-1] Wed Dec 24 10:52:58 2008 @@ -2,6 +2,7 @@ <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> <group> <module name="wininet_winetest" type="win32cui" installbase="bin" installname="wininet_winetest.exe" allowwarnings="true"> + <compilerflag compiler="cc">-Wno-format</compilerflag> <include base="wininet_winetest">.</include> <library>wine</library> <library>wininet</library>
16 years
1
0
0
0
[tkreuzer] 38328: - Put Dx values at start of buffer to have alignemnt of 4 - increase size of stack buffer to 100, results in >90% buffer hits - Handle Dy values when ETO_PDY is specified (patch by Alexander Potashev, aspotashev at gmail dot com) See issue #3958 for more details.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Dec 24 09:35:40 2008 New Revision: 38328 URL:
http://svn.reactos.org/svn/reactos?rev=38328&view=rev
Log: - Put Dx values at start of buffer to have alignemnt of 4 - increase size of stack buffer to 100, results in >90% buffer hits - Handle Dy values when ETO_PDY is specified (patch by Alexander Potashev, aspotashev at gmail dot com) See issue #3958 for more details. Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c Modified: trunk/reactos/subsystems/win32/win32k/objects/freetype.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/freetype.c [iso-8859-1] Wed Dec 24 09:35:40 2008 @@ -3603,6 +3603,12 @@ TextLeft += Dx[i<<DxShift] << 6; // DbgPrint("new TextLeft2: %d\n", TextLeft); } + + if (DxShift) + { + TextTop -= Dx[2 * i + 1] << 6; + } + previous = glyph_index; String++; @@ -3651,7 +3657,7 @@ return FALSE; } -#define STACK_TEXT_BUFFER_SIZE 50 +#define STACK_TEXT_BUFFER_SIZE 100 BOOL APIENTRY NtGdiExtTextOutW( @@ -3706,17 +3712,19 @@ /* Probe and copy user mode data to the buffer */ _SEH2_TRY { + /* Put the Dx before the String to assure alignment of 4 */ + SafeString = (LPWSTR)(((ULONG_PTR)Buffer) + DxSize); + /* Probe and copy the string */ ProbeForRead(UnsafeString, StringSize, 1); - SafeString = Buffer; memcpy((PVOID)SafeString, UnsafeString, StringSize); /* If we have Dx values... */ if (UnsafeDx) { /* ... probe and copy them */ + SafeDx = Buffer; ProbeForRead(UnsafeDx, DxSize, 1); - SafeDx = (LPINT)(((ULONG_PTR)Buffer) + StringSize); memcpy(SafeDx, UnsafeDx, DxSize); } }
16 years
1
0
0
0
[mjmartin] 38327: - Update structs and flags to correct names based on documentation.
by mjmartin@svn.reactos.org
Author: mjmartin Date: Wed Dec 24 06:14:30 2008 New Revision: 38327 URL:
http://svn.reactos.org/svn/reactos?rev=38327&view=rev
Log: - Update structs and flags to correct names based on documentation. Modified: trunk/reactos/base/services/eventlog/eventlog.c trunk/reactos/base/services/eventlog/eventlog.h trunk/reactos/base/services/eventlog/file.c trunk/reactos/base/services/eventlog/logport.c Modified: trunk/reactos/base/services/eventlog/eventlog.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
============================================================================== --- trunk/reactos/base/services/eventlog/eventlog.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/eventlog.c [iso-8859-1] Wed Dec 24 06:14:30 2008 @@ -271,24 +271,24 @@ *pEventTime = (Time.ll - u1970.ll) / 10000000; } -VOID PRINT_HEADER(PFILE_HEADER header) -{ - DPRINT("SizeOfHeader = %d\n", header->SizeOfHeader); +VOID PRINT_HEADER(PEVENTLOGHEADER header) +{ + DPRINT("HeaderSize = %d\n", header->HeaderSize); DPRINT("Signature = 0x%x\n", header->Signature); DPRINT("MajorVersion = %d\n", header->MajorVersion); DPRINT("MinorVersion = %d\n", header->MinorVersion); - DPRINT("FirstRecordOffset = %d\n", header->FirstRecordOffset); - DPRINT("EofOffset = 0x%x\n", header->EofOffset); - DPRINT("NextRecord = %d\n", header->NextRecord); - DPRINT("OldestRecord = %d\n", header->OldestRecord); - DPRINT("unknown1 = 0x%x\n", header->unknown1); - DPRINT("unknown2 = 0x%x\n", header->unknown2); - DPRINT("SizeOfHeader2 = %d\n", header->SizeOfHeader2); + DPRINT("StartOffset = %d\n", header->StartOffset); + DPRINT("EndOffset = 0x%x\n", header->EndOffset); + DPRINT("CurrentRecordNumber = %d\n", header->CurrentRecordNumber); + DPRINT("OldestRecordNumber = %d\n", header->OldestRecordNumber); + DPRINT("MaxSize = 0x%x\n", header->MaxSize); + DPRINT("Retention = 0x%x\n", header->Retention); + DPRINT("EndHeaderSize = %d\n", header->EndHeaderSize); DPRINT("Flags: "); - if (header->Flags & LOGFILE_FLAG1) DPRINT("LOGFILE_FLAG1 "); - if (header->Flags & LOGFILE_FLAG2) DPRINT("| LOGFILE_FLAG2 "); - if (header->Flags & LOGFILE_FLAG3) DPRINT("| LOGFILE_FLAG3 "); - if (header->Flags & LOGFILE_FLAG4) DPRINT("| LOGFILE_FLAG4"); + if (header->Flags & ELF_LOGFILE_HEADER_DIRTY) DPRINT("ELF_LOGFILE_HEADER_DIRTY"); + if (header->Flags & ELF_LOGFILE_HEADER_WRAP) DPRINT("| ELF_LOGFILE_HEADER_WRAP "); + if (header->Flags & ELF_LOGGFILE_LOGFULL_WRITTEN) DPRINT("| ELF_LOGGFILE_LOGFULL_WRITTEN "); + if (header->Flags & ELF_LOGFILE_ARCHIVE_SET) DPRINT("| ELF_LOGFILE_ARCHIVE_SET "); DPRINT("\n"); } Modified: trunk/reactos/base/services/eventlog/eventlog.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/eve…
============================================================================== --- trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/eventlog.h [iso-8859-1] Wed Dec 24 06:14:30 2008 @@ -36,43 +36,41 @@ #define LOGFILE_SIGNATURE 0x654c664c /* - * FIXME * Flags used in logfile header */ -#define LOGFILE_FLAG1 1 -#define LOGFILE_FLAG2 2 -#define LOGFILE_FLAG3 4 -#define LOGFILE_FLAG4 8 +#define ELF_LOGFILE_HEADER_DIRTY 1 +#define ELF_LOGFILE_HEADER_WRAP 2 +#define ELF_LOGGFILE_LOGFULL_WRITTEN 4 +#define ELF_LOGFILE_ARCHIVE_SET 8 -typedef struct -{ - DWORD SizeOfHeader; - DWORD Signature; - DWORD MajorVersion; - DWORD MinorVersion; - DWORD FirstRecordOffset; - DWORD EofOffset; - DWORD NextRecord; - DWORD OldestRecord; - DWORD unknown1; - DWORD Flags; - DWORD unknown2; - DWORD SizeOfHeader2; -} FILE_HEADER, *PFILE_HEADER; +/* FIXME: MSDN reads that the following two structs are in winnt.h. Are they? */ +typedef struct _EVENTLOGHEADER { + ULONG HeaderSize; + ULONG Signature; + ULONG MajorVersion; + ULONG MinorVersion; + ULONG StartOffset; + ULONG EndOffset; + ULONG CurrentRecordNumber; + ULONG OldestRecordNumber; + ULONG MaxSize; + ULONG Flags; + ULONG Retention; + ULONG EndHeaderSize; +} EVENTLOGHEADER, *PEVENTLOGHEADER; -typedef struct -{ - DWORD Size1; - DWORD Ones; // Must be 0x11111111 - DWORD Twos; // Must be 0x22222222 - DWORD Threes; // Must be 0x33333333 - DWORD Fours; // Must be 0x44444444 - DWORD StartOffset; - DWORD EndOffset; - DWORD NextRecordNumber; - DWORD OldestRecordNumber; - DWORD Size2; -} EOF_RECORD, *PEOF_RECORD; +typedef struct _EVENTLOGEOF { + ULONG RecordSizeBeginning; + ULONG Ones; + ULONG Twos; + ULONG Threes; + ULONG Fours; + ULONG BeginRecord; + ULONG EndRecord; + ULONG CurrentRecordNumber; + ULONG OldestRecordNumber; + ULONG RecordSizeEnd; +} EVENTLOGEOF, *PEVENTLOGEOF; typedef struct { @@ -83,7 +81,7 @@ typedef struct { HANDLE hFile; - FILE_HEADER Header; + EVENTLOGHEADER Header; WCHAR *LogName; WCHAR *FileName; CRITICAL_SECTION cs; @@ -165,7 +163,7 @@ /* eventlog.c */ extern HANDLE MyHeap; -VOID PRINT_HEADER(PFILE_HEADER header); +VOID PRINT_HEADER(PEVENTLOGHEADER header); VOID PRINT_RECORD(PEVENTLOGRECORD pRec); Modified: trunk/reactos/base/services/eventlog/file.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/fil…
============================================================================== --- trunk/reactos/base/services/eventlog/file.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/file.c [iso-8859-1] Wed Dec 24 06:14:30 2008 @@ -20,24 +20,24 @@ BOOL LogfInitializeNew(PLOGFILE LogFile) { DWORD dwWritten; - EOF_RECORD EofRec; - - ZeroMemory(&LogFile->Header, sizeof(FILE_HEADER)); + EVENTLOGEOF EofRec; + + ZeroMemory(&LogFile->Header, sizeof(EVENTLOGHEADER)); SetFilePointer(LogFile->hFile, 0, NULL, FILE_BEGIN); SetEndOfFile(LogFile->hFile); - LogFile->Header.SizeOfHeader = sizeof(FILE_HEADER); - LogFile->Header.SizeOfHeader2 = sizeof(FILE_HEADER); - LogFile->Header.FirstRecordOffset = sizeof(FILE_HEADER); - LogFile->Header.EofOffset = sizeof(FILE_HEADER); + LogFile->Header.HeaderSize = sizeof(EVENTLOGHEADER); + LogFile->Header.EndHeaderSize = sizeof(EVENTLOGHEADER); + LogFile->Header.StartOffset = sizeof(EVENTLOGHEADER); + LogFile->Header.EndOffset = sizeof(EVENTLOGHEADER); LogFile->Header.MajorVersion = MAJORVER; LogFile->Header.MinorVersion = MINORVER; - LogFile->Header.NextRecord = 1; + LogFile->Header.CurrentRecordNumber = 1; LogFile->Header.Signature = LOGFILE_SIGNATURE; if (!WriteFile(LogFile->hFile, &LogFile->Header, - sizeof(FILE_HEADER), + sizeof(EVENTLOGHEADER), &dwWritten, NULL)) { @@ -49,16 +49,16 @@ EofRec.Twos = 0x22222222; EofRec.Threes = 0x33333333; EofRec.Fours = 0x44444444; - EofRec.Size1 = sizeof(EOF_RECORD); - EofRec.Size2 = sizeof(EOF_RECORD); - EofRec.NextRecordNumber = LogFile->Header.NextRecord; - EofRec.OldestRecordNumber = LogFile->Header.OldestRecord; - EofRec.StartOffset = LogFile->Header.FirstRecordOffset; - EofRec.EndOffset = LogFile->Header.EofOffset; + EofRec.RecordSizeBeginning = sizeof(EVENTLOGEOF); + EofRec.RecordSizeEnd = sizeof(EVENTLOGEOF); + EofRec.CurrentRecordNumber = LogFile->Header.CurrentRecordNumber; + EofRec.OldestRecordNumber = LogFile->Header.OldestRecordNumber; + EofRec.BeginRecord = LogFile->Header.StartOffset; + EofRec.EndRecord = LogFile->Header.EndOffset; if (!WriteFile(LogFile->hFile, &EofRec, - sizeof(EOF_RECORD), + sizeof(EVENTLOGEOF), &dwWritten, NULL)) { @@ -92,7 +92,7 @@ if (!ReadFile(LogFile->hFile, &LogFile->Header, - sizeof(FILE_HEADER), + sizeof(EVENTLOGHEADER), &dwRead, NULL)) { @@ -100,14 +100,14 @@ return FALSE; } - if (dwRead != sizeof(FILE_HEADER)) + if (dwRead != sizeof(EVENTLOGHEADER)) { DPRINT("EventLog: Invalid file %S.\n", LogFile->FileName); return LogfInitializeNew(LogFile); } - if (LogFile->Header.SizeOfHeader != sizeof(FILE_HEADER) || - LogFile->Header.SizeOfHeader2 != sizeof(FILE_HEADER)) + if (LogFile->Header.HeaderSize != sizeof(EVENTLOGHEADER) || + LogFile->Header.EndHeaderSize != sizeof(EVENTLOGHEADER)) { DPRINT("EventLog: Invalid header size in %S.\n", LogFile->FileName); return LogfInitializeNew(LogFile); @@ -120,10 +120,10 @@ return LogfInitializeNew(LogFile); } - if (LogFile->Header.EofOffset > GetFileSize(LogFile->hFile, NULL) + 1) + if (LogFile->Header.EndOffset > GetFileSize(LogFile->hFile, NULL) + 1) { DPRINT("EventLog: Invalid eof offset %x in %S.\n", - LogFile->Header.EofOffset, LogFile->FileName); + LogFile->Header.EndOffset, LogFile->FileName); return LogfInitializeNew(LogFile); } @@ -204,7 +204,7 @@ if (*pdwRecSize2 != dwRecSize) { - DPRINT1("Invalid size2 of record %d (%x) in %S\n", + DPRINT1("Invalid RecordSizeEnd of record %d (%x) in %S\n", dwRecordsNumber, *pdwRecSize2, LogFile->LogName); HeapFree(MyHeap, 0, RecBuf); break; @@ -224,8 +224,8 @@ HeapFree(MyHeap, 0, RecBuf); } // for(;;) - LogFile->Header.NextRecord = dwRecordsNumber + 1; - LogFile->Header.OldestRecord = dwRecordsNumber ? 1 : 0; // FIXME + LogFile->Header.CurrentRecordNumber = dwRecordsNumber + 1; + LogFile->Header.OldestRecordNumber = dwRecordsNumber ? 1 : 0; // FIXME if (!SetFilePointer(LogFile->hFile, 0, NULL, FILE_CURRENT) == INVALID_SET_FILE_POINTER) @@ -236,7 +236,7 @@ if (!WriteFile(LogFile->hFile, &LogFile->Header, - sizeof(FILE_HEADER), + sizeof(EVENTLOGHEADER), &dwRead, NULL)) { @@ -648,7 +648,7 @@ { DWORD dwWritten; SYSTEMTIME st; - EOF_RECORD EofRec; + EVENTLOGEOF EofRec; if (!Buffer) return FALSE; @@ -659,7 +659,7 @@ EnterCriticalSection(&LogFile->cs); if (SetFilePointer(LogFile->hFile, - LogFile->Header.EofOffset, + LogFile->Header.EndOffset, NULL, FILE_BEGIN) == INVALID_SET_FILE_POINTER) { @@ -676,33 +676,33 @@ } if (!LogfAddOffsetInformation(LogFile, - LogFile->Header.NextRecord, - LogFile->Header.EofOffset)) - { - LeaveCriticalSection(&LogFile->cs); - return FALSE; - } - - LogFile->Header.NextRecord++; - LogFile->Header.EofOffset += dwWritten; - - if (LogFile->Header.OldestRecord == 0) - LogFile->Header.OldestRecord = 1; + LogFile->Header.CurrentRecordNumber, + LogFile->Header.EndOffset)) + { + LeaveCriticalSection(&LogFile->cs); + return FALSE; + } + + LogFile->Header.CurrentRecordNumber++; + LogFile->Header.EndOffset += dwWritten; + + if (LogFile->Header.OldestRecordNumber == 0) + LogFile->Header.OldestRecordNumber = 1; EofRec.Ones = 0x11111111; EofRec.Twos = 0x22222222; EofRec.Threes = 0x33333333; EofRec.Fours = 0x44444444; - EofRec.Size1 = sizeof(EOF_RECORD); - EofRec.Size2 = sizeof(EOF_RECORD); - EofRec.NextRecordNumber = LogFile->Header.NextRecord; - EofRec.OldestRecordNumber = LogFile->Header.OldestRecord; - EofRec.StartOffset = LogFile->Header.FirstRecordOffset; - EofRec.EndOffset = LogFile->Header.EofOffset; + EofRec.RecordSizeBeginning = sizeof(EVENTLOGEOF); + EofRec.RecordSizeEnd = sizeof(EVENTLOGEOF); + EofRec.CurrentRecordNumber = LogFile->Header.CurrentRecordNumber; + EofRec.OldestRecordNumber = LogFile->Header.OldestRecordNumber; + EofRec.BeginRecord = LogFile->Header.StartOffset; + EofRec.EndRecord = LogFile->Header.EndOffset; if (!WriteFile(LogFile->hFile, &EofRec, - sizeof(EOF_RECORD), + sizeof(EVENTLOGEOF), &dwWritten, NULL)) { @@ -721,7 +721,7 @@ if (!WriteFile(LogFile->hFile, &LogFile->Header, - sizeof(FILE_HEADER), + sizeof(EVENTLOGHEADER), &dwWritten, NULL)) { @@ -757,7 +757,7 @@ DWORD LogfGetOldestRecord(PLOGFILE LogFile) { - return LogFile->Header.OldestRecord; + return LogFile->Header.OldestRecordNumber; } BOOL LogfAddOffsetInformation(PLOGFILE LogFile, ULONG ulNumber, ULONG ulOffset) Modified: trunk/reactos/base/services/eventlog/logport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/services/eventlog/log…
============================================================================== --- trunk/reactos/base/services/eventlog/logport.c [iso-8859-1] (original) +++ trunk/reactos/base/services/eventlog/logport.c [iso-8859-1] Wed Dec 24 06:14:30 2008 @@ -143,7 +143,7 @@ { DPRINT("Received datagram\n"); Message = (PIO_ERROR_LOG_MESSAGE) & Request.Message; - ulRecNum = SystemLog ? SystemLog->Header.NextRecord : 0; + ulRecNum = SystemLog ? SystemLog->Header.CurrentRecordNumber : 0; pRec = (PEVENTLOGRECORD) LogfAllocAndBuildNewRecord(&dwRecSize, ulRecNum, Message->Type, Message->EntryData.EventCategory,
16 years
1
0
0
0
[greatlrd] 38326: Rewrote DllGetClassObject DXDiagCF_LockServer DXDiagCF_CreateInstance DXDiagCF_Release DXDiagCF_AddRef DXDiagCF_QueryInterface to make them more winodws NT compatible and the struct match better againts windows. If u type cast the COM interface pointer to _INT struct you will access the internal data, even overwrite function pointers to own.
by greatlrd@svn.reactos.org
Author: greatlrd Date: Wed Dec 24 05:14:44 2008 New Revision: 38326 URL:
http://svn.reactos.org/svn/reactos?rev=38326&view=rev
Log: Rewrote DllGetClassObject DXDiagCF_LockServer DXDiagCF_CreateInstance DXDiagCF_Release DXDiagCF_AddRef DXDiagCF_QueryInterface to make them more winodws NT compatible and the struct match better againts windows. If u type cast the COM interface pointer to _INT struct you will access the internal data, even overwrite function pointers to own. Modified: branches/reactx/reactos/dll/directx/dxdiagn/container.c branches/reactx/reactos/dll/directx/dxdiagn/dxdiag_main.c branches/reactx/reactos/dll/directx/dxdiagn/dxdiag_private.h branches/reactx/reactos/dll/directx/dxdiagn/provider.c Modified: branches/reactx/reactos/dll/directx/dxdiagn/container.c URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/dxdi…
============================================================================== --- branches/reactx/reactos/dll/directx/dxdiagn/container.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/dxdiagn/container.c [iso-8859-1] Wed Dec 24 05:14:44 2008 @@ -48,7 +48,7 @@ TRACE("(%p)->(ref before=%lu)\n", This, refCount - 1); - DXDIAGN_LockModule(); + //DXDIAGN_LockModule(); return refCount; } @@ -63,7 +63,7 @@ HeapFree(GetProcessHeap(), 0, This); } - DXDIAGN_UnlockModule(); + //DXDIAGN_UnlockModule(); return refCount; } Modified: branches/reactx/reactos/dll/directx/dxdiagn/dxdiag_main.c URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/dxdi…
============================================================================== --- branches/reactx/reactos/dll/directx/dxdiagn/dxdiag_main.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/dxdiagn/dxdiag_main.c [iso-8859-1] Wed Dec 24 05:14:44 2008 @@ -23,68 +23,15 @@ #include "dxdiag_private.h" #include "wine/debug.h" +#define INITGUID + +DWORD g_cComponents; +DWORD g_cServerLocks; + WINE_DEFAULT_DEBUG_CHANNEL(dxdiag); -LONG DXDIAGN_refCount = 0; - -/* At process attach */ -BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - TRACE("%p,%lx,%p\n", hInstDLL, fdwReason, lpvReserved); - if (fdwReason == DLL_PROCESS_ATTACH) { - DisableThreadLibraryCalls(hInstDLL); - } - return TRUE; -} - -/******************************************************************************* - * DXDiag ClassFactory - */ -typedef struct { - const IClassFactoryVtbl *lpVtbl; - REFCLSID rclsid; - HRESULT (*pfnCreateInstanceFactory)(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj); -} IClassFactoryImpl; - -static HRESULT WINAPI DXDiagCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) { - FIXME("- no interface\n\tIID:\t%s\n", debugstr_guid(riid)); - - if (ppobj == NULL) return E_POINTER; - - return E_NOINTERFACE; -} - -static ULONG WINAPI DXDiagCF_AddRef(LPCLASSFACTORY iface) { - DXDIAGN_LockModule(); - - return 2; /* non-heap based object */ -} - -static ULONG WINAPI DXDiagCF_Release(LPCLASSFACTORY iface) { - DXDIAGN_UnlockModule(); - - return 1; /* non-heap based object */ -} - -static HRESULT WINAPI DXDiagCF_CreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj) { - IClassFactoryImpl *This = (IClassFactoryImpl *)iface; - TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,debugstr_guid(riid),ppobj); - - return This->pfnCreateInstanceFactory(iface, pOuter, riid, ppobj); -} - -static HRESULT WINAPI DXDiagCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) { - TRACE("(%d)\n", dolock); - - if (dolock) - DXDIAGN_LockModule(); - else - DXDIAGN_UnlockModule(); - - return S_OK; -} - -static const IClassFactoryVtbl DXDiagCF_Vtbl = { +IClassFactoryVtbl DXDiagCF_Vtbl = +{ DXDiagCF_QueryInterface, DXDiagCF_AddRef, DXDiagCF_Release, @@ -92,17 +39,162 @@ DXDiagCF_LockServer }; -static IClassFactoryImpl DXDiag_CFS[] = { - { &DXDiagCF_Vtbl, &CLSID_DxDiagProvider, DXDiag_CreateDXDiagProvider }, - { NULL, NULL, NULL } +IDxDiagProviderVtbl DxDiagProvider_Vtbl = +{ + IDxDiagProviderImpl_QueryInterface, + IDxDiagProviderImpl_AddRef, + IDxDiagProviderImpl_Release, + IDxDiagProviderImpl_Initialize, + IDxDiagProviderImpl_GetRootContainer }; + +IDxDiagProviderPrivateVtbl DxDiagProvider_PrivateVtbl = +{ + IDxDiagProviderImpl_QueryInterface, + IDxDiagProviderImpl_AddRef, + IDxDiagProviderImpl_Release, + IDxDiagProviderImpl_ExecMethod +}; + +/* At process attach */ +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("%p,%lx,%p\n", hInstDLL, fdwReason, lpvReserved); + if (fdwReason == DLL_PROCESS_ATTACH) { + DisableThreadLibraryCalls(hInstDLL); + } + return TRUE; +} + +/******************************************************************************* + * DXDiag ClassFactory + */ + +HRESULT +WINAPI +DXDiagCF_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppobj) +{ + LPICLASSFACTORY_INT This = (LPICLASSFACTORY_INT) iface; + HRESULT retValue = S_OK; + + if (ppobj == NULL) + { + retValue = E_INVALIDARG; + } + else + { + if ( ( IsEqualGUID( riid, &IID_IUnknown) ) || + ( IsEqualGUID( riid, &IID_IClassFactory) ) ) + { + *ppobj = This; + IClassFactory_AddRef( iface ); + } + else + { + *ppobj = NULL; + retValue = E_NOINTERFACE; + } + } + return retValue; +} + +ULONG +WINAPI +DXDiagCF_AddRef(LPCLASSFACTORY iface) +{ + LPICLASSFACTORY_INT This = (LPICLASSFACTORY_INT) iface; + + return (ULONG) InterlockedIncrement( (LONG *) &This->RefCount ); +} + +ULONG +WINAPI +DXDiagCF_Release(LPCLASSFACTORY iface) +{ + LPICLASSFACTORY_INT This = (LPICLASSFACTORY_INT) iface; + ULONG RefCount = 0; + + RefCount = InterlockedDecrement( (LONG *) &This->RefCount ); + + if (RefCount <= 0) + { + if (This->RefCount == 0) + { + HeapFree(GetProcessHeap(), 0, This); + } + + RefCount = 0; + } + + return RefCount; +} + + +HRESULT +WINAPI +DXDiagCF_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj) +{ + HRESULT retValue = S_OK; + + if ( *ppobj != NULL ) + { + *ppobj = NULL; + } + + if ( pOuter == NULL ) + { + if ( IsEqualGUID( riid, &CLSID_DxDiagProvider ) ) + { + + LPDXDIAGPROVIDER_INT myDxDiagProvider_int = (LPDXDIAGPROVIDER_INT) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(DXDIAGPROVIDER_INT)); + + if ( myDxDiagProvider_int == NULL) + { + *ppobj = NULL; + retValue = E_OUTOFMEMORY; + } + else + { + myDxDiagProvider_int->lpVbl = (LPVOID) &DxDiagProvider_Vtbl; + myDxDiagProvider_int->lpVbl_private = (LPVOID) &DxDiagProvider_PrivateVtbl; + IDxDiagProviderImpl_AddRef( (LPDXDIAGPROVIDER) myDxDiagProvider_int ); + InterlockedIncrement( (LONG *)&g_cComponents); + retValue = IDxDiagProvider_QueryInterface( (LPDXDIAGPROVIDER) myDxDiagProvider_int, riid, ppobj ); + IDxDiagProvider_Release( (LPDXDIAGPROVIDER) myDxDiagProvider_int ); + *ppobj = (LPVOID) myDxDiagProvider_int; + } + } + else + { + retValue = CLASS_E_CLASSNOTAVAILABLE; + } + } + + return retValue; +} + +HRESULT +WINAPI +DXDiagCF_LockServer(LPCLASSFACTORY iface,BOOL dolock) +{ + + if (dolock == TRUE) + { + InterlockedIncrement( (LONG *)&g_cServerLocks); + } + + return S_OK; +} + + + /*********************************************************************** * DllCanUnloadNow (DXDIAGN.@) */ HRESULT WINAPI DllCanUnloadNow(void) { - return DXDIAGN_refCount != 0 ? S_FALSE : S_OK; + return S_OK; } /*********************************************************************** @@ -110,18 +202,42 @@ */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv) { - int i = 0; - - TRACE("(%p,%p,%p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); - while (NULL != DXDiag_CFS[i].rclsid) { - if (IsEqualGUID(rclsid, DXDiag_CFS[i].rclsid)) { - DXDiagCF_AddRef((IClassFactory*) &DXDiag_CFS[i]); - *ppv = &DXDiag_CFS[i]; - return S_OK; - } - ++i; - } - - FIXME("(%p,%p,%p): no interface found.\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); - return CLASS_E_CLASSNOTAVAILABLE; -} + HRESULT retValue = S_OK; + LPICLASSFACTORY_INT myIClassFactory_int; + LPCLASSFACTORY This; + + + if ( IsEqualGUID( rclsid, &CLSID_DxDiagProvider) ) + { + myIClassFactory_int = (LPICLASSFACTORY_INT) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,sizeof(ICLASSFACTORY_INT)); + + if (myIClassFactory_int != NULL) + { + myIClassFactory_int->lpVbl = (LPVOID) &DXDiagCF_Vtbl; + + This = (LPCLASSFACTORY) myIClassFactory_int; + + DXDiagCF_AddRef( This ); + + retValue = IClassFactory_QueryInterface( This, riid, ppv ); + + IClassFactory_AddRef( This ); + + *ppv = (LPVOID) This; + } + else + { + retValue = E_OUTOFMEMORY; + *ppv = NULL; + } + + } + else + { + retValue = CLASS_E_CLASSNOTAVAILABLE; + *ppv = NULL; + } + + return retValue; + +} Modified: branches/reactx/reactos/dll/directx/dxdiagn/dxdiag_private.h URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/dxdi…
============================================================================== --- branches/reactx/reactos/dll/directx/dxdiagn/dxdiag_private.h [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/dxdiagn/dxdiag_private.h [iso-8859-1] Wed Dec 24 05:14:44 2008 @@ -21,16 +21,27 @@ #ifndef __WINE_DXDIAG_PRIVATE_H #define __WINE_DXDIAG_PRIVATE_H -#include <stdarg.h> +#define COBJMACROS -#include "windef.h" -#include "winbase.h" -#include "wingdi.h" -#include "winuser.h" -#include "objbase.h" -#include "oleauto.h" +#include <windows.h> +#if defined(_WIN32) && !defined(_NO_COM ) +#define COM_NO_WINDOWS_H -#include "dxdiag.h" +#include <objbase.h> +#else +#define IUnknown void +#if !defined(NT_BUILD_ENVIRONMENT) && !defined(WINNT) + #define CO_E_NOTINITIALIZED 0x800401F0 +#endif +#endif + + + + + + + +#include <dxdiag.h> /* DXDiag Interfaces: */ typedef struct IDxDiagProviderImpl IDxDiagProviderImpl; @@ -43,15 +54,33 @@ /***************************************************************************** * IDxDiagProvider implementation structure */ -struct IDxDiagProviderImpl { - /* IUnknown fields */ - const IDxDiagProviderVtbl *lpVtbl; - LONG ref; - /* IDxDiagProvider fields */ - BOOL init; - DXDIAG_INIT_PARAMS params; - IDxDiagContainer* pRootContainer; -}; + +typedef struct _DXDIAGPROVIDER_INT +{ + /*0x00 */ LPVOID lpVbl; + /*0x04 */ LPVOID lpVbl_private; + /*0x08 */ DWORD Unkonwn1; + /*0x0C */ DWORD Unkonwn2; + /*0x10 */ DWORD RefCount; + /*0x0C */ DWORD Unkonwn3; + /*0x20 */ CHAR Unkonwn4; + /*0x21 */ CHAR Unkonwn5; + /*0x22 */ CHAR Unkonwn6; + /*0x23 */ CHAR Unkonwn7; + /*0x24 */ CHAR Unkonwn8; + /*0x25 */ CHAR Unkonwn9; + /*0x26 */ CHAR Unkonwn10; + /*0x27 */ CHAR Unkonwn11; + /*0x28 */ CHAR Unkonwn12; + /*0x29 */ CHAR Unkonwn13; + /*0x2A */ CHAR Unkonwn14; + /*0x2C */ CHAR Unkonwn15; + /* wine */ + /* IDxDiagProvider fields */ + BOOL init; + DXDIAG_INIT_PARAMS params; + IDxDiagContainer* pRootContainer; +} DXDIAGPROVIDER_INT, *LPDXDIAGPROVIDER_INT; /* IUnknown: */ extern HRESULT WINAPI IDxDiagProviderImpl_QueryInterface(PDXDIAGPROVIDER iface, REFIID riid, LPVOID *ppobj); @@ -101,10 +130,6 @@ extern HRESULT WINAPI IDxDiagContainerImpl_AddProp(PDXDIAGCONTAINER iface, LPCWSTR pwszPropName, VARIANT* pVarProp); extern HRESULT WINAPI IDxDiagContainerImpl_AddChildContainer(PDXDIAGCONTAINER iface, LPCWSTR pszContName, PDXDIAGCONTAINER pSubCont); -/** - * factories - */ -extern HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj); /** internal factory */ extern HRESULT DXDiag_CreateDXDiagContainer(REFIID riid, LPVOID *ppobj); @@ -113,8 +138,61 @@ /********************************************************************** * Dll lifetime tracking declaration for dxdiagn.dll */ -extern LONG DXDIAGN_refCount; -static inline void DXDIAGN_LockModule(void) { InterlockedIncrement( &DXDIAGN_refCount ); } -static inline void DXDIAGN_UnlockModule(void) { InterlockedDecrement( &DXDIAGN_refCount ); } + + + + +/***************************************************************************** + * IClassFactoryImpl implementation structure + */ + + +HRESULT WINAPI DXDiagCF_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj); +ULONG WINAPI DXDiagCF_AddRef(LPCLASSFACTORY iface); +ULONG WINAPI DXDiagCF_Release(LPCLASSFACTORY iface); +HRESULT WINAPI DXDiagCF_CreateInstance(LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj); +HRESULT WINAPI DXDiagCF_LockServer(LPCLASSFACTORY iface,BOOL dolock); + + + +typedef struct _ICLASSFACTORY_INT +{ + LPVOID lpVbl; + DWORD RefCount; + LPVOID Unknown1; + LPVOID Unknown2; +} ICLASSFACTORY_INT, *LPICLASSFACTORY_INT; + + + +ULONG WINAPI IDxDiagProviderImpl_ExecMethod(PDXDIAGPROVIDER iface); + +#if defined( _WIN32 ) && !defined( _NO_COM ) + #undef INTERFACE + #define INTERFACE IDxDiagProviderPrivate + + DECLARE_INTERFACE_( IDxDiagProviderPrivate, IUnknown ) + { + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + STDMETHOD_(ULONG,ExecMethod) (THIS) PURE; + + }; + #if !defined(__cplusplus) || defined(CINTERFACE) + #define IDxDiagProviderPrivate_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) + #define IDxDiagProviderPrivate_AddRef(p) (p)->lpVtbl->AddRef(p) + #define IDxDiagProviderPrivate_Release(p) (p)->lpVtbl->Release(p) + #define IDxDiagProviderPrivate_ExecMethod(p) (p)->lpVtbl->ExecMethod(p) + #else + #define IDxDiagProviderPrivate_QueryInterface(p, a, b) (p)->QueryInterface(a, b) + #define IDxDiagProviderPrivate_AddRef(p) (p)->AddRef() + #define IDxDiagProviderPrivate_Release(p) (p)->Release() + #define IDxDiagProviderPrivate_ExecMethod(p) (p)->ExecMethod() + #endif +#endif + +typedef struct IDxDiagProviderPrivateVtbl DXDIAGPROVIDERPRIVARECALLBACK; +typedef DXDIAGPROVIDERPRIVARECALLBACK *LPDXDIAGPROVIDERPRIVARECALLBACK; #endif Modified: branches/reactx/reactos/dll/directx/dxdiagn/provider.c URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/dll/directx/dxdi…
============================================================================== --- branches/reactx/reactos/dll/directx/dxdiagn/provider.c [iso-8859-1] (original) +++ branches/reactx/reactos/dll/directx/dxdiagn/provider.c [iso-8859-1] Wed Dec 24 05:14:44 2008 @@ -42,24 +42,29 @@ } ULONG WINAPI IDxDiagProviderImpl_AddRef(PDXDIAGPROVIDER iface) { - IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; - TRACE("(%p) : AddRef from %ld\n", This, This->ref); - return ++(This->ref); + LPDXDIAGPROVIDER_INT This = (LPDXDIAGPROVIDER_INT) iface; + TRACE("(%p) : AddRef from %ld\n", This, This->RefCount); + return ++(This->RefCount); } ULONG WINAPI IDxDiagProviderImpl_Release(PDXDIAGPROVIDER iface) { - IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; - ULONG ref = --This->ref; - TRACE("(%p) : ReleaseRef to %ld\n", This, This->ref); + LPDXDIAGPROVIDER_INT This = (LPDXDIAGPROVIDER_INT) iface; + ULONG ref = --This->RefCount; + TRACE("(%p) : ReleaseRef to %ld\n", This, This->RefCount); if (ref == 0) { HeapFree(GetProcessHeap(), 0, This); } return ref; } +ULONG WINAPI IDxDiagProviderImpl_ExecMethod(PDXDIAGPROVIDER iface) { + return 0; +} + + /* IDxDiagProvider Interface follow: */ HRESULT WINAPI IDxDiagProviderImpl_Initialize(PDXDIAGPROVIDER iface, DXDIAG_INIT_PARAMS* pParams) { - IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; + LPDXDIAGPROVIDER_INT This = (LPDXDIAGPROVIDER_INT) iface; TRACE("(%p,%p)\n", iface, pParams); if (NULL == pParams) { @@ -76,7 +81,7 @@ HRESULT WINAPI IDxDiagProviderImpl_GetRootContainer(PDXDIAGPROVIDER iface, IDxDiagContainer** ppInstance) { HRESULT hr = S_OK; - IDxDiagProviderImpl *This = (IDxDiagProviderImpl *)iface; + LPDXDIAGPROVIDER_INT This = (LPDXDIAGPROVIDER_INT) iface; TRACE("(%p,%p)\n", iface, ppInstance); if (NULL == ppInstance) { @@ -94,26 +99,5 @@ return IDxDiagContainerImpl_QueryInterface((PDXDIAGCONTAINER)This->pRootContainer, &IID_IDxDiagContainer, (void**) ppInstance); } -IDxDiagProviderVtbl DxDiagProvider_Vtbl = -{ - IDxDiagProviderImpl_QueryInterface, - IDxDiagProviderImpl_AddRef, - IDxDiagProviderImpl_Release, - IDxDiagProviderImpl_Initialize, - IDxDiagProviderImpl_GetRootContainer -}; -HRESULT DXDiag_CreateDXDiagProvider(LPCLASSFACTORY iface, LPUNKNOWN punkOuter, REFIID riid, LPVOID *ppobj) { - IDxDiagProviderImpl* provider; - TRACE("(%p, %s, %p)\n", punkOuter, debugstr_guid(riid), ppobj); - - provider = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDxDiagProviderImpl)); - if (NULL == provider) { - *ppobj = NULL; - return E_OUTOFMEMORY; - } - provider->lpVtbl = &DxDiagProvider_Vtbl; - provider->ref = 0; /* will be inited with QueryInterface */ - return IDxDiagProviderImpl_QueryInterface ((PDXDIAGPROVIDER)provider, riid, ppobj); -}
16 years
1
0
0
0
[sginsberg] 38325: - DEVMGR: wcsnicmp -> _wcsnicmp
by sginsberg@svn.reactos.org
Author: sginsberg Date: Wed Dec 24 04:39:48 2008 New Revision: 38325 URL:
http://svn.reactos.org/svn/reactos?rev=38325&view=rev
Log: - DEVMGR: wcsnicmp -> _wcsnicmp Modified: trunk/reactos/dll/win32/devmgr/advprop.c trunk/reactos/dll/win32/devmgr/devmgr.rbuild Modified: trunk/reactos/dll/win32/devmgr/advprop.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/advprop.c…
============================================================================== --- trunk/reactos/dll/win32/devmgr/advprop.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/advprop.c [iso-8859-1] Wed Dec 24 04:39:48 2008 @@ -1537,7 +1537,7 @@ if (*lpString == L'/') { lpString++; - if(!wcsnicmp(lpString, L"DeviceID", 8)) + if(!_wcsnicmp(lpString, L"DeviceID", 8)) { lpString += 9; if (*lpString != L'\0') @@ -1553,7 +1553,7 @@ ret = TRUE; } } - else if (!wcsnicmp(lpString, L"MachineName", 11)) + else if (!_wcsnicmp(lpString, L"MachineName", 11)) { lpString += 12; if (*lpString != L'\0') Modified: trunk/reactos/dll/win32/devmgr/devmgr.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/devmgr/devmgr.rb…
============================================================================== --- trunk/reactos/dll/win32/devmgr/devmgr.rbuild [iso-8859-1] (original) +++ trunk/reactos/dll/win32/devmgr/devmgr.rbuild [iso-8859-1] Wed Dec 24 04:39:48 2008 @@ -1,4 +1,4 @@ -<module name="devmgr" type="win32dll" baseaddress="${BASEADDRESS_DEVENUM}" installbase="system32" installname="devmgr.dll" allowwarnings="true" unicode="yes"> +<module name="devmgr" type="win32dll" baseaddress="${BASEADDRESS_DEVENUM}" installbase="system32" installname="devmgr.dll" unicode="yes"> <include base="devmgr">.</include> <importlibrary definition="devmgr.spec" /> <library>kernel32</library>
16 years
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
71
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
Results per page:
10
25
50
100
200