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 2014
----- 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
17 participants
464 discussions
Start a n
N
ew thread
[hbelusca] 62332: [NTVDM] - Add utility functions for loading ROM images from files, and running them. - Add a missing PVOID in the MEM_ALIGN_DOWN macro.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Feb 26 01:07:09 2014 New Revision: 62332 URL:
http://svn.reactos.org/svn/reactos?rev=62332&view=rev
Log: [NTVDM] - Add utility functions for loading ROM images from files, and running them. - Add a missing PVOID in the MEM_ALIGN_DOWN macro. Added: branches/ntvdm/subsystems/ntvdm/bios/rom.c (with props) branches/ntvdm/subsystems/ntvdm/bios/rom.h (with props) Modified: branches/ntvdm/subsystems/ntvdm/CMakeLists.txt branches/ntvdm/subsystems/ntvdm/emulator.c branches/ntvdm/subsystems/ntvdm/emulator.h Modified: branches/ntvdm/subsystems/ntvdm/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/CMakeLis…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/CMakeLists.txt [iso-8859-1] Wed Feb 26 01:07:09 2014 @@ -10,6 +10,7 @@ bios/bios32/kbdbios32.c bios/bios32/vidbios32.c bios/bios.c + bios/rom.c hardware/cmos.c hardware/pic.c hardware/ps2.c Added: branches/ntvdm/subsystems/ntvdm/bios/rom.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios/rom…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/bios/rom.c (added) +++ branches/ntvdm/subsystems/ntvdm/bios/rom.c [iso-8859-1] Wed Feb 26 01:07:09 2014 @@ -0,0 +1,237 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Virtual DOS Machine + * FILE: rom.c + * PURPOSE: ROM Support Functions + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr) + */ + +/* INCLUDES *******************************************************************/ + +#define NDEBUG + +#include "emulator.h" +#include "callback.h" + +#include "rom.h" + +/* PRIVATE FUNCTIONS **********************************************************/ + +static HANDLE +OpenRomFile(IN LPCWSTR RomFileName, + OUT PDWORD RomSize OPTIONAL) +{ + HANDLE hRomFile; + DWORD dwRomSize; + + /* Open the ROM image file */ + SetLastError(0); // For debugging purposes + hRomFile = CreateFileW(RomFileName, + GENERIC_READ, + FILE_SHARE_READ, + NULL, + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, + NULL); + DPRINT1("ROM opening %s ; GetLastError() = %u\n", hRomFile != INVALID_HANDLE_VALUE ? "succeeded" : "failed", GetLastError()); + + /* We failed, bail out */ + if (hRomFile == INVALID_HANDLE_VALUE) return NULL; + + /* OK, we have a handle to the ROM image file */ + + /* + * Retrieve the size of the file. + * + * The size of the ROM image file is at most 256kB. For instance, + * the SeaBIOS image, which includes also expansion ROMs inside it, + * covers the range C000:0000 to F000:FFFF . + * + * We therefore can use GetFileSize. + */ + dwRomSize = GetFileSize(hRomFile, NULL); + if ( (dwRomSize == INVALID_FILE_SIZE && GetLastError() != ERROR_SUCCESS) || + (dwRomSize > 0x40000) ) + { + /* We failed, bail out */ + DPRINT1("Error when retrieving ROM size, or size too large (%d)\n", dwRomSize); + + /* Close the ROM image file */ + CloseHandle(hRomFile); + + return NULL; + } + + /* Success, return file handle and size if needed */ + if (RomSize) *RomSize = dwRomSize; + return hRomFile; +} + +static BOOL +LoadRomFileByHandle(IN HANDLE RomFileHandle, + IN PVOID RomLocation, + IN ULONG RomSize) +{ + /* + * The size of the ROM image file is at most 256kB. For instance, + * the SeaBIOS image, which includes also expansion ROMs inside it, + * covers the range C000:0000 to F000:FFFF . + */ + if (RomSize > 0x40000) + { + DPRINT1("Wrong ROM image size 0x%lx, expected at most 0x40000 (256kB)", RomSize); + return FALSE; + } + + /* Attempt to load the ROM image file into memory */ + SetLastError(0); // For debugging purposes + return ReadFile(RomFileHandle, + REAL_TO_PHYS(RomLocation), + RomSize, + &RomSize, + NULL); +} + +static UCHAR +ComputeChecksum(IN ULONG RomLocation, + IN ULONG RomSize) +{ + ULONG RomLastAddress = RomLocation + RomSize; + UCHAR Sum = 0x00; // Using a UCHAR guarantees that we wrap at 0xFF i.e. we do a sum modulo 0x100. + + while (RomLocation < RomLastAddress) + { + Sum += *(PUCHAR)REAL_TO_PHYS(RomLocation); + ++RomLocation; + } + + return Sum; +} + +static VOID +InitRomRange(IN PCALLBACK16 Context, + IN ULONG Start, + IN ULONG End, + IN ULONG Increment) +{ + ULONG Address, AddressBoot; + ULONG RomSize; + UCHAR Checksum; + + for (Address = Start; Address < End; Address += Increment) + { + /* Does the ROM have a valid signature? */ + if (*(PUSHORT)REAL_TO_PHYS(Address) == OPTION_ROM_SIGNATURE) + { + /* Check the control sum of the ROM */ + + /* + * If this is an adapter ROM (Start: C8000, End: E0000), its + * reported size is stored in byte 2 of the ROM. + * + * If this is an expansion ROM (Start: E0000, End: F0000), + * its real length is 64kB. + */ + RomSize = *(PUCHAR)REAL_TO_PHYS(Address + 2) * 512; + if (Address >= 0xE0000) RomSize = 0x10000; + + Checksum = ComputeChecksum(Address, RomSize); + if (Checksum == 0x00) + { + AddressBoot = Address + 3; + DPRINT1("Going to run @ address 0x%p\n", AddressBoot); + + AddressBoot = MAKELONG((AddressBoot & 0xFFFF), (AddressBoot & 0xF0000) >> 4); + // setDS((Address & 0xF0000) >> 4); + setDS((Address & 0xFF000) >> 4); + RunCallback16(Context, AddressBoot); + // Call16((AddressBoot & 0xF0000) >> 4, (AddressBoot & 0xFFFF)); + + DPRINT1("Rom @ address 0x%p initialized\n", Address); + } + else + { + DPRINT1("Rom @ address 0x%p has invalid checksum of 0x%02x\n", Address, Checksum); + } + } + } +} + +/* PUBLIC FUNCTIONS ***********************************************************/ + +BOOLEAN LoadBios(IN LPCWSTR BiosFileName, + OUT PVOID* BiosLocation OPTIONAL, + OUT PDWORD BiosSize OPTIONAL) +{ + BOOL Success; + HANDLE hBiosFile; + DWORD dwBiosSize = 0; + PVOID pBiosLocation; + + /* Open the BIOS image file */ + hBiosFile = OpenRomFile(BiosFileName, &dwBiosSize); + + /* If we failed, bail out */ + if (hBiosFile == NULL) return FALSE; + + /* BIOS location needs to be aligned on 32-bit boundary */ + // (PVOID)((ULONG_PTR)BaseAddress + ROM_AREA_END + 1 - dwBiosSize) + pBiosLocation = MEM_ALIGN_DOWN(TO_LINEAR(0xF000, 0xFFFF) + 1 - dwBiosSize, sizeof(ULONG)); + + /* Attempt to load the BIOS image file into memory */ + Success = LoadRomFileByHandle(hBiosFile, pBiosLocation, dwBiosSize); + DPRINT1("BIOS loading %s ; GetLastError() = %u\n", Success ? "succeeded" : "failed", GetLastError()); + + /* Close the BIOS image file */ + CloseHandle(hBiosFile); + + /* In case of success, return BIOS location and size if needed */ + if (Success) + { + if (BiosLocation) *BiosLocation = pBiosLocation; + if (BiosSize) *BiosSize = dwBiosSize; + } + + return (BOOLEAN)Success; +} + +BOOLEAN LoadRom(IN LPCWSTR RomFileName, + IN PVOID RomLocation, + OUT PDWORD RomSize OPTIONAL) +{ + BOOL Success; + HANDLE hRomFile; + DWORD dwRomSize = 0; + + /* Open the ROM image file */ + hRomFile = OpenRomFile(RomFileName, &dwRomSize); + + /* If we failed, bail out */ + if (hRomFile == NULL) return FALSE; + + /* Attempt to load the ROM image file into memory */ + Success = LoadRomFileByHandle(hRomFile, RomLocation, dwRomSize); + DPRINT1("ROM loading %s ; GetLastError() = %u\n", Success ? "succeeded" : "failed", GetLastError()); + + /* Close the ROM image file and return */ + CloseHandle(hRomFile); + + /* In case of success, return ROM size if needed */ + if (Success) + { + if (RomSize) *RomSize = dwRomSize; + } + + return (BOOLEAN)Success; +} + +VOID SearchAndInitRoms(IN PCALLBACK16 Context) +{ + /* Adapters ROMs -- Start: C8000, End: E0000, 2kB blocks */ + InitRomRange(Context, 0xC8000, 0xE0000, 0x0800); + + /* Expansion ROM -- Start: E0000, End: F0000, 64kB block */ + InitRomRange(Context, 0xE0000, 0xEFFFF, 0x10000); +} + +/* EOF */ Propchange: branches/ntvdm/subsystems/ntvdm/bios/rom.c ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/ntvdm/subsystems/ntvdm/bios/rom.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/bios/rom…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/bios/rom.h (added) +++ branches/ntvdm/subsystems/ntvdm/bios/rom.h [iso-8859-1] Wed Feb 26 01:07:09 2014 @@ -0,0 +1,37 @@ +/* + * COPYRIGHT: GPL - See COPYING in the top level directory + * PROJECT: ReactOS Virtual DOS Machine + * FILE: rom.h + * PURPOSE: ROM Support Functions + * PROGRAMMERS: Hermes Belusca-Maito (hermes.belusca(a)sfr.fr) + */ + +#ifndef _ROM_H_ +#define _ROM_H_ + +/* INCLUDES *******************************************************************/ + +#include "ntvdm.h" + +/* DEFINES ********************************************************************/ + +#define ROM_AREA_START 0xE0000 +#define ROM_AREA_END 0xFFFFF + +#define OPTION_ROM_SIGNATURE 0xAA55 + +/* FUNCTIONS ******************************************************************/ + +BOOLEAN LoadBios(IN LPCWSTR BiosFileName, + OUT PVOID* BiosLocation OPTIONAL, + OUT PDWORD BiosSize OPTIONAL); + +BOOLEAN LoadRom(IN LPCWSTR RomFileName, + IN PVOID RomLocation, + OUT PDWORD RomSize OPTIONAL); + +VOID SearchAndInitRoms(IN PCALLBACK16 Context); + +#endif // _ROM_H_ + +/* EOF */ Propchange: branches/ntvdm/subsystems/ntvdm/bios/rom.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/ntvdm/subsystems/ntvdm/emulator.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/emulator.c [iso-8859-1] Wed Feb 26 01:07:09 2014 @@ -11,9 +11,10 @@ #define NDEBUG #include "emulator.h" +#include "callback.h" #include "clock.h" -#include "bios/bios.h" +#include "bios/rom.h" #include "hardware/cmos.h" #include "hardware/pic.h" #include "hardware/ps2.h" Modified: branches/ntvdm/subsystems/ntvdm/emulator.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/emulator…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/emulator.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/emulator.h [iso-8859-1] Wed Feb 26 01:07:09 2014 @@ -45,7 +45,7 @@ /* Basic Memory Management */ #define MEM_ALIGN_UP(ptr, align) MEM_ALIGN_DOWN((ULONG_PTR)(ptr) + (align) - 1l, (align)) -#define MEM_ALIGN_DOWN(ptr, align) ((ULONG_PTR)(ptr) & ~((align) - 1l)) +#define MEM_ALIGN_DOWN(ptr, align) (PVOID)((ULONG_PTR)(ptr) & ~((align) - 1l)) #define TO_LINEAR(seg, off) (((seg) << 4) + (off)) #define MAX_SEGMENT 0xFFFF
10 years, 10 months
1
0
0
0
[hbelusca] 62331: [NTVDM] - Reduce the size of the trampoline needed to perform 32 ---> 16 bit callbacks. - Fix some comments, improve DPRINTs.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Wed Feb 26 01:03:14 2014 New Revision: 62331 URL:
http://svn.reactos.org/svn/reactos?rev=62331&view=rev
Log: [NTVDM] - Reduce the size of the trampoline needed to perform 32 ---> 16 bit callbacks. - Fix some comments, improve DPRINTs. Modified: branches/ntvdm/subsystems/ntvdm/callback.c branches/ntvdm/subsystems/ntvdm/callback.h Modified: branches/ntvdm/subsystems/ntvdm/callback.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/callback…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/callback.c [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/callback.c [iso-8859-1] Wed Feb 26 01:03:14 2014 @@ -33,9 +33,15 @@ #define BOP(num) LOBYTE(EMULATOR_BOP), HIBYTE(EMULATOR_BOP), (num) -#define UnSimulate16 MAKELONG(EMULATOR_BOP, BOP_UNSIMULATE) // BOP(BOP_UNSIMULATE) - -#define CALL16_TRAMPOLINE_SIZE (2 * sizeof(ULONGLONG)) +#define UnSimulate16(trap) \ +do { \ + *(PUSHORT)(trap) = EMULATOR_BOP; \ + (trap) += sizeof(USHORT); \ + *(trap) = BOP_UNSIMULATE; \ +} while(0) +// #define UnSimulate16 MAKELONG(EMULATOR_BOP, BOP_UNSIMULATE) // BOP(BOP_UNSIMULATE) + +#define CALL16_TRAMPOLINE_SIZE (1 * sizeof(ULONGLONG)) #define INT16_TRAMPOLINE_SIZE (1 * sizeof(ULONGLONG)) /* 16-bit generic interrupt code for calling a 32-bit interrupt handler */ @@ -97,7 +103,7 @@ setCS(Segment); setIP(Offset); - DPRINT("Call16(0x%04X, 0x%04X)\n", Segment, Offset); + DPRINT("Call16(%04X:%04X)\n", Segment, Offset); /* Start CPU simulation */ EmulatorSimulate(); @@ -146,23 +152,21 @@ UCHAR OldTrampoline[CALL16_TRAMPOLINE_SIZE]; /* Save the old trampoline */ - // RtlCopyMemory(OldTrampoline, TrampolineBase, sizeof(OldTrampoline)); ((PULONGLONG)&OldTrampoline)[0] = ((PULONGLONG)TrampolineBase)[0]; - ((PULONGLONG)&OldTrampoline)[1] = ((PULONGLONG)TrampolineBase)[1]; - - /* Build the generic entry-point for 32-bit calls */ + + DPRINT1("RunCallback16(0x%p)\n", FarPtr); + + /* Build the generic entry-point for 16-bit far calls */ *Trampoline++ = 0x9A; // Call far seg:off *(PULONG)Trampoline = FarPtr; Trampoline += sizeof(ULONG); - *(PULONG)Trampoline = UnSimulate16; + UnSimulate16(Trampoline); /* Perform the call */ Call16(HIWORD(Context->TrampolineFarPtr), LOWORD(Context->TrampolineFarPtr)); /* Restore the old trampoline */ - // RtlCopyMemory(TrampolineBase, OldTrampoline, sizeof(OldTrampoline)); - ((PULONGLONG)TrampolineBase)[1] = ((PULONGLONG)&OldTrampoline)[1]; ((PULONGLONG)TrampolineBase)[0] = ((PULONGLONG)&OldTrampoline)[0]; } @@ -228,10 +232,9 @@ DPRINT("Int32Call(0x%X)\n", IntNumber); /* Save the old trampoline */ - // RtlCopyMemory(OldTrampoline, TrampolineBase, sizeof(OldTrampoline)); ((PULONGLONG)&OldTrampoline)[0] = ((PULONGLONG)TrampolineBase)[0]; - /* Build the generic entry-point for 32-bit calls */ + /* Build the generic entry-point for 16-bit calls */ if (IntNumber == 0x03) { /* We are redefining for INT 03h */ @@ -244,14 +247,13 @@ *Trampoline++ = 0xCD; // Call INT XXh *Trampoline++ = IntNumber; } - *(PULONG)Trampoline = UnSimulate16; + UnSimulate16(Trampoline); /* Perform the call */ Call16(HIWORD(Context->TrampolineFarPtr), LOWORD(Context->TrampolineFarPtr)); /* Restore the old trampoline */ - // RtlCopyMemory(TrampolineBase, OldTrampoline, sizeof(OldTrampoline)); ((PULONGLONG)TrampolineBase)[0] = ((PULONGLONG)&OldTrampoline)[0]; } @@ -269,7 +271,7 @@ DPRINT1("Unhandled 32-bit interrupt: 0x%02X, AX = 0x%04X\n", IntNum, getAX()); } -VOID WINAPI ControlBop(LPWORD Stack) +static VOID WINAPI ControlBop(LPWORD Stack) { /* Get the Function Number and skip it */ BYTE FuncNum = *(PBYTE)SEG_OFF_TO_PTR(getCS(), getIP()); Modified: branches/ntvdm/subsystems/ntvdm/callback.h URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/ntvdm/callback…
============================================================================== --- branches/ntvdm/subsystems/ntvdm/callback.h [iso-8859-1] (original) +++ branches/ntvdm/subsystems/ntvdm/callback.h [iso-8859-1] Wed Feb 26 01:03:14 2014 @@ -36,7 +36,26 @@ IN USHORT Segment, IN USHORT Offset); -VOID WINAPI Int32Dispatch(LPWORD Stack); +VOID +Call16(IN USHORT Segment, + IN USHORT Offset); + +ULONG +RegisterCallback16(IN ULONG FarPtr, + IN LPBYTE CallbackCode, + IN SIZE_T CallbackSize, + OUT PSIZE_T CodeSize OPTIONAL); + +VOID +RunCallback16(IN PCALLBACK16 Context, + IN ULONG FarPtr); + +ULONG +RegisterInt16(IN ULONG FarPtr, + IN BYTE IntNumber, + IN LPBYTE CallbackCode, + IN SIZE_T CallbackSize, + OUT PSIZE_T CodeSize OPTIONAL); ULONG RegisterInt32(IN ULONG FarPtr, @@ -48,6 +67,7 @@ Int32Call(IN PCALLBACK16 Context, IN BYTE IntNumber); +VOID WINAPI Int32Dispatch(LPWORD Stack); VOID InitializeCallbacks(VOID); #endif // _CALLBACK_H_
10 years, 10 months
1
0
0
0
[dquintana] 62330: [RSHELL] * Some menu style improvements. * Some code style improvements. * Added a skeleton CMergedFolder, as a base towards showing items from both the user and the common start...
by dquintana@svn.reactos.org
Author: dquintana Date: Tue Feb 25 18:23:02 2014 New Revision: 62330 URL:
http://svn.reactos.org/svn/reactos?rev=62330&view=rev
Log: [RSHELL] * Some menu style improvements. * Some code style improvements. * Added a skeleton CMergedFolder, as a base towards showing items from both the user and the common start menus. It does not work yet. CORE-7586 Added: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp (with props) branches/shell-experiments/base/shell/rshell/CMergedFolder.h (with props) Modified: branches/shell-experiments/base/shell/rshell/CMakeLists.txt branches/shell-experiments/base/shell/rshell/CMenuBand.cpp branches/shell-experiments/base/shell/rshell/CMenuBand.h branches/shell-experiments/base/shell/rshell/CMenuDeskBar.h branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp branches/shell-experiments/base/shell/rshell/CStartMenu.cpp branches/shell-experiments/base/shell/rshell/precomp.h branches/shell-experiments/dll/win32/shell32/CMakeLists.txt Modified: branches/shell-experiments/base/shell/rshell/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMakeLists.txt [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMakeLists.txt [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -13,6 +13,7 @@ CMenuFocusManager.cpp CMenuSite.cpp CMenuToolbars.cpp + CMergedFolder.cpp CStartMenu.cpp misc.cpp wraplog.cpp Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -709,6 +709,8 @@ break; } + cdraw->iListGap += 4; + *theResult = CDRF_NOTIFYPOSTPAINT | TBCDRF_NOBACKGROUND | TBCDRF_NOEDGES | TBCDRF_NOOFFSET | TBCDRF_NOMARK | 0x00800000; // FIXME: the last bit is Vista+, for debugging only return S_OK; @@ -903,6 +905,7 @@ if (popup) { IUnknown_SetSite(popup, m_subMenuParent); + popup->Popup(pAt, pExclude, MPPF_RIGHT); } if (m_staticToolbar) m_staticToolbar->InvalidateDraw(); Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuBand.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuBand.h [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -25,7 +25,6 @@ class CMenuFocusManager; class CMenuBand : - public CComCoClass<CMenuBand>, public CComObjectRootEx<CComMultiThreadModelNoCS>, public IDeskBand, public IObjectWithSite, Modified: branches/shell-experiments/base/shell/rshell/CMenuDeskBar.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuDeskBar.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuDeskBar.h [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -25,9 +25,8 @@ > CMenuWinTraits; class CMenuDeskBar : + public CComObjectRootEx<CComMultiThreadModelNoCS>, public CWindowImpl<CMenuDeskBar, CWindow, CMenuWinTraits>, - public CComCoClass<CMenuDeskBar>, - public CComObjectRootEx<CComMultiThreadModelNoCS>, public IOleCommandTarget, public IServiceProvider, public IInputObjectSite, Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -75,11 +75,12 @@ if (m_menuBand->UseBigIcons()) { shiml = SHIL_LARGE; - SendMessageW(m_hwndToolbar, TB_SETPADDING, 0, MAKELPARAM(0, 0)); + SendMessageW(m_hwndToolbar, TB_SETPADDING, 0, MAKELPARAM(4, 0)); } else { shiml = SHIL_SMALL; + SendMessageW(m_hwndToolbar, TB_SETPADDING, 0, MAKELPARAM(4, 4)); } IImageList * piml; Added: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp (added) +++ branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -0,0 +1,337 @@ +/* + * Shell Menu Site + * + * Copyright 2014 David Quintana + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#include "precomp.h" +#include <atlwin.h> +#include <shlwapi_undoc.h> + +#include "CMergedFolder.h" + +WINE_DEFAULT_DEBUG_CHANNEL(CMergedFolder); + +class CEnumMergedFolder : + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IEnumIDList +{ +private: + CComPtr<IEnumIDList> m_UserLocal; + CComPtr<IEnumIDList> m_AllUSers; + BOOL m_FirstDone; + +public: + CEnumMergedFolder() : m_UserLocal(NULL), m_AllUSers(NULL), m_FirstDone(FALSE) {} + ~CEnumMergedFolder() {} + + DECLARE_NOT_AGGREGATABLE(CEnumMergedFolder) + DECLARE_PROTECT_FINAL_CONSTRUCT() + + BEGIN_COM_MAP(CEnumMergedFolder) + COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) + END_COM_MAP() + + HRESULT Begin(HWND hwndOwner, SHCONTF flags, IShellFolder * userLocal, IShellFolder * allUSers) + { + HRESULT hr; + hr = userLocal->EnumObjects(hwndOwner, flags, &m_UserLocal); + if (FAILED(hr)) + return hr; + hr = userLocal->EnumObjects(hwndOwner, flags, &m_AllUSers); + if (FAILED(hr)) + { + m_UserLocal = NULL; + return hr; + } + m_FirstDone = FALSE; + return S_OK; + } + + virtual HRESULT STDMETHODCALLTYPE Next( + ULONG celt, + LPITEMIDLIST *rgelt, + ULONG *pceltFetched) + { + HRESULT hr; + + *pceltFetched = 0; + + if (!m_FirstDone) + { + hr = m_UserLocal->Next(celt, rgelt, pceltFetched); + if (FAILED(hr)) + return hr; + if (hr == S_FALSE) + m_FirstDone = true; + if (celt < 2) + return hr; + } + + DWORD offset = *pceltFetched; + if (*pceltFetched < celt) + { + rgelt += *pceltFetched; + celt = (*pceltFetched - celt); + *pceltFetched = 0; + } + + hr = m_UserLocal->Next(celt, rgelt, pceltFetched); + if (FAILED(hr)) + return hr; + + *pceltFetched += offset; + return hr; + } + + virtual HRESULT STDMETHODCALLTYPE Skip( + ULONG celt) + { + UNIMPLEMENTED; + return E_NOTIMPL; + } + + virtual HRESULT STDMETHODCALLTYPE Reset( + ) + { + if (m_FirstDone) + m_AllUSers->Reset(); + return m_UserLocal->Reset(); + } + + virtual HRESULT STDMETHODCALLTYPE Clone( + IEnumIDList **ppenum) + { + UNIMPLEMENTED; + return E_NOTIMPL; + } +}; + +extern "C" +HRESULT CMergedFolder_Constructor(IShellFolder* userLocal, IShellFolder* allUsers, REFIID riid, LPVOID *ppv) +{ + *ppv = NULL; + + CMergedFolder * fld = new CComObject<CMergedFolder>(); + + if (!fld) + return E_OUTOFMEMORY; + + HRESULT hr; + + hr = fld->_SetSources(userLocal, allUsers); + + hr = fld->QueryInterface(riid, ppv); + if (FAILED(hr)) + fld->Release(); + + return hr; +} + +HRESULT CMergedFolder::_SetSources(IShellFolder* userLocal, IShellFolder* allUsers) +{ + m_UserLocal = userLocal; + m_AllUSers = allUsers; + return S_OK; +} + +// IShellFolder +HRESULT STDMETHODCALLTYPE CMergedFolder::ParseDisplayName( + HWND hwndOwner, + LPBC pbcReserved, + LPOLESTR lpszDisplayName, + ULONG *pchEaten, + LPITEMIDLIST *ppidl, + ULONG *pdwAttributes) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::EnumObjects( + HWND hwndOwner, + SHCONTF grfFlags, + IEnumIDList **ppenumIDList) +{ + CEnumMergedFolder * merged = new CComObject<CEnumMergedFolder>(); + *ppenumIDList = merged; + return merged->Begin(hwndOwner, grfFlags, m_UserLocal, m_AllUSers); +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::BindToObject( + LPCITEMIDLIST pidl, + LPBC pbcReserved, + REFIID riid, + void **ppvOut) +{ + HRESULT hr; + + hr = m_UserLocal->BindToObject(pidl, pbcReserved, riid, ppvOut); + if (SUCCEEDED(hr)) + return hr; + + hr = m_AllUSers->BindToObject(pidl, pbcReserved, riid, ppvOut); + + return hr; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::BindToStorage( + LPCITEMIDLIST pidl, + LPBC pbcReserved, + REFIID riid, + void **ppvObj) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::CompareIDs( + LPARAM lParam, + LPCITEMIDLIST pidl1, + LPCITEMIDLIST pidl2) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::CreateViewObject( + HWND hwndOwner, + REFIID riid, + void **ppvOut) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::GetAttributesOf( + UINT cidl, + LPCITEMIDLIST *apidl, + SFGAOF *rgfInOut) +{ + HRESULT hr; + + hr = m_UserLocal->GetAttributesOf(cidl, apidl, rgfInOut); + if (SUCCEEDED(hr)) + return hr; + + hr = m_AllUSers->GetAttributesOf(cidl, apidl, rgfInOut); + + return hr; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::GetUIObjectOf( + HWND hwndOwner, + UINT cidl, + LPCITEMIDLIST *apidl, + REFIID riid, + UINT *prgfInOut, + void **ppvOut) +{ + HRESULT hr; + + hr = m_UserLocal->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, ppvOut); + if (SUCCEEDED(hr)) + return hr; + + hr = m_AllUSers->GetUIObjectOf(hwndOwner, cidl, apidl, riid, prgfInOut, ppvOut); + + return hr; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::GetDisplayNameOf( + LPCITEMIDLIST pidl, + SHGDNF uFlags, + STRRET *lpName) +{ + HRESULT hr; + + hr = m_UserLocal->GetDisplayNameOf(pidl, uFlags, lpName); + if (SUCCEEDED(hr)) + return hr; + + hr = m_AllUSers->GetDisplayNameOf(pidl, uFlags, lpName); + + return hr; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::SetNameOf( + HWND hwnd, + LPCITEMIDLIST pidl, + LPCOLESTR lpszName, + SHGDNF uFlags, + LPITEMIDLIST *ppidlOut) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +// IShellFolder2 +HRESULT STDMETHODCALLTYPE CMergedFolder::GetDefaultSearchGUID( + GUID *lpguid) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::EnumSearches( + IEnumExtraSearch **ppenum) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::GetDefaultColumn( + DWORD dwReserved, + ULONG *pSort, + ULONG *pDisplay) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::GetDefaultColumnState( + UINT iColumn, + SHCOLSTATEF *pcsFlags) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::GetDetailsEx( + LPCITEMIDLIST pidl, + const SHCOLUMNID *pscid, + VARIANT *pv) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::GetDetailsOf( + LPCITEMIDLIST pidl, + UINT iColumn, + SHELLDETAILS *psd) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} + +HRESULT STDMETHODCALLTYPE CMergedFolder::MapColumnToSCID( + UINT iColumn, + SHCOLUMNID *pscid) +{ + UNIMPLEMENTED; + return E_NOTIMPL; +} Propchange: branches/shell-experiments/base/shell/rshell/CMergedFolder.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/shell-experiments/base/shell/rshell/CMergedFolder.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMergedFolder.h (added) +++ branches/shell-experiments/base/shell/rshell/CMergedFolder.h [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -0,0 +1,135 @@ +/* + * Shell Menu Site + * + * Copyright 2014 David Quintana + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ +#pragma once + +class CMergedFolder : + public CComObjectRootEx<CComMultiThreadModelNoCS>, + public IShellFolder2 +{ +private: + CComPtr<IShellFolder> m_UserLocal; + CComPtr<IShellFolder> m_AllUSers; + +public: + CMergedFolder() {} + ~CMergedFolder() {} + + HRESULT _SetSources(IShellFolder* userLocal, IShellFolder* allUSers); + + DECLARE_NOT_AGGREGATABLE(CMergedFolder) + DECLARE_PROTECT_FINAL_CONSTRUCT() + + BEGIN_COM_MAP(CMergedFolder) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder2, IShellFolder2) + COM_INTERFACE_ENTRY_IID(IID_IShellFolder, IShellFolder) + END_COM_MAP() + + // IShellFolder + virtual HRESULT STDMETHODCALLTYPE ParseDisplayName( + HWND hwndOwner, + LPBC pbcReserved, + LPOLESTR lpszDisplayName, + ULONG *pchEaten, + LPITEMIDLIST *ppidl, + ULONG *pdwAttributes); + + virtual HRESULT STDMETHODCALLTYPE EnumObjects( + HWND hwndOwner, + SHCONTF grfFlags, + IEnumIDList **ppenumIDList); + + virtual HRESULT STDMETHODCALLTYPE BindToObject( + LPCITEMIDLIST pidl, + LPBC pbcReserved, + REFIID riid, + void **ppvOut); + + virtual HRESULT STDMETHODCALLTYPE BindToStorage( + LPCITEMIDLIST pidl, + LPBC pbcReserved, + REFIID riid, + void **ppvObj); + + virtual HRESULT STDMETHODCALLTYPE CompareIDs( + LPARAM lParam, + LPCITEMIDLIST pidl1, + LPCITEMIDLIST pidl2); + + virtual HRESULT STDMETHODCALLTYPE CreateViewObject( + HWND hwndOwner, + REFIID riid, + void **ppvOut); + + virtual HRESULT STDMETHODCALLTYPE GetAttributesOf( + UINT cidl, + LPCITEMIDLIST *apidl, + SFGAOF *rgfInOut); + + virtual HRESULT STDMETHODCALLTYPE GetUIObjectOf( + HWND hwndOwner, + UINT cidl, + LPCITEMIDLIST *apidl, + REFIID riid, + UINT *prgfInOut, + void **ppvOut); + + virtual HRESULT STDMETHODCALLTYPE GetDisplayNameOf( + LPCITEMIDLIST pidl, + SHGDNF uFlags, + STRRET *lpName); + + virtual HRESULT STDMETHODCALLTYPE SetNameOf( + HWND hwnd, + LPCITEMIDLIST pidl, + LPCOLESTR lpszName, + SHGDNF uFlags, + LPITEMIDLIST *ppidlOut); + + // IShellFolder2 + virtual HRESULT STDMETHODCALLTYPE GetDefaultSearchGUID( + GUID *lpguid); + + virtual HRESULT STDMETHODCALLTYPE EnumSearches( + IEnumExtraSearch **ppenum); + + virtual HRESULT STDMETHODCALLTYPE GetDefaultColumn( + DWORD dwReserved, + ULONG *pSort, + ULONG *pDisplay); + + virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnState( + UINT iColumn, + SHCOLSTATEF *pcsFlags); + + virtual HRESULT STDMETHODCALLTYPE GetDetailsEx( + LPCITEMIDLIST pidl, + const SHCOLUMNID *pscid, + VARIANT *pv); + + virtual HRESULT STDMETHODCALLTYPE GetDetailsOf( + LPCITEMIDLIST pidl, + UINT iColumn, + SHELLDETAILS *psd); + + virtual HRESULT STDMETHODCALLTYPE MapColumnToSCID( + UINT iColumn, + SHCOLUMNID *pscid); + +}; Propchange: branches/shell-experiments/base/shell/rshell/CMergedFolder.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -284,11 +284,17 @@ IShellMenu* pShellMenu; IBandSite* pBandSite; IDeskBar* pDeskBar; - LPITEMIDLIST pidlStartMenu; HRESULT hr; IShellFolder *shellFolder; - IShellFolder *psfStartMenu; + + LPITEMIDLIST pidlStartMenuUser; + IShellFolder *psfStartMenuUser; + +#if MERGE_FOLDERS + LPITEMIDLIST pidlStartMenuAll; + IShellFolder *psfStartMenuAll; +#endif #if USE_SYSTEM_MENUBAND hr = CoCreateInstance(CLSID_MenuBand, @@ -349,14 +355,31 @@ if (FAILED(hr)) return hr; + hr = SHGetDesktopFolder(&shellFolder); + /* FIXME: Use CLSID_MergedFolder class and IID_IAugmentedShellFolder2 interface here */ /* CLSID_MergedFolder 26fdc864-be88-46e7-9235-032d8ea5162e */ /* IID_IAugmentedShellFolder2 8db3b3f4-6cfe-11d1-8ae9-00c04fd918d0 */ - hr = SHGetFolderLocation(NULL, CSIDL_STARTMENU, 0, 0, &pidlStartMenu); - hr = SHGetDesktopFolder(&shellFolder); - hr = shellFolder->BindToObject(pidlStartMenu, NULL, IID_IShellFolder, (void**) &psfStartMenu); - - hr = pShellMenu->SetShellFolder(psfStartMenu, NULL, NULL, 0); + hr = SHGetFolderLocation(NULL, CSIDL_STARTMENU, 0, 0, &pidlStartMenuUser); + hr = shellFolder->BindToObject(pidlStartMenuUser, NULL, IID_IShellFolder, (void**) &psfStartMenuUser); + +#if MERGE_FOLDERS + hr = SHGetFolderLocation(NULL, CSIDL_COMMON_STARTMENU, 0, 0, &pidlStartMenuAll); + hr = shellFolder->BindToObject(pidlStartMenuAll, NULL, IID_IShellFolder, (void**) &psfStartMenuAll); + + IShellFolder * psfMerged; + hr = CMergedFolder_Constructor(psfStartMenuUser, psfStartMenuAll, IID_PPV_ARG(IShellFolder, &psfMerged)); + if (FAILED(hr)) + return hr; + + hr = pShellMenu->SetShellFolder(psfMerged, NULL, NULL, 0); + if (FAILED(hr)) + return hr; +#else + hr = pShellMenu->SetShellFolder(psfStartMenuUser, NULL, NULL, 0); + if (FAILED(hr)) + return hr; +#endif hr = pDeskBar->SetClient(pBandSite); if (FAILED(hr)) Modified: branches/shell-experiments/base/shell/rshell/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/precomp.h [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -44,6 +44,7 @@ extern "C" HRESULT CMenuDeskBar_Wrapper(IDeskBar * db, REFIID riid, LPVOID *ppv); extern "C" HRESULT CMenuSite_Wrapper(IBandSite * bs, REFIID riid, LPVOID *ppv); extern "C" HRESULT CMenuBand_Wrapper(IShellMenu * sm, REFIID riid, LPVOID *ppv); +extern "C" HRESULT CMergedFolder_Constructor(IShellFolder* userLocal, IShellFolder* allUsers, REFIID riid, LPVOID *ppv); static __inline ULONG Win32DbgPrint(const char *filename, int line, const char *lpFormat, ...) Modified: branches/shell-experiments/dll/win32/shell32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/she…
============================================================================== --- branches/shell-experiments/dll/win32/shell32/CMakeLists.txt [iso-8859-1] (original) +++ branches/shell-experiments/dll/win32/shell32/CMakeLists.txt [iso-8859-1] Tue Feb 25 18:23:02 2014 @@ -1,3 +1,4 @@ +PROJECT(SHELL) set_cpp(WITH_RUNTIME)
10 years, 10 months
1
0
0
0
[dquintana] 62329: [RSHELL] * CStartMenu: Now THESE are the right IDs. The previous ones were icon indices within the file.
by dquintana@svn.reactos.org
Author: dquintana Date: Tue Feb 25 11:47:29 2014 New Revision: 62329 URL:
http://svn.reactos.org/svn/reactos?rev=62329&view=rev
Log: [RSHELL] * CStartMenu: Now THESE are the right IDs. The previous ones were icon indices within the file. Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Tue Feb 25 11:47:29 2014 @@ -25,24 +25,24 @@ /* NOTE: The following constants *MUST NOT* be changed because they're hardcoded and need to be the exact values in order to get the start menu to work! */ +#define IDM_RUN 401 +#define IDM_LOGOFF 402 +#define IDM_UNDOCKCOMPUTER 410 +#define IDM_TASKBARANDSTARTMENU 413 +#define IDM_LASTSTARTMENU_SEPARATOR 450 +#define IDM_DOCUMENTS 501 +#define IDM_HELPANDSUPPORT 503 #define IDM_PROGRAMS 504 +#define IDM_CONTROLPANEL 505 +#define IDM_SHUTDOWN 506 #define IDM_FAVORITES 507 -#define IDM_DOCUMENTS 501 #define IDM_SETTINGS 508 -#define IDM_CONTROLPANEL 505 +#define IDM_PRINTERSANDFAXES 510 +#define IDM_SEARCH 520 +#define IDM_SYNCHRONIZE 553 +#define IDM_NETWORKCONNECTIONS 557 +#define IDM_DISCONNECT 5000 #define IDM_SECURITY 5001 -#define IDM_NETWORKCONNECTIONS 557 -#define IDM_PRINTERSANDFAXES 510 -#define IDM_TASKBARANDSTARTMENU 413 -#define IDM_SEARCH 520 -#define IDM_HELPANDSUPPORT 503 -#define IDM_RUN 401 -#define IDM_SYNCHRONIZE 553 -#define IDM_LOGOFF 402 -#define IDM_DISCONNECT 5000 -#define IDM_UNDOCKCOMPUTER 410 -#define IDM_SHUTDOWN 506 -#define IDM_LASTSTARTMENU_SEPARATOR 450 /* * TODO: @@ -92,15 +92,15 @@ { // Smaller "24x24" icons used for the start menu // The bitmaps are still 32x32, but the image is centered - case IDM_FAVORITES: iconIndex = -209; break; - case IDM_SEARCH: iconIndex = -210; break; - case IDM_HELPANDSUPPORT: iconIndex = -211; break; - case IDM_LOGOFF: iconIndex = -212; break; - case IDM_PROGRAMS: iconIndex = -213; break; - case IDM_DOCUMENTS: iconIndex = -214; break; - case IDM_RUN: iconIndex = -215; break; - case IDM_SHUTDOWN: iconIndex = -216; break; - case IDM_SETTINGS: iconIndex = -217; break; + case IDM_FAVORITES: iconIndex = -322; break; + case IDM_SEARCH: iconIndex = -323; break; + case IDM_HELPANDSUPPORT: iconIndex = -324; break; + case IDM_LOGOFF: iconIndex = -325; break; + case IDM_PROGRAMS: iconIndex = -326; break; + case IDM_DOCUMENTS: iconIndex = -327; break; + case IDM_RUN: iconIndex = -328; break; + case IDM_SHUTDOWN: iconIndex = -329; break; + case IDM_SETTINGS: iconIndex = -330; break; case IDM_CONTROLPANEL: iconIndex = -22; break; case IDM_NETWORKCONNECTIONS: iconIndex = -257; break; @@ -116,12 +116,21 @@ if (iconIndex) { + if ((psminfo->dwMask & SMIM_TYPE) != 0) + psminfo->dwType = SMIT_STRING; if ((psminfo->dwMask & SMIM_ICON) != 0) psminfo->iIcon = Shell_GetCachedImageIndex(L"shell32.dll", iconIndex, FALSE); + if ((psminfo->dwMask & SMIM_FLAGS) != 0) + psminfo->dwFlags |= SMIF_ICON; #ifdef TEST_TRACKPOPUPMENU_SUBMENUS if ((psminfo->dwMask & SMIM_FLAGS) != 0) psminfo->dwFlags |= SMIF_TRACKPOPUP; #endif + } + else + { + if ((psminfo->dwMask & SMIM_TYPE) != 0) + psminfo->dwType = SMIT_SEPARATOR; } return S_OK; }
10 years, 10 months
1
0
0
0
[dquintana] 62328: [RSHELL] * CStartMenu: Update the icon resource IDs to the IDs with the smaller images. This causes the images not to show. Need help figuring out why. * Misc changes. CORE-7586
by dquintana@svn.reactos.org
Author: dquintana Date: Tue Feb 25 10:44:28 2014 New Revision: 62328 URL:
http://svn.reactos.org/svn/reactos?rev=62328&view=rev
Log: [RSHELL] * CStartMenu: Update the icon resource IDs to the IDs with the smaller images. This causes the images not to show. Need help figuring out why. * Misc changes. CORE-7586 Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp branches/shell-experiments/base/shell/rshell/CMenuToolbars.h branches/shell-experiments/base/shell/rshell/CStartMenu.cpp branches/shell-experiments/base/shell/rshell/wraplog.cpp Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Tue Feb 25 10:44:28 2014 @@ -875,10 +875,8 @@ { if (m_hotBar && m_hotItem >= 0) { - // TODO: popup the current child if it has subitems, otherwise spread up. if (m_hotBar->HasSubMenu(m_hotItem)==S_OK) { - LRESULT result; m_hotBar->PopupItem(m_hotItem); return S_FALSE; } Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Tue Feb 25 10:44:28 2014 @@ -64,6 +64,13 @@ { ::ShowWindow(m_hwnd, fShow ? SW_SHOW : SW_HIDE); + UpdateImageLists(); + + return S_OK; +} + +HRESULT CMenuToolbarBase::UpdateImageLists() +{ int shiml; if (m_menuBand->UseBigIcons()) { @@ -85,7 +92,6 @@ { SendMessageW(m_hwndToolbar, TB_SETIMAGELIST, 0, 0); } - return S_OK; } @@ -163,30 +169,11 @@ // SendMessageW(m_hwnd, TB_SETIMAGELIST, 0, 0); //} //else - int shiml; - if (m_menuBand->UseBigIcons()) - { - shiml = SHIL_LARGE; - SendMessageW(hwndToolbar, TB_SETPADDING, 0, MAKELPARAM(0, 0)); - } - else - { - shiml = SHIL_SMALL; - } - - IImageList * piml; - HRESULT hr = SHGetImageList(shiml, IID_PPV_ARG(IImageList, &piml)); - if (SUCCEEDED(hr)) - { - SendMessageW(hwndToolbar, TB_SETIMAGELIST, 0, reinterpret_cast<LPARAM>(piml)); - } - else - { - SendMessageW(hwndToolbar, TB_SETIMAGELIST, 0, 0); - } SetWindowLongPtr(hwndToolbar, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this)); m_SubclassOld = (WNDPROC) SetWindowLongPtr(hwndToolbar, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(CMenuToolbarBase::s_SubclassProc)); + + UpdateImageLists(); return S_OK; } Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.h URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuToolbars.h [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.h [iso-8859-1] Tue Feb 25 10:44:28 2014 @@ -70,6 +70,8 @@ protected: LRESULT CALLBACK SubclassProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); + + HRESULT UpdateImageLists(); }; class CMenuStaticToolbar : Modified: branches/shell-experiments/base/shell/rshell/CStartMenu.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CStartMenu.cpp [iso-8859-1] Tue Feb 25 10:44:28 2014 @@ -90,23 +90,26 @@ switch (psmd->uId) { - case IDM_PROGRAMS: iconIndex = -20; break; - case IDM_FAVORITES: iconIndex = -173; break; - case IDM_DOCUMENTS: iconIndex = -21; break; - case IDM_SETTINGS: iconIndex = -22; break; + // Smaller "24x24" icons used for the start menu + // The bitmaps are still 32x32, but the image is centered + case IDM_FAVORITES: iconIndex = -209; break; + case IDM_SEARCH: iconIndex = -210; break; + case IDM_HELPANDSUPPORT: iconIndex = -211; break; + case IDM_LOGOFF: iconIndex = -212; break; + case IDM_PROGRAMS: iconIndex = -213; break; + case IDM_DOCUMENTS: iconIndex = -214; break; + case IDM_RUN: iconIndex = -215; break; + case IDM_SHUTDOWN: iconIndex = -216; break; + case IDM_SETTINGS: iconIndex = -217; break; + case IDM_CONTROLPANEL: iconIndex = -22; break; - //case IDM_SECURITY: iconIndex = -21; break; case IDM_NETWORKCONNECTIONS: iconIndex = -257; break; case IDM_PRINTERSANDFAXES: iconIndex = -138; break; case IDM_TASKBARANDSTARTMENU: iconIndex = -40; break; - case IDM_SEARCH: iconIndex = -23; break; - case IDM_HELPANDSUPPORT: iconIndex = -24; break; - case IDM_RUN: iconIndex = -25; break; + //case IDM_SECURITY: iconIndex = -21; break; //case IDM_SYNCHRONIZE: iconIndex = -21; break; - case IDM_LOGOFF: iconIndex = -45; break; //case IDM_DISCONNECT: iconIndex = -21; break; //case IDM_UNDOCKCOMPUTER: iconIndex = -21; break; - case IDM_SHUTDOWN: iconIndex = -28; break; default: return S_FALSE; } Modified: branches/shell-experiments/base/shell/rshell/wraplog.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/wraplog.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/wraplog.cpp [iso-8859-1] Tue Feb 25 10:44:28 2014 @@ -13,7 +13,7 @@ { if (openCount == 0) { - log = fopen("G:\\RShellWrap.log", "w"); + log = fopen("RShellWrap.log", "w"); nTemps = 0; callLevel = 0; }
10 years, 10 months
1
0
0
0
[jimtabor] 62327: [Win32ss] - MapWindowPoints return incorrect result for windows with WS_EX_LAYOUTRTL style. - Patch by Maxim Andreyanov. see CORE-7947.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Feb 25 05:29:00 2014 New Revision: 62327 URL:
http://svn.reactos.org/svn/reactos?rev=62327&view=rev
Log: [Win32ss] - MapWindowPoints return incorrect result for windows with WS_EX_LAYOUTRTL style. - Patch by Maxim Andreyanov. see CORE-7947. Modified: trunk/reactos/win32ss/user/ntuser/window.c trunk/reactos/win32ss/user/ntuser/winpos.c trunk/reactos/win32ss/user/user32/windows/winpos.c Modified: trunk/reactos/win32ss/user/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/window…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/window.c [iso-8859-1] Tue Feb 25 05:29:00 2014 @@ -2313,6 +2313,17 @@ ParentWindow->rcClient.top); } */ + /* correct child window coordinates if mirroring on parent is enabled */ + if (ParentWindow != NULL) + { + if ( ((Cs->style & WS_CHILD) == WS_CHILD) && + ((ParentWindow->ExStyle & WS_EX_LAYOUTRTL) == WS_EX_LAYOUTRTL)) + { + Window->rcWindow.right = ParentWindow->rcClient.right - (Window->rcWindow.left - ParentWindow->rcClient.left); + Window->rcWindow.left = Window->rcWindow.right - Size.cx; + } + } + Window->rcClient = Window->rcWindow; /* Link the window */ Modified: trunk/reactos/win32ss/user/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/winpos…
============================================================================== --- trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/ntuser/winpos.c [iso-8859-1] Tue Feb 25 05:29:00 2014 @@ -119,8 +119,6 @@ Delta.x -= Change * ToWnd->rcClient.left; Delta.y -= ToWnd->rcClient.top; } - - if (mirror_from) Delta.x = -Delta.x; for (i = 0; i != cPoints; i++) { Modified: trunk/reactos/win32ss/user/user32/windows/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/window…
============================================================================== --- trunk/reactos/win32ss/user/user32/windows/winpos.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/user/user32/windows/winpos.c [iso-8859-1] Tue Feb 25 05:29:00 2014 @@ -218,8 +218,6 @@ Delta.y -= ToWnd->rcClient.top; } - if (mirror_from) Delta.x = -Delta.x; - for (i = 0; i != cPoints; i++) { lpPoints[i].x += Delta.x;
10 years, 10 months
1
0
0
0
[jimtabor] 62326: [Ext2fs] - Fixed the driver start up for Ext2 partitions and drives. Now the driver loads. - At one time this driver worked on the same hardware I have today, same drives nothing ...
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Feb 25 03:39:23 2014 New Revision: 62326 URL:
http://svn.reactos.org/svn/reactos?rev=62326&view=rev
Log: [Ext2fs] - Fixed the driver start up for Ext2 partitions and drives. Now the driver loads. - At one time this driver worked on the same hardware I have today, same drives nothing has changed. Now since all the changes else where, guessing it broke something. - Don't assign and bug reports to me, if so, I will remove them! Modified: trunk/reactos/boot/bootdata/hivesys.inf trunk/reactos/drivers/filesystems/ext2/src/ext2init.c trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c trunk/reactos/drivers/filesystems/fs_rec/ext2.c trunk/reactos/drivers/filesystems/fs_rec/fs_rec.c Modified: trunk/reactos/boot/bootdata/hivesys.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/hivesys.inf?…
============================================================================== --- trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] (original) +++ trunk/reactos/boot/bootdata/hivesys.inf [iso-8859-1] Tue Feb 25 03:39:23 2014 @@ -1560,6 +1560,14 @@ HKLM,"SYSTEM\CurrentControlSet\Services\usbccgp","ImagePath",0x00020000,"system32\drivers\usbccgp.sys" HKLM,"SYSTEM\CurrentControlSet\Services\usbccgp","Start",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\usbccgp","Type",0x00010001,0x00000001 + +; MountMgr driver +;HKLM,"SYSTEM\CurrentControlSet\Services\MountMgr","ErrorControl",0x00010001,0x00000001 +;HKLM,"SYSTEM\CurrentControlSet\Services\MountMgr","Group",0x00000000,"Boot Bus Extender" +;HKLM,"SYSTEM\CurrentControlSet\Services\MountMgr","ImagePath",0x00020000,"system32\drivers\mountmgr.sys" +;HKLM,"SYSTEM\CurrentControlSet\Services\MountMgr","Start",0x00010001,0x00000000 +;HKLM,"SYSTEM\CurrentControlSet\Services\MountMgr","Tag",0x00010001,0x00000008 +;HKLM,"SYSTEM\CurrentControlSet\Services\MountMgr","Type",0x00010001,0x00000001 ; ACPI driver HKLM,"SYSTEM\CurrentControlSet\Services\acpi","ErrorControl",0x00010001,0x00000001 @@ -1859,7 +1867,7 @@ ; EXT2 Filesystem driver HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","ErrorControl",0x00010001,0x00000000 HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Group",0x00000000,"Boot File System" -HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","ImagePath",0x00020000,"system32\drivers\ext2.sys" +HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","ImagePath",0x00020000,"system32\drivers\ext2fs.sys" HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Start",0x00010001,0x00000003 HKLM,"SYSTEM\CurrentControlSet\Services\Ext2fs","Type",0x00010001,0x00000002 Modified: trunk/reactos/drivers/filesystems/ext2/src/ext2init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/ext2init.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/ext2init.c [iso-8859-1] Tue Feb 25 03:39:23 2014 @@ -20,7 +20,7 @@ #define EXT2_BUG_CHECK_ID EXT2_FILE_INIT #define DEBUG_LEVEL (DEBUG_TRACE_INIT) -#define EXT2_FS_NAME L"\\ext2" +#define EXT2_FS_NAME L"\\Ext2fs" // Must match others! // global variables are declared here Ext2Data Ext2GlobalData; Modified: trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ext2/s…
============================================================================== --- trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ext2/src/fsctrl.c [iso-8859-1] Tue Feb 25 03:39:23 2014 @@ -535,6 +535,7 @@ else { DebugTrace(DEBUG_TRACE_MOUNT, "Failing mount. Partition not Ext2...", 0); + DbgPrint("Supper Blk Magic %x\n",SuperBlock->s_magic); } try_exit: NOTHING; @@ -782,16 +783,23 @@ if (Status == STATUS_INVALID_PARAMETER) { - + DbgPrint("Ext2PerformVerifyDiskRead Invalid Param\n"); return FALSE; } + if (Status == STATUS_NO_MEDIA_IN_DEVICE) + { + DbgPrint("Ext2PerformVerifyDiskRead NO MEDIA in DEVICE!!! BS!!\n"); + return FALSE; + } + // // If it doesn't succeed then either return or raise the error. // if (!NT_SUCCESS(Status)) { + DbgPrint("Ext2PerformVerifyDiskRead Fail Status %x\n",Status); return FALSE; } Modified: trunk/reactos/drivers/filesystems/fs_rec/ext2.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fs_rec…
============================================================================== --- trunk/reactos/drivers/filesystems/fs_rec/ext2.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fs_rec/ext2.c [iso-8859-1] Tue Feb 25 03:39:23 2014 @@ -93,7 +93,7 @@ /* Load the file system */ Status = FsRecLoadFileSystem(DeviceObject, - L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Ext2"); + L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\Ext2fs"); break; default: Modified: trunk/reactos/drivers/filesystems/fs_rec/fs_rec.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fs_rec…
============================================================================== --- trunk/reactos/drivers/filesystems/fs_rec/fs_rec.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/fs_rec/fs_rec.c [iso-8859-1] Tue Feb 25 03:39:23 2014 @@ -373,14 +373,14 @@ if (NT_SUCCESS(Status)) DeviceCount++; /* Register EXT2 */ - /*Status = FsRecRegisterFs(DriverObject, - NULL, - NULL, - L"\\Ext2", + Status = FsRecRegisterFs(DriverObject, + NULL, + NULL, + L"\\Ext2fs", L"\\FileSystem\\Ext2Recognizer", FS_TYPE_EXT2, FILE_DEVICE_DISK_FILE_SYSTEM); - if (NT_SUCCESS(Status)) DeviceCount++;*/ + if (NT_SUCCESS(Status)){ DeviceCount++; DPRINT1("2 Ext2FS!!!!!\n");} /* Return appropriate Status */ return (DeviceCount > 0) ? STATUS_SUCCESS : STATUS_IMAGE_ALREADY_LOADED;
10 years, 10 months
1
0
0
0
[aandrejevic] 62325: [FAST486] Actually, we should return FALSE if any exception occurred...
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Tue Feb 25 00:26:00 2014 New Revision: 62325 URL:
http://svn.reactos.org/svn/reactos?rev=62325&view=rev
Log: [FAST486] Actually, we should return FALSE if any exception occurred... Modified: branches/ntvdm/lib/fast486/opcodes.c Modified: branches/ntvdm/lib/fast486/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] Tue Feb 25 00:26:00 2014 @@ -4244,7 +4244,7 @@ { /* Call the VM86 monitor */ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, 0); - return TRUE; + return FALSE; } /* Push the flags */ @@ -4273,7 +4273,7 @@ { /* Call the VM86 monitor */ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, 0); - return TRUE; + return FALSE; } State->Flags.Cf = NewFlags.Cf;
10 years, 10 months
1
0
0
0
[aandrejevic] 62324: [FAST486] Return TRUE if nothing unexpected occurred.
by aandrejevic@svn.reactos.org
Author: aandrejevic Date: Tue Feb 25 00:02:54 2014 New Revision: 62324 URL:
http://svn.reactos.org/svn/reactos?rev=62324&view=rev
Log: [FAST486] Return TRUE if nothing unexpected occurred. Modified: branches/ntvdm/lib/fast486/opcodes.c Modified: branches/ntvdm/lib/fast486/opcodes.c URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/lib/fast486/opcodes.c?rev…
============================================================================== --- branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] (original) +++ branches/ntvdm/lib/fast486/opcodes.c [iso-8859-1] Tue Feb 25 00:02:54 2014 @@ -4244,7 +4244,7 @@ { /* Call the VM86 monitor */ Fast486ExceptionWithErrorCode(State, FAST486_EXCEPTION_GP, 0); - return FALSE; + return TRUE; } /* Push the flags */
10 years, 10 months
1
0
0
0
[dquintana] 62323: [RSHELL] * CMenuBand: Fix the keyboard navigation a bit. Still not fully working yet. * Show submenus a bit closer to the arrow, as Windows does. CORE-7881
by dquintana@svn.reactos.org
Author: dquintana Date: Mon Feb 24 23:10:12 2014 New Revision: 62323 URL:
http://svn.reactos.org/svn/reactos?rev=62323&view=rev
Log: [RSHELL] * CMenuBand: Fix the keyboard navigation a bit. Still not fully working yet. * Show submenus a bit closer to the arrow, as Windows does. CORE-7881 Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp Modified: branches/shell-experiments/base/shell/rshell/CMenuBand.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuBand.cpp [iso-8859-1] Mon Feb 24 23:10:12 2014 @@ -314,7 +314,6 @@ return S_OK; } -/* IDockingWindow */ HRESULT STDMETHODCALLTYPE CMenuBand::ShowDW(BOOL fShow) { HRESULT hr = S_OK; @@ -392,54 +391,6 @@ } return S_FALSE; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::HasFocusIO() -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::TranslateAcceleratorIO(LPMSG lpMsg) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::IsDirty() -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::Load(IStream *pStm) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::Save(IStream *pStm, BOOL fClearDirty) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetSizeMax(ULARGE_INTEGER *pcbSize) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetClassID(CLSID *pClassID) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText) -{ - UNIMPLEMENTED; - return S_OK; } HRESULT STDMETHODCALLTYPE CMenuBand::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) @@ -492,10 +443,6 @@ m_subMenuChild->OnSelect(MPOS_CANCELLEVEL); return m_subMenuParent->OnSelect(dwSelectType); case MPOS_SELECTRIGHT: - if (m_hotBar && m_hotItem >= 0) - { - // TODO: popup the current child if it has subitems, otherwise spread up. - } return m_subMenuParent->OnSelect(dwSelectType); case MPOS_EXECUTE: case MPOS_FULLCANCEL: @@ -741,8 +688,7 @@ rc = cdraw->nmcd.rc; hdc = cdraw->nmcd.hdc; - if (cdraw->nmcd.uItemState != CDIS_DISABLED && - ((INT)cdraw->nmcd.dwItemSpec == m_hotItem || + if (((INT)cdraw->nmcd.dwItemSpec == m_hotItem || (m_hotItem < 0 && (INT)cdraw->nmcd.dwItemSpec == m_popupItem))) { cdraw->nmcd.uItemState = CDIS_HOT; @@ -799,78 +745,6 @@ return S_FALSE; } -HRESULT STDMETHODCALLTYPE CMenuBand::GetSubMenu(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::SetToolbar(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::SetMinWidth(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::SetNoBorder(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::SetTheme(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetTop(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetBottom(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetTracked(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetParentSite(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::GetState(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::DoDefaultAction(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - -HRESULT STDMETHODCALLTYPE CMenuBand::IsEmpty(THIS) -{ - UNIMPLEMENTED; - return S_OK; -} - HRESULT CMenuBand::_CallCBWithItemId(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam) { return _CallCB(uMsg, wParam, lParam, id); @@ -968,7 +842,7 @@ { if (m_staticToolbar && (m_hotBar == m_staticToolbar || m_hotBar == NULL)) { - hr = m_staticToolbar->ChangeHotItem(VK_DOWN); + hr = m_staticToolbar->ChangeHotItem(VK_UP); if (hr == S_FALSE) { if (m_SFToolbar) @@ -991,9 +865,29 @@ return hr; } } + else if (changeType == MPOS_SELECTLEFT) + { + if (m_subMenuChild) + m_subMenuChild->OnSelect(MPOS_CANCELLEVEL); + return m_subMenuParent->OnSelect(MPOS_CANCELLEVEL); + } + else if (changeType == MPOS_SELECTRIGHT) + { + if (m_hotBar && m_hotItem >= 0) + { + // TODO: popup the current child if it has subitems, otherwise spread up. + if (m_hotBar->HasSubMenu(m_hotItem)==S_OK) + { + LRESULT result; + m_hotBar->PopupItem(m_hotItem); + return S_FALSE; + } + } + return m_subMenuParent->OnSelect(changeType); + } else { - m_subMenuParent->OnSelect(changeType); + return m_subMenuParent->OnSelect(changeType); } return S_OK; } @@ -1017,3 +911,123 @@ if (m_SFToolbar) m_SFToolbar->InvalidateDraw(); return S_OK; } + +HRESULT STDMETHODCALLTYPE CMenuBand::GetSubMenu(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::SetToolbar(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::SetMinWidth(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::SetNoBorder(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::SetTheme(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetTop(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetBottom(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetTracked(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetParentSite(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetState(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::DoDefaultAction(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::IsEmpty(THIS) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::HasFocusIO() +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::TranslateAcceleratorIO(LPMSG lpMsg) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::IsDirty() +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::Load(IStream *pStm) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::Save(IStream *pStm, BOOL fClearDirty) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetSizeMax(ULARGE_INTEGER *pcbSize) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::GetClassID(CLSID *pClassID) +{ + UNIMPLEMENTED; + return S_OK; +} + +HRESULT STDMETHODCALLTYPE CMenuBand::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) +{ + UNIMPLEMENTED; + return S_OK; +} Modified: branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/base/shell/rs…
============================================================================== --- branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] (original) +++ branches/shell-experiments/base/shell/rshell/CMenuToolbars.cpp [iso-8859-1] Mon Feb 24 23:10:12 2014 @@ -295,7 +295,7 @@ ClientToScreen(m_hwndToolbar, &a); ClientToScreen(m_hwndToolbar, &b); - POINTL pt = { b.x, a.y }; + POINTL pt = { b.x - 4, a.y }; RECTL rcl = { a.x, a.y, b.x, b.y }; // maybe-TODO: fetch client area of deskbar?
10 years, 10 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
47
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Results per page:
10
25
50
100
200