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
February 2010
----- 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
22 participants
365 discussions
Start a n
N
ew thread
[dgorbachev] 45491: Fix bug #5156.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sun Feb 7 20:56:06 2010 New Revision: 45491 URL:
http://svn.reactos.org/svn/reactos?rev=45491&view=rev
Log: Fix bug #5156. Modified: trunk/reactos/base/setup/usetup/interface/usetup.c Modified: trunk/reactos/base/setup/usetup/interface/usetup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
============================================================================== --- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Sun Feb 7 20:56:06 2010 @@ -1786,8 +1786,8 @@ else { /* Round-up by cylinder size */ - PartSize = ROUND_UP (PartSize * 1024 * 1024, - DiskEntry->CylinderSize); + PartSize = (PartSize * 1024 * 1024 + DiskEntry->CylinderSize - 1) / + DiskEntry->CylinderSize * DiskEntry->CylinderSize; /* But never get larger than the unpartitioned disk space */ if (PartSize > PartEntry->UnpartitionedLength)
14 years, 10 months
1
0
0
0
[dgorbachev] 45490: Fix formatting.
by dgorbachev@svn.reactos.org
Author: dgorbachev Date: Sun Feb 7 20:52:10 2010 New Revision: 45490 URL:
http://svn.reactos.org/svn/reactos?rev=45490&view=rev
Log: Fix formatting. Modified: trunk/reactos/base/setup/usetup/cabinet.c Modified: trunk/reactos/base/setup/usetup/cabinet.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/cabinet.…
============================================================================== --- trunk/reactos/base/setup/usetup/cabinet.c [iso-8859-1] (original) +++ trunk/reactos/base/setup/usetup/cabinet.c [iso-8859-1] Sun Feb 7 20:52:10 2010 @@ -20,19 +20,19 @@ #define SEEK_END 2 #endif -typedef struct __DOSTIME -{ - WORD Second:5; - WORD Minute:6; - WORD Hour:5; +typedef struct _DOSTIME +{ + WORD Second:5; + WORD Minute:6; + WORD Hour:5; } DOSTIME, *PDOSTIME; -typedef struct __DOSDATE -{ - WORD Day:5; - WORD Month:4; - WORD Year:5; +typedef struct _DOSDATE +{ + WORD Day:5; + WORD Month:4; + WORD Year:5; } DOSDATE, *PDOSDATE; static WCHAR CabinetName[256]; // Filename of current cabinet @@ -57,7 +57,7 @@ static ULONG CodecId; static PCABINET_CODEC_UNCOMPRESS CodecUncompress = NULL; static BOOL CodecSelected = FALSE; -static ULONG LastFileOffset = 0; // Uncompressed offset of last extracted file +static ULONG LastFileOffset = 0; // Uncompressed offset of last extracted file static PCABINET_OVERWRITE OverwriteHandler = NULL; static PCABINET_EXTRACT ExtractHandler = NULL; static PCABINET_DISK_CHANGE DiskChangeHandler = NULL; @@ -80,7 +80,6 @@ return RtlAllocateHeap(ProcessHeap, HEAP_ZERO_MEMORY, nSize); } - void __cdecl free(void* _ptr) { RtlFreeHeap(ProcessHeap, 0, _ptr); @@ -93,11 +92,6 @@ /* RAW codec */ -ULONG -RawCodecUncompress(PVOID OutputBuffer, - PVOID InputBuffer, - PLONG InputLength, - PLONG OutputLength) /* * FUNCTION: Uncompresses data in a buffer * ARGUMENTS: @@ -108,21 +102,20 @@ * OutputLength = Length of output buffer before, amount filled after * Negative to indicate that this is not the end of the block */ -{ - LONG In = abs(*InputLength), Out = abs(*OutputLength); - memcpy(OutputBuffer, InputBuffer, In < Out ? In : Out); - *InputLength = *OutputLength = In < Out ? In : Out; - return CS_SUCCESS; -} - +ULONG +RawCodecUncompress(PVOID OutputBuffer, + PVOID InputBuffer, + PLONG InputLength, + PLONG OutputLength) +{ + LONG In = abs(*InputLength), Out = abs(*OutputLength); + memcpy(OutputBuffer, InputBuffer, In < Out ? In : Out); + *InputLength = *OutputLength = In < Out ? In : Out; + return CS_SUCCESS; +} /* MSZIP codec */ -ULONG -MSZipCodecUncompress(PVOID OutputBuffer, - PVOID InputBuffer, - PLONG InputLength, - PLONG OutputLength) /* * FUNCTION: Uncompresses data in a buffer * ARGUMENTS: @@ -133,140 +126,146 @@ * OutputLength = Length of output buffer before, amount filled after * Negative to indicate that this is not the end of the block */ -{ - USHORT Magic; - INT Status; - - DPRINT("MSZipCodecUncompress( OutputBuffer = %x, InputBuffer = %x, InputLength = %d, OutputLength = %d.\n", OutputBuffer, InputBuffer, *InputLength, *OutputLength); - if( *InputLength > 0 ) - { - Magic = *((PUSHORT)InputBuffer); - - if (Magic != MSZIP_MAGIC) - { - DPRINT("Bad MSZIP block header magic (0x%X)\n", Magic); - return CS_BADSTREAM; - } - - ZStream.next_in = ((PUCHAR)InputBuffer )+ 2; - ZStream.avail_in = *InputLength - 2; - ZStream.next_out = (PUCHAR)OutputBuffer; - ZStream.avail_out = abs(*OutputLength); - - /* WindowBits is passed < 0 to tell that there is no zlib header. - * Note that in this case inflate *requires* an extra "dummy" byte - * after the compressed stream in order to complete decompression and - * return Z_STREAM_END. - */ - Status = inflateInit2(&ZStream, -MAX_WBITS); - if (Status != Z_OK) - { - DPRINT("inflateInit2() returned (%d).\n", Status); - return CS_BADSTREAM; - } - ZStream.total_in = 2; - } - else { - ZStream.avail_in = -*InputLength; - ZStream.next_in = (PUCHAR)InputBuffer; - ZStream.next_out = (PUCHAR)OutputBuffer; - ZStream.avail_out = abs(*OutputLength); - ZStream.total_in = 0; - } - ZStream.total_out = 0; - Status = inflate(&ZStream, Z_SYNC_FLUSH ); - if (Status != Z_OK && Status != Z_STREAM_END) - { - DPRINT("inflate() returned (%d) (%s).\n", Status, ZStream.msg); - if (Status == Z_MEM_ERROR) - return CS_NOMEMORY; - return CS_BADSTREAM; - } - - if( *OutputLength > 0 ) - { - Status = inflateEnd(&ZStream); - if (Status != Z_OK) - { - DPRINT("inflateEnd() returned (%d).\n", Status); - return CS_BADSTREAM; - } - } - *OutputLength = ZStream.total_out; - *InputLength = ZStream.total_in; - return CS_SUCCESS; -} - - +ULONG +MSZipCodecUncompress(PVOID OutputBuffer, + PVOID InputBuffer, + PLONG InputLength, + PLONG OutputLength) +{ + USHORT Magic; + INT Status; + + DPRINT("MSZipCodecUncompress(OutputBuffer = %x, InputBuffer = %x, " + "InputLength = %d, OutputLength = %d)\n", OutputBuffer, + InputBuffer, *InputLength, *OutputLength); + if (*InputLength > 0) + { + Magic = *(PUSHORT)InputBuffer; + + if (Magic != MSZIP_MAGIC) + { + DPRINT("Bad MSZIP block header magic (0x%X)\n", Magic); + return CS_BADSTREAM; + } + + ZStream.next_in = (PUCHAR)InputBuffer + 2; + ZStream.avail_in = *InputLength - 2; + ZStream.next_out = (PUCHAR)OutputBuffer; + ZStream.avail_out = abs(*OutputLength); + + /* WindowBits is passed < 0 to tell that there is no zlib header. + * Note that in this case inflate *requires* an extra "dummy" byte + * after the compressed stream in order to complete decompression and + * return Z_STREAM_END. + */ + Status = inflateInit2(&ZStream, -MAX_WBITS); + if (Status != Z_OK) + { + DPRINT("inflateInit2() returned (%d)\n", Status); + return CS_BADSTREAM; + } + ZStream.total_in = 2; + } + else + { + ZStream.avail_in = -*InputLength; + ZStream.next_in = (PUCHAR)InputBuffer; + ZStream.next_out = (PUCHAR)OutputBuffer; + ZStream.avail_out = abs(*OutputLength); + ZStream.total_in = 0; + } + + ZStream.total_out = 0; + Status = inflate(&ZStream, Z_SYNC_FLUSH); + if (Status != Z_OK && Status != Z_STREAM_END) + { + DPRINT("inflate() returned (%d) (%s)\n", Status, ZStream.msg); + if (Status == Z_MEM_ERROR) + return CS_NOMEMORY; + return CS_BADSTREAM; + } + + if (*OutputLength > 0) + { + Status = inflateEnd(&ZStream); + if (Status != Z_OK) + { + DPRINT("inflateEnd() returned (%d)\n", Status); + return CS_BADSTREAM; + } + } + + *OutputLength = ZStream.total_out; + *InputLength = ZStream.total_in; + + return CS_SUCCESS; +} /* Memory functions */ -voidpf MSZipAlloc(voidpf opaque, uInt items, uInt size) -{ - return (voidpf)RtlAllocateHeap (ProcessHeap, 0, items * size); -} - -void MSZipFree (voidpf opaque, voidpf address) -{ - RtlFreeHeap(ProcessHeap, 0, address); +voidpf +MSZipAlloc(voidpf opaque, uInt items, uInt size) +{ + return (voidpf)RtlAllocateHeap(ProcessHeap, 0, items * size); +} + +void +MSZipFree(voidpf opaque, voidpf address) +{ + RtlFreeHeap(ProcessHeap, 0, address); } static BOOL -ConvertSystemTimeToFileTime( - CONST SYSTEMTIME * lpSystemTime, - LPFILETIME lpFileTime) -{ - TIME_FIELDS TimeFields; - LARGE_INTEGER liTime; - - TimeFields.Year = lpSystemTime->wYear; - TimeFields.Month = lpSystemTime->wMonth; - TimeFields.Day = lpSystemTime->wDay; - TimeFields.Hour = lpSystemTime->wHour; - TimeFields.Minute = lpSystemTime->wMinute; - TimeFields.Second = lpSystemTime->wSecond; - TimeFields.Milliseconds = lpSystemTime->wMilliseconds; - - if (RtlTimeFieldsToTime(&TimeFields, &liTime)) - { - lpFileTime->dwLowDateTime = liTime.u.LowPart; - lpFileTime->dwHighDateTime = liTime.u.HighPart; - return TRUE; - } - return FALSE; -} - +ConvertSystemTimeToFileTime(CONST SYSTEMTIME *lpSystemTime, + LPFILETIME lpFileTime) +{ + TIME_FIELDS TimeFields; + LARGE_INTEGER liTime; + + TimeFields.Year = lpSystemTime->wYear; + TimeFields.Month = lpSystemTime->wMonth; + TimeFields.Day = lpSystemTime->wDay; + TimeFields.Hour = lpSystemTime->wHour; + TimeFields.Minute = lpSystemTime->wMinute; + TimeFields.Second = lpSystemTime->wSecond; + TimeFields.Milliseconds = lpSystemTime->wMilliseconds; + + if (RtlTimeFieldsToTime(&TimeFields, &liTime)) + { + lpFileTime->dwLowDateTime = liTime.u.LowPart; + lpFileTime->dwHighDateTime = liTime.u.HighPart; + return TRUE; + } + + return FALSE; +} static BOOL -ConvertDosDateTimeToFileTime( - WORD wFatDate, - WORD wFatTime, - LPFILETIME lpFileTime) -{ - PDOSTIME pdtime = (PDOSTIME) &wFatTime; - PDOSDATE pddate = (PDOSDATE) &wFatDate; - SYSTEMTIME SystemTime; - - if (lpFileTime == NULL) - return FALSE; - - SystemTime.wMilliseconds = 0; - SystemTime.wSecond = pdtime->Second; - SystemTime.wMinute = pdtime->Minute; - SystemTime.wHour = pdtime->Hour; - - SystemTime.wDay = pddate->Day; - SystemTime.wMonth = pddate->Month; - SystemTime.wYear = 1980 + pddate->Year; - - ConvertSystemTimeToFileTime(&SystemTime,lpFileTime); - - return TRUE; -} - - -static PWCHAR -GetFileName(PWCHAR Path) +ConvertDosDateTimeToFileTime(WORD wFatDate, + WORD wFatTime, + LPFILETIME lpFileTime) +{ + PDOSTIME pdtime = (PDOSTIME)&wFatTime; + PDOSDATE pddate = (PDOSDATE)&wFatDate; + SYSTEMTIME SystemTime; + + if (lpFileTime == NULL) + return FALSE; + + SystemTime.wMilliseconds = 0; + SystemTime.wSecond = pdtime->Second; + SystemTime.wMinute = pdtime->Minute; + SystemTime.wHour = pdtime->Hour; + + SystemTime.wDay = pddate->Day; + SystemTime.wMonth = pddate->Month; + SystemTime.wYear = 1980 + pddate->Year; + + ConvertSystemTimeToFileTime(&SystemTime, lpFileTime); + + return TRUE; +} + /* * FUNCTION: Returns a pointer to file name * ARGUMENTS: @@ -274,43 +273,45 @@ * RETURNS: * Pointer to filename */ -{ - ULONG i, j; - - j = i = 0; - - while (Path [i++]) - { - if (Path[i - 1] == L'\\') j = i; - } - return Path + j; -} - - -static VOID -RemoveFileName(PWCHAR Path) +static PWCHAR +GetFileName(PWCHAR Path) +{ + ULONG i, j; + + j = i = 0; + + while (Path[i++]) + { + if (Path[i - 1] == L'\\') + j = i; + } + + return Path + j; +} + /* * FUNCTION: Removes a file name from a path * ARGUMENTS: * Path = Pointer to string with path */ -{ - PWCHAR FileName; - DWORD i; - - i = 0; - FileName = GetFileName(Path + i); - - if ((FileName != (Path + i)) && (FileName [-1] == L'\\')) - FileName--; - if ((FileName == (Path + i)) && (FileName [0] == L'\\')) - FileName++; - FileName[0] = 0; -} - - -static BOOL -SetAttributesOnFile(PCFFILE File, HANDLE hFile) +static VOID +RemoveFileName(PWCHAR Path) +{ + PWCHAR FileName; + DWORD i; + + i = 0; + FileName = GetFileName(Path + i); + + if (FileName != Path + i && FileName[-1] == L'\\') + FileName--; + + if (FileName == Path + i && FileName[0] == L'\\') + FileName++; + + FileName[0] = 0; +} + /* * FUNCTION: Sets attributes on a file * ARGUMENTS: @@ -318,113 +319,110 @@ * RETURNS: * Status of operation */ -{ - FILE_BASIC_INFORMATION FileBasic; - IO_STATUS_BLOCK IoStatusBlock; - NTSTATUS NtStatus; - ULONG Attributes = 0; - - if (File->Attributes & CAB_ATTRIB_READONLY) - Attributes |= FILE_ATTRIBUTE_READONLY; - - if (File->Attributes & CAB_ATTRIB_HIDDEN) - Attributes |= FILE_ATTRIBUTE_HIDDEN; - - if (File->Attributes & CAB_ATTRIB_SYSTEM) - Attributes |= FILE_ATTRIBUTE_SYSTEM; - - if (File->Attributes & CAB_ATTRIB_DIRECTORY) - Attributes |= FILE_ATTRIBUTE_DIRECTORY; - - if (File->Attributes & CAB_ATTRIB_ARCHIVE) - Attributes |= FILE_ATTRIBUTE_ARCHIVE; - - NtStatus = NtQueryInformationFile(hFile, - &IoStatusBlock, - &FileBasic, - sizeof(FILE_BASIC_INFORMATION), - FileBasicInformation); - if (!NT_SUCCESS(NtStatus)) - { - DPRINT("NtQueryInformationFile() failed (%x).\n", NtStatus); - } - else - { - FileBasic.FileAttributes = Attributes; - - NtStatus = NtSetInformationFile(hFile, - &IoStatusBlock, - &FileBasic, - sizeof(FILE_BASIC_INFORMATION), - FileBasicInformation); - if (!NT_SUCCESS(NtStatus)) - { - DPRINT("NtSetInformationFile() failed (%x).\n", NtStatus); - } - } - - return NT_SUCCESS(NtStatus); -} - -static ULONG -CloseCabinet(VOID) +static BOOL +SetAttributesOnFile(PCFFILE File, + HANDLE hFile) +{ + FILE_BASIC_INFORMATION FileBasic; + IO_STATUS_BLOCK IoStatusBlock; + NTSTATUS NtStatus; + ULONG Attributes = 0; + + if (File->Attributes & CAB_ATTRIB_READONLY) + Attributes |= FILE_ATTRIBUTE_READONLY; + + if (File->Attributes & CAB_ATTRIB_HIDDEN) + Attributes |= FILE_ATTRIBUTE_HIDDEN; + + if (File->Attributes & CAB_ATTRIB_SYSTEM) + Attributes |= FILE_ATTRIBUTE_SYSTEM; + + if (File->Attributes & CAB_ATTRIB_DIRECTORY) + Attributes |= FILE_ATTRIBUTE_DIRECTORY; + + if (File->Attributes & CAB_ATTRIB_ARCHIVE) + Attributes |= FILE_ATTRIBUTE_ARCHIVE; + + NtStatus = NtQueryInformationFile(hFile, + &IoStatusBlock, + &FileBasic, + sizeof(FILE_BASIC_INFORMATION), + FileBasicInformation); + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("NtQueryInformationFile() failed (%x)\n", NtStatus); + } + else + { + FileBasic.FileAttributes = Attributes; + + NtStatus = NtSetInformationFile(hFile, + &IoStatusBlock, + &FileBasic, + sizeof(FILE_BASIC_INFORMATION), + FileBasicInformation); + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("NtSetInformationFile() failed (%x)\n", NtStatus); + } + } + + return NT_SUCCESS(NtStatus); +} + /* * FUNCTION: Closes the current cabinet * RETURNS: * Status of operation */ -{ - if (FileBuffer) - { - NtUnmapViewOfSection( NtCurrentProcess(), FileBuffer ); - NtClose( FileSectionHandle ); - NtClose( FileHandle ); - FileBuffer = NULL; - } - - return 0; -} - - +static ULONG +CloseCabinet(VOID) +{ + if (FileBuffer) + { + NtUnmapViewOfSection(NtCurrentProcess(), FileBuffer); + NtClose(FileSectionHandle); + NtClose(FileHandle); + FileBuffer = NULL; + } + + return 0; +} + +/* + * FUNCTION: Initialize archiver + */ VOID CabinetInitialize(VOID) -/* - * FUNCTION: Initialize archiver - */ -{ - ZStream.zalloc = MSZipAlloc; - ZStream.zfree = MSZipFree; - ZStream.opaque = (voidpf)0; - - FileOpen = FALSE; - wcscpy(DestPath, L""); - - CodecId = CAB_CODEC_RAW; - CodecSelected = TRUE; - - FolderUncompSize = 0; - BytesLeftInBlock = 0; - CabinetReserved = 0; - FolderReserved = 0; - DataReserved = 0; - CabinetReservedArea = NULL; - LastFileOffset = 0; -} - - +{ + ZStream.zalloc = MSZipAlloc; + ZStream.zfree = MSZipFree; + ZStream.opaque = (voidpf)0; + + FileOpen = FALSE; + wcscpy(DestPath, L""); + + CodecId = CAB_CODEC_RAW; + CodecSelected = TRUE; + + FolderUncompSize = 0; + BytesLeftInBlock = 0; + CabinetReserved = 0; + FolderReserved = 0; + DataReserved = 0; + CabinetReservedArea = NULL; + LastFileOffset = 0; +} + +/* + * FUNCTION: Cleanup archiver + */ VOID CabinetCleanup(VOID) -/* - * FUNCTION: Cleanup archiver - */ -{ - CabinetClose(); -} - - -BOOL -CabinetNormalizePath(PWCHAR Path, - ULONG Length) +{ + CabinetClose(); +} + /* * FUNCTION: Normalizes a path * ARGUMENTS: @@ -433,254 +431,256 @@ * RETURNS: * TRUE if there was enough room in Path, or FALSE */ -{ - ULONG n; - BOOL OK = TRUE; - - if ((n = wcslen(Path)) && - (Path[n - 1] != L'\\') && - (OK = ((n + 1) < Length))) - { - Path[n] = L'\\'; - Path[n + 1] = 0; - } - return OK; -} - - -PWCHAR -CabinetGetCabinetName() +BOOL +CabinetNormalizePath(PWCHAR Path, + ULONG Length) +{ + ULONG n; + BOOL Ok; + + n = wcslen(Path); + Ok = (n + 1) < Length; + + if (n != 0 && Path[n - 1] != L'\\' && Ok) + { + Path[n] = L'\\'; + Path[n + 1] = 0; + } + + return Ok; +} + /* * FUNCTION: Returns pointer to cabinet file name * RETURNS: * Pointer to string with name of cabinet */ -{ - return CabinetName; -} - - -VOID -CabinetSetCabinetName(PWCHAR FileName) +PWCHAR +CabinetGetCabinetName(VOID) +{ + return CabinetName; +} + /* * FUNCTION: Sets cabinet file name * ARGUMENTS: * FileName = Pointer to string with name of cabinet */ -{ - wcscpy(CabinetName, FileName); -} - - VOID -CabinetSetDestinationPath(PWCHAR DestinationPath) +CabinetSetCabinetName(PWCHAR FileName) +{ + wcscpy(CabinetName, FileName); +} + /* * FUNCTION: Sets destination path * ARGUMENTS: * DestinationPath = Pointer to string with name of destination path */ -{ - wcscpy(DestPath, DestinationPath); - if (wcslen(DestPath) > 0) - CabinetNormalizePath(DestPath, MAX_PATH); -} - - -PWCHAR -CabinetGetDestinationPath() +VOID +CabinetSetDestinationPath(PWCHAR DestinationPath) +{ + wcscpy(DestPath, DestinationPath); + + if (wcslen(DestPath) > 0) + CabinetNormalizePath(DestPath, MAX_PATH); +} + /* * FUNCTION: Returns destination path * RETURNS: * Pointer to string with name of destination path */ -{ - return DestPath; -} - - -ULONG -CabinetOpen(VOID) +PWCHAR +CabinetGetDestinationPath(VOID) +{ + return DestPath; +} + /* * FUNCTION: Opens a cabinet file * RETURNS: * Status of operation */ -{ - PUCHAR Buffer; - UNICODE_STRING ustring; - ANSI_STRING astring; - - if (!FileOpen) - { - OBJECT_ATTRIBUTES ObjectAttributes; - IO_STATUS_BLOCK IoStatusBlock; - UNICODE_STRING FileName; - NTSTATUS NtStatus; - ULONG Size; - - RtlInitUnicodeString(&FileName, - CabinetName); - - InitializeObjectAttributes(&ObjectAttributes, - &FileName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - NtStatus = NtOpenFile(&FileHandle, - GENERIC_READ | SYNCHRONIZE, - &ObjectAttributes, - &IoStatusBlock, - FILE_SHARE_READ, - FILE_SYNCHRONOUS_IO_NONALERT); - if (!NT_SUCCESS(NtStatus)) - { - DPRINT("Cannot open file (%S) (%x).\n", CabinetName, NtStatus); - return CAB_STATUS_CANNOT_OPEN; - } - FileOpen = TRUE; - - NtStatus = NtCreateSection(&FileSectionHandle, - SECTION_ALL_ACCESS, - 0, - 0, - PAGE_READONLY, - SEC_COMMIT, - FileHandle); - if(!NT_SUCCESS(NtStatus)) - { - DPRINT("NtCreateSection failed: %x\n", NtStatus); - return CAB_STATUS_NOMEMORY; - } - FileBuffer = 0; - FileSize = 0; - NtStatus = NtMapViewOfSection(FileSectionHandle, - NtCurrentProcess(), - (PVOID *)&FileBuffer, - 0, - 0, - 0, - &FileSize, - ViewUnmap, - 0, - PAGE_READONLY); - if(!NT_SUCCESS(NtStatus)) - { - DPRINT("NtMapViewOfSection failed: %x\n", NtStatus); - return CAB_STATUS_NOMEMORY; - } - DPRINT( "Cabinet file %S opened and mapped to %x\n", CabinetName, FileBuffer ); - PCABHeader = (PCFHEADER)FileBuffer; - - /* Check header */ - if(FileSize <= sizeof(CFHEADER) || - PCABHeader->Signature != CAB_SIGNATURE || - PCABHeader->Version != CAB_VERSION || - PCABHeader->FolderCount == 0 || - PCABHeader->FileCount == 0 || - PCABHeader->FileTableOffset < sizeof(CFHEADER)) - { - CloseCabinet(); - DPRINT("File has invalid header.\n"); - return CAB_STATUS_INVALID_CAB; - } - - Size = 0; - Buffer = (PUCHAR)(PCABHeader+1); - /* Read/skip any reserved bytes */ - if (PCABHeader->Flags & CAB_FLAG_RESERVE) - { - CabinetReserved = *(PUSHORT)Buffer; - Buffer += 2; - FolderReserved = *Buffer; - Buffer++; - DataReserved = *Buffer; - Buffer++; - if (CabinetReserved > 0) +ULONG +CabinetOpen(VOID) +{ + PUCHAR Buffer; + UNICODE_STRING ustring; + ANSI_STRING astring; + + if (!FileOpen) + { + OBJECT_ATTRIBUTES ObjectAttributes; + IO_STATUS_BLOCK IoStatusBlock; + UNICODE_STRING FileName; + NTSTATUS NtStatus; + ULONG Size; + + RtlInitUnicodeString(&FileName, CabinetName); + + InitializeObjectAttributes(&ObjectAttributes, + &FileName, + OBJ_CASE_INSENSITIVE, + NULL, NULL); + + NtStatus = NtOpenFile(&FileHandle, + GENERIC_READ | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ, + FILE_SYNCHRONOUS_IO_NONALERT); + + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("Cannot open file (%S) (%x)\n", CabinetName, NtStatus); + return CAB_STATUS_CANNOT_OPEN; + } + + FileOpen = TRUE; + + NtStatus = NtCreateSection(&FileSectionHandle, + SECTION_ALL_ACCESS, + 0, 0, + PAGE_READONLY, + SEC_COMMIT, + FileHandle); + + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("NtCreateSection failed: %x\n", NtStatus); + return CAB_STATUS_NOMEMORY; + } + + FileBuffer = 0; + FileSize = 0; + + NtStatus = NtMapViewOfSection(FileSectionHandle, + NtCurrentProcess(), + (PVOID *)&FileBuffer, + 0, 0, 0, + &FileSize, + ViewUnmap, + 0, + PAGE_READONLY); + + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("NtMapViewOfSection failed: %x\n", NtStatus); + return CAB_STATUS_NOMEMORY; + } + + DPRINT("Cabinet file %S opened and mapped to %x\n", CabinetName, FileBuffer); + PCABHeader = (PCFHEADER) FileBuffer; + + /* Check header */ + if (FileSize <= sizeof(CFHEADER) || + PCABHeader->Signature != CAB_SIGNATURE || + PCABHeader->Version != CAB_VERSION || + PCABHeader->FolderCount == 0 || + PCABHeader->FileCount == 0 || + PCABHeader->FileTableOffset < sizeof(CFHEADER)) + { + CloseCabinet(); + DPRINT("File has invalid header\n"); + return CAB_STATUS_INVALID_CAB; + } + + Size = 0; + Buffer = (PUCHAR)(PCABHeader + 1); + + /* Read/skip any reserved bytes */ + if (PCABHeader->Flags & CAB_FLAG_RESERVE) + { + CabinetReserved = *(PUSHORT)Buffer; + Buffer += 2; + FolderReserved = *Buffer; + Buffer++; + DataReserved = *Buffer; + Buffer++; + + if (CabinetReserved > 0) { - CabinetReservedArea = Buffer; - Buffer += CabinetReserved; + CabinetReservedArea = Buffer; + Buffer += CabinetReserved; } } - if (PCABHeader->Flags & CAB_FLAG_HASPREV) - { - /* The previous cabinet file is in the same directory as the current */ - wcscpy(CabinetPrev, CabinetName); - RemoveFileName(CabinetPrev); - CabinetNormalizePath(CabinetPrev, 256); - RtlInitAnsiString( &astring, (LPSTR)Buffer ); - ustring.Length = wcslen( CabinetPrev ); - ustring.Buffer = CabinetPrev + ustring.Length; - ustring.MaximumLength = sizeof( CabinetPrev ) - ustring.Length; - RtlAnsiStringToUnicodeString( &ustring, &astring, FALSE ); - Buffer += astring.Length + 1; - - /* Read label of prev disk */ - RtlInitAnsiString( &astring, (LPSTR)Buffer ); - ustring.Length = 0; - ustring.Buffer = DiskPrev; - ustring.MaximumLength = sizeof( DiskPrev ); - RtlAnsiStringToUnicodeString( &ustring, &astring, FALSE ); - Buffer += astring.Length + 1; - } - else - { - wcscpy(CabinetPrev, L""); - wcscpy(DiskPrev, L""); - } - - if (PCABHeader->Flags & CAB_FLAG_HASNEXT) - { - /* The next cabinet file is in the same directory as the previous */ - wcscpy(CabinetNext, CabinetName); - RemoveFileName(CabinetNext); - CabinetNormalizePath(CabinetNext, 256); - RtlInitAnsiString( &astring, (LPSTR)Buffer ); - ustring.Length = wcslen( CabinetNext ); - ustring.Buffer = CabinetNext + ustring.Length; - ustring.MaximumLength = sizeof( CabinetNext ) - ustring.Length; - RtlAnsiStringToUnicodeString( &ustring, &astring, FALSE ); - Buffer += astring.Length + 1; - - /* Read label of next disk */ - RtlInitAnsiString( &astring, (LPSTR)Buffer ); - ustring.Length = 0; - ustring.Buffer = DiskNext; - ustring.MaximumLength = sizeof( DiskNext ); - RtlAnsiStringToUnicodeString( &ustring, &astring, FALSE ); - Buffer += astring.Length + 1; - } - else - { - wcscpy(CabinetNext, L""); - wcscpy(DiskNext, L""); - } - CabinetFolders = (PCFFOLDER)Buffer; - } - DPRINT( "CabinetOpen returning SUCCESS\n" ); - return CAB_STATUS_SUCCESS; -} - - + if (PCABHeader->Flags & CAB_FLAG_HASPREV) + { + /* The previous cabinet file is in + the same directory as the current */ + wcscpy(CabinetPrev, CabinetName); + RemoveFileName(CabinetPrev); + CabinetNormalizePath(CabinetPrev, 256); + RtlInitAnsiString(&astring, (LPSTR)Buffer); + ustring.Length = wcslen(CabinetPrev); + ustring.Buffer = CabinetPrev + ustring.Length; + ustring.MaximumLength = sizeof(CabinetPrev) - ustring.Length; + RtlAnsiStringToUnicodeString(&ustring, &astring, FALSE); + Buffer += astring.Length + 1; + + /* Read label of prev disk */ + RtlInitAnsiString(&astring, (LPSTR)Buffer); + ustring.Length = 0; + ustring.Buffer = DiskPrev; + ustring.MaximumLength = sizeof(DiskPrev); + RtlAnsiStringToUnicodeString(&ustring, &astring, FALSE); + Buffer += astring.Length + 1; + } + else + { + wcscpy(CabinetPrev, L""); + wcscpy(DiskPrev, L""); + } + + if (PCABHeader->Flags & CAB_FLAG_HASNEXT) + { + /* The next cabinet file is in + the same directory as the previous */ + wcscpy(CabinetNext, CabinetName); + RemoveFileName(CabinetNext); + CabinetNormalizePath(CabinetNext, 256); + RtlInitAnsiString(&astring, (LPSTR)Buffer); + ustring.Length = wcslen(CabinetNext); + ustring.Buffer = CabinetNext + ustring.Length; + ustring.MaximumLength = sizeof(CabinetNext) - ustring.Length; + RtlAnsiStringToUnicodeString(&ustring, &astring, FALSE); + Buffer += astring.Length + 1; + + /* Read label of next disk */ + RtlInitAnsiString(&astring, (LPSTR)Buffer); + ustring.Length = 0; + ustring.Buffer = DiskNext; + ustring.MaximumLength = sizeof(DiskNext); + RtlAnsiStringToUnicodeString(&ustring, &astring, FALSE); + Buffer += astring.Length + 1; + } + else + { + wcscpy(CabinetNext, L""); + wcscpy(DiskNext, L""); + } + CabinetFolders = (PCFFOLDER)Buffer; + } + + DPRINT("CabinetOpen returning SUCCESS\n"); + return CAB_STATUS_SUCCESS; +} + +/* + * FUNCTION: Closes the cabinet file + */ VOID CabinetClose(VOID) -/* - * FUNCTION: Closes the cabinet file - */ -{ - if (FileOpen) - { - CloseCabinet(); - - FileOpen = FALSE; - } -} - - -ULONG -CabinetFindFirst(PWCHAR FileName, - PCAB_SEARCH Search) +{ + if (FileOpen) + { + CloseCabinet(); + FileOpen = FALSE; + } +} + /* * FUNCTION: Finds the first file in the cabinet that matches a search criteria * ARGUMENTS: @@ -689,17 +689,17 @@ * RETURNS: * Status of operation */ -{ - DPRINT( "CabinetFindFirst( FileName = %S )\n", FileName ); - wcsncpy(Search->Search, FileName, MAX_PATH); - wcsncpy(Search->Cabinet, CabinetName, MAX_PATH); - Search->File = 0; - return CabinetFindNext(Search); -} - - ULONG -CabinetFindNext(PCAB_SEARCH Search) +CabinetFindFirst(PWCHAR FileName, + PCAB_SEARCH Search) +{ + DPRINT("CabinetFindFirst( FileName = %S )\n", FileName); + wcsncpy(Search->Search, FileName, MAX_PATH); + wcsncpy(Search->Cabinet, CabinetName, MAX_PATH); + Search->File = 0; + return CabinetFindNext(Search); +} + /* * FUNCTION: Finds next file in the cabinet that matches a search criteria * ARGUMENTS: @@ -707,99 +707,116 @@ * RETURNS: * Status of operation */ -{ - ULONG Status; - PCFFILE Prev; - ANSI_STRING AnsiString; - UNICODE_STRING UnicodeString; - WCHAR FileName[MAX_PATH] = {L'\0'}; - - if( wcscmp( Search->Cabinet, CabinetName ) != 0 ) - Search->File = 0; // restart search of cabinet has changed since last find - if( !Search->File ) - { - // starting new search or cabinet - Search->File = (PCFFILE)(FileBuffer + PCABHeader->FileTableOffset); - Search->Index = 0; - Prev = 0; - } - else Prev = Search->File; - while(1) - { - // look at each file in the archive and see if we found a match - if( Search->File->FolderIndex == 0xFFFD || Search->File->FolderIndex == 0xFFFF ) - { - // skip files continued from previous cab - DPRINT("Skipping file (%s) FileOffset (0x%X) LastFileOffset (0x%X).\n", - (char *)(Search->File + 1), Search->File->FileOffset, LastFileOffset); - } - else { - // FIXME: check for match against search criteria - if( Search->File != Prev ) - { - // don't match the file we started with - if( wcscmp( Search->Search, L"*" ) == 0 ) - { - // take any file - break; - } - else { - // otherwise, try to match the exact file name - RtlInitAnsiString( &AnsiString, Search->File->FileName ); - UnicodeString.Buffer = FileName; - UnicodeString.Length = 0; - UnicodeString.MaximumLength = sizeof( FileName ); - RtlAnsiStringToUnicodeString( &UnicodeString, &AnsiString, FALSE ); - if( wcscmp( Search->Search, UnicodeString.Buffer ) == 0 ) - break; - } - } - } - // if we make it here we found no match, so move to the next file - Search->Index++; - if( Search->Index >= PCABHeader->FileCount ) - { - // we have reached the end of this cabinet, try to open the next - DPRINT( "End of cabinet reached\n" ); - if (wcslen(DiskNext) > 0) - { - CloseCabinet(); - - CabinetSetCabinetName(CabinetNext); - wcscpy( Search->Cabinet, CabinetName ); - - if (DiskChangeHandler != NULL) - { - DiskChangeHandler(CabinetNext, DiskNext); - } - - Status = CabinetOpen(); - if (Status != CAB_STATUS_SUCCESS) - return Status; - - } - else - { - return CAB_STATUS_NOFILE; - } - // starting new search or cabinet - Search->File = (PCFFILE)(FileBuffer + PCABHeader->FileTableOffset); - Search->Index = 0; - Prev = 0; - } - else Search->File = (PCFFILE)(strchr( (char *)(Search->File + 1), 0 ) + 1); - } - DPRINT( "Found file %s\n", Search->File->FileName ); - return CAB_STATUS_SUCCESS; -} - - -int Validate() -{ - return (int)RtlValidateHeap(ProcessHeap, 0, 0); -} - -ULONG CabinetExtractFile( PCAB_SEARCH Search ) +ULONG +CabinetFindNext(PCAB_SEARCH Search) +{ + ULONG Status; + PCFFILE Prev; + ANSI_STRING AnsiString; + UNICODE_STRING UnicodeString; + WCHAR FileName[MAX_PATH]; + + if (wcscmp(Search->Cabinet, CabinetName) != 0) + { + /* restart search of cabinet has changed since last find */ + Search->File = 0; + } + + if (!Search->File) + { + /* starting new search or cabinet */ + Search->File = (PCFFILE)(FileBuffer + PCABHeader->FileTableOffset); + Search->Index = 0; + Prev = 0; + } + else + Prev = Search->File; + + while (TRUE) + { + /* look at each file in the archive and see if we found a match */ + if (Search->File->FolderIndex == 0xFFFD || + Search->File->FolderIndex == 0xFFFF) + { + /* skip files continued from previous cab */ + DPRINT("Skipping file (%s): FileOffset (0x%X), " + "LastFileOffset (0x%X)\n", (char *)(Search->File + 1), + Search->File->FileOffset, LastFileOffset); + } + else + { + // FIXME: check for match against search criteria + if (Search->File != Prev) + { + /* don't match the file we started with */ + if (wcscmp(Search->Search, L"*") == 0) + { + /* take any file */ + break; + } + else + { + /* otherwise, try to match the exact file name */ + RtlInitAnsiString(&AnsiString, Search->File->FileName); + UnicodeString.Buffer = FileName; + UnicodeString.Buffer[0] = 0; + UnicodeString.Length = 0; + UnicodeString.MaximumLength = sizeof(FileName); + RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, FALSE); + if (wcscmp(Search->Search, UnicodeString.Buffer) == 0) + break; + } + } + } + + /* if we make it here we found no match, so move to the next file */ + Search->Index++; + if (Search->Index >= PCABHeader->FileCount) + { + /* we have reached the end of this cabinet, try to open the next */ + DPRINT("End of cabinet reached\n"); + if (wcslen(DiskNext) > 0) + { + CloseCabinet(); + + CabinetSetCabinetName(CabinetNext); + wcscpy(Search->Cabinet, CabinetName); + + if (DiskChangeHandler != NULL) + { + DiskChangeHandler(CabinetNext, DiskNext); + } + + Status = CabinetOpen(); + if (Status != CAB_STATUS_SUCCESS) + return Status; + } + else + { + return CAB_STATUS_NOFILE; + } + + /* starting new search or cabinet */ + Search->File = (PCFFILE)(FileBuffer + PCABHeader->FileTableOffset); + Search->Index = 0; + Prev = 0; + } + else + Search->File = (PCFFILE)(strchr((char *)(Search->File + 1), 0) + 1); + } + + DPRINT("Found file %s\n", Search->File->FileName); + return CAB_STATUS_SUCCESS; +} + +#if 0 +int +Validate() +{ + return (int)RtlValidateHeap(ProcessHeap, 0, 0); +} +#endif + /* * FUNCTION: Extracts a file from the cabinet * ARGUMENTS: @@ -807,309 +824,339 @@ * RETURNS * Status of operation */ -{ - ULONG Size; // remaining file bytes to decompress - ULONG CurrentOffset; // current uncompressed offset within the folder - PUCHAR CurrentBuffer; // current pointer to compressed data in the block - LONG RemainingBlock; // remaining comp data in the block - HANDLE DestFile; - HANDLE DestFileSection; - PVOID DestFileBuffer; // mapped view of dest file - PVOID CurrentDestBuffer; // pointer to the current position in the dest view - PCFDATA CFData; // current data block - ULONG Status; - FILETIME FileTime; - WCHAR DestName[MAX_PATH]; - NTSTATUS NtStatus; - UNICODE_STRING UnicodeString; - ANSI_STRING AnsiString; - IO_STATUS_BLOCK IoStatusBlock; - OBJECT_ATTRIBUTES ObjectAttributes; - FILE_BASIC_INFORMATION FileBasic; - PCFFOLDER CurrentFolder; - LARGE_INTEGER MaxDestFileSize; - LONG InputLength, OutputLength; - char Junk[512]; - - if( wcscmp( Search->Cabinet, CabinetName ) != 0 ) - { - // the file is not in the current cabinet - DPRINT( "File is not in this cabinet ( %S != %S )\n", Search->Cabinet, CabinetName ); - return CAB_STATUS_NOFILE; - } - // look up the folder that the file specifies - if( Search->File->FolderIndex == 0xFFFD || Search->File->FolderIndex == 0xFFFF ) - { - // folder is continued from previous cabinet, that shouldn't happen here - return CAB_STATUS_NOFILE; - } - else if( Search->File->FolderIndex == 0xFFFE ) - { - // folder is the last in this cabinet and continues into next - CurrentFolder = &CabinetFolders[PCABHeader->FolderCount-1]; - } - else { - // folder is completely contained within this cabinet - CurrentFolder = &CabinetFolders[Search->File->FolderIndex]; - } - switch (CurrentFolder->CompressionType & CAB_COMP_MASK) - { - case CAB_COMP_NONE: - CabinetSelectCodec(CAB_CODEC_RAW); - break; - case CAB_COMP_MSZIP: - CabinetSelectCodec(CAB_CODEC_MSZIP); - break; - default: - return CAB_STATUS_UNSUPPCOMP; - } - - DPRINT("Extracting file at uncompressed offset (0x%X) Size (%d bytes)).\n", - (UINT)Search->File->FileOffset, - (UINT)Search->File->FileSize); - RtlInitAnsiString( &AnsiString, Search->File->FileName ); - wcscpy( DestName, DestPath ); - UnicodeString.MaximumLength = sizeof( DestName ) - wcslen( DestName ); - UnicodeString.Buffer = DestName + wcslen( DestName ); - UnicodeString.Length = 0; - RtlAnsiStringToUnicodeString( &UnicodeString, &AnsiString, FALSE ); - - /* Create destination file, fail if it already exists */ - RtlInitUnicodeString(&UnicodeString, - DestName); - - - InitializeObjectAttributes(&ObjectAttributes, - &UnicodeString, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - - NtStatus = NtCreateFile(&DestFile, - GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, - &ObjectAttributes, - &IoStatusBlock, - NULL, - FILE_ATTRIBUTE_NORMAL, - 0, - FILE_CREATE, - FILE_SYNCHRONOUS_IO_NONALERT, - NULL, - 0); - if (!NT_SUCCESS(NtStatus)) - { - DPRINT("NtCreateFile() failed (%S) (%x).\n", DestName, NtStatus); - - /* If file exists, ask to overwrite file */ - if (OverwriteHandler == NULL || OverwriteHandler(Search->File, DestName)) - { - /* Create destination file, overwrite if it already exists */ - NtStatus = NtCreateFile(&DestFile, - GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, - &ObjectAttributes, - &IoStatusBlock, - NULL, - FILE_ATTRIBUTE_NORMAL, - 0, - FILE_OVERWRITE, - FILE_SYNCHRONOUS_IO_ALERT, - NULL, - 0); - if (!NT_SUCCESS(NtStatus)) +ULONG +CabinetExtractFile(PCAB_SEARCH Search) +{ + ULONG Size; // remaining file bytes to decompress + ULONG CurrentOffset; // current uncompressed offset within the folder + PUCHAR CurrentBuffer; // current pointer to compressed data in the block + LONG RemainingBlock; // remaining comp data in the block + HANDLE DestFile; + HANDLE DestFileSection; + PVOID DestFileBuffer; // mapped view of dest file + PVOID CurrentDestBuffer; // pointer to the current position in the dest view + PCFDATA CFData; // current data block + ULONG Status; + FILETIME FileTime; + WCHAR DestName[MAX_PATH]; + NTSTATUS NtStatus; + UNICODE_STRING UnicodeString; + ANSI_STRING AnsiString; + IO_STATUS_BLOCK IoStatusBlock; + OBJECT_ATTRIBUTES ObjectAttributes; + FILE_BASIC_INFORMATION FileBasic; + PCFFOLDER CurrentFolder; + LARGE_INTEGER MaxDestFileSize; + LONG InputLength, OutputLength; + char Junk[512]; + + if (wcscmp(Search->Cabinet, CabinetName) != 0) + { + /* the file is not in the current cabinet */ + DPRINT("File is not in this cabinet (%S != %S)\n", + Search->Cabinet, CabinetName); + return CAB_STATUS_NOFILE; + } + + /* look up the folder that the file specifies */ + if (Search->File->FolderIndex == 0xFFFD || + Search->File->FolderIndex == 0xFFFF) + { + /* folder is continued from previous cabinet, + that shouldn't happen here */ + return CAB_STATUS_NOFILE; + } + else if (Search->File->FolderIndex == 0xFFFE) + { + /* folder is the last in this cabinet and continues into next */ + CurrentFolder = &CabinetFolders[PCABHeader->FolderCount - 1]; + } + else + { + /* folder is completely contained within this cabinet */ + CurrentFolder = &CabinetFolders[Search->File->FolderIndex]; + } + + switch (CurrentFolder->CompressionType & CAB_COMP_MASK) + { + case CAB_COMP_NONE: + CabinetSelectCodec(CAB_CODEC_RAW); + break; + case CAB_COMP_MSZIP: + CabinetSelectCodec(CAB_CODEC_MSZIP); + break; + default: + return CAB_STATUS_UNSUPPCOMP; + } + + DPRINT("Extracting file at uncompressed offset (0x%X) Size (%d bytes)\n", + (UINT)Search->File->FileOffset, (UINT)Search->File->FileSize); + + RtlInitAnsiString(&AnsiString, Search->File->FileName); + wcscpy(DestName, DestPath); + UnicodeString.MaximumLength = sizeof(DestName) - wcslen(DestName); + UnicodeString.Buffer = DestName + wcslen(DestName); + UnicodeString.Length = 0; + RtlAnsiStringToUnicodeString(&UnicodeString, &AnsiString, FALSE); + + /* Create destination file, fail if it already exists */ + RtlInitUnicodeString(&UnicodeString, DestName); + + InitializeObjectAttributes(&ObjectAttributes, + &UnicodeString, + OBJ_CASE_INSENSITIVE, + NULL, NULL); + + NtStatus = NtCreateFile(&DestFile, + GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + FILE_ATTRIBUTE_NORMAL, + 0, + FILE_CREATE, + FILE_SYNCHRONOUS_IO_NONALERT, + NULL, 0); + + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("NtCreateFile() failed (%S) (%x)\n", DestName, NtStatus); + + /* If file exists, ask to overwrite file */ + if (OverwriteHandler == NULL || OverwriteHandler(Search->File, DestName)) + { + /* Create destination file, overwrite if it already exists */ + NtStatus = NtCreateFile(&DestFile, + GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, + &ObjectAttributes, + &IoStatusBlock, + NULL, + FILE_ATTRIBUTE_NORMAL, + 0, + FILE_OVERWRITE, + FILE_SYNCHRONOUS_IO_ALERT, + NULL, 0); + + if (!NT_SUCCESS(NtStatus)) { - DPRINT("NtCreateFile() failed 2 (%S) (%x).\n", DestName, NtStatus); - return CAB_STATUS_CANNOT_CREATE; + DPRINT("NtCreateFile() failed (%S) (%x)\n", DestName, NtStatus); + return CAB_STATUS_CANNOT_CREATE; } } - else - { - DPRINT("File (%S) exists.\n", DestName); - return CAB_STATUS_FILE_EXISTS; - } - } - MaxDestFileSize.QuadPart = Search->File->FileSize; - NtStatus = NtCreateSection(&DestFileSection, - SECTION_ALL_ACCESS, - 0, - &MaxDestFileSize, - PAGE_READWRITE, - SEC_COMMIT, - DestFile); - if(!NT_SUCCESS(NtStatus)) - { - DPRINT("NtCreateSection failed: %x\n", NtStatus); - Status = CAB_STATUS_NOMEMORY; - goto CloseDestFile; - } - DestFileBuffer = 0; - DestFileSize = 0; - NtStatus = NtMapViewOfSection(DestFileSection, - NtCurrentProcess(), - &DestFileBuffer, - 0, - 0, - 0, - &DestFileSize, - ViewUnmap, - 0, - PAGE_READWRITE); - if(!NT_SUCCESS(NtStatus)) - { - DPRINT("NtMapViewOfSection failed: %x\n", NtStatus); - Status = CAB_STATUS_NOMEMORY; - goto CloseDestFileSection; - } - CurrentDestBuffer = DestFileBuffer; - if (!ConvertDosDateTimeToFileTime(Search->File->FileDate, Search->File->FileTime, &FileTime)) - { - DPRINT("DosDateTimeToFileTime() failed.\n"); - Status = CAB_STATUS_CANNOT_WRITE; - goto UnmapDestFile; - } - - NtStatus = NtQueryInformationFile(DestFile, - &IoStatusBlock, - &FileBasic, - sizeof(FILE_BASIC_INFORMATION), - FileBasicInformation); - if (!NT_SUCCESS(NtStatus)) - { - DPRINT("NtQueryInformationFile() failed (%x).\n", NtStatus); - } - else - { - memcpy(&FileBasic.LastAccessTime, &FileTime, sizeof(FILETIME)); - - NtStatus = NtSetInformationFile(DestFile, - &IoStatusBlock, - &FileBasic, - sizeof(FILE_BASIC_INFORMATION), - FileBasicInformation); - if (!NT_SUCCESS(NtStatus)) - { - DPRINT("NtSetInformationFile() failed (%x).\n", NtStatus); - } - } - - SetAttributesOnFile(Search->File, DestFile); - - /* Call extract event handler */ - if (ExtractHandler != NULL) - { - ExtractHandler(Search->File, DestName); - } - // find the starting block of the file - // start with the first data block of the folder - CFData = (PCFDATA)(CabinetFolders[Search->File->FolderIndex].DataOffset + FileBuffer); - CurrentOffset = 0; - while( CurrentOffset + CFData->UncompSize <= Search->File->FileOffset ) - { - // walk the data blocks until we reach the one containing the start of the file - CurrentOffset += CFData->UncompSize; - CFData = (PCFDATA)((char *)(CFData+1) + DataReserved + CFData->CompSize); - } - // now decompress and discard any data in the block before the start of the file - CurrentBuffer = ((unsigned char *)(CFData+1)) + DataReserved; // start of comp data - RemainingBlock = CFData->CompSize; - InputLength = RemainingBlock; - while( CurrentOffset < Search->File->FileOffset ) - { - // compute remaining uncomp bytes to start of file, bounded by sizeof junk - OutputLength = Search->File->FileOffset - CurrentOffset; - if( OutputLength > (LONG)sizeof( Junk ) ) - OutputLength = sizeof( Junk ); - OutputLength = -OutputLength; // negate to signal NOT end of block - CodecUncompress( Junk, - CurrentBuffer, - &InputLength, - &OutputLength ); - CurrentOffset += OutputLength; // add the uncomp bytes extracted to current folder offset - CurrentBuffer += InputLength; // add comp bytes consumed to CurrentBuffer - RemainingBlock -= InputLength; // subtract bytes consumed from bytes remaining in block - InputLength = -RemainingBlock; // neg for resume decompression of the same block - } - // now CurrentBuffer points to the first comp byte of the file, so we can begin decompressing - - Size = Search->File->FileSize; // Size = remaining uncomp bytes of the file to decompress - while(Size > 0) - { - OutputLength = Size; - DPRINT( "Decompressing block at %x with RemainingBlock = %d, Size = %d\n", CurrentBuffer, RemainingBlock, Size ); - Status = CodecUncompress(CurrentDestBuffer, - CurrentBuffer, - &InputLength, - &OutputLength); - if (Status != CS_SUCCESS) - { - DPRINT("Cannot uncompress block.\n"); - if(Status == CS_NOMEMORY) - Status = CAB_STATUS_NOMEMORY; - Status = CAB_STATUS_INVALID_CAB; - goto UnmapDestFile; - } - CurrentDestBuffer = (PVOID)((ULONG_PTR)CurrentDestBuffer + OutputLength); // advance dest buffer by bytes produced - CurrentBuffer += InputLength; // advance src buffer by bytes consumed - Size -= OutputLength; // reduce remaining file bytes by bytes produced - RemainingBlock -= InputLength; // reduce remaining block size by bytes consumed - if( RemainingBlock == 0 ) - { - // used up this block, move on to the next - DPRINT( "Out of block data\n" ); - CFData = (PCFDATA)CurrentBuffer; - RemainingBlock = CFData->CompSize; - CurrentBuffer = ((unsigned char *)(CFData+1) + DataReserved); - InputLength = RemainingBlock; - } - } - Status = CAB_STATUS_SUCCESS; - UnmapDestFile: - NtUnmapViewOfSection(NtCurrentProcess(), DestFileBuffer); - CloseDestFileSection: - NtClose(DestFileSection); - CloseDestFile: - NtClose(DestFile); - - return Status; -} - - -VOID -CabinetSelectCodec(ULONG Id) + else + { + DPRINT("File (%S) exists\n", DestName); + return CAB_STATUS_FILE_EXISTS; + } + } + + MaxDestFileSize.QuadPart = Search->File->FileSize; + NtStatus = NtCreateSection(&DestFileSection, + SECTION_ALL_ACCESS, + 0, + &MaxDestFileSize, + PAGE_READWRITE, + SEC_COMMIT, + DestFile); + + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("NtCreateSection failed: %x\n", NtStatus); + Status = CAB_STATUS_NOMEMORY; + goto CloseDestFile; + } + + DestFileBuffer = 0; + DestFileSize = 0; + NtStatus = NtMapViewOfSection(DestFileSection, + NtCurrentProcess(), + &DestFileBuffer, + 0, 0, 0, + &DestFileSize, + ViewUnmap, + 0, + PAGE_READWRITE); + + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("NtMapViewOfSection failed: %x\n", NtStatus); + Status = CAB_STATUS_NOMEMORY; + goto CloseDestFileSection; + } + + CurrentDestBuffer = DestFileBuffer; + if (!ConvertDosDateTimeToFileTime(Search->File->FileDate, + Search->File->FileTime, + &FileTime)) + { + DPRINT("DosDateTimeToFileTime() failed\n"); + Status = CAB_STATUS_CANNOT_WRITE; + goto UnmapDestFile; + } + + NtStatus = NtQueryInformationFile(DestFile, + &IoStatusBlock, + &FileBasic, + sizeof(FILE_BASIC_INFORMATION), + FileBasicInformation); + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("NtQueryInformationFile() failed (%x)\n", NtStatus); + } + else + { + memcpy(&FileBasic.LastAccessTime, &FileTime, sizeof(FILETIME)); + + NtStatus = NtSetInformationFile(DestFile, + &IoStatusBlock, + &FileBasic, + sizeof(FILE_BASIC_INFORMATION), + FileBasicInformation); + if (!NT_SUCCESS(NtStatus)) + { + DPRINT("NtSetInformationFile() failed (%x)\n", NtStatus); + } + } + + SetAttributesOnFile(Search->File, DestFile); + + /* Call extract event handler */ + if (ExtractHandler != NULL) + { + ExtractHandler(Search->File, DestName); + } + + /* find the starting block of the file + start with the first data block of the folder */ + CFData = (PCFDATA)(CabinetFolders[Search->File->FolderIndex].DataOffset + FileBuffer); + CurrentOffset = 0; + while (CurrentOffset + CFData->UncompSize <= Search->File->FileOffset) + { + /* walk the data blocks until we reach + the one containing the start of the file */ + CurrentOffset += CFData->UncompSize; + CFData = (PCFDATA)((char *)(CFData + 1) + DataReserved + CFData->CompSize); + } + + /* now decompress and discard any data in + the block before the start of the file */ + + /* start of comp data */ + CurrentBuffer = ((unsigned char *)(CFData + 1)) + DataReserved; + RemainingBlock = CFData->CompSize; + InputLength = RemainingBlock; + + while (CurrentOffset < Search->File->FileOffset) + { + /* compute remaining uncomp bytes to start + of file, bounded by sizeof junk */ + OutputLength = Search->File->FileOffset - CurrentOffset; + if (OutputLength > (LONG)sizeof(Junk)) + OutputLength = sizeof (Junk); + + /* negate to signal NOT end of block */ + OutputLength = -OutputLength; + CodecUncompress(Junk, CurrentBuffer, &InputLength, &OutputLength); + /* add the uncomp bytes extracted to current folder offset */ + CurrentOffset += OutputLength; + /* add comp bytes consumed to CurrentBuffer */ + CurrentBuffer += InputLength; + /* subtract bytes consumed from bytes remaining in block */ + RemainingBlock -= InputLength; + /* neg for resume decompression of the same block */ + InputLength = -RemainingBlock; + } + + /* now CurrentBuffer points to the first comp byte + of the file, so we can begin decompressing */ + + /* Size = remaining uncomp bytes of the file to decompress */ + Size = Search->File->FileSize; + while (Size > 0) + { + OutputLength = Size; + DPRINT("Decompressing block at %x with RemainingBlock = %d, Size = %d\n", + CurrentBuffer, RemainingBlock, Size); + + Status = CodecUncompress(CurrentDestBuffer, + CurrentBuffer, + &InputLength, + &OutputLength); + + if (Status != CS_SUCCESS) + { + DPRINT("Cannot uncompress block\n"); + if (Status == CS_NOMEMORY) + Status = CAB_STATUS_NOMEMORY; + Status = CAB_STATUS_INVALID_CAB; + goto UnmapDestFile; + } + + /* advance dest buffer by bytes produced */ + CurrentDestBuffer = (PVOID)((ULONG_PTR)CurrentDestBuffer + OutputLength); + /* advance src buffer by bytes consumed */ + CurrentBuffer += InputLength; + /* reduce remaining file bytes by bytes produced */ + Size -= OutputLength; + /* reduce remaining block size by bytes consumed */ + RemainingBlock -= InputLength; + if (RemainingBlock == 0) + { + /* used up this block, move on to the next */ + DPRINT("Out of block data\n"); + CFData = (PCFDATA)CurrentBuffer; + RemainingBlock = CFData->CompSize; + CurrentBuffer = (unsigned char *)(CFData + 1) + DataReserved; + InputLength = RemainingBlock; + } + } + + Status = CAB_STATUS_SUCCESS; + +UnmapDestFile: + NtUnmapViewOfSection(NtCurrentProcess(), DestFileBuffer); + +CloseDestFileSection: + NtClose(DestFileSection); + +CloseDestFile: + NtClose(DestFile); + + return Status; +} + /* * FUNCTION: Selects codec engine to use * ARGUMENTS: * Id = Codec identifier */ -{ - if (CodecSelected) - { - if (Id == CodecId) - return; - - CodecSelected = FALSE; - } - - switch (Id) - { - case CAB_CODEC_RAW: - CodecUncompress = RawCodecUncompress; - break; - case CAB_CODEC_MSZIP: - CodecUncompress = MSZipCodecUncompress; - break; - default: - return; - } - - CodecId = Id; - CodecSelected = TRUE; -} - - VOID -CabinetSetEventHandlers(PCABINET_OVERWRITE Overwrite, - PCABINET_EXTRACT Extract, - PCABINET_DISK_CHANGE DiskChange) +CabinetSelectCodec(ULONG Id) +{ + if (CodecSelected) + { + if (Id == CodecId) + return; + + CodecSelected = FALSE; + } + + switch (Id) + { + case CAB_CODEC_RAW: + CodecUncompress = RawCodecUncompress; + break; + case CAB_CODEC_MSZIP: + CodecUncompress = MSZipCodecUncompress; + break; + default: + return; + } + + CodecId = Id; + CodecSelected = TRUE; +} + /* * FUNCTION: Set event handlers * ARGUMENTS: @@ -1117,33 +1164,38 @@ * Extract = Handler called when a file is to be extracted * DiskChange = Handler called when changing the disk */ -{ - OverwriteHandler = Overwrite; - ExtractHandler = Extract; - DiskChangeHandler = DiskChange; -} - - +VOID +CabinetSetEventHandlers(PCABINET_OVERWRITE Overwrite, + PCABINET_EXTRACT Extract, + PCABINET_DISK_CHANGE DiskChange) +{ + OverwriteHandler = Overwrite; + ExtractHandler = Extract; + DiskChangeHandler = DiskChange; +} + +/* + * FUNCTION: Get pointer to cabinet reserved area. NULL if none + */ PVOID CabinetGetCabinetReservedArea(PULONG Size) -/* - * FUNCTION: Get pointer to cabinet reserved area. NULL if none - */ -{ - if (CabinetReservedArea != NULL) - { - if (Size != NULL) - { - *Size = CabinetReserved; - } - return CabinetReservedArea; - } - else - { - if (Size != NULL) - { - *Size = 0; - } - return NULL; - } -} +{ + if (CabinetReservedArea != NULL) + { + if (Size != NULL) + { + *Size = CabinetReserved; + } + + return CabinetReservedArea; + } + else + { + if (Size != NULL) + { + *Size = 0; + } + + return NULL; + } +}
14 years, 10 months
1
0
0
0
[ekohl] 45489: Fix LSAPR_POLICY_INFORMATION and associated types.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Feb 7 18:01:57 2010 New Revision: 45489 URL:
http://svn.reactos.org/svn/reactos?rev=45489&view=rev
Log: Fix LSAPR_POLICY_INFORMATION and associated types. Modified: trunk/reactos/dll/win32/lsasrv/lsarpc.c trunk/reactos/include/reactos/idl/lsa.idl Modified: trunk/reactos/dll/win32/lsasrv/lsarpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsarpc.c?…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] Sun Feb 7 18:01:57 2010 @@ -229,7 +229,7 @@ NTSTATUS LsarQueryInformationPolicy( LSAPR_HANDLE PolicyHandle, POLICY_INFORMATION_CLASS InformationClass, - unsigned long PolicyInformation) + PLSAPR_POLICY_INFORMATION *PolicyInformation) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; @@ -240,7 +240,7 @@ NTSTATUS LsarSetInformationPolicy( LSAPR_HANDLE PolicyHandle, POLICY_INFORMATION_CLASS InformationClass, - unsigned long *PolicyInformation) + PLSAPR_POLICY_INFORMATION PolicyInformation) { UNIMPLEMENTED; return STATUS_NOT_IMPLEMENTED; Modified: trunk/reactos/include/reactos/idl/lsa.idl URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/idl/lsa.id…
============================================================================== --- trunk/reactos/include/reactos/idl/lsa.idl [iso-8859-1] (original) +++ trunk/reactos/include/reactos/idl/lsa.idl [iso-8859-1] Sun Feb 7 18:01:57 2010 @@ -302,13 +302,11 @@ LARGE_INTEGER ModifiedId; LARGE_INTEGER DatabaseCreationTime; } POLICY_MODIFICATION_INFO, *PPOLICY_MODIFICATION_INFO; -cpp_quote("#endif") - -typedef struct _POLICY_FULL_SET_INFO { + +typedef struct _POLICY_AUDIT_FULL_SET_INFO { BOOL ShutDownOnFull; -} POLICY_FULL_SET_INFO, *PPOLICY_FULL_SET_INFO; - -cpp_quote("#ifndef _NTSECAPI_H") +} POLICY_AUDIT_FULL_SET_INFO, *PPOLICY_AUDIT_FULL_SET_INFO; + typedef struct _POLICY_AUDIT_FULL_QUERY_INFO { BOOL ShutDownOnFull; BOOL LogIsFull; @@ -323,23 +321,23 @@ PRPC_SID Sid; } LSAPR_POLICY_DNS_DOMAIN_INFO, *PLSAPR_POLICY_DNS_DOMAIN_INFO; -/*typedef +typedef [switch_type(POLICY_INFORMATION_CLASS)] union _LSAPR_POLICY_INFORMATION { [case(PolicyAuditLogInformation)] POLICY_AUDIT_LOG_INFO PolicyAuditLogInfo; - [case(PolicyAuditEventsInformation)] POLICY_AUDIT_EVENTS_INFO PolicyAuditEventsInfo; - [case(PolicyPrimaryDomainInformation)] POLICY_PRIMARY_DOM_INFO PolicyPrimaryDomInfo; - [case(PolicyPdAccountInformation)] POLICY_PD_ACCOUNT_INFO PolicyPdAccountInfo; - [case(PolicyAccountDomainInformation)] POLICY_ACCOUNT_DOM_INFO PolicyAccountDomainInfo; + [case(PolicyAuditEventsInformation)] LSAPR_POLICY_AUDIT_EVENTS_INFO PolicyAuditEventsInfo; + [case(PolicyPrimaryDomainInformation)] LSAPR_POLICY_PRIMARY_DOM_INFO PolicyPrimaryDomInfo; + [case(PolicyPdAccountInformation)] LSAPR_POLICY_PD_ACCOUNT_INFO PolicyPdAccountInfo; + [case(PolicyAccountDomainInformation)] LSAPR_POLICY_ACCOUNT_DOM_INFO PolicyAccountDomainInfo; [case(PolicyLsaServerRoleInformation)] POLICY_LSA_SERVER_ROLE_INFO PolicyServerRoleInfo; - [case(PolicyReplicaSourceInformation)] POLICY_REPLICA_SRCE_INFO PolicyReplicaSourceInfo; + [case(PolicyReplicaSourceInformation)] POLICY_LSA_REPLICA_SRCE_INFO PolicyReplicaSourceInfo; [case(PolicyDefaultQuotaInformation)] POLICY_DEFAULT_QUOTA_INFO PolicyDefaultQuotaInfo; [case(PolicyModificationInformation)] POLICY_MODIFICATION_INFO PolicyModificationInfo; [case(PolicyAuditFullSetInformation)] POLICY_AUDIT_FULL_SET_INFO PolicyAuditFullSetInfo; [case(PolicyAuditFullQueryInformation)] POLICY_AUDIT_FULL_QUERY_INFO PolicyAuditFullQueryInfo; - [case(PolicyDnsDomainInformation)] LSAPR_DNS_DOMAIN_INFO PolicyDnsDomainInfo; - [case(PolicyDnsDomainInformationInt)] LSAPR_DNS_DOMAIN_INFO PolicyDnsDomainInfoInt; + [case(PolicyDnsDomainInformation)] LSAPR_POLICY_DNS_DOMAIN_INFO PolicyDnsDomainInfo; + [case(PolicyDnsDomainInformationInt)] LSAPR_POLICY_DNS_DOMAIN_INFO PolicyDnsDomainInfoInt; [case(PolicyLocalAccountDomainInformation)] LSAPR_POLICY_ACCOUNT_DOM_INFO PolicyLocalAccountDomainInfo; -} LSAPR_POLICY_INFORMATION, *PLSAPR_POLICY_INFORMATION;*/ +} LSAPR_POLICY_INFORMATION, *PLSAPR_POLICY_INFORMATION; typedef struct _LSAPR_TRUSTED_ENUM_BUFFER { DWORD EntriesRead; @@ -639,15 +637,13 @@ NTSTATUS LsarQueryInformationPolicy( [in] LSAPR_HANDLE PolicyHandle, [in] POLICY_INFORMATION_CLASS InformationClass, - [in] unsigned long PolicyInformation); - /* FIXME: should be [in, switch_is(InformationClass)] PLSAPR_POLICY_INFORMATION PolicyInformation); */ + [out, switch_is(InformationClass)] PLSAPR_POLICY_INFORMATION *PolicyInformation); /* Function 8 */ NTSTATUS LsarSetInformationPolicy( [in] LSAPR_HANDLE PolicyHandle, [in] POLICY_INFORMATION_CLASS InformationClass, - [out] unsigned long *PolicyInformation); - /* FIXME: should be [out, switch_is(InformationClass)] PLSAPR_POLICY_INFORMATION *PolicyInformation); */ + [in, switch_is(InformationClass)] PLSAPR_POLICY_INFORMATION PolicyInformation); /* Function 9 */ NTSTATUS LsarClearAuditLog(
14 years, 10 months
1
0
0
0
[janderwald] 45488: [DSOUND] - Fix broken assert - Fix calculation of length for the first locked audio buffer
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Feb 7 16:57:25 2010 New Revision: 45488 URL:
http://svn.reactos.org/svn/reactos?rev=45488&view=rev
Log: [DSOUND] - Fix broken assert - Fix calculation of length for the first locked audio buffer Modified: trunk/reactos/dll/directx/dsound_new/secondary.c Modified: trunk/reactos/dll/directx/dsound_new/secondary.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/dsound_new/sec…
============================================================================== --- trunk/reactos/dll/directx/dsound_new/secondary.c [iso-8859-1] (original) +++ trunk/reactos/dll/directx/dsound_new/secondary.c [iso-8859-1] Sun Feb 7 16:57:25 2010 @@ -263,8 +263,9 @@ else { ASSERT(dwOffset < This->BufferSize); - ASSERT(dwBytes < This->BufferSize); - ASSERT(dwBytes + dwOffset <= This->BufferSize); + ASSERT(dwBytes <= This->BufferSize); + + dwBytes = min(This->BufferSize - dwOffset, dwBytes); *ppvAudioPtr1 = This->Buffer + dwOffset; *pdwAudioBytes1 = dwBytes; @@ -316,7 +317,7 @@ /* release primary buffer */ PrimaryDirectSoundBuffer_ReleaseLock(This->PrimaryBuffer); - DPRINT1("SetFormatSuccess PrimaryBuffer %p\n", This->PrimaryBuffer); + DPRINT("SetFormatSuccess PrimaryBuffer %p\n", This->PrimaryBuffer); return DS_OK; }
14 years, 10 months
1
0
0
0
[janderwald] 45487: [PORTCLS] - Reset number of mappings and available data when a reset request arrives - Handle case where a get position request appears before an audio buffer arrives which results in divide by zero exception
by janderwald@svn.reactos.org
Author: janderwald Date: Sun Feb 7 16:35:00 2010 New Revision: 45487 URL:
http://svn.reactos.org/svn/reactos?rev=45487&view=rev
Log: [PORTCLS] - Reset number of mappings and available data when a reset request arrives - Handle case where a get position request appears before an audio buffer arrives which results in divide by zero exception Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] Sun Feb 7 16:35:00 2010 @@ -466,6 +466,11 @@ KsCancelIo(&m_IrpList, &m_IrpListLock); // reset stream start flag m_StartStream = FALSE; + // reset number of mappings + m_NumMappings = 0; + // reset number of data available + m_NumDataAvailable = 0; + // done return TRUE; } Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
============================================================================== --- trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp [iso-8859-1] (original) +++ trunk/reactos/drivers/wdm/audio/backpln/portcls/pin_wavecyclic.cpp [iso-8859-1] Sun Feb 7 16:35:00 2010 @@ -693,8 +693,11 @@ if (m_ConnectDetails->Interface.Id == KSINTERFACE_STANDARD_LOOPED_STREAMING) { - // normalize position - m_Position.PlayOffset = m_Position.PlayOffset % m_Position.WriteOffset; + if (m_Position.WriteOffset) + { + // normalize position + m_Position.PlayOffset = m_Position.PlayOffset % m_Position.WriteOffset; + } } } } @@ -742,8 +745,11 @@ if (m_ConnectDetails->Interface.Id == KSINTERFACE_STANDARD_LOOPED_STREAMING) { - // normalize position - m_Position.PlayOffset = m_Position.PlayOffset % m_Position.WriteOffset; + if (m_Position.WriteOffset) + { + // normalize position + m_Position.PlayOffset = m_Position.PlayOffset % m_Position.WriteOffset; + } } }
14 years, 10 months
1
0
0
0
[dreimer] 45486: Oops, forgot one location to fix.
by dreimer@svn.reactos.org
Author: dreimer Date: Sun Feb 7 14:58:35 2010 New Revision: 45486 URL:
http://svn.reactos.org/svn/reactos?rev=45486&view=rev
Log: Oops, forgot one location to fix. Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE.ns…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosBE.nsi [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/RosBE.nsi [iso-8859-1] Sun Feb 7 14:58:35 2010 @@ -365,7 +365,8 @@ File /r Components\Powershell\scut.ps1 File /r Components\Powershell\sSVN.ps1 File /r Components\Powershell\update.ps1 - WriteRegStr HKLM "Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" "ExecutionPolicy" "RemoteSigned" + WriteRegStr HKLM "SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" "ExecutionPolicy" "RemoteSigned" + WriteRegStr HKLM "SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" "ExecutionPolicy" "RemoteSigned" ${Endif} SectionEnd
14 years, 10 months
1
0
0
0
[dreimer] 45485: Hopefully fix 64 bit Execution Policy. Have no 64 bit OS here atm
by dreimer@svn.reactos.org
Author: dreimer Date: Sun Feb 7 14:52:26 2010 New Revision: 45485 URL:
http://svn.reactos.org/svn/reactos?rev=45485&view=rev
Log: Hopefully fix 64 bit Execution Policy. Have no 64 bit OS here atm Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi Modified: trunk/tools/RosBE/RosBE-Windows/RosBE.nsi URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/RosBE.ns…
============================================================================== --- trunk/tools/RosBE/RosBE-Windows/RosBE.nsi [iso-8859-1] (original) +++ trunk/tools/RosBE/RosBE-Windows/RosBE.nsi [iso-8859-1] Sun Feb 7 14:52:26 2010 @@ -128,7 +128,8 @@ File /r Components\Powershell\RosBE.ps1 File /r Components\Powershell\rosbe-gcc-env.ps1 File /r Components\Powershell\version.ps1 - WriteRegStr HKLM "Software\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" "ExecutionPolicy" "RemoteSigned" + WriteRegStr HKLM "SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" "ExecutionPolicy" "RemoteSigned" + WriteRegStr HKLM "SOFTWARE\Wow6432Node\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" "ExecutionPolicy" "RemoteSigned" ${else} File /r Root\Basedir.cmd File /r Root\Build-Shared.cmd
14 years, 10 months
1
0
0
0
[ekohl] 45484: Implement LsaEnumerateAccountRights.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Feb 7 14:51:25 2010 New Revision: 45484 URL:
http://svn.reactos.org/svn/reactos?rev=45484&view=rev
Log: Implement LsaEnumerateAccountRights. Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c trunk/reactos/dll/win32/lsasrv/lsarpc.c Modified: trunk/reactos/dll/win32/advapi32/sec/lsa.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/sec/lsa…
============================================================================== --- trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/sec/lsa.c [iso-8859-1] Sun Feb 7 14:51:25 2010 @@ -217,7 +217,7 @@ } /* - * @unimplemented + * @implemented */ NTSTATUS WINAPI @@ -227,10 +227,35 @@ PLSA_UNICODE_STRING *UserRights, PULONG CountOfRights) { - FIXME("(%p,%p,%p,%p) stub\n", PolicyHandle, AccountSid, UserRights, CountOfRights); - *UserRights = 0; - *CountOfRights = 0; - return STATUS_OBJECT_NAME_NOT_FOUND; + LSAPR_USER_RIGHT_SET UserRightsSet; + NTSTATUS Status; + + TRACE("(%p,%p,%p,%p) stub\n", PolicyHandle, AccountSid, UserRights, CountOfRights); + + UserRightsSet.Entries = 0; + UserRightsSet.UserRights = NULL; + + RpcTryExcept + { + Status = LsarEnmuerateAccountRights((LSAPR_HANDLE)PolicyHandle, + AccountSid, + &UserRightsSet); + + *CountOfRights = UserRightsSet.Entries; + *UserRights = (PUNICODE_STRING)UserRightsSet.UserRights; + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + Status = I_RpcMapWin32Status(RpcExceptionCode()); + + if (UserRightsSet.UserRights != NULL) + { + MIDL_user_free(UserRightsSet.UserRights); + } + } + RpcEndExcept; + + return Status; } /* @@ -288,7 +313,8 @@ /* * @implemented */ -NTSTATUS WINAPI +NTSTATUS +WINAPI LsaFreeMemory(PVOID Buffer) { TRACE("(%p)\n", Buffer); Modified: trunk/reactos/dll/win32/lsasrv/lsarpc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/lsasrv/lsarpc.c?…
============================================================================== --- trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/lsasrv/lsarpc.c [iso-8859-1] Sun Feb 7 14:51:25 2010 @@ -560,8 +560,14 @@ PRPC_SID AccountSid, PLSAPR_USER_RIGHT_SET UserRights) { - UNIMPLEMENTED; - return STATUS_NOT_IMPLEMENTED; + FIXME("(%p,%p,%p) stub\n", PolicyHandle, AccountSid, UserRights); + + if (!LsapValidateDbHandle(PolicyHandle)) + return STATUS_INVALID_HANDLE; + + UserRights->Entries = 0; + UserRights->UserRights = NULL; + return STATUS_OBJECT_NAME_NOT_FOUND; }
14 years, 10 months
1
0
0
0
[jcatena] 45483: [ntos] msvc wip
by jcatena@svn.reactos.org
Author: jcatena Date: Sun Feb 7 12:53:10 2010 New Revision: 45483 URL:
http://svn.reactos.org/svn/reactos?rev=45483&view=rev
Log: [ntos] msvc wip Modified: branches/jcatena-branch/ntoskrnl/ke/i386/exp.c branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c Modified: branches/jcatena-branch/ntoskrnl/ke/i386/exp.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/exp.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/exp.c [iso-8859-1] Sun Feb 7 12:53:10 2010 @@ -53,7 +53,8 @@ { ULONG i; USHORT FlippedSelector; - + + DPRINTT("\n"); /* Loop the IDT */ for (i = 0; i <= MAXIMUM_IDTVECTOR; i++) { Modified: branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c [iso-8859-1] Sun Feb 7 12:53:10 2010 @@ -720,12 +720,9 @@ /* Get GDT, IDT, PCR and TSS pointers */ KiGetMachineBootPointers(&Gdt, &Idt, &Pcr, &Tss); - + /* Setup the TSS descriptors and entries */ Ki386InitializeTss(Tss, Idt, Gdt); - - // !!! - KiTrapInit(); /* Initialize the PCR */ RtlZeroMemory(Pcr, PAGE_SIZE); @@ -745,9 +742,6 @@ __writefsdword(KPCR_DR6, 0); __writefsdword(KPCR_DR7, 0); - /* Setup the IDT */ - KeInitExceptions(); - /* Load Ring 3 selectors for DS/ES */ Ke386SetDs(KGDT_R3_DATA | RPL_MASK); Ke386SetEs(KGDT_R3_DATA | RPL_MASK); @@ -756,14 +750,23 @@ RtlCopyMemory(&NmiEntry, &Idt[2], sizeof(KIDTENTRY)); RtlCopyMemory(&DoubleFaultEntry, &Idt[8], sizeof(KIDTENTRY)); - /* Copy kernel's trap handlers */ + /* Setup the IDT */ + KeInitExceptions(); + Idt = KiIdt; + +#if 0 + /* Copy kernel's trap handlers */ RtlCopyMemory(Idt, (PVOID)KiIdtDescriptor.Base, KiIdtDescriptor.Limit + 1); +#endif /* Restore NMI and double fault */ RtlCopyMemory(&Idt[2], &NmiEntry, sizeof(KIDTENTRY)); RtlCopyMemory(&Idt[8], &DoubleFaultEntry, sizeof(KIDTENTRY)); + + __lidt(&KiIdtDescriptor.Limit); + KiTrapInit(); AppCpuInit: /* Loop until we can release the freeze lock */
14 years, 10 months
1
0
0
0
[jcatena] 45482: [ntos] msvc wip
by jcatena@svn.reactos.org
Author: jcatena Date: Sun Feb 7 11:47:13 2010 New Revision: 45482 URL:
http://svn.reactos.org/svn/reactos?rev=45482&view=rev
Log: [ntos] msvc wip Modified: branches/jcatena-branch/drivers/base/kddll/kdcom.vcproj branches/jcatena-branch/hal/halx86/include/halp.h branches/jcatena-branch/ntoskrnl/ex/init.c branches/jcatena-branch/ntoskrnl/ke/i386/cpu.c branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c branches/jcatena-branch/ntoskrnl/ntoskrnl.sln branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj branches/jcatena-branch/ntoskrnl/ntoskrnl.vsprops branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h branches/jcatena-branch/ntoskrnl/trap/trap.c Modified: branches/jcatena-branch/drivers/base/kddll/kdcom.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/drivers/base/kdd…
============================================================================== --- branches/jcatena-branch/drivers/base/kddll/kdcom.vcproj [iso-8859-1] (original) +++ branches/jcatena-branch/drivers/base/kddll/kdcom.vcproj [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -131,6 +131,7 @@ AdditionalDependencies="ntoskrnl.lib hal.lib" ModuleDefinitionFile="kdcom.def" GenerateDebugInformation="true" + SubSystem="0" OptimizeReferences="2" EnableCOMDATFolding="2" ResourceOnlyDLL="true" Modified: branches/jcatena-branch/hal/halx86/include/halp.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/hal/halx86/inclu…
============================================================================== --- branches/jcatena-branch/hal/halx86/include/halp.h [iso-8859-1] (original) +++ branches/jcatena-branch/hal/halx86/include/halp.h [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -29,10 +29,8 @@ ); typedef -FASTCALL -VOID -DECLSPEC_NORETURN -(*PHAL_SW_INTERRUPT_HANDLER_2ND_ENTRY)( +VOID +(FASTCALL *PHAL_SW_INTERRUPT_HANDLER_2ND_ENTRY)( IN PKTRAP_FRAME TrapFrame ); Modified: branches/jcatena-branch/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ex/init…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ex/init.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ex/init.c [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -1298,10 +1298,14 @@ /* Set us at maximum priority */ KeSetPriorityThread(KeGetCurrentThread(), HIGH_PRIORITY); + DPRINTT("HalInitSystem\n"); + _ASM int 3 + /* Do Phase 1 HAL Initialization */ - DPRINTT("HalInitSystem\n"); if (!HalInitSystem(1, LoaderBlock)) KeBugCheck(HAL1_INITIALIZATION_FAILED); + + _ASM int 3 DPRINTT("HalInitSystem r\n"); Modified: branches/jcatena-branch/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/cpu.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/cpu.c [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -931,6 +931,7 @@ // Restore GDT and IDT // Ke386SetGlobalDescriptorTable(&ProcessorState->SpecialRegisters.Gdtr.Limit); + __lidt(&ProcessorState->SpecialRegisters.Idtr.Limit); // Modified: branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -33,6 +33,7 @@ UCHAR Type; UCHAR Entry; + DPRINTT("\n"); /* Check if this is a primary or 2nd-level dispatch */ Type = HalSystemVectorDispatchEntry(Vector, &Dispatch->FlatDispatch, @@ -151,6 +152,7 @@ VOID KiUnexpectedInterrupt(VOID) { + DPRINTT("\n"); /* Crash the machine */ KeBugCheck(TRAP_CAUSE_UNKNOWN); } @@ -173,7 +175,7 @@ if (HalBeginSystemInterrupt(HIGH_LEVEL, Interrupt->Vector, &OldIrql)) { /* Warn user */ - DPRINT1("\n\x7\x7!!! Unexpected Interrupt %02lx !!!\n"); + DPRINT1("!!! Unexpected Interrupt %02lx !!!\n"); /* Now call the epilogue code */ KiExitInterrupt(TrapFrame, OldIrql, FALSE); @@ -210,7 +212,7 @@ if (HalBeginSystemInterrupt(HIGH_LEVEL, Interrupt->Vector, &OldIrql)) { /* Warn user */ - DPRINT1("\n\x7\x7!!! Unexpected Interrupt %02lx !!!\n"); + DPRINT1("!!! Unexpected Interrupt %x !!!\n", Interrupt->Vector); /* Now call the epilogue code */ KiExitInterrupt(TrapFrame, OldIrql, FALSE); @@ -372,7 +374,9 @@ { PULONG DispatchCode = &Interrupt->DispatchCode[0]; - /* Set the Interrupt Header */ + DPRINTT("\n"); + + /* Set the Interrupt Header */ Interrupt->Type = InterruptObject; Interrupt->Size = sizeof(KINTERRUPT); Modified: branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -1658,16 +1658,14 @@ KiTrap(KiFastCallEntry, KI_FAST_SYSTEM_CALL); #endif -/* - * @implemented - */ -VOID -NTAPI -Kei386EoiHelper(VOID) -{ +#if 0 // see idt.s +VOID NTAPI _NAKED Kei386EoiHelper(VOID) +{ + /* We should never see this call happening */ DPRINT1("Mismatched NT/HAL version"); while (TRUE); } +#endif /* EOF */ Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.sln URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ntoskrnl.sln [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ntoskrnl.sln [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -68,100 +68,199 @@ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "trap", "trap\trap.vcproj", "{E2A7291E-515F-4BAD-8E82-F77AA0815B47}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "halx86", "..\hal\halx86\halx86.vcproj", "{BE9CFC62-1DA2-49B4-AC03-10B1CC754741}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution d|Win32 = d|Win32 + Debug|Win32 = Debug|Win32 r|Win32 = r|Win32 + Release|Win32 = Release|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {E432D40C-7443-4449-9182-8932E0AEAE99}.d|Win32.ActiveCfg = d|Win32 {E432D40C-7443-4449-9182-8932E0AEAE99}.d|Win32.Build.0 = d|Win32 + {E432D40C-7443-4449-9182-8932E0AEAE99}.Debug|Win32.ActiveCfg = d|Win32 + {E432D40C-7443-4449-9182-8932E0AEAE99}.Debug|Win32.Build.0 = d|Win32 {E432D40C-7443-4449-9182-8932E0AEAE99}.r|Win32.ActiveCfg = r|Win32 {E432D40C-7443-4449-9182-8932E0AEAE99}.r|Win32.Build.0 = r|Win32 + {E432D40C-7443-4449-9182-8932E0AEAE99}.Release|Win32.ActiveCfg = r|Win32 + {E432D40C-7443-4449-9182-8932E0AEAE99}.Release|Win32.Build.0 = r|Win32 {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.d|Win32.ActiveCfg = d|Win32 {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.d|Win32.Build.0 = d|Win32 + {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.Debug|Win32.ActiveCfg = d|Win32 + {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.Debug|Win32.Build.0 = d|Win32 {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.r|Win32.ActiveCfg = r|Win32 {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.r|Win32.Build.0 = r|Win32 + {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.Release|Win32.ActiveCfg = r|Win32 + {A4D48188-969A-48AD-A7A8-9A0985EE7A7B}.Release|Win32.Build.0 = r|Win32 {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.d|Win32.ActiveCfg = d|Win32 {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.d|Win32.Build.0 = d|Win32 + {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.Debug|Win32.ActiveCfg = d|Win32 + {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.Debug|Win32.Build.0 = d|Win32 {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.r|Win32.ActiveCfg = r|Win32 {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.r|Win32.Build.0 = r|Win32 + {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.Release|Win32.ActiveCfg = r|Win32 + {32B0B2D6-5612-40E8-90F5-FB5CB4D76C6E}.Release|Win32.Build.0 = r|Win32 {590171C3-2DD0-4790-9BB7-A3601BD548A1}.d|Win32.ActiveCfg = d|Win32 {590171C3-2DD0-4790-9BB7-A3601BD548A1}.d|Win32.Build.0 = d|Win32 + {590171C3-2DD0-4790-9BB7-A3601BD548A1}.Debug|Win32.ActiveCfg = d|Win32 + {590171C3-2DD0-4790-9BB7-A3601BD548A1}.Debug|Win32.Build.0 = d|Win32 {590171C3-2DD0-4790-9BB7-A3601BD548A1}.r|Win32.ActiveCfg = r|Win32 {590171C3-2DD0-4790-9BB7-A3601BD548A1}.r|Win32.Build.0 = r|Win32 + {590171C3-2DD0-4790-9BB7-A3601BD548A1}.Release|Win32.ActiveCfg = r|Win32 + {590171C3-2DD0-4790-9BB7-A3601BD548A1}.Release|Win32.Build.0 = r|Win32 {33A96973-0632-4142-A411-36B937663234}.d|Win32.ActiveCfg = d|Win32 {33A96973-0632-4142-A411-36B937663234}.d|Win32.Build.0 = d|Win32 + {33A96973-0632-4142-A411-36B937663234}.Debug|Win32.ActiveCfg = d|Win32 + {33A96973-0632-4142-A411-36B937663234}.Debug|Win32.Build.0 = d|Win32 {33A96973-0632-4142-A411-36B937663234}.r|Win32.ActiveCfg = r|Win32 {33A96973-0632-4142-A411-36B937663234}.r|Win32.Build.0 = r|Win32 + {33A96973-0632-4142-A411-36B937663234}.Release|Win32.ActiveCfg = r|Win32 + {33A96973-0632-4142-A411-36B937663234}.Release|Win32.Build.0 = r|Win32 {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.d|Win32.ActiveCfg = d|Win32 {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.d|Win32.Build.0 = d|Win32 + {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.Debug|Win32.ActiveCfg = d|Win32 + {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.Debug|Win32.Build.0 = d|Win32 {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.r|Win32.ActiveCfg = r|Win32 {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.r|Win32.Build.0 = r|Win32 + {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.Release|Win32.ActiveCfg = r|Win32 + {93A5CAA3-5B14-41C4-961A-1D1A93FD9818}.Release|Win32.Build.0 = r|Win32 {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.d|Win32.ActiveCfg = d|Win32 {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.d|Win32.Build.0 = d|Win32 + {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.Debug|Win32.ActiveCfg = d|Win32 + {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.Debug|Win32.Build.0 = d|Win32 {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.r|Win32.ActiveCfg = r|Win32 {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.r|Win32.Build.0 = r|Win32 + {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.Release|Win32.ActiveCfg = r|Win32 + {A4C0117F-DBB0-4631-A408-D6E4D964E07C}.Release|Win32.Build.0 = r|Win32 {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.d|Win32.ActiveCfg = d|Win32 {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.d|Win32.Build.0 = d|Win32 + {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.Debug|Win32.ActiveCfg = d|Win32 + {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.Debug|Win32.Build.0 = d|Win32 {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.r|Win32.ActiveCfg = r|Win32 {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.r|Win32.Build.0 = r|Win32 + {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.Release|Win32.ActiveCfg = r|Win32 + {8035D0FD-0157-4F0D-845B-DE9CCB48490D}.Release|Win32.Build.0 = r|Win32 {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.d|Win32.ActiveCfg = d|Win32 {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.d|Win32.Build.0 = d|Win32 + {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.Debug|Win32.ActiveCfg = d|Win32 + {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.Debug|Win32.Build.0 = d|Win32 {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.r|Win32.ActiveCfg = r|Win32 {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.r|Win32.Build.0 = r|Win32 + {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.Release|Win32.ActiveCfg = r|Win32 + {7CCF80F4-FCA6-4ED7-8C52-E92B7A1B7116}.Release|Win32.Build.0 = r|Win32 {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.d|Win32.ActiveCfg = d|Win32 {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.d|Win32.Build.0 = d|Win32 + {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.Debug|Win32.ActiveCfg = d|Win32 + {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.Debug|Win32.Build.0 = d|Win32 {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.r|Win32.ActiveCfg = r|Win32 {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.r|Win32.Build.0 = r|Win32 + {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.Release|Win32.ActiveCfg = r|Win32 + {D4F03490-B3A7-4389-AB68-1DF9EF82D51F}.Release|Win32.Build.0 = r|Win32 {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.d|Win32.ActiveCfg = d|Win32 {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.d|Win32.Build.0 = d|Win32 + {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.Debug|Win32.ActiveCfg = d|Win32 + {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.Debug|Win32.Build.0 = d|Win32 {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.r|Win32.ActiveCfg = r|Win32 {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.r|Win32.Build.0 = r|Win32 + {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.Release|Win32.ActiveCfg = r|Win32 + {E3324A8B-EE25-43F7-9895-44E3A8083EA3}.Release|Win32.Build.0 = r|Win32 {17C7F7C1-6315-4856-9375-39F0B329FA09}.d|Win32.ActiveCfg = d|Win32 {17C7F7C1-6315-4856-9375-39F0B329FA09}.d|Win32.Build.0 = d|Win32 + {17C7F7C1-6315-4856-9375-39F0B329FA09}.Debug|Win32.ActiveCfg = d|Win32 + {17C7F7C1-6315-4856-9375-39F0B329FA09}.Debug|Win32.Build.0 = d|Win32 {17C7F7C1-6315-4856-9375-39F0B329FA09}.r|Win32.ActiveCfg = r|Win32 {17C7F7C1-6315-4856-9375-39F0B329FA09}.r|Win32.Build.0 = r|Win32 + {17C7F7C1-6315-4856-9375-39F0B329FA09}.Release|Win32.ActiveCfg = r|Win32 + {17C7F7C1-6315-4856-9375-39F0B329FA09}.Release|Win32.Build.0 = r|Win32 {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.d|Win32.ActiveCfg = d|Win32 {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.d|Win32.Build.0 = d|Win32 + {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.Debug|Win32.ActiveCfg = d|Win32 + {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.Debug|Win32.Build.0 = d|Win32 {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.r|Win32.ActiveCfg = r|Win32 {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.r|Win32.Build.0 = r|Win32 + {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.Release|Win32.ActiveCfg = r|Win32 + {F61DDEF4-A045-4AFD-AA0A-FAF6F6F97A21}.Release|Win32.Build.0 = r|Win32 {431D55CC-8FCA-4298-919C-F3214EFDDA60}.d|Win32.ActiveCfg = d|Win32 {431D55CC-8FCA-4298-919C-F3214EFDDA60}.d|Win32.Build.0 = d|Win32 + {431D55CC-8FCA-4298-919C-F3214EFDDA60}.Debug|Win32.ActiveCfg = d|Win32 + {431D55CC-8FCA-4298-919C-F3214EFDDA60}.Debug|Win32.Build.0 = d|Win32 {431D55CC-8FCA-4298-919C-F3214EFDDA60}.r|Win32.ActiveCfg = r|Win32 {431D55CC-8FCA-4298-919C-F3214EFDDA60}.r|Win32.Build.0 = r|Win32 + {431D55CC-8FCA-4298-919C-F3214EFDDA60}.Release|Win32.ActiveCfg = r|Win32 + {431D55CC-8FCA-4298-919C-F3214EFDDA60}.Release|Win32.Build.0 = r|Win32 {45C60178-D657-45EC-9A99-EEE39C9845BF}.d|Win32.ActiveCfg = d|Win32 {45C60178-D657-45EC-9A99-EEE39C9845BF}.d|Win32.Build.0 = d|Win32 + {45C60178-D657-45EC-9A99-EEE39C9845BF}.Debug|Win32.ActiveCfg = d|Win32 + {45C60178-D657-45EC-9A99-EEE39C9845BF}.Debug|Win32.Build.0 = d|Win32 {45C60178-D657-45EC-9A99-EEE39C9845BF}.r|Win32.ActiveCfg = r|Win32 {45C60178-D657-45EC-9A99-EEE39C9845BF}.r|Win32.Build.0 = r|Win32 + {45C60178-D657-45EC-9A99-EEE39C9845BF}.Release|Win32.ActiveCfg = r|Win32 + {45C60178-D657-45EC-9A99-EEE39C9845BF}.Release|Win32.Build.0 = r|Win32 {45E70482-84C8-4846-A1BF-3C7A1BC94335}.d|Win32.ActiveCfg = d|Win32 {45E70482-84C8-4846-A1BF-3C7A1BC94335}.d|Win32.Build.0 = d|Win32 + {45E70482-84C8-4846-A1BF-3C7A1BC94335}.Debug|Win32.ActiveCfg = d|Win32 + {45E70482-84C8-4846-A1BF-3C7A1BC94335}.Debug|Win32.Build.0 = d|Win32 {45E70482-84C8-4846-A1BF-3C7A1BC94335}.r|Win32.ActiveCfg = r|Win32 {45E70482-84C8-4846-A1BF-3C7A1BC94335}.r|Win32.Build.0 = r|Win32 + {45E70482-84C8-4846-A1BF-3C7A1BC94335}.Release|Win32.ActiveCfg = r|Win32 + {45E70482-84C8-4846-A1BF-3C7A1BC94335}.Release|Win32.Build.0 = r|Win32 {33EB04DB-6651-4F5C-9035-807FF1E38842}.d|Win32.ActiveCfg = d|Win32 {33EB04DB-6651-4F5C-9035-807FF1E38842}.d|Win32.Build.0 = d|Win32 + {33EB04DB-6651-4F5C-9035-807FF1E38842}.Debug|Win32.ActiveCfg = d|Win32 + {33EB04DB-6651-4F5C-9035-807FF1E38842}.Debug|Win32.Build.0 = d|Win32 {33EB04DB-6651-4F5C-9035-807FF1E38842}.r|Win32.ActiveCfg = r|Win32 {33EB04DB-6651-4F5C-9035-807FF1E38842}.r|Win32.Build.0 = r|Win32 + {33EB04DB-6651-4F5C-9035-807FF1E38842}.Release|Win32.ActiveCfg = r|Win32 + {33EB04DB-6651-4F5C-9035-807FF1E38842}.Release|Win32.Build.0 = r|Win32 {AEADDBC1-092C-4180-8D34-12CA97CFB497}.d|Win32.ActiveCfg = d|Win32 {AEADDBC1-092C-4180-8D34-12CA97CFB497}.d|Win32.Build.0 = d|Win32 + {AEADDBC1-092C-4180-8D34-12CA97CFB497}.Debug|Win32.ActiveCfg = d|Win32 + {AEADDBC1-092C-4180-8D34-12CA97CFB497}.Debug|Win32.Build.0 = d|Win32 {AEADDBC1-092C-4180-8D34-12CA97CFB497}.r|Win32.ActiveCfg = r|Win32 {AEADDBC1-092C-4180-8D34-12CA97CFB497}.r|Win32.Build.0 = r|Win32 + {AEADDBC1-092C-4180-8D34-12CA97CFB497}.Release|Win32.ActiveCfg = r|Win32 + {AEADDBC1-092C-4180-8D34-12CA97CFB497}.Release|Win32.Build.0 = r|Win32 {53C05779-2821-431C-93CC-CDFE6942DE3C}.d|Win32.ActiveCfg = d|Win32 {53C05779-2821-431C-93CC-CDFE6942DE3C}.d|Win32.Build.0 = d|Win32 + {53C05779-2821-431C-93CC-CDFE6942DE3C}.Debug|Win32.ActiveCfg = d|Win32 + {53C05779-2821-431C-93CC-CDFE6942DE3C}.Debug|Win32.Build.0 = d|Win32 {53C05779-2821-431C-93CC-CDFE6942DE3C}.r|Win32.ActiveCfg = r|Win32 {53C05779-2821-431C-93CC-CDFE6942DE3C}.r|Win32.Build.0 = r|Win32 + {53C05779-2821-431C-93CC-CDFE6942DE3C}.Release|Win32.ActiveCfg = r|Win32 + {53C05779-2821-431C-93CC-CDFE6942DE3C}.Release|Win32.Build.0 = r|Win32 {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.d|Win32.ActiveCfg = d|Win32 {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.d|Win32.Build.0 = d|Win32 + {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.Debug|Win32.ActiveCfg = d|Win32 + {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.Debug|Win32.Build.0 = d|Win32 {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.r|Win32.ActiveCfg = r|Win32 {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.r|Win32.Build.0 = r|Win32 + {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.Release|Win32.ActiveCfg = r|Win32 + {3D9AC5B7-C29C-46F5-B3D8-C4388F37DB5C}.Release|Win32.Build.0 = r|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.d|Win32.ActiveCfg = d|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.d|Win32.Build.0 = d|Win32 + {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Debug|Win32.ActiveCfg = d|Win32 + {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Debug|Win32.Build.0 = d|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.r|Win32.ActiveCfg = r|Win32 {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.r|Win32.Build.0 = r|Win32 + {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Release|Win32.ActiveCfg = r|Win32 + {97021AF5-ED87-4AA8-B116-2D53E5D6D528}.Release|Win32.Build.0 = r|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.d|Win32.ActiveCfg = d|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.d|Win32.Build.0 = d|Win32 + {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Debug|Win32.ActiveCfg = d|Win32 + {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Debug|Win32.Build.0 = d|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.r|Win32.ActiveCfg = r|Win32 {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.r|Win32.Build.0 = r|Win32 + {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Release|Win32.ActiveCfg = r|Win32 + {E2A7291E-515F-4BAD-8E82-F77AA0815B47}.Release|Win32.Build.0 = r|Win32 + {BE9CFC62-1DA2-49B4-AC03-10B1CC754741}.d|Win32.ActiveCfg = Debug|Win32 + {BE9CFC62-1DA2-49B4-AC03-10B1CC754741}.Debug|Win32.ActiveCfg = Debug|Win32 + {BE9CFC62-1DA2-49B4-AC03-10B1CC754741}.Debug|Win32.Build.0 = Debug|Win32 + {BE9CFC62-1DA2-49B4-AC03-10B1CC754741}.r|Win32.ActiveCfg = Release|Win32 + {BE9CFC62-1DA2-49B4-AC03-10B1CC754741}.r|Win32.Build.0 = Release|Win32 + {BE9CFC62-1DA2-49B4-AC03-10B1CC754741}.Release|Win32.ActiveCfg = Release|Win32 + {BE9CFC62-1DA2-49B4-AC03-10B1CC754741}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -70,6 +70,7 @@ ModuleDefinitionFile="ntoskrnl.def" GenerateMapFile="true" MapFileName="$(IntDir)\_ntoskrnl.map" + SubSystem="0" EntryPointSymbol="KiSystemStartup" BaseAddress="0x80800000" /> @@ -146,6 +147,7 @@ ModuleDefinitionFile="ntoskrnl.def" GenerateMapFile="true" MapFileName="$(IntDir)\_ntoskrnl.map" + SubSystem="0" LinkTimeCodeGeneration="1" EntryPointSymbol="KiSystemStartup" BaseAddress="0x80800000" Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.vsprops URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
============================================================================== --- branches/jcatena-branch/ntoskrnl/ntoskrnl.vsprops [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/ntoskrnl.vsprops [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -20,7 +20,7 @@ OmitFramePointers="false" EnableFiberSafeOptimizations="false" WholeProgramOptimization="false" - AdditionalIncludeDirectories=".;.\include;"$(inc)\reactos\msc\i386";"$(inc)\reactos\msc";"$(inc)\reactos\i386";"$(inc)\reactos";"$(s)\ntoskrnl\$(trapx)\i386";"$(s)\ntoskrnl\$(trapx)";"$(s)\ntoskrnl\include";"$(s)\ntoskrnl\include\internal\i386";"$(s)\ntoskrnl\include\internal";"$(objrbe)\ntoskrnl\include";"$(s)\lib\rtl";"$(objrbe)\include\psdk";"$(inc)\psdk";"$(inc)\ddk";"$(inc)\\i386";"$(inc)\ndk";"$(inc)\ndk\i386";"$(inc)\crt\msc";"$(inc)\crt";"$(objrbe)\include";"$(inc)\reactos\drivers";"$(inc)\reactos\libs";"$(inc)";"$(s)\lib\cmlib"" + AdditionalIncludeDirectories=".;.\include;"$(inc)\reactos\msc\i386";"$(inc)\reactos\msc";"$(inc)\reactos\i386";"$(inc)\reactos";"$(s)\ntoskrnl\$(trapx)\i386";"$(s)\ntoskrnl\$(trapx)";"$(s)\ntoskrnl\include";"$(s)\ntoskrnl\include\internal\i386";"$(s)\ntoskrnl\include\internal";"$(objrbe)\ntoskrnl\include";"$(s)\lib\rtl";"$(objrbe)\include\psdk";"$(inc)\psdk";"$(inc)\ddk";"$(inc)\\i386";"$(inc)\ndk";"$(inc)\ndk\i386";"$(inc)\crt\msc";"$(inc)\crt";"$(objrbe)\include";"$(objrbe)\include\reactos";"$(inc)\reactos\drivers";"$(inc)\reactos\libs";"$(inc)";"$(s)\lib\cmlib"" IgnoreStandardIncludePath="true" StringPooling="true" ExceptionHandling="1" Modified: branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/i3…
============================================================================== --- branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -34,7 +34,6 @@ sub esp, dword ptr offset KTRAP_FRAME.V86Es #elif (TRAP_STUB_FLAGS & TRAPF_INTERRUPT) // the primary stub (trap_m.h) pushes a pointer to KINTERRUPT - int 3 sub esp, offset KTRAP_FRAME.ErrCode #elif (TRAP_STUB_FLAGS & TRAPF_ERRORCODE) sub esp, offset KTRAP_FRAME.ErrCode @@ -46,32 +45,40 @@ #endif // save volatiles + mov KTRAP_FRAME.Edx[esp], edx + mov KTRAP_FRAME.Ecx[esp], ecx mov KTRAP_FRAME.Eax[esp], eax - mov KTRAP_FRAME.Ecx[esp], ecx - mov KTRAP_FRAME.Edx[esp], edx -// !!! while testing we always save novol too + // !!! only for testing we are always saving novol // #if (TRAP_STUB_FLAGS & TRAPF_SAVENOVOL) + mov KTRAP_FRAME.Edi[esp], edi + mov KTRAP_FRAME.Esi[esp], esi + mov KTRAP_FRAME.Ebx[esp], ebx mov KTRAP_FRAME.Ebp[esp], ebp - mov KTRAP_FRAME.Ebx[esp], ebx - mov KTRAP_FRAME.Esi[esp], esi - mov KTRAP_FRAME.Edi[esp], edi // #endif // save & load segs #if !(TRAP_STUB_FLAGS & TRAPF_NOSAVESEG) - mov KTRAP_FRAME.SegDs[esp], ds - mov KTRAP_FRAME.SegEs[esp], es #if !(TRAP_STUB_FLAGS & TRAPF_NOLOADDS) mov ax, TRAP_STUB_DS +#endif +#if (TRAP_STUB_FLAGS & TRAPF_LOADFS) + mov dx, TRAP_STUB_FS +#endif + // gs most probably does not need save/restore, + // but we're playing safe for now + mov KTRAP_FRAME.SegGs[esp], gs + mov KTRAP_FRAME.SegEs[esp], es + mov KTRAP_FRAME.SegDs[esp], ds + +#if !(TRAP_STUB_FLAGS & TRAPF_NOLOADDS) + mov es, ax mov ds, ax - mov es, ax #endif #if !(TRAP_STUB_FLAGS & TRAPF_NOSAVEFS) mov KTRAP_FRAME.SegFs[esp], fs #if (TRAP_STUB_FLAGS & TRAPF_LOADFS) - mov ax, TRAP_STUB_FS - mov fs, ax + mov fs, dx #endif #endif // #if !(TRAP_STUB_FLAGS & TRAPF_NOSAVEFS) #endif // #if !(TRAP_STUB_FLAGS & TRAPF_NOSAVESEG) @@ -89,19 +96,20 @@ // restore seg regs #if !(TRAP_STUB_FLAGS & TRAPF_NOSAVESEG) + mov es, KTRAP_FRAME.SegGs[esp] + mov es, KTRAP_FRAME.SegEs[esp] mov ds, KTRAP_FRAME.SegDs[esp] - mov es, KTRAP_FRAME.SegEs[esp] #if !(TRAP_STUB_FLAGS & TRAPF_NOSAVEFS) mov fs, KTRAP_FRAME.SegFs[esp] #endif #endif - // !!! while testing we always save novol too +// !!! only for testing we're always saving novol // #if (TRAP_STUB_FLAGS & TRAPF_SAVENOVOL) + mov edi, KTRAP_FRAME.Edi[esp] + mov esi, KTRAP_FRAME.Esi[esp] + mov ebx, KTRAP_FRAME.Ebx[esp] mov ebp, KTRAP_FRAME.Ebp[esp] - mov ebx, KTRAP_FRAME.Ebx[esp] - mov esi, KTRAP_FRAME.Esi[esp] - mov edi, KTRAP_FRAME.Edi[esp] // #endif // restore volatile regs and return @@ -113,10 +121,10 @@ sti CpuSysExit #else + mov edx, KTRAP_FRAME.Edx[esp] + mov ecx, KTRAP_FRAME.Ecx[esp] mov eax, KTRAP_FRAME.Eax[esp] - mov ecx, KTRAP_FRAME.Ecx[esp] - mov edx, KTRAP_FRAME.Edx[esp] - add esp, KTRAP_FRAME_EIP + add esp, offset KTRAP_FRAME.Eip iretd #endif Modified: branches/jcatena-branch/ntoskrnl/trap/trap.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/tr…
============================================================================== --- branches/jcatena-branch/ntoskrnl/trap/trap.c [iso-8859-1] (original) +++ branches/jcatena-branch/ntoskrnl/trap/trap.c [iso-8859-1] Sun Feb 7 11:47:13 2010 @@ -140,12 +140,18 @@ void *kk = KiTrap00; -VOID _FASTCALL KiInterruptHandler(KTRAP_FRAME *TrapFrame, PKINTERRUPT Interrupt) +VOID FASTCALL KiInterruptHandler(KTRAP_FRAME *TrapFrame, PKINTERRUPT Interrupt) { DPRINTT("\n"); - _ASM int 3 + // _ASM int 3 KiInterruptTemplateHandler(TrapFrame, Interrupt); // KiTrapReturn(TrapFrame); +} + +VOID FASTCALL Kii386EoiHelper(KTRAP_FRAME *TrapFrame) +{ + DPRINT1("!!! This should not be used\n"); + KiEoiHelper(TrapFrame); } VOID _CDECL KiTrapInit(VOID)
14 years, 10 months
1
0
0
0
← Newer
1
...
22
23
24
25
26
27
28
...
37
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
Results per page:
10
25
50
100
200