diff --git a/base/applications/kbswitch/kbswitch.c b/base/applications/kbswitch/kbswitch.c index 72b517384a7..9487956bc9d 100644 --- a/base/applications/kbswitch/kbswitch.c +++ b/base/applications/kbswitch/kbswitch.c @@ -11,6 +11,7 @@ #include #include #include +#include /* * This program kbswitch is a mimic of Win2k's internat.exe. @@ -26,13 +27,6 @@ * won't be generated in Vista+. */ -#define IME_MASK (0xE0000000UL) -#define SPECIAL_MASK (0xF0000000UL) - -#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK) -#define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK) -#define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF)) - #define WM_NOTIFYICONMSG (WM_USER + 248) PKBSWITCHSETHOOKS KbSwitchSetHooks = NULL; diff --git a/base/shell/explorer/resource.h b/base/shell/explorer/resource.h index 1d79e677842..f78d7538e9a 100644 --- a/base/shell/explorer/resource.h +++ b/base/shell/explorer/resource.h @@ -109,6 +109,11 @@ /* These values must be synchronized with shell32 */ #define IDS_ADVANCED_DISPLAY_FAVORITES 30466 #define IDS_ADVANCED_DISPLAY_LOG_OFF 30467 +#define IDS_ADVANCED_EXPAND_CONTROL_PANEL 30468 +#define IDS_ADVANCED_EXPAND_MY_DOCUMENTS 30469 +#define IDS_ADVANCED_EXPAND_PRINTERS 30470 +#define IDS_ADVANCED_EXPAND_MY_PICTURES 30472 +#define IDS_ADVANCED_EXPAND_NET_CONNECTIONS 30473 #define IDS_ADVANCED_DISPLAY_RUN 30474 #define IDS_ADVANCED_DISPLAY_ADMINTOOLS 30476 diff --git a/base/shell/explorer/startmnucust.cpp b/base/shell/explorer/startmnucust.cpp index b4465de9722..922d4581aab 100644 --- a/base/shell/explorer/startmnucust.cpp +++ b/base/shell/explorer/startmnucust.cpp @@ -21,6 +21,7 @@ #include "precomp.h" +#define I_UNCHECKED 1 #define I_CHECKED 2 // TODO: Windows Explorer appears to be calling NewLinkHere / ConfigStartMenu directly for both items. @@ -82,34 +83,57 @@ struct CUSTOMIZE_ENTRY { LPARAM id; LPCWSTR name; - FN_CUSTOMIZE_READ fnRead; - FN_CUSTOMIZE_WRITE fnWrite; + BOOL bDefaultValue; + RESTRICTIONS policy1, policy2; }; -static DWORD CALLBACK CustomizeRead0(const CUSTOMIZE_ENTRY *entry) -{ - return GetAdvancedBool(entry->name, FALSE); -} - -static BOOL CALLBACK CustomizeWrite0(const CUSTOMIZE_ENTRY *entry, DWORD dwValue) -{ - return SetAdvancedDword(entry->name, dwValue); -} - static const CUSTOMIZE_ENTRY s_CustomizeEntries[] = { - // FIXME: Make "StartMenuAdminTools" effective - //{ IDS_ADVANCED_DISPLAY_ADMINTOOLS, L"StartMenuAdminTools", CustomizeRead1, CustomizeWrite1 }, // FIXME - - { IDS_ADVANCED_DISPLAY_FAVORITES, L"StartMenuFavorites", CustomizeRead0, CustomizeWrite0 }, - { IDS_ADVANCED_DISPLAY_LOG_OFF, L"StartMenuLogoff", CustomizeRead0, CustomizeWrite0 }, - - // FIXME: SHRestricted is buggy! - //{ IDS_ADVANCED_DISPLAY_RUN, L"NoRun", CustomizeRead2, CustomizeWrite2 }, + { + IDS_ADVANCED_DISPLAY_ADMINTOOLS, L"StartMenuAdminTools", TRUE, + }, + { + IDS_ADVANCED_DISPLAY_FAVORITES, L"StartMenuFavorites", FALSE, + REST_NOFAVORITESMENU + }, + { + IDS_ADVANCED_DISPLAY_LOG_OFF, L"StartMenuLogoff", FALSE, + REST_STARTMENULOGOFF + }, + { + IDS_ADVANCED_DISPLAY_RUN, L"StartMenuRun", TRUE, + REST_NORUN + }, + { + IDS_ADVANCED_EXPAND_MY_DOCUMENTS, L"CascadeMyDocuments", FALSE, + REST_NOSMMYDOCS + }, + { + IDS_ADVANCED_EXPAND_MY_PICTURES, L"CascadeMyPictures", FALSE, + REST_NOSMMYPICS + }, + { + IDS_ADVANCED_EXPAND_CONTROL_PANEL, L"CascadeControlPanel", FALSE, + REST_NOSETFOLDERS, REST_NOCONTROLPANEL, + }, + { + IDS_ADVANCED_EXPAND_PRINTERS, L"CascadePrinters", FALSE, + REST_NOSETFOLDERS + }, + { + IDS_ADVANCED_EXPAND_NET_CONNECTIONS, L"CascadeNetworkConnections", FALSE, + REST_NOSETFOLDERS, REST_NONETWORKCONNECTIONS + }, }; static VOID AddCustomizeItem(HWND hTreeView, const CUSTOMIZE_ENTRY *entry) { + if (SHRestricted(entry->policy1) || SHRestricted(entry->policy2)) + { + TRACE("%p: Restricted\n", entry->id); + return; // Restricted. Don't show + } + TV_INSERTSTRUCT Insert = { TVI_ROOT, TVI_LAST }; Insert.item.mask = TVIF_TEXT | TVIF_STATE | TVIF_PARAM; @@ -118,8 +142,9 @@ static VOID AddCustomizeItem(HWND hTreeView, const CUSTOMIZE_ENTRY *entry) Insert.item.pszText = szText; Insert.item.lParam = entry->id; Insert.item.stateMask = TVIS_STATEIMAGEMASK; - if (entry->fnRead(entry)) - Insert.item.state = INDEXTOSTATEIMAGEMASK(I_CHECKED); + BOOL bChecked = GetAdvancedBool(entry->name, entry->bDefaultValue); + Insert.item.state = INDEXTOSTATEIMAGEMASK(bChecked ? I_CHECKED : I_UNCHECKED); + TRACE("%p: %d\n", entry->id, bChecked); TreeView_InsertItem(hTreeView, &Insert); } @@ -142,7 +167,7 @@ static BOOL CustomizeClassic_OnOK(HWND hwnd) { HWND hTreeView = GetDlgItem(hwnd, IDC_CLASSICSTART_SETTINGS); - for (HTREEITEM hItem = TreeView_GetFirstVisible(hTreeView); + for (HTREEITEM hItem = TreeView_GetRoot(hTreeView); hItem != NULL; hItem = TreeView_GetNextVisible(hTreeView, hItem)) { @@ -151,12 +176,16 @@ static BOOL CustomizeClassic_OnOK(HWND hwnd) item.stateMask = TVIS_STATEIMAGEMASK; TreeView_GetItem(hTreeView, &item); - BOOL bChecked = (item.state & INDEXTOSTATEIMAGEMASK(I_CHECKED)); + BOOL bChecked = !!(item.state & INDEXTOSTATEIMAGEMASK(I_CHECKED)); for (auto& entry : s_CustomizeEntries) { + if (SHRestricted(entry.policy1) || SHRestricted(entry.policy2)) + continue; + if (item.lParam == entry.id) { - entry.fnWrite(&entry, bChecked); + TRACE("%p: %d\n", item.lParam, bChecked); + SetAdvancedDword(entry.name, bChecked); break; } } diff --git a/base/shell/explorer/startmnusite.cpp b/base/shell/explorer/startmnusite.cpp index 5f52b43de36..872a24e335e 100644 --- a/base/shell/explorer/startmnusite.cpp +++ b/base/shell/explorer/startmnusite.cpp @@ -130,107 +130,96 @@ class CStartMenuSite : /* Remove menu items that don't apply */ - dwLogoff = SHRestricted(REST_STARTMENULOGOFF); - bWantLogoff = (dwLogoff == 2 || - SHRestricted(REST_FORCESTARTMENULOGOFF) || - GetAdvancedBool(L"StartMenuLogoff", FALSE)); - /* Favorites */ - if (!GetAdvancedBool(L"StartMenuFavorites", FALSE)) + if (SHRestricted(REST_NOFAVORITESMENU) || + !GetAdvancedBool(L"StartMenuFavorites", FALSE)) { - DeleteMenu(hMenu, - IDM_FAVORITES, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_FAVORITES, MF_BYCOMMAND); } /* Documents */ - if (SHRestricted(REST_NORECENTDOCSMENU)) + if (SHRestricted(REST_NORECENTDOCSMENU) || + !GetAdvancedBool(L"Start_ShowRecentDocs", TRUE)) { - DeleteMenu(hMenu, - IDM_DOCUMENTS, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_DOCUMENTS, MF_BYCOMMAND); } /* Settings */ - hSettingsMenu = FindSubMenu(hMenu, - IDM_SETTINGS, - FALSE); - if (hSettingsMenu != NULL) + hSettingsMenu = FindSubMenu(hMenu, IDM_SETTINGS, FALSE); + + /* Control Panel */ + if (SHRestricted(REST_NOSETFOLDERS) || + SHRestricted(REST_NOCONTROLPANEL) || + !GetAdvancedBool(L"Start_ShowControlPanel", TRUE)) { - if (SHRestricted(REST_NOSETFOLDERS)) - { - /* Control Panel */ - if (SHRestricted(REST_NOCONTROLPANEL)) - { - DeleteMenu(hSettingsMenu, - IDM_CONTROLPANEL, - MF_BYCOMMAND); - - /* Delete the separator below it */ - DeleteMenu(hSettingsMenu, - 0, - MF_BYPOSITION); - } - - /* Network Connections */ - if (SHRestricted(REST_NONETWORKCONNECTIONS)) - { - DeleteMenu(hSettingsMenu, - IDM_NETWORKCONNECTIONS, - MF_BYCOMMAND); - } - - /* Printers and Faxes */ - DeleteMenu(hSettingsMenu, - IDM_PRINTERSANDFAXES, - MF_BYCOMMAND); - } + DeleteMenu(hSettingsMenu, IDM_CONTROLPANEL, MF_BYCOMMAND); - /* Security */ - if (GetSystemMetrics(SM_REMOTECONTROL) == 0 || - SHRestricted(REST_NOSECURITY)) - { - DeleteMenu(hSettingsMenu, - IDM_SECURITY, - MF_BYCOMMAND); - } + /* Delete the separator below it */ + DeleteMenu(hSettingsMenu, 0, MF_BYPOSITION); + } - if (GetMenuItemCount(hSettingsMenu) == 0) - { - DeleteMenu(hMenu, - IDM_SETTINGS, - MF_BYCOMMAND); - } + /* Network Connections */ + if (SHRestricted(REST_NOSETFOLDERS) || + SHRestricted(REST_NONETWORKCONNECTIONS) || + !GetAdvancedBool(L"Start_ShowNetConn", TRUE)) + { + DeleteMenu(hSettingsMenu, IDM_NETWORKCONNECTIONS, MF_BYCOMMAND); + } + + /* Printers and Faxes */ + if (SHRestricted(REST_NOSETFOLDERS) || + !GetAdvancedBool(L"Start_ShowPrinters", TRUE)) + { + DeleteMenu(hSettingsMenu, IDM_PRINTERSANDFAXES, MF_BYCOMMAND); + } + + /* Security */ + if (SHRestricted(REST_NOSETFOLDERS) || + GetSystemMetrics(SM_REMOTECONTROL) == 0 || + SHRestricted(REST_NOSECURITY)) + { + DeleteMenu(hSettingsMenu, IDM_SECURITY, MF_BYCOMMAND); + } + + /* Delete Settings menu if it was empty */ + if (GetMenuItemCount(hSettingsMenu) == 0) + { + DeleteMenu(hMenu, IDM_SETTINGS, MF_BYCOMMAND); } /* Search */ - if (SHRestricted(REST_NOFIND)) + if (SHRestricted(REST_NOFIND) || + !GetAdvancedBool(L"Start_ShowSearch", TRUE)) { - DeleteMenu(hMenu, - IDM_SEARCH, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_SEARCH, MF_BYCOMMAND); } - /* FIXME: Help */ + /* Help */ + if (SHRestricted(REST_NOSMHELP) || + !GetAdvancedBool(L"Start_ShowHelp", TRUE)) + { + DeleteMenu(hMenu, IDM_HELPANDSUPPORT, MF_BYCOMMAND); + } /* Run */ - if (SHRestricted(REST_NORUN)) + if (SHRestricted(REST_NORUN) || + !GetAdvancedBool(L"StartMenuRun", TRUE)) { - DeleteMenu(hMenu, - IDM_RUN, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_RUN, MF_BYCOMMAND); } /* Synchronize */ if (!ShowSynchronizeMenuItem()) { - DeleteMenu(hMenu, - IDM_SYNCHRONIZE, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_SYNCHRONIZE, MF_BYCOMMAND); uLastItemsCount--; } /* Log off */ + dwLogoff = SHRestricted(REST_STARTMENULOGOFF); + bWantLogoff = (dwLogoff == 2 || + SHRestricted(REST_FORCESTARTMENULOGOFF) || + GetAdvancedBool(L"StartMenuLogoff", FALSE)); if (dwLogoff != 1 && bWantLogoff) { /* FIXME: We need a more sophisticated way to determine whether to show @@ -248,53 +237,41 @@ class CStartMenuSite : szUser)) { /* We couldn't update the menu item, delete it... */ - DeleteMenu(hMenu, - IDM_LOGOFF, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_LOGOFF, MF_BYCOMMAND); } } else { - DeleteMenu(hMenu, - IDM_LOGOFF, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_LOGOFF, MF_BYCOMMAND); uLastItemsCount--; } - /* Disconnect */ - if (GetSystemMetrics(SM_REMOTECONTROL) == 0) + if (SHRestricted(REST_NODISCONNECT) || + GetSystemMetrics(SM_REMOTECONTROL) == 0) { - DeleteMenu(hMenu, - IDM_DISCONNECT, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_DISCONNECT, MF_BYCOMMAND); uLastItemsCount--; } /* Undock computer */ if (!ShowUndockMenuItem()) { - DeleteMenu(hMenu, - IDM_UNDOCKCOMPUTER, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_UNDOCKCOMPUTER, MF_BYCOMMAND); uLastItemsCount--; } /* Shut down */ if (SHRestricted(REST_NOCLOSE)) { - DeleteMenu(hMenu, - IDM_SHUTDOWN, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_SHUTDOWN, MF_BYCOMMAND); uLastItemsCount--; } if (uLastItemsCount == 0) { /* Remove the separator at the end of the menu */ - DeleteMenu(hMenu, - IDM_LASTSTARTMENU_SEPARATOR, - MF_BYCOMMAND); + DeleteMenu(hMenu, IDM_LASTSTARTMENU_SEPARATOR, MF_BYCOMMAND); } return S_OK; diff --git a/boot/boot_images.cmake b/boot/boot_images.cmake index ae3e600c05b..a140a4b1104 100644 --- a/boot/boot_images.cmake +++ b/boot/boot_images.cmake @@ -100,7 +100,7 @@ function(add_user_profile_dirs _image_filelist _rootdir _username) file(APPEND ${_image_filelist} "${_rootdir}/${_username}/Recent=${CMAKE_CURRENT_BINARY_DIR}/empty\n") file(APPEND ${_image_filelist} "${_rootdir}/${_username}/SendTo=${CMAKE_CURRENT_BINARY_DIR}/empty\n") file(APPEND ${_image_filelist} "${_rootdir}/${_username}/Start Menu/Programs=${CMAKE_CURRENT_BINARY_DIR}/empty\n") - file(APPEND ${_image_filelist} "${_rootdir}/${_username}/Start Menu/Programs/Administrative Tools=${CMAKE_CURRENT_BINARY_DIR}/empty\n") + #file(APPEND ${_image_filelist} "${_rootdir}/${_username}/Start Menu/Programs/Administrative Tools=${CMAKE_CURRENT_BINARY_DIR}/empty\n") # CORE-12328 file(APPEND ${_image_filelist} "${_rootdir}/${_username}/Start Menu/Programs/StartUp=${CMAKE_CURRENT_BINARY_DIR}/empty\n") file(APPEND ${_image_filelist} "${_rootdir}/${_username}/Templates=${CMAKE_CURRENT_BINARY_DIR}/empty\n") endfunction() diff --git a/boot/freeldr/freeldr/arch/i386/hwdisk.c b/boot/freeldr/freeldr/arch/i386/hwdisk.c index 0a7ef8600ae..421fd38d48c 100644 --- a/boot/freeldr/freeldr/arch/i386/hwdisk.c +++ b/boot/freeldr/freeldr/arch/i386/hwdisk.c @@ -28,6 +28,9 @@ DBG_DEFAULT_CHANNEL(HWDETECT); * This is the common code for harddisk for both the PC and the XBOX. */ +#define FIRST_BIOS_DISK 0x80 +#define FIRST_PARTITION 1 + typedef struct tagDISKCONTEXT { UCHAR DriveNumber; @@ -248,7 +251,7 @@ static const DEVVTBL DiskVtbl = PCHAR GetHarddiskIdentifier(UCHAR DriveNumber) { - return PcDiskIdentifier[DriveNumber - 0x80]; + return PcDiskIdentifier[DriveNumber - FIRST_BIOS_DISK]; } static VOID @@ -262,7 +265,7 @@ GetHarddiskInformation(UCHAR DriveNumber) BOOLEAN ValidPartitionTable; CHAR ArcName[MAX_PATH]; PARTITION_TABLE_ENTRY PartitionTableEntry; - PCHAR Identifier = PcDiskIdentifier[DriveNumber - 0x80]; + PCHAR Identifier = PcDiskIdentifier[DriveNumber - FIRST_BIOS_DISK]; /* Detect disk partition type */ DiskDetectPartitionType(DriveNumber); @@ -272,7 +275,7 @@ GetHarddiskInformation(UCHAR DriveNumber) { ERR("Reading MBR failed\n"); /* We failed, use a default identifier */ - sprintf(Identifier, "BIOSDISK%d", DriveNumber - 0x80 + 1); + sprintf(Identifier, "BIOSDISK%d", DriveNumber - FIRST_BIOS_DISK + 1); return; } @@ -294,20 +297,20 @@ GetHarddiskInformation(UCHAR DriveNumber) ValidPartitionTable = (Mbr->MasterBootRecordMagic == 0xAA55); /* Fill out the ARC disk block */ - sprintf(ArcName, "multi(0)disk(0)rdisk(%u)", DriveNumber - 0x80); + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)", DriveNumber - FIRST_BIOS_DISK); AddReactOSArcDiskInfo(ArcName, Signature, Checksum, ValidPartitionTable); - sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(0)", DriveNumber - 0x80); + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(0)", DriveNumber - FIRST_BIOS_DISK); FsRegisterDevice(ArcName, &DiskVtbl); /* Add partitions */ - i = 1; + i = FIRST_PARTITION; DiskReportError(FALSE); while (DiskGetPartitionEntry(DriveNumber, i, &PartitionTableEntry)) { if (PartitionTableEntry.SystemIndicator != PARTITION_ENTRY_UNUSED) { - sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(%lu)", DriveNumber - 0x80, i); + sprintf(ArcName, "multi(0)disk(0)rdisk(%u)partition(%lu)", DriveNumber - FIRST_BIOS_DISK, i); FsRegisterDevice(ArcName, &DiskVtbl); } i++; @@ -350,7 +353,7 @@ EnumerateHarddisks(OUT PBOOLEAN BootDriveReported) /* Count the number of visible harddisk drives */ DiskReportError(FALSE); DiskCount = 0; - DriveNumber = 0x80; + DriveNumber = FIRST_BIOS_DISK; ASSERT(DiskReadBufferSize > 0); @@ -432,7 +435,7 @@ DiskGetBootPath(BOOLEAN IsPxe) // RtlStringCbPrintfA(FrLdrBootPath, sizeof(FrLdrBootPath), "ramdisk(%u)", 0); RtlStringCbCopyA(FrLdrBootPath, sizeof(FrLdrBootPath), "ramdisk(0)"); } - else if (FrldrBootDrive < 0x80) + else if (FrldrBootDrive < FIRST_BIOS_DISK) { /* This is a floppy */ RtlStringCbPrintfA(FrLdrBootPath, sizeof(FrLdrBootPath), @@ -442,7 +445,7 @@ DiskGetBootPath(BOOLEAN IsPxe) { /* Boot Partition 0xFF is the magic value that indicates booting from CD-ROM (see isoboot.S) */ RtlStringCbPrintfA(FrLdrBootPath, sizeof(FrLdrBootPath), - "multi(0)disk(0)cdrom(%u)", FrldrBootDrive - 0x80); + "multi(0)disk(0)cdrom(%u)", FrldrBootDrive - FIRST_BIOS_DISK); } else { @@ -460,7 +463,7 @@ DiskGetBootPath(BOOLEAN IsPxe) RtlStringCbPrintfA(FrLdrBootPath, sizeof(FrLdrBootPath), "multi(0)disk(0)rdisk(%u)partition(%lu)", - FrldrBootDrive - 0x80, FrldrBootPartition); + FrldrBootDrive - FIRST_BIOS_DISK, FrldrBootPartition); } return TRUE; @@ -479,7 +482,7 @@ PcInitializeBootDevices(VOID) DiskGetBootPath(PxeInit()); /* Add it, if it's a floppy or cdrom */ - if ((FrldrBootDrive >= 0x80 && !BootDriveReported) || + if ((FrldrBootDrive >= FIRST_BIOS_DISK && !BootDriveReported) || DiskIsDriveRemovable(FrldrBootDrive)) { /* TODO: Check if it's really a CDROM drive */ diff --git a/boot/freeldr/freeldr/arch/uefi/stubs.c b/boot/freeldr/freeldr/arch/uefi/stubs.c index e9263d60ba3..f63bd4d2105 100644 --- a/boot/freeldr/freeldr/arch/uefi/stubs.c +++ b/boot/freeldr/freeldr/arch/uefi/stubs.c @@ -7,8 +7,6 @@ #include -#include - #ifndef _M_ARM /* TODO: Handle this with custom Disk / partition setup */ UCHAR diff --git a/boot/freeldr/freeldr/arch/uefi/ueficon.c b/boot/freeldr/freeldr/arch/uefi/ueficon.c index 6dc6eb5b8b6..b3471fd1b83 100644 --- a/boot/freeldr/freeldr/arch/uefi/ueficon.c +++ b/boot/freeldr/freeldr/arch/uefi/ueficon.c @@ -77,6 +77,21 @@ ConvertToBiosExtValue(UCHAR KeyIn) return KEY_RIGHT; case SCAN_LEFT: return KEY_LEFT; + case SCAN_HOME: + return KEY_HOME; + case SCAN_END: + return KEY_END; + + // case SCAN_INSERT: + // break; + + case SCAN_DELETE: + return KEY_DELETE; + + // case SCAN_PAGE_UP: + // case SCAN_PAGE_DOWN: + // break; + case SCAN_F1: return KEY_F1; case SCAN_F2: @@ -99,8 +114,6 @@ ConvertToBiosExtValue(UCHAR KeyIn) return KEY_F10; case SCAN_ESC: return KEY_ESC; - case SCAN_DELETE: - return KEY_DELETE; } return 0; } diff --git a/boot/freeldr/freeldr/arch/uefi/uefidisk.c b/boot/freeldr/freeldr/arch/uefi/uefidisk.c index 4905e2b867f..2d5458d4707 100644 --- a/boot/freeldr/freeldr/arch/uefi/uefidisk.c +++ b/boot/freeldr/freeldr/arch/uefi/uefidisk.c @@ -98,7 +98,7 @@ UefiGetBootPartitionEntry( { TRACE("Boot PartitionNumber is 0\n"); /* The OffsetToBoot is equal to the RootIdentifier */ - PartitionNum = 1; + PartitionNum = FIRST_PARTITION; } *BootPartition = PartitionNum; @@ -395,7 +395,7 @@ UefiSetupBlockDevices(VOID) PcBiosDiskCount = 0; UefiBootRootIdentifier = 0; - /* 1) Setup a list of boothandles by using the LocateHandle protocol */ + /* 1) Setup a list of boot handles by using the LocateHandle protocol */ Status = GlobalSystemTable->BootServices->LocateHandle(ByProtocol, &bioGuid, NULL, &handle_size, handles); handles = MmAllocateMemoryWithType(handle_size, LoaderFirmwareTemporary); Status = GlobalSystemTable->BootServices->LocateHandle(ByProtocol, &bioGuid, NULL, &handle_size, handles); diff --git a/boot/freeldr/freeldr/arch/uefi/uefisetup.c b/boot/freeldr/freeldr/arch/uefi/uefisetup.c index ec3b0d405a6..a7950c67621 100644 --- a/boot/freeldr/freeldr/arch/uefi/uefisetup.c +++ b/boot/freeldr/freeldr/arch/uefi/uefisetup.c @@ -52,7 +52,7 @@ MachInit(const char *CmdLine) MachVtbl.HwIdle = UefiHwIdle; /* Setup GOP */ - if (UefiInitalizeVideo() != EFI_SUCCESS) + if (UefiInitializeVideo() != EFI_SUCCESS) { ERR("Failed to setup GOP\n"); } diff --git a/boot/freeldr/freeldr/arch/uefi/uefivid.c b/boot/freeldr/freeldr/arch/uefi/uefivid.c index 341798c4d85..2afd69aee18 100644 --- a/boot/freeldr/freeldr/arch/uefi/uefivid.c +++ b/boot/freeldr/freeldr/arch/uefi/uefivid.c @@ -28,7 +28,7 @@ EFI_GUID EfiGraphicsOutputProtocol = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; /* FUNCTIONS ******************************************************************/ EFI_STATUS -UefiInitalizeVideo(VOID) +UefiInitializeVideo(VOID) { EFI_STATUS Status; EFI_GRAPHICS_OUTPUT_PROTOCOL* gop = NULL; diff --git a/boot/freeldr/freeldr/bootmgr.c b/boot/freeldr/freeldr/bootmgr.c index 2c837951fec..98abf5ed955 100644 --- a/boot/freeldr/freeldr/bootmgr.c +++ b/boot/freeldr/freeldr/bootmgr.c @@ -26,31 +26,33 @@ DBG_DEFAULT_CHANNEL(WARNING); /* GLOBALS ********************************************************************/ -typedef -VOID +typedef VOID (*EDIT_OS_ENTRY_PROC)( - IN OUT OperatingSystemItem* OperatingSystem); + _Inout_ OperatingSystemItem* OperatingSystem); static VOID EditCustomBootReactOSSetup( - IN OUT OperatingSystemItem* OperatingSystem) + _Inout_ OperatingSystemItem* OperatingSystem) { EditCustomBootReactOS(OperatingSystem, TRUE); } static VOID EditCustomBootNTOS( - IN OUT OperatingSystemItem* OperatingSystem) + _Inout_ OperatingSystemItem* OperatingSystem) { EditCustomBootReactOS(OperatingSystem, FALSE); } -static const struct +typedef struct _OS_LOADING_METHOD { PCSTR BootType; EDIT_OS_ENTRY_PROC EditOsEntry; ARC_ENTRY_POINT OsLoader; -} OSLoadingMethods[] = +} OS_LOADING_METHOD, *POS_LOADING_METHOD; + +static const OS_LOADING_METHOD +OSLoadingMethods[] = { {"ReactOSSetup", EditCustomBootReactOSSetup, LoadReactOSSetup}, @@ -71,13 +73,40 @@ static const struct /* FUNCTIONS ******************************************************************/ +static const OS_LOADING_METHOD* +GetOSLoadingMethod( + _In_ ULONG_PTR SectionId) +{ + ULONG i; + CHAR BootType[80]; + + /* The operating system section has been opened by InitOperatingSystemList() */ + ASSERT(SectionId != 0); + + /* Try to read the boot type. We must have the value (it + * has been possibly added by InitOperatingSystemList()) */ + *BootType = ANSI_NULL; + IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType)); + ASSERT(*BootType); + + /* Find the suitable OS loading method */ + for (i = 0; ; ++i) + { + if (i >= RTL_NUMBER_OF(OSLoadingMethods)) + return NULL; + if (_stricmp(BootType, OSLoadingMethods[i].BootType) == 0) + return &OSLoadingMethods[i]; + } + UNREACHABLE; +} + /* * This function converts the list of key=value options in the given operating * system section into an ARC-compatible argument vector, providing in addition * the extra mandatory Software Loading Environment Variables, following the * ARC specification. */ -PCHAR* +static PCHAR* BuildArgvForOsLoader( IN PCSTR LoadIdentifier, IN ULONG_PTR SectionId, @@ -177,23 +206,25 @@ BuildArgvForOsLoader( return Argv; } -VOID LoadOperatingSystem(IN OperatingSystemItem* OperatingSystem) +VOID +LoadOperatingSystem( + _In_ OperatingSystemItem* OperatingSystem) { ULONG_PTR SectionId = OperatingSystem->SectionId; - ULONG i; + const OS_LOADING_METHOD* OSLoadingMethod; ULONG Argc; PCHAR* Argv; - CHAR BootType[80]; - - /* The operating system section has been opened by InitOperatingSystemList() */ - ASSERT(SectionId != 0); - /* Try to read the boot type */ - *BootType = ANSI_NULL; - IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType)); + /* Find the suitable OS loader to start */ + OSLoadingMethod = GetOSLoadingMethod(SectionId); + if (!OSLoadingMethod) + return; + ASSERT(OSLoadingMethod->OsLoader); - /* We must have the "BootType" value (it has been possibly added by InitOperatingSystemList()) */ - ASSERT(*BootType); + /* Build the ARC-compatible argument vector */ + Argv = BuildArgvForOsLoader(OperatingSystem->LoadIdentifier, SectionId, &Argc); + if (!Argv) + return; // Unexpected failure. #ifdef _M_IX86 #ifndef UEFIBOOT @@ -202,56 +233,25 @@ VOID LoadOperatingSystem(IN OperatingSystemItem* OperatingSystem) #endif #endif - /* Find the suitable OS loader to start */ - for (i = 0; ; ++i) - { - if (i >= RTL_NUMBER_OF(OSLoadingMethods)) - return; - if (_stricmp(BootType, OSLoadingMethods[i].BootType) == 0) - break; - } - - /* Build the ARC-compatible argument vector */ - Argv = BuildArgvForOsLoader(OperatingSystem->LoadIdentifier, SectionId, &Argc); - if (!Argv) - return; // Unexpected failure. - /* Start the OS loader */ - OSLoadingMethods[i].OsLoader(Argc, Argv, NULL); + OSLoadingMethod->OsLoader(Argc, Argv, NULL); FrLdrHeapFree(Argv, TAG_STRING); } #ifdef HAS_OPTION_MENU_EDIT_CMDLINE - -VOID EditOperatingSystemEntry(IN OperatingSystemItem* OperatingSystem) +VOID +EditOperatingSystemEntry( + _Inout_ OperatingSystemItem* OperatingSystem) { - ULONG_PTR SectionId = OperatingSystem->SectionId; - ULONG i; - CHAR BootType[80]; - - /* The operating system section has been opened by InitOperatingSystemList() */ - ASSERT(SectionId != 0); - - /* Try to read the boot type */ - *BootType = ANSI_NULL; - IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType)); - - /* We must have the "BootType" value (it has been possibly added by InitOperatingSystemList()) */ - ASSERT(*BootType); - - /* Find the suitable OS entry editor */ - for (i = 0; ; ++i) + /* Find the suitable OS entry editor and open it */ + const OS_LOADING_METHOD* OSLoadingMethod = + GetOSLoadingMethod(OperatingSystem->SectionId); + if (OSLoadingMethod) { - if (i >= RTL_NUMBER_OF(OSLoadingMethods)) - return; - if (_stricmp(BootType, OSLoadingMethods[i].BootType) == 0) - break; + ASSERT(OSLoadingMethod->EditOsEntry); + OSLoadingMethod->EditOsEntry(OperatingSystem); } - - /* Run it */ - OSLoadingMethods[i].EditOsEntry(OperatingSystem); } - #endif // HAS_OPTION_MENU_EDIT_CMDLINE static LONG diff --git a/boot/freeldr/freeldr/include/arch/uefi/machuefi.h b/boot/freeldr/freeldr/include/arch/uefi/machuefi.h index 6df376b1494..dbae085dbd2 100644 --- a/boot/freeldr/freeldr/include/arch/uefi/machuefi.h +++ b/boot/freeldr/freeldr/include/arch/uefi/machuefi.h @@ -7,24 +7,17 @@ #include -EFI_STATUS -UefiMachInit(_In_ EFI_HANDLE ImageHandle, - _In_ EFI_SYSTEM_TABLE *SystemTable); - VOID UefiConsPutChar(int Ch); BOOLEAN UefiConsKbHit(VOID); -VOID -UefiConsSetCursor(UINT32 Col, UINT32 Row); - int UefiConsGetCh(void); EFI_STATUS -UefiInitalizeVideo(VOID); +UefiInitializeVideo(VOID); VOID UefiVideoClearScreen(UCHAR Attr); @@ -47,10 +40,6 @@ UefiVideoSetTextCursorPosition(UCHAR X, UCHAR Y); VOID UefiVideoHideShowTextCursor(BOOLEAN Show); -VOID -UefiVideoOutputChar(UCHAR Char, unsigned X, - unsigned Y, ULONG FgColor, ULONG BgColor); - VOID UefiVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y); diff --git a/boot/freeldr/freeldr/include/freeldr.h b/boot/freeldr/freeldr/include/freeldr.h index 91b196f5600..f37e585b232 100644 --- a/boot/freeldr/freeldr/include/freeldr.h +++ b/boot/freeldr/freeldr/include/freeldr.h @@ -31,7 +31,6 @@ /* Public headers */ #ifdef __REACTOS__ -#define NTOSAPI #include #include #include @@ -114,11 +113,9 @@ #include #endif #include -#include #elif defined(_M_AMD64) #include #include -#include #elif defined(_M_PPC) #include #elif defined(_M_ARM) @@ -128,10 +125,17 @@ #endif VOID __cdecl BootMain(IN PCCH CmdLine); -VOID LoadOperatingSystem(IN OperatingSystemItem* OperatingSystem); + +VOID +LoadOperatingSystem( + _In_ OperatingSystemItem* OperatingSystem); + #ifdef HAS_OPTION_MENU_EDIT_CMDLINE -VOID EditOperatingSystemEntry(IN OperatingSystemItem* OperatingSystem); +VOID +EditOperatingSystemEntry( + _Inout_ OperatingSystemItem* OperatingSystem); #endif + VOID RunLoader(VOID); VOID FrLdrCheckCpuCompatibility(VOID); diff --git a/boot/freeldr/freeldr/include/ui.h b/boot/freeldr/freeldr/include/ui.h index 7a7e5cfc6e3..1b47cc89447 100644 --- a/boot/freeldr/freeldr/include/ui.h +++ b/boot/freeldr/freeldr/include/ui.h @@ -49,11 +49,7 @@ extern CHAR UiTimeText[260]; extern const PCSTR UiMonthNames[12]; -/////////////////////////////////////////////////////////////////////////////////////// -// -// User Interface Functions -// -/////////////////////////////////////////////////////////////////////////////////////// +/* User Interface Functions **************************************************/ BOOLEAN UiInitialize(BOOLEAN ShowUi); // Initialize User-Interface VOID UiUnInitialize(PCSTR BootText); // Un-initialize User-Interface @@ -91,10 +87,21 @@ UiDrawCenteredText( VOID UiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen VOID UiUpdateDateTime(VOID); // Updates the date and time -VOID UiInfoBox(PCSTR MessageText); // Displays a info box on the screen -VOID UiMessageBox(PCSTR Format, ...); // Displays a message box on the screen with an ok button -VOID UiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources +/* Displays an info box on the screen */ +VOID +UiInfoBox( + _In_ PCSTR MessageText); + +/* Displays a message box on the screen with an ok button */ +VOID +UiMessageBox( + _In_ PCSTR Format, ...); + +/* Displays a message box on the screen with an ok button using no system resources */ +VOID +UiMessageBoxCritical( + _In_ PCSTR MessageText); /* Loading Progress-Bar Functions ********************************************/ @@ -192,11 +199,7 @@ UCHAR UiTextToFillStyle(PCSTR FillStyleText); // Converts the VOID UiFadeInBackdrop(VOID); // Draws the backdrop and fades the screen in VOID UiFadeOut(VOID); // Fades the screen out -/////////////////////////////////////////////////////////////////////////////////////// -// -// Menu Functions -// -/////////////////////////////////////////////////////////////////////////////////////// +/* Menu Functions ************************************************************/ typedef struct tagUI_MENU_INFO { diff --git a/boot/freeldr/freeldr/include/ui/gui.h b/boot/freeldr/freeldr/include/ui/gui.h index a2ce9373ad3..e1b2be55890 100644 --- a/boot/freeldr/freeldr/include/ui/gui.h +++ b/boot/freeldr/freeldr/include/ui/gui.h @@ -21,11 +21,8 @@ #define TITLE_BOX_CHAR_HEIGHT 5 -/////////////////////////////////////////////////////////////////////////////////////// -// -// Graphical User Interface Functions -// -/////////////////////////////////////////////////////////////////////////////////////// +/* Graphical User Interface Functions ****************************************/ + VOID GuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified @@ -34,20 +31,34 @@ VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text VOID GuiDrawText2(ULONG X, ULONG Y, ULONG MaxNumChars, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified VOID GuiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen VOID GuiUpdateDateTime(VOID); // Updates the date and time -VOID GuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later -VOID GuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save -VOID GuiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button -VOID GuiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources + +/* Saves the screen so that it can be restored later */ +_Ret_maybenull_ +__drv_allocatesMem(Mem) +PUCHAR +GuiSaveScreen(VOID); + +/* Restores the screen from a previous save */ +VOID +GuiRestoreScreen( + _In_opt_ __drv_freesMem(Mem) PUCHAR Buffer); + +/* Displays a message box on the screen with an ok button */ +VOID +GuiMessageBox( + _In_ PCSTR MessageText); + +/* Displays a message box on the screen with an ok button using no system resources */ +VOID +GuiMessageBoxCritical( + _In_ PCSTR MessageText); + VOID GuiDrawProgressBar(ULONG Position, ULONG Range); // Draws the progress bar showing nPos percent filled UCHAR GuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value UCHAR GuiTextToFillStyle(PCSTR FillStyleText); // Converts the text fill into it's equivalent fill value -/////////////////////////////////////////////////////////////////////////////////////// -// -// Menu Functions -// -/////////////////////////////////////////////////////////////////////////////////////// +/* Menu Functions ************************************************************/ BOOLEAN GuiDisplayMenu( diff --git a/boot/freeldr/freeldr/include/ui/noui.h b/boot/freeldr/freeldr/include/ui/noui.h index 72eca1a9298..df986bfd178 100644 --- a/boot/freeldr/freeldr/include/ui/noui.h +++ b/boot/freeldr/freeldr/include/ui/noui.h @@ -47,8 +47,14 @@ NoUiDrawCenteredText( VOID NoUiDrawStatusText(PCSTR StatusText); VOID NoUiUpdateDateTime(VOID); -VOID NoUiMessageBox(PCSTR MessageText); -VOID NoUiMessageBoxCritical(PCSTR MessageText); + +VOID +NoUiMessageBox( + _In_ PCSTR MessageText); + +VOID +NoUiMessageBoxCritical( + _In_ PCSTR MessageText); /* Loading Progress-Bar Functions ********************************************/ diff --git a/boot/freeldr/freeldr/include/ui/tui.h b/boot/freeldr/freeldr/include/ui/tui.h index cb90ae214a3..9017c0b4ef6 100644 --- a/boot/freeldr/freeldr/include/ui/tui.h +++ b/boot/freeldr/freeldr/include/ui/tui.h @@ -101,10 +101,27 @@ TuiDrawCenteredText( VOID TuiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen VOID TuiUpdateDateTime(VOID); // Updates the date and time -VOID TuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later -VOID TuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save -VOID TuiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button -VOID TuiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources + +/* Saves the screen so that it can be restored later */ +_Ret_maybenull_ +__drv_allocatesMem(Mem) +PUCHAR +TuiSaveScreen(VOID); + +/* Restores the screen from a previous save */ +VOID +TuiRestoreScreen( + _In_opt_ __drv_freesMem(Mem) PUCHAR Buffer); + +/* Displays a message box on the screen with an ok button */ +VOID +TuiMessageBox( + _In_ PCSTR MessageText); + +/* Displays a message box on the screen with an ok button using no system resources */ +VOID +TuiMessageBoxCritical( + _In_ PCSTR MessageText); BOOLEAN TuiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length); UCHAR TuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value diff --git a/boot/freeldr/freeldr/lib/inifile/inifile.c b/boot/freeldr/freeldr/lib/inifile/inifile.c index a15102f28da..a1bd7c9f91a 100644 --- a/boot/freeldr/freeldr/lib/inifile/inifile.c +++ b/boot/freeldr/freeldr/lib/inifile/inifile.c @@ -24,14 +24,18 @@ DBG_DEFAULT_CHANNEL(INIFILE); BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId) { - PINI_SECTION Section; + PLIST_ENTRY Entry; + PINI_SECTION Section; TRACE("IniOpenSection() SectionName = %s\n", SectionName); - // Loop through each section and find the one they want - Section = CONTAINING_RECORD(IniFileSectionListHead.Flink, INI_SECTION, ListEntry); - while (&Section->ListEntry != &IniFileSectionListHead) + // Loop through each section and find the one we want + for (Entry = IniFileSectionListHead.Flink; + Entry != &IniFileSectionListHead; + Entry = Entry->Flink) { + Section = CONTAINING_RECORD(Entry, INI_SECTION, ListEntry); + // Compare against the section name if (_stricmp(SectionName, Section->SectionName) == 0) { @@ -41,9 +45,6 @@ BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId) TRACE("IniOpenSection() Found it! SectionId = 0x%x\n", SectionId); return TRUE; } - - // Get the next section in the list - Section = CONTAINING_RECORD(Section->ListEntry.Flink, INI_SECTION, ListEntry); } TRACE("IniOpenSection() Section not found.\n"); @@ -53,7 +54,7 @@ BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId) ULONG IniGetNumSectionItems(ULONG_PTR SectionId) { - PINI_SECTION Section = (PINI_SECTION)SectionId; + PINI_SECTION Section = (PINI_SECTION)SectionId; TRACE("IniGetNumSectionItems() SectionId = 0x%x\n", SectionId); TRACE("IniGetNumSectionItems() Item count = %d\n", Section->SectionItemCount); @@ -63,14 +64,18 @@ ULONG IniGetNumSectionItems(ULONG_PTR SectionId) PINI_SECTION_ITEM IniGetSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber) { - PINI_SECTION Section = (PINI_SECTION)SectionId; - PINI_SECTION_ITEM SectionItem; + PINI_SECTION Section = (PINI_SECTION)SectionId; + PLIST_ENTRY Entry; + PINI_SECTION_ITEM SectionItem; - // Loop through each section item and find the one they want - SectionItem = CONTAINING_RECORD(Section->SectionItemList.Flink, INI_SECTION_ITEM, ListEntry); - while (&SectionItem->ListEntry != &Section->SectionItemList) + // Loop through each section item and find the one we want + for (Entry = Section->SectionItemList.Flink; + Entry != &Section->SectionItemList; + Entry = Entry->Flink) { - // Check to see if this is the setting they want + SectionItem = CONTAINING_RECORD(Entry, INI_SECTION_ITEM, ListEntry); + + // Check to see if this is the setting we want if (SettingNumber == 0) { return SectionItem; @@ -78,16 +83,13 @@ PINI_SECTION_ITEM IniGetSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber // Nope, keep going SettingNumber--; - - // Get the next section item in the list - SectionItem = CONTAINING_RECORD(SectionItem->ListEntry.Flink, INI_SECTION_ITEM, ListEntry); } return NULL; } ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex) { - PINI_SECTION_ITEM SectionItem; + PINI_SECTION_ITEM SectionItem; // Retrieve requested setting SectionItem = IniGetSettingByNumber(SectionId, SettingIndex); @@ -100,7 +102,7 @@ ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex) ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex) { - PINI_SECTION_ITEM SectionItem; + PINI_SECTION_ITEM SectionItem; // Retrieve requested setting SectionItem = IniGetSettingByNumber(SectionId, SettingIndex); @@ -146,16 +148,20 @@ BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR S BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG BufferSize) { - PINI_SECTION Section = (PINI_SECTION)SectionId; - PINI_SECTION_ITEM SectionItem; + PINI_SECTION Section = (PINI_SECTION)SectionId; + PLIST_ENTRY Entry; + PINI_SECTION_ITEM SectionItem; TRACE("IniReadSettingByName() SectionId = 0x%x\n", SectionId); - // Loop through each section item and find the one they want - SectionItem = CONTAINING_RECORD(Section->SectionItemList.Flink, INI_SECTION_ITEM, ListEntry); - while (&SectionItem->ListEntry != &Section->SectionItemList) + // Loop through each section item and find the one we want + for (Entry = Section->SectionItemList.Flink; + Entry != &Section->SectionItemList; + Entry = Entry->Flink) { - // Check to see if this is the setting they want + SectionItem = CONTAINING_RECORD(Entry, INI_SECTION_ITEM, ListEntry); + + // Check to see if this is the setting we want if (_stricmp(SettingName, SectionItem->ItemName) == 0) { TRACE("IniReadSettingByName() Setting \'%s\' found.\n", SettingName); @@ -166,9 +172,6 @@ BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffe return TRUE; } - - // Get the next section item in the list - SectionItem = CONTAINING_RECORD(SectionItem->ListEntry.Flink, INI_SECTION_ITEM, ListEntry); } WARN("IniReadSettingByName() Setting \'%s\' not found.\n", SettingName); @@ -178,7 +181,7 @@ BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffe BOOLEAN IniAddSection(PCSTR SectionName, ULONG_PTR* SectionId) { - PINI_SECTION Section; + PINI_SECTION Section; // Allocate a new section structure Section = FrLdrTempAlloc(sizeof(INI_SECTION), TAG_INI_SECTION); @@ -251,8 +254,8 @@ VOID IniCleanup(VOID) BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue) { - PINI_SECTION Section = (PINI_SECTION)SectionId; - PINI_SECTION_ITEM SectionItem; + PINI_SECTION Section = (PINI_SECTION)SectionId; + PINI_SECTION_ITEM SectionItem; // Allocate a new item structure SectionItem = FrLdrTempAlloc(sizeof(INI_SECTION_ITEM), TAG_INI_SECTION_ITEM); @@ -292,26 +295,27 @@ BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCST BOOLEAN IniModifySettingValue(ULONG_PTR SectionId, PCSTR SettingName, PCSTR SettingValue) { - PINI_SECTION Section = (PINI_SECTION)SectionId; - PINI_SECTION_ITEM SectionItem; + PINI_SECTION Section = (PINI_SECTION)SectionId; + PLIST_ENTRY Entry; + PINI_SECTION_ITEM SectionItem; PCHAR NewItemValue; // Loop through each section item and find the one we want - SectionItem = CONTAINING_RECORD(Section->SectionItemList.Flink, INI_SECTION_ITEM, ListEntry); - while (&SectionItem->ListEntry != &Section->SectionItemList) + for (Entry = Section->SectionItemList.Flink; + Entry != &Section->SectionItemList; + Entry = Entry->Flink) { + SectionItem = CONTAINING_RECORD(Entry, INI_SECTION_ITEM, ListEntry); + // Check to see if this is the setting we want if (_stricmp(SectionItem->ItemName, SettingName) == 0) { break; } - // Nope, keep going - // Get the next section item in the list - SectionItem = CONTAINING_RECORD(SectionItem->ListEntry.Flink, INI_SECTION_ITEM, ListEntry); } // If the section item does not exist, create it - if (&SectionItem->ListEntry == &Section->SectionItemList) + if (Entry == &Section->SectionItemList) { return IniAddSettingValueToSection(SectionId, SettingName, SettingValue); } diff --git a/boot/freeldr/freeldr/lib/inifile/parse.c b/boot/freeldr/freeldr/lib/inifile/parse.c index 9a3c161e0ab..ab36448e40e 100644 --- a/boot/freeldr/freeldr/lib/inifile/parse.c +++ b/boot/freeldr/freeldr/lib/inifile/parse.c @@ -22,10 +22,10 @@ #include DBG_DEFAULT_CHANNEL(INIFILE); -LIST_ENTRY IniFileSectionListHead; -BOOLEAN IniFileSectionInitialized = FALSE; -ULONG IniFileSectionCount = 0; -ULONG IniFileSettingCount = 0; +LIST_ENTRY IniFileSectionListHead = {&IniFileSectionListHead, &IniFileSectionListHead}; +BOOLEAN IniFileSectionInitialized = FALSE; +ULONG IniFileSectionCount = 0; +ULONG IniFileSettingCount = 0; BOOLEAN IniParseFile(PCHAR IniFileData, ULONG IniFileSize) @@ -122,9 +122,9 @@ BOOLEAN IniParseFile(PCHAR IniFileData, ULONG IniFileSize) // First check to make sure we're inside a [section] if (CurrentSection == NULL) { - printf("Error: freeldr.ini:%lu: Setting '%s' found outside of a [section].\n", CurrentLineNumber, IniFileLine); - printf("Press any key to continue...\n"); - MachConsGetCh(); + ERR("Error: freeldr.ini:%lu: Setting '%s' found outside of a [section].\n", CurrentLineNumber, IniFileLine); + + // Skip it CurrentLineNumber++; continue; } diff --git a/boot/freeldr/freeldr/lib/mm/heap.c b/boot/freeldr/freeldr/lib/mm/heap.c index 7f2fda05380..35adcd35039 100644 --- a/boot/freeldr/freeldr/lib/mm/heap.c +++ b/boot/freeldr/freeldr/lib/mm/heap.c @@ -71,6 +71,7 @@ FrLdrHeapCreate( PHEAP_BLOCK Block; SIZE_T Remaining; USHORT PreviousSize; + TRACE("HeapCreate(MemoryType=%ld)\n", MemoryType); /* Allocate some memory for the heap */ @@ -78,7 +79,7 @@ FrLdrHeapCreate( Heap = MmAllocateMemoryWithType(MaximumSize, MemoryType); if (!Heap) { - ERR("HEAP: Failed to allocate heap of size 0x%lx, Type\n", + ERR("HEAP: Failed to allocate heap of size 0x%lx, Type %lu\n", MaximumSize, MemoryType); return NULL; } @@ -445,6 +446,7 @@ FrLdrHeapFreeEx( #if DBG && !defined(_M_ARM) ULONGLONG Time = __rdtsc(); #endif + TRACE("HeapFree(%p, %p)\n", HeapHandle, Pointer); ASSERT(Tag != 'dnE#'); diff --git a/boot/freeldr/freeldr/lib/mm/meminit.c b/boot/freeldr/freeldr/lib/mm/meminit.c index aacccda4800..953b6596330 100644 --- a/boot/freeldr/freeldr/lib/mm/meminit.c +++ b/boot/freeldr/freeldr/lib/mm/meminit.c @@ -419,9 +419,9 @@ PVOID MmFindLocationForPageLookupTable(PFN_NUMBER TotalPageCount) SIZE_T PageLookupTableSize; PFN_NUMBER RequiredPages; PFN_NUMBER CandidateBasePage = 0; - PFN_NUMBER CandidatePageCount; + PFN_NUMBER CandidatePageCount = 0; PFN_NUMBER PageLookupTableEndPage; - PVOID PageLookupTableMemAddress = NULL; + PVOID PageLookupTableMemAddress; // Calculate how much pages we need to keep the page lookup table PageLookupTableSize = TotalPageCount * sizeof(PAGE_LOOKUP_TABLE_ITEM); diff --git a/boot/freeldr/freeldr/ntldr/arch/amd64/winldr.c b/boot/freeldr/freeldr/ntldr/arch/amd64/winldr.c index 5c804372844..19359798fa9 100644 --- a/boot/freeldr/freeldr/ntldr/arch/amd64/winldr.c +++ b/boot/freeldr/freeldr/ntldr/arch/amd64/winldr.c @@ -10,6 +10,7 @@ #include #include +#include #include "../../winldr.h" #include diff --git a/boot/freeldr/freeldr/ntldr/arch/i386/winldr.c b/boot/freeldr/freeldr/ntldr/arch/i386/winldr.c index 2fccbf9225d..852fb7b12f3 100644 --- a/boot/freeldr/freeldr/ntldr/arch/i386/winldr.c +++ b/boot/freeldr/freeldr/ntldr/arch/i386/winldr.c @@ -10,6 +10,7 @@ #include #include +#include #include "../../winldr.h" #include diff --git a/boot/freeldr/freeldr/pcat.cmake b/boot/freeldr/freeldr/pcat.cmake index 5ea6f9b8aa7..177d5a3adba 100644 --- a/boot/freeldr/freeldr/pcat.cmake +++ b/boot/freeldr/freeldr/pcat.cmake @@ -50,8 +50,6 @@ if(ARCH STREQUAL "i386") list(APPEND PCATLDR_ARC_SOURCE # disk/scsiport.c lib/fs/pxe.c - # arch/i386/halstub.c - # arch/i386/ntoskrnl.c arch/i386/drivemap.c arch/i386/hwacpi.c arch/i386/hwapm.c @@ -120,7 +118,6 @@ elseif(ARCH STREQUAL "amd64") list(APPEND PCATLDR_ARC_SOURCE lib/fs/pxe.c - # arch/i386/ntoskrnl.c arch/i386/drivemap.c arch/i386/hwacpi.c arch/i386/hwapm.c diff --git a/boot/freeldr/freeldr/ui/directui.c b/boot/freeldr/freeldr/ui/directui.c index 8bd47b2be0e..197061927d2 100644 --- a/boot/freeldr/freeldr/ui/directui.c +++ b/boot/freeldr/freeldr/ui/directui.c @@ -93,19 +93,22 @@ UiDrawStatusText(IN PCSTR StatusText) } VOID -UiInfoBox(IN PCSTR MessageText) +UiInfoBox( + _In_ PCSTR MessageText) { TuiPrintf(MessageText); } VOID -UiMessageBox(IN PCSTR MessageText) +UiMessageBox( + _In_ PCSTR MessageText) { TuiPrintf(MessageText); } VOID -UiMessageBoxCritical(IN PCSTR MessageText) +UiMessageBoxCritical( + _In_ PCSTR MessageText) { TuiPrintf(MessageText); } diff --git a/boot/freeldr/freeldr/ui/gui.c b/boot/freeldr/freeldr/ui/gui.c index d3160199ac9..ddd81fce547 100644 --- a/boot/freeldr/freeldr/ui/gui.c +++ b/boot/freeldr/freeldr/ui/gui.c @@ -51,19 +51,29 @@ VOID GuiUpdateDateTime(VOID) { } -VOID GuiSaveScreen(PUCHAR Buffer) +_Ret_maybenull_ +__drv_allocatesMem(Mem) +PUCHAR +GuiSaveScreen(VOID) { + return NULL; } -VOID GuiRestoreScreen(PUCHAR Buffer) +VOID +GuiRestoreScreen( + _In_opt_ __drv_freesMem(Mem) PUCHAR Buffer) { } -VOID GuiMessageBox(PCSTR MessageText) +VOID +GuiMessageBox( + _In_ PCSTR MessageText) { } -VOID GuiMessageBoxCritical(PCSTR MessageText) +VOID +GuiMessageBoxCritical( + _In_ PCSTR MessageText) { } diff --git a/boot/freeldr/freeldr/ui/noui.c b/boot/freeldr/freeldr/ui/noui.c index 1e7c21d1554..e79598bec63 100644 --- a/boot/freeldr/freeldr/ui/noui.c +++ b/boot/freeldr/freeldr/ui/noui.c @@ -77,23 +77,23 @@ VOID NoUiUpdateDateTime(VOID) { } -VOID NoUiMessageBox(PCSTR MessageText) +VOID +NoUiMessageBox( + _In_ PCSTR MessageText) { - // We have not yet displayed the user interface - // We are probably still reading the .ini file - // and have encountered an error. Just use printf() - // and return. - printf("%s\n", MessageText); - printf("Press any key\n"); - MachConsGetCh(); + NoUiMessageBoxCritical(MessageText); } -VOID NoUiMessageBoxCritical(PCSTR MessageText) -{ - // We have not yet displayed the user interface - // We are probably still reading the .ini file - // and have encountered an error. Just use printf() - // and return. +VOID +NoUiMessageBoxCritical( + _In_ PCSTR MessageText) +{ + /* + * We have not yet displayed the user interface + * We are probably still reading the .ini file + * and have encountered an error. Just use printf() + * and return. + */ printf("%s\n", MessageText); printf("Press any key\n"); MachConsGetCh(); diff --git a/boot/freeldr/freeldr/ui/tui.c b/boot/freeldr/freeldr/ui/tui.c index d8669ea196b..587b5bc44f9 100644 --- a/boot/freeldr/freeldr/ui/tui.c +++ b/boot/freeldr/freeldr/ui/tui.c @@ -19,6 +19,14 @@ #include +typedef struct _SMALL_RECT +{ + SHORT Left; + SHORT Top; + SHORT Right; + SHORT Bottom; +} SMALL_RECT, *PSMALL_RECT; + PVOID TextVideoBuffer = NULL; /* GENERIC TUI UTILS *********************************************************/ @@ -606,68 +614,76 @@ VOID TuiUpdateDateTime(VOID) Buffer, ATTR(UiTitleBoxFgColor, UiTitleBoxBgColor)); } -VOID TuiSaveScreen(PUCHAR Buffer) +_Ret_maybenull_ +__drv_allocatesMem(Mem) +PUCHAR +TuiSaveScreen(VOID) { - PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer; - ULONG i; + PUCHAR Buffer; + PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer; + ULONG i; + + /* Allocate the buffer */ + Buffer = FrLdrTempAlloc(UiScreenWidth * UiScreenHeight * 2, + TAG_TUI_SCREENBUFFER); + if (!Buffer) + return NULL; + /* Loop through each cell and copy it */ for (i=0; i < (UiScreenWidth * UiScreenHeight * 2); i++) { Buffer[i] = ScreenMemory[i]; } + + return Buffer; } -VOID TuiRestoreScreen(PUCHAR Buffer) +VOID +TuiRestoreScreen( + _In_opt_ __drv_freesMem(Mem) PUCHAR Buffer) { - PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer; - ULONG i; + PUCHAR ScreenMemory = (PUCHAR)TextVideoBuffer; + ULONG i; + if (!Buffer) + return; + + /* Loop through each cell and copy it */ for (i=0; i < (UiScreenWidth * UiScreenHeight * 2); i++) { ScreenMemory[i] = Buffer[i]; } - VideoCopyOffScreenBufferToVRAM(); -} - -VOID TuiMessageBox(PCSTR MessageText) -{ - PVOID ScreenBuffer; - // Save the screen contents - ScreenBuffer = FrLdrTempAlloc(UiScreenWidth * UiScreenHeight * 2, - TAG_TUI_SCREENBUFFER); - TuiSaveScreen(ScreenBuffer); + /* Free the buffer */ + FrLdrTempFree(Buffer, TAG_TUI_SCREENBUFFER); - // Display the message box - TuiMessageBoxCritical(MessageText); - - // Restore the screen contents - TuiRestoreScreen(ScreenBuffer); - FrLdrTempFree(ScreenBuffer, TAG_TUI_SCREENBUFFER); + VideoCopyOffScreenBufferToVRAM(); } -VOID TuiMessageBoxCritical(PCSTR MessageText) +static VOID +TuiDrawMsgBoxCommon( + _In_ PCSTR MessageText, + _Out_ PSMALL_RECT MsgBoxRect) { - int width = 8; - unsigned int height = 1; - int curline = 0; - int k; - size_t i , j; - int x1, x2, y1, y2; - char temp[260]; - char key; - - // Find the height - for (i=0; iLeft = x1; MsgBoxRect->Right = x2; + MsgBoxRect->Top = y1; MsgBoxRect->Bottom = y2; + - // Draw the text - for (i=0,j=0; i width) - width = k; - - k = 0; - j++; - } - - // Calculate box area - x1 = (UiScreenWidth - (width+2))/2; - x2 = x1 + width + 3; - y1 = ((UiScreenHeight - height - 2)/2) + 1; - y2 = y1 + height + 4; - - // Draw the box - TuiDrawBox(x1, y1, x2, y2, D_VERT, D_HORZ, TRUE, TRUE, ATTR(UiMessageBoxFgColor, UiMessageBoxBgColor)); - - // Draw the text - for (i=0,j=0; i #include #include +#include #include "resource.h" @@ -83,17 +84,6 @@ DWORDfromString(const WCHAR *pszString) return wcstoul(pszString, &pszEnd, 16); } -#define IME_MASK (0xE0000000UL) -#define SUBST_MASK (0xD0000000UL) -#define SPECIAL_MASK (0xF0000000UL) - -#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK) -#define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK) -#define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF)) - -#define IS_IME_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK) -#define IS_SUBST_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK) - VOID GetSystemLibraryPath(LPWSTR pszPath, INT cchPath, LPCWSTR pszFileName); #endif /* _INPUT_H */ diff --git a/dll/cpl/main/CMakeLists.txt b/dll/cpl/main/CMakeLists.txt index 9746795a7fd..c6a5cdf5f65 100644 --- a/dll/cpl/main/CMakeLists.txt +++ b/dll/cpl/main/CMakeLists.txt @@ -7,7 +7,8 @@ list(APPEND SOURCE mouse.c main.h) -file(GLOB main_rc_deps resources/*.*) +set(ICONS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../win32/shell32/res/icons) +file(GLOB main_rc_deps resources/*.* ${ICONS_DIR}/38.ico ${ICONS_DIR}/39.ico) add_rc_deps(main.rc ${main_rc_deps}) add_library(main MODULE diff --git a/dll/cpl/main/lang/bg-BG.rc b/dll/cpl/main/lang/bg-BG.rc index 9ef7d2e17e1..9f3ae82e16f 100644 --- a/dll/cpl/main/lang/bg-BG.rc +++ b/dll/cpl/main/lang/bg-BG.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&Добре", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Отказ", IDCANCEL, 175, 75, 50, 15 LTEXT "На&стройка продължителността на задържане на цъка на мишката, необходимо за да бъде отчетено цъкането", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/cs-CZ.rc b/dll/cpl/main/lang/cs-CZ.rc index 207afb38c5f..a86bb826aca 100644 --- a/dll/cpl/main/lang/cs-CZ.rc +++ b/dll/cpl/main/lang/cs-CZ.rc @@ -49,7 +49,7 @@ BEGIN PUSHBUTTON "Ok", IDOK, 120, 75, 50, 15 PUSHBUTTON "Storno", IDCANCEL, 175, 75, 50, 15 LTEXT "&Nastavte dobu, po kterou musíte držet tlačítko myši stisknuté, než se funkce ClickLock aktivuje.", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/de-DE.rc b/dll/cpl/main/lang/de-DE.rc index e858533cb95..46b2cbae25e 100644 --- a/dll/cpl/main/lang/de-DE.rc +++ b/dll/cpl/main/lang/de-DE.rc @@ -45,7 +45,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Abbrechen", IDCANCEL, 175, 75, 50, 15 LTEXT "&Stellen Sie ein, wie lange eine Maus- oder Trackballtaste gedrückt werden muss, bevor die KlickEinrasten-Funktion aktiviert wird.", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/el-GR.rc b/dll/cpl/main/lang/el-GR.rc index d4ca1e4d796..a7eeb9b5749 100644 --- a/dll/cpl/main/lang/el-GR.rc +++ b/dll/cpl/main/lang/el-GR.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&Ok", IDOK, 120, 75, 50, 15 PUSHBUTTON "Ά&κυρο", IDCANCEL, 175, 75, 50, 15 LTEXT "&Επιλέξτε πόσο πρέπει να κρατήσετε πατημένο το κουμπί του ποντικιού μέχρι να κλειδωθεί", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/en-US.rc b/dll/cpl/main/lang/en-US.rc index 033b265e4af..0e165d4df54 100644 --- a/dll/cpl/main/lang/en-US.rc +++ b/dll/cpl/main/lang/en-US.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 110, 59, 60, 14 PUSHBUTTON "&Cancel", IDCANCEL, 174, 59, 60, 14 LTEXT "&Adjust how long you need to hold down a mouse or trackball button before your click is locked", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/es-ES.rc b/dll/cpl/main/lang/es-ES.rc index 4434f07abd2..3f33320c5b7 100644 --- a/dll/cpl/main/lang/es-ES.rc +++ b/dll/cpl/main/lang/es-ES.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&Aceptar", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Cancelar", IDCANCEL, 175, 75, 50, 15 LTEXT "&Ajustar el tiempo que debe mantenerse presionado un botón del ratón o de la bola de seguimiento antes de que el clic se bloquee.", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/fr-FR.rc b/dll/cpl/main/lang/fr-FR.rc index c523ebfcee8..1a09f402d1a 100644 --- a/dll/cpl/main/lang/fr-FR.rc +++ b/dll/cpl/main/lang/fr-FR.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&Ok", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Annuler", IDCANCEL, 175, 75, 50, 15 LTEXT "&Ajuste le temps nécessaire pendant lequel vous devez cliquer avant de verrouiller le clic.", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/he-IL.rc b/dll/cpl/main/lang/he-IL.rc index 7b03f3b4df3..80ec90bdf5f 100644 --- a/dll/cpl/main/lang/he-IL.rc +++ b/dll/cpl/main/lang/he-IL.rc @@ -45,7 +45,7 @@ BEGIN PUSHBUTTON "אישור", IDOK, 110, 59, 60, 14 PUSHBUTTON "ביטול", IDCANCEL, 174, 59, 60, 14 LTEXT "&Adjust how long you need to hold down a mouse or trackball button before your click is locked", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/hu-HU.rc b/dll/cpl/main/lang/hu-HU.rc index 680d92d2dfa..da5433dd099 100644 --- a/dll/cpl/main/lang/hu-HU.rc +++ b/dll/cpl/main/lang/hu-HU.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 110, 59, 60, 14 PUSHBUTTON "&Mégse", IDCANCEL, 174, 59, 60, 14 LTEXT "&Beállíthatja milyen hosszan kell lenyomva tartania az egér vagy hanyattegér gombját, mielőtt megmarkolná\naz elemet.", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/id-ID.rc b/dll/cpl/main/lang/id-ID.rc index c47eafe12a0..57e327ffe9d 100644 --- a/dll/cpl/main/lang/id-ID.rc +++ b/dll/cpl/main/lang/id-ID.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&Ok", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Batal", IDCANCEL, 175, 75, 50, 15 LTEXT "&Sesuaikan berapa lama anda perlu menekan mouse atau tombol trackball sebelum klik anda dikunci", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/it-IT.rc b/dll/cpl/main/lang/it-IT.rc index d042575cc27..c1e128e3d1c 100644 --- a/dll/cpl/main/lang/it-IT.rc +++ b/dll/cpl/main/lang/it-IT.rc @@ -45,7 +45,7 @@ BEGIN PUSHBUTTON "&Ok", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Annulla", IDCANCEL, 175, 75, 50, 15 LTEXT "&Regola per quanto deve rimanere premuto il tasto di un mouse o una trackball prima che il clic sia rilevato", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/ja-JP.rc b/dll/cpl/main/lang/ja-JP.rc index 6b84aa1d8f4..6f094c9a4a9 100644 --- a/dll/cpl/main/lang/ja-JP.rc +++ b/dll/cpl/main/lang/ja-JP.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 110, 59, 60, 14 PUSHBUTTON "キャンセル(&C)", IDCANCEL, 174, 59, 60, 14 LTEXT "クリックする前にマウスかトラックボールのボタンをどの程度押し続けるかを補正する(&A)", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/nl-NL.rc b/dll/cpl/main/lang/nl-NL.rc index 69b93ab3fdf..f1b20ac203e 100644 --- a/dll/cpl/main/lang/nl-NL.rc +++ b/dll/cpl/main/lang/nl-NL.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&Ok", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Annuleren", IDCANCEL, 175, 75, 50, 15 LTEXT "&Stel in hoe lang de muisknop ingedrukt moet worden voordat de klik vergrendeld is.", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/no-NO.rc b/dll/cpl/main/lang/no-NO.rc index c7566905289..e774e93c04a 100644 --- a/dll/cpl/main/lang/no-NO.rc +++ b/dll/cpl/main/lang/no-NO.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 110, 59, 60, 14 PUSHBUTTON "&Avbryt", IDCANCEL, 174, 59, 60, 14 LTEXT "&Juster hvor lenge du må holde mus eller styrekuleknappen nede før klikket er låst.", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/pl-PL.rc b/dll/cpl/main/lang/pl-PL.rc index d1c49a5a706..c8c4d7dd5a0 100644 --- a/dll/cpl/main/lang/pl-PL.rc +++ b/dll/cpl/main/lang/pl-PL.rc @@ -51,7 +51,7 @@ BEGIN PUSHBUTTON "&Ok", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Anuluj", IDCANCEL, 175, 75, 50, 15 LTEXT "&Dopasuj czas potrzebny do przytrzymania wciśniętego przycisku myszy lub urządzenia wskazującego przed „zablokowaniem” kliknięcia.", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/pt-PT.rc b/dll/cpl/main/lang/pt-PT.rc index 4646b79fce4..ce463172d58 100644 --- a/dll/cpl/main/lang/pt-PT.rc +++ b/dll/cpl/main/lang/pt-PT.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 110, 59, 60, 14 PUSHBUTTON "&Cancelar", IDCANCEL, 174, 59, 60, 14 LTEXT "&Ajuste por quanto tempo precisa manter pressionado o botão do rato ou do trackball antes que o clique seja bloqueado", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/ro-RO.rc b/dll/cpl/main/lang/ro-RO.rc index 48db1a09ae1..bac78dcdf79 100644 --- a/dll/cpl/main/lang/ro-RO.rc +++ b/dll/cpl/main/lang/ro-RO.rc @@ -52,7 +52,7 @@ BEGIN PUSHBUTTON "Con&firmă", IDOK, 110, 59, 60, 14 PUSHBUTTON "A&nulează", IDCANCEL, 174, 59, 60, 14 LTEXT "Sp&ecificați perioada de menținere apăsată a unui buton pentru a-l imobiliza.", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/ru-RU.rc b/dll/cpl/main/lang/ru-RU.rc index b583ac990eb..69c24083725 100644 --- a/dll/cpl/main/lang/ru-RU.rc +++ b/dll/cpl/main/lang/ru-RU.rc @@ -43,7 +43,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 120, 79, 50, 15 PUSHBUTTON "&Отмена", IDCANCEL, 177, 79, 50, 15 LTEXT "&Выберите, как долго следует удерживать нажатой кнопку мыши или трекбола для того, чтобы сработало залипание.", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/sk-SK.rc b/dll/cpl/main/lang/sk-SK.rc index 0a8288e0695..3b0ac318392 100644 --- a/dll/cpl/main/lang/sk-SK.rc +++ b/dll/cpl/main/lang/sk-SK.rc @@ -48,7 +48,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 110, 59, 60, 14 PUSHBUTTON "&Zrušiť", IDCANCEL, 175, 75, 50, 15 LTEXT "&Adjust how long you need to hold down a mouse or trackball button before your click is locked", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/sq-AL.rc b/dll/cpl/main/lang/sq-AL.rc index f57d11b2a80..7ac5d6258e6 100644 --- a/dll/cpl/main/lang/sq-AL.rc +++ b/dll/cpl/main/lang/sq-AL.rc @@ -47,7 +47,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 110, 59, 60, 14 PUSHBUTTON "&Anulo", IDCANCEL, 174, 59, 60, 14 LTEXT "&Rregullo se sa kohë ju duhet të mbani të shtypur një buton të miut para klikimi juaj është mbyllur", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/tr-TR.rc b/dll/cpl/main/lang/tr-TR.rc index a205c1e92e2..bd96a07d5ab 100644 --- a/dll/cpl/main/lang/tr-TR.rc +++ b/dll/cpl/main/lang/tr-TR.rc @@ -45,7 +45,7 @@ BEGIN PUSHBUTTON "Tamam", IDOK, 110, 59, 60, 14 PUSHBUTTON "İptal", IDCANCEL, 174, 59, 60, 14 LTEXT "&Tıklamanız kilitlenmeden önce bir fare ya da iztopu düğmesine ne kadar basılı tutmanız gerektiğini ayarlayınız:", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/uk-UA.rc b/dll/cpl/main/lang/uk-UA.rc index f61ce8ac003..73d751423e9 100644 --- a/dll/cpl/main/lang/uk-UA.rc +++ b/dll/cpl/main/lang/uk-UA.rc @@ -51,7 +51,7 @@ BEGIN PUSHBUTTON "&OK", IDOK, 120, 75, 50, 15 PUSHBUTTON "&Скасувати", IDCANCEL, 175, 75, 50, 15 LTEXT "&Виберіть, як довго слід утримувати натиснуту кнопку миші або трекбола перед спрацьовуванням залипання", -1, 60, 15, 170, 30 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 15, 15, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/zh-CN.rc b/dll/cpl/main/lang/zh-CN.rc index aaa5eecefaa..6e16755f67d 100644 --- a/dll/cpl/main/lang/zh-CN.rc +++ b/dll/cpl/main/lang/zh-CN.rc @@ -50,7 +50,7 @@ BEGIN PUSHBUTTON "确定(&O)", IDOK, 110, 59, 60, 14 PUSHBUTTON "取消(&C)", IDCANCEL, 174, 59, 60, 14 LTEXT "调整您需要按下鼠标或轨迹球按钮多久单击才能被“锁定”(&A)。", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/zh-HK.rc b/dll/cpl/main/lang/zh-HK.rc index 1d70d9ff9da..6f80767e3f4 100644 --- a/dll/cpl/main/lang/zh-HK.rc +++ b/dll/cpl/main/lang/zh-HK.rc @@ -51,7 +51,7 @@ BEGIN PUSHBUTTON "確定(&O)", IDOK, 110, 59, 60, 14 PUSHBUTTON "取消(&C)", IDCANCEL, 174, 59, 60, 14 LTEXT "調整您按住滑鼠或軌跡球按鈕時所需要的時間(&A)", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/lang/zh-TW.rc b/dll/cpl/main/lang/zh-TW.rc index d734b313456..83413d6ce15 100644 --- a/dll/cpl/main/lang/zh-TW.rc +++ b/dll/cpl/main/lang/zh-TW.rc @@ -51,7 +51,7 @@ BEGIN PUSHBUTTON "確定(&O)", IDOK, 110, 59, 60, 14 PUSHBUTTON "取消(&C)", IDCANCEL, 174, 59, 60, 14 LTEXT "調整您按住滑鼠或軌跡球按鈕時所需要的時間(&A)", -1, 37, 5, 200, 27 - ICON IDI_LOOK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 + ICON IDI_LOCK_KEY, IDC_ICON_CLICK_LOCK, 5, 5, 15, 15 END IDD_PAGE_BUTTON DIALOGEX 0, 0, 246, 228 diff --git a/dll/cpl/main/main.rc b/dll/cpl/main/main.rc index 3ec7f569e62..20ca1c15165 100644 --- a/dll/cpl/main/main.rc +++ b/dll/cpl/main/main.rc @@ -22,13 +22,14 @@ IDI_MOUSE_SPEED ICON "resources/mouse_speed.ico" IDI_MOUSE_BUTTON ICON "resources/mouse_button.ico" IDI_MOUSE_TRAILS ICON "resources/mouse_trails.ico" IDI_MOUSE_HIDE ICON "resources/mouse_hide.ico" -IDI_FONTS_FOLDER ICON "resources/fonts_folder.ico" +IDI_PRINTERS_FOLDER ICON "../../win32/shell32/res/icons/38.ico" // IDI_SHELL_PRINTERS_FOLDER +IDI_FONTS_FOLDER ICON "../../win32/shell32/res/icons/39.ico" // IDI_SHELL_FONTS_FOLDER IDI_ADMIN_TOOLS_FOLDER ICON "resources/admintools_folder.ico" IDI_MOUSE_POINTER ICON "resources/mouse_pointer.ico" IDI_MOUSE_WHEEL ICON "resources/mouse_wheel.ico" IDI_REPEAT_RATE ICON "resources/repeat_rate.ico" IDI_REPEAT_DELAY ICON "resources/repeat_delay.ico" -IDI_LOOK_KEY ICON "resources/look_key.ico" +IDI_LOCK_KEY ICON "resources/lock_key.ico" #include diff --git a/dll/cpl/main/mouse.c b/dll/cpl/main/mouse.c index 28ca28f3590..8290a0541ce 100644 --- a/dll/cpl/main/mouse.c +++ b/dll/cpl/main/mouse.c @@ -204,7 +204,7 @@ ClickLockProc(IN HWND hwndDlg, pos = (pButtonData->g_ClickLockTime - 200) / 200; SendMessage(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE, (LPARAM)pos); - hIcon = LoadImage(hApplet, MAKEINTRESOURCE(IDI_LOOK_KEY), + hIcon = LoadImage(hApplet, MAKEINTRESOURCE(IDI_LOCK_KEY), IMAGE_ICON, 16, 16, 0); SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)hIcon); return TRUE; diff --git a/dll/cpl/main/resource.h b/dll/cpl/main/resource.h index 9bff0b95d1e..b0708ad5a45 100644 --- a/dll/cpl/main/resource.h +++ b/dll/cpl/main/resource.h @@ -5,21 +5,22 @@ #define IDC_CPLICON_1 100 #define IDC_CPLICON_2 200 -#define IDI_FOLDER_OPEN 201 -#define IDI_FOLDER_CLOSED 202 -#define IDI_MOUSE_LEFT 203 -#define IDI_MOUSE_RIGHT 204 -#define IDI_MOUSE_SPEED 205 -#define IDI_MOUSE_BUTTON 206 -#define IDI_MOUSE_TRAILS 207 -#define IDI_MOUSE_HIDE 208 +#define IDI_MOUSE_SPEED 104 +#define IDI_REPEAT_DELAY 105 +#define IDI_REPEAT_RATE 106 +#define IDI_MOUSE_BUTTON 108 +#define IDI_MOUSE_LEFT 109 +#define IDI_MOUSE_RIGHT 110 +#define IDI_PRINTERS_FOLDER 300 #define IDI_FONTS_FOLDER 400 #define IDI_ADMIN_TOOLS_FOLDER 500 -#define IDI_MOUSE_POINTER 600 -#define IDI_MOUSE_WHEEL 601 -#define IDI_REPEAT_RATE 602 -#define IDI_REPEAT_DELAY 603 -#define IDI_LOOK_KEY 604 +#define IDI_MOUSE_TRAILS 600 +#define IDI_MOUSE_HIDE 601 +#define IDI_MOUSE_POINTER 602 +#define IDI_MOUSE_WHEEL 603 +#define IDI_FOLDER_CLOSED 605 +#define IDI_FOLDER_OPEN 606 +#define IDI_LOCK_KEY 607 #define IDD_PAGE_BUTTON 101 #define IDD_PAGE_POINTER 102 diff --git a/dll/cpl/main/resources/fonts_folder.ico b/dll/cpl/main/resources/fonts_folder.ico deleted file mode 100644 index f7b94af2e7c..00000000000 Binary files a/dll/cpl/main/resources/fonts_folder.ico and /dev/null differ diff --git a/dll/cpl/main/resources/look_key.ico b/dll/cpl/main/resources/lock_key.ico similarity index 100% rename from dll/cpl/main/resources/look_key.ico rename to dll/cpl/main/resources/lock_key.ico diff --git a/dll/ime/msctfime/bridge.cpp b/dll/ime/msctfime/bridge.cpp index 9fdc8c4cc39..a61a66cfa69 100644 --- a/dll/ime/msctfime/bridge.cpp +++ b/dll/ime/msctfime/bridge.cpp @@ -679,15 +679,111 @@ CicBridge::SetActiveContextAlways(TLS *pTLS, HIMC hIMC, BOOL fActive, HWND hWnd, } /// @unimplemented +BOOL +CicBridge::DoOpenCandidateHanja( + ITfThreadMgr_P *pThreadMgr, + CicIMCLock& imcLock, + CicInputContext *pCicIC) +{ + return FALSE; +} + +/// @unimplemented +HRESULT +CicBridge::OnSetConversionSentenceMode( + ITfThreadMgr_P *pThreadMgr, + CicIMCLock& imcLock, + CicInputContext *pCicIC, + DWORD dwValue, + LANGID LangID) +{ + return E_NOTIMPL; +} + +/// @implemented HRESULT CicBridge::Notify( TLS *pTLS, - ITfThreadMgr *pThreadMgr, + ITfThreadMgr_P *pThreadMgr, HIMC hIMC, DWORD dwAction, DWORD dwIndex, DWORD_PTR dwValue) { - return E_NOTIMPL; // FIXME + CicIMCLock imcLock(hIMC); + if (FAILED(imcLock.m_hr)) + return imcLock.m_hr; + + CicIMCCLock imeContext(imcLock.get().hCtfImeContext); + if (FAILED(imeContext.m_hr)) + return imeContext.m_hr; + + CicInputContext *pCicIC = imeContext.get().m_pCicIC; + if (!pCicIC) + return E_OUTOFMEMORY; + + CicProfile *pProfile = pTLS->m_pProfile; + if (!pProfile) + return E_OUTOFMEMORY; + + LANGID LangID; + pProfile->GetLangId(&LangID); + + switch (dwAction) + { + case NI_OPENCANDIDATE: + if (PRIMARYLANGID(LangID) == LANG_KOREAN) + { + if (DoOpenCandidateHanja(pThreadMgr, imcLock, pCicIC)) + return S_OK; + return E_FAIL; + } + return E_NOTIMPL; + + case NI_COMPOSITIONSTR: + switch (dwIndex) + { + case CPS_COMPLETE: + pCicIC->EscbCompComplete(imcLock); + break; + + case CPS_CONVERT: + case CPS_REVERT: + return E_NOTIMPL; + + case CPS_CANCEL: + pCicIC->EscbCompCancel(imcLock); + break; + + default: + return E_FAIL; + } + return S_OK; + + case NI_CONTEXTUPDATED: + switch (dwValue) + { + case IMC_SETCONVERSIONMODE: + case IMC_SETSENTENCEMODE: + return OnSetConversionSentenceMode(pThreadMgr, imcLock, pCicIC, dwValue, LangID); + + case IMC_SETOPENSTATUS: + return OnSetOpenStatus(pTLS, pThreadMgr, imcLock, pCicIC); + + case IMC_SETCANDIDATEPOS: + return pCicIC->OnSetCandidatePos(pTLS, imcLock); + + case IMC_SETCOMPOSITIONFONT: + case IMC_SETCOMPOSITIONWINDOW: + return E_NOTIMPL; + + default: + return E_FAIL; + } + break; + + default: + return E_NOTIMPL; + } } /// @unimplemented @@ -719,7 +815,7 @@ CicBridge::ToAsciiEx( return E_NOTIMPL; // FIXME } -/// @unimplemented +/// @implemented BOOL CicBridge::SetCompositionString( TLS *pTLS, @@ -731,14 +827,80 @@ CicBridge::SetCompositionString( LPCVOID lpRead, DWORD dwReadLen) { - return FALSE; // FIXME + CicIMCLock imcLock(hIMC); + if (FAILED(imcLock.m_hr)) + return FALSE; + + CicIMCCLock imeContext(imcLock.get().hCtfImeContext); + if (FAILED(imeContext.m_hr)) + return FALSE; + + CicInputContext *pCicIC = imeContext.get().m_pCicIC; + auto pProfile = pTLS->m_pProfile; + if (!pCicIC || !pProfile) + return FALSE; + + UINT uCodePage; + pProfile->GetCodePageA(&uCodePage); + + LANGID LangID; + if (dwIndex != SCS_SETSTR || + !lpComp || *(WORD*)lpComp || + !dwCompLen || + FAILED(pProfile->GetLangId(&LangID)) || + PRIMARYLANGID(LangID) != LANG_KOREAN) + { + return pCicIC->SetCompositionString(imcLock, pThreadMgr, dwIndex, + lpComp, dwCompLen, lpRead, dwReadLen, + uCodePage); + } + + if (imcLock.get().fdwConversion & IME_CMODE_NATIVE) + { + ::ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE, 0); + return TRUE; + } + + return FALSE; } /// @unimplemented LRESULT +CicBridge::EscHanjaMode(TLS *pTLS, HIMC hIMC, LPVOID lpData) +{ + CicIMCLock imcLock(hIMC); + if (FAILED(imcLock.m_hr)) + return imcLock.m_hr; + + CicIMCCLock imeContext(imcLock.get().hCtfImeContext); + if (FAILED(imeContext.m_hr)) + return imeContext.m_hr; + + CicInputContext *pCicIC = imeContext.get().m_pCicIC; + if (!pCicIC) + return TRUE; + + if (pCicIC->m_bCandidateOpen) + return TRUE; + + pCicIC->m_dwUnknown6_5[4] |= 0x1; + + //FIXME + + pCicIC->m_dwUnknown6_5[4] &= ~0x1; + + return TRUE; +} + +/// @implemented +LRESULT CicBridge::EscapeKorean(TLS *pTLS, HIMC hIMC, UINT uSubFunc, LPVOID lpData) { - return 0; // FIXME + if (uSubFunc == IME_ESC_QUERY_SUPPORT) + return *(DWORD*)lpData == IME_ESC_HANJA_MODE; + if (uSubFunc == IME_ESC_HANJA_MODE) + return EscHanjaMode(pTLS, hIMC, lpData); + return 0; } /// @implemented diff --git a/dll/ime/msctfime/bridge.h b/dll/ime/msctfime/bridge.h index 6e0853ccb7e..f1cc1aa2ee4 100644 --- a/dll/ime/msctfime/bridge.h +++ b/dll/ime/msctfime/bridge.h @@ -28,6 +28,8 @@ class CicBridge : public ITfSysHookSink static BOOL CALLBACK EnumCreateInputContextCallback(HIMC hIMC, LPARAM lParam); static BOOL CALLBACK EnumDestroyInputContextCallback(HIMC hIMC, LPARAM lParam); + LRESULT EscHanjaMode(TLS *pTLS, HIMC hIMC, LPVOID lpData); + public: CicBridge(); virtual ~CicBridge(); @@ -89,7 +91,7 @@ class CicBridge : public ITfSysHookSink HRESULT Notify( TLS *pTLS, - ITfThreadMgr *pThreadMgr, + ITfThreadMgr_P *pThreadMgr, HIMC hIMC, DWORD dwAction, DWORD dwIndex, @@ -132,4 +134,18 @@ class CicBridge : public ITfSysHookSink LPVOID lpData); static BOOL IsOwnDim(ITfDocumentMgr *pDocMgr); + + BOOL + DoOpenCandidateHanja( + ITfThreadMgr_P *pThreadMgr, + CicIMCLock& imcLock, + CicInputContext *pCicIC); + + HRESULT + OnSetConversionSentenceMode( + ITfThreadMgr_P *pThreadMgr, + CicIMCLock& imcLock, + CicInputContext *pCicIC, + DWORD dwValue, + LANGID LangID); }; diff --git a/dll/ime/msctfime/inputcontext.cpp b/dll/ime/msctfime/inputcontext.cpp index 86ffb1f5627..7c7a3c91d20 100644 --- a/dll/ime/msctfime/inputcontext.cpp +++ b/dll/ime/msctfime/inputcontext.cpp @@ -9,6 +9,185 @@ WINE_DEFAULT_DEBUG_CHANNEL(msctfime); +/*********************************************************************** + * CInputContextOwner + */ + +/// @unimplemented +CInputContextOwner::CInputContextOwner(FN_IC_OWNER_CALLBACK fnCallback, LPVOID pCallbackPV) +{ + m_dwCookie = -1; + m_fnCallback = fnCallback; + m_cRefs = 1; + m_pCallbackPV = pCallbackPV; +} + +/// @implemented +CInputContextOwner::~CInputContextOwner() +{ +} + +/// @implemented +HRESULT CInputContextOwner::_Advise(IUnknown *pContext) +{ + ITfSource *pSource = NULL; + + m_pContext = NULL; + + HRESULT hr = E_FAIL; + if (SUCCEEDED(m_pContext->QueryInterface(IID_ITfSource, (LPVOID*)&pSource)) && + SUCCEEDED(pSource->AdviseSink(IID_ITfContextOwner, + static_cast(this), &m_dwCookie))) + { + m_pContext = pContext; + m_pContext->AddRef(); + hr = S_OK; + } + + if (pSource) + pSource->Release(); + + return hr; +} + +/// @implemented +HRESULT CInputContextOwner::_Unadvise() +{ + ITfSource *pSource = NULL; + + HRESULT hr = E_FAIL; + if (m_pContext) + { + if (SUCCEEDED(m_pContext->QueryInterface(IID_ITfSource, (LPVOID*)&pSource)) && + SUCCEEDED(pSource->UnadviseSink(m_dwCookie))) + { + hr = S_OK; + } + } + + if (m_pContext) + { + m_pContext->Release(); + m_pContext = NULL; + } + + if (pSource) + pSource->Release(); + + return hr; +} + +/// @implemented +STDMETHODIMP CInputContextOwner::QueryInterface(REFIID riid, LPVOID* ppvObj) +{ + *ppvObj = NULL; + + if (IsEqualIID(riid, IID_IUnknown) || IsEqualIID(riid, IID_ITfContextOwner)) + { + *ppvObj = this; + AddRef(); + return S_OK; + } + + if (IsEqualIID(riid, IID_ITfMouseTrackerACP)) + { + *ppvObj = static_cast(this); + AddRef(); + return S_OK; + } + + return E_NOINTERFACE; +} + +/// @implemented +STDMETHODIMP_(ULONG) CInputContextOwner::AddRef() +{ + return ++m_cRefs; +} + +/// @implemented +STDMETHODIMP_(ULONG) CInputContextOwner::Release() +{ + if (--m_cRefs == 0) + { + delete this; + return 0; + } + return m_cRefs; +} + +/// @unimplemented +STDMETHODIMP +CInputContextOwner::GetACPFromPoint( + const POINT *ptScreen, + DWORD dwFlags, + LONG *pacp) +{ + return E_NOTIMPL; +} + +/// @unimplemented +STDMETHODIMP +CInputContextOwner::GetTextExt( + LONG acpStart, + LONG acpEnd, + RECT *prc, + BOOL *pfClipped) +{ + return E_NOTIMPL; +} + +/// @implemented +STDMETHODIMP CInputContextOwner::GetScreenExt(RECT *prc) +{ + return m_fnCallback(2, &prc, m_pCallbackPV); +} + +/// @implemented +STDMETHODIMP CInputContextOwner::GetStatus(TF_STATUS *pdcs) +{ + return m_fnCallback(6, &pdcs, m_pCallbackPV); +} + +/// @unimplemented +STDMETHODIMP CInputContextOwner::GetWnd(HWND *phwnd) +{ + return m_fnCallback(7, &phwnd, m_pCallbackPV); +} + +/// @unimplemented +STDMETHODIMP CInputContextOwner::GetAttribute(REFGUID rguidAttribute, VARIANT *pvarValue) +{ + return E_NOTIMPL; +} + +struct MOUSE_SINK_ARGS +{ + ITfRangeACP *range; + ITfMouseSink *pSink; + DWORD *pdwCookie; +}; + +/// @implemented +STDMETHODIMP CInputContextOwner::AdviseMouseSink( + ITfRangeACP *range, + ITfMouseSink *pSink, + DWORD *pdwCookie) +{ + MOUSE_SINK_ARGS args = { range, pSink, pdwCookie }; + return m_fnCallback(9, &args, m_pCallbackPV); +} + +/// @implemented +STDMETHODIMP CInputContextOwner::UnadviseMouseSink(DWORD dwCookie) +{ + return m_fnCallback(10, &dwCookie, m_pCallbackPV); +} + +/*********************************************************************** + * CicInputContext + */ + /// @unimplemented CicInputContext::CicInputContext( _In_ TfClientId cliendId, @@ -157,7 +336,12 @@ CicInputContext::DestroyInputContext() m_pCompEventSink1 = NULL; } - //FIXME: m_pInputContextOwner + if (m_pInputContextOwner) + { + m_pInputContextOwner->_Unadvise(); + m_pInputContextOwner->Release(); + m_pInputContextOwner = NULL; + } if (m_pDocumentMgr) m_pDocumentMgr->Pop(1); @@ -265,6 +449,18 @@ HRESULT CicInputContext::EscbCompComplete(CicIMCLock& imcLock) return E_NOTIMPL; } +/// @unimplemented +HRESULT CicInputContext::EscbCompCancel(CicIMCLock& imcLock) +{ + return E_NOTIMPL; +} + +/// @unimplemented +HRESULT CicInputContext::OnSetCandidatePos(TLS *pTLS, CicIMCLock& imcLock) +{ + return E_NOTIMPL; +} + /// @unimplemented HRESULT CicInputContext::DelayedReconvertFuncCall(CicIMCLock& imcLock) { @@ -308,3 +504,17 @@ HRESULT CicInputContext::EndReconvertString(CicIMCLock& imcLock) { return E_NOTIMPL; } + +/// @unimplemented +BOOL CicInputContext::SetCompositionString( + CicIMCLock& imcLock, + ITfThreadMgr_P *pThreadMgr, + DWORD dwIndex, + LPCVOID lpComp, + DWORD dwCompLen, + LPCVOID lpRead, + DWORD dwReadLen, + UINT uCodePage) +{ + return FALSE; +} diff --git a/dll/ime/msctfime/inputcontext.h b/dll/ime/msctfime/inputcontext.h index 7ae33906fd5..2ed51862140 100644 --- a/dll/ime/msctfime/inputcontext.h +++ b/dll/ime/msctfime/inputcontext.h @@ -12,6 +12,59 @@ class CInputContextOwnerCallBack; class CInputContextOwner; +class CicInputContext; + + +typedef HRESULT (CALLBACK *FN_IC_OWNER_CALLBACK)(UINT uType, LPVOID args, LPVOID param); + +/*********************************************************************** + * CInputContextOwner + */ +class CInputContextOwner + : public ITfContextOwner + , public ITfMouseTrackerACP +{ +protected: + LONG m_cRefs; + IUnknown *m_pContext; + DWORD m_dwCookie; + FN_IC_OWNER_CALLBACK m_fnCallback; + LPVOID m_pCallbackPV; + +public: + CInputContextOwner(FN_IC_OWNER_CALLBACK fnCallback, LPVOID pCallbackPV); + virtual ~CInputContextOwner(); + + HRESULT _Advise(IUnknown *pContext); + HRESULT _Unadvise(); + + // IUnknown methods + STDMETHODIMP QueryInterface(REFIID riid, LPVOID* ppvObj) override; + STDMETHODIMP_(ULONG) AddRef() override; + STDMETHODIMP_(ULONG) Release() override; + + // ITfContextOwner methods + STDMETHODIMP GetACPFromPoint( + const POINT *ptScreen, + DWORD dwFlags, + LONG *pacp) override; + STDMETHODIMP GetTextExt( + LONG acpStart, + LONG acpEnd, + RECT *prc, + BOOL *pfClipped) override; + STDMETHODIMP GetScreenExt(RECT *prc) override; + STDMETHODIMP GetStatus(TF_STATUS *pdcs) override; + STDMETHODIMP GetWnd(HWND *phwnd) override; + STDMETHODIMP GetAttribute(REFGUID rguidAttribute, VARIANT *pvarValue) override; + + // ITfMouseTrackerACP methods + STDMETHODIMP AdviseMouseSink( + ITfRangeACP *range, + ITfMouseSink *pSink, + DWORD *pdwCookie) override; + STDMETHODIMP UnadviseMouseSink(DWORD dwCookie) override; +}; /*********************************************************************** * CicInputContext @@ -88,9 +141,14 @@ class CicInputContext HRESULT CreateInputContext(_Inout_ ITfThreadMgr *pThreadMgr, _Inout_ CicIMCLock& imcLock); HRESULT DestroyInputContext(); + BOOL SetCompositionString(CicIMCLock& imcLock, ITfThreadMgr_P *pThreadMgr, DWORD dwIndex, + LPCVOID lpComp, DWORD dwCompLen, LPCVOID lpRead, DWORD dwReadLen, + UINT uCodePage); + HRESULT SetupDocFeedString(CicIMCLock& imcLock, UINT uCodePage); HRESULT EscbClearDocFeedBuffer(CicIMCLock& imcLock, BOOL bFlag); HRESULT EscbCompComplete(CicIMCLock& imcLock); + HRESULT EscbCompCancel(CicIMCLock& imcLock); HRESULT SetupReconvertString( CicIMCLock& imcLock, ITfThreadMgr_P *pThreadMgr, @@ -106,4 +164,6 @@ class CicInputContext HRESULT EndReconvertString(CicIMCLock& imcLock); HRESULT DelayedReconvertFuncCall(CicIMCLock& imcLock); void ClearPrevCandidatePos(); + + HRESULT OnSetCandidatePos(TLS *pTLS, CicIMCLock& imcLock); }; diff --git a/dll/ntdll/ldr/ldrutils.c b/dll/ntdll/ldr/ldrutils.c index 69e2f8c152e..1c67c8dccd4 100644 --- a/dll/ntdll/ldr/ldrutils.c +++ b/dll/ntdll/ldr/ldrutils.c @@ -2455,6 +2455,7 @@ LdrpLoadDll(IN BOOLEAN Redirected, RtlCopyUnicodeString(&RawDllName, DllName); /* Find the extension, if present */ + /* NOTE: Access violation is expected here in some cases (Buffer[-1]) */ p = DllName->Buffer + DllName->Length / sizeof(WCHAR) - 1; GotExtension = FALSE; while (p >= DllName->Buffer) diff --git a/dll/shellext/mydocs/CMakeLists.txt b/dll/shellext/mydocs/CMakeLists.txt index 5c1b170faa5..78d6f8b377e 100644 --- a/dll/shellext/mydocs/CMakeLists.txt +++ b/dll/shellext/mydocs/CMakeLists.txt @@ -3,7 +3,8 @@ spec2def(mydocs.dll mydocs.spec) add_definitions( -D_WINE) -file(GLOB_RECURSE mydocs_rc_deps res/*.*) +set(ICONS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../win32/shell32/res/icons) +file(GLOB_RECURSE mydocs_rc_deps res/*.* ${ICONS_DIR}/235.ico ${ICONS_DIR}/236.ico) add_rc_deps(mydocs.rc ${mydocs_rc_deps}) list(APPEND SOURCE diff --git a/dll/shellext/mydocs/mydocs.rc b/dll/shellext/mydocs/mydocs.rc index a16fc6bc3e6..ec24cb9414b 100644 --- a/dll/shellext/mydocs/mydocs.rc +++ b/dll/shellext/mydocs/mydocs.rc @@ -16,6 +16,9 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL +100 ICON "../../win32/shell32/res/icons/235.ico" // IDI_SHELL_MY_DOCUMENTS +101 ICON "../../win32/shell32/res/icons/236.ico" // IDI_SHELL_MY_PICTURES + IDR_MYDOCS REGISTRY "res/mydocs.rgs" #ifdef LANGUAGE_DE_DE diff --git a/dll/shellext/ntobjshex/foldercommon.h b/dll/shellext/ntobjshex/foldercommon.h index 2983f328198..fddae8bd1b5 100644 --- a/dll/shellext/ntobjshex/foldercommon.h +++ b/dll/shellext/ntobjshex/foldercommon.h @@ -20,7 +20,7 @@ class CFolderViewCB : CFolderViewCB() : m_View(NULL) {} virtual ~CFolderViewCB() {} - virtual HRESULT STDMETHODCALLTYPE MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam) + STDMETHODIMP MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam) override { switch (uMsg) { @@ -42,7 +42,7 @@ class CFolderViewCB : return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE Initialize(IShellView* psv) + STDMETHOD(Initialize)(IShellView* psv) { m_View = psv; return S_OK; @@ -81,13 +81,13 @@ class CCommonFolder : } // IShellFolder - virtual HRESULT STDMETHODCALLTYPE ParseDisplayName( + STDMETHODIMP ParseDisplayName( HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, ULONG *pchEaten, LPITEMIDLIST *ppidl, - ULONG *pdwAttributes) + ULONG *pdwAttributes) override { if (!ppidl) return E_POINTER; @@ -160,16 +160,16 @@ class CCommonFolder : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE EnumObjects( + STDMETHOD(EnumObjects)( HWND hwndOwner, SHCONTF grfFlags, IEnumIDList **ppenumIDList) PURE; - virtual HRESULT STDMETHODCALLTYPE BindToObject( + STDMETHODIMP BindToObject( LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, - void **ppvOut) + void **ppvOut) override { const TItemId * info; @@ -213,7 +213,7 @@ class CCommonFolder : } protected: - virtual HRESULT STDMETHODCALLTYPE InternalBindToObject( + STDMETHOD(InternalBindToObject)( PWSTR path, const TItemId * info, LPITEMIDLIST first, @@ -222,7 +222,7 @@ class CCommonFolder : LPBC pbcReserved, IShellFolder** ppsfChild) PURE; - virtual HRESULT STDMETHODCALLTYPE ResolveSymLink( + STDMETHOD(ResolveSymLink)( const TItemId * info, LPITEMIDLIST * fullPidl) { @@ -230,21 +230,20 @@ class CCommonFolder : } public: - - virtual HRESULT STDMETHODCALLTYPE BindToStorage( + STDMETHODIMP BindToStorage( LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, - void **ppvObj) + void **ppvObj) override { UNIMPLEMENTED; return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE CompareIDs( + STDMETHODIMP CompareIDs( LPARAM lParam, LPCITEMIDLIST pidl1, - LPCITEMIDLIST pidl2) + LPCITEMIDLIST pidl2) override { HRESULT hr; @@ -288,7 +287,7 @@ class CCommonFolder : } protected: - virtual HRESULT STDMETHODCALLTYPE CompareName( + STDMETHOD(CompareName)( LPARAM lParam, const TItemId * first, const TItemId * second) @@ -331,10 +330,10 @@ class CCommonFolder : } public: - virtual HRESULT STDMETHODCALLTYPE CreateViewObject( + STDMETHODIMP CreateViewObject( HWND hwndOwner, REFIID riid, - void **ppvOut) + void **ppvOut) override { if (!IsEqualIID(riid, IID_IShellView)) return E_NOINTERFACE; @@ -368,10 +367,10 @@ class CCommonFolder : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE GetAttributesOf( + STDMETHODIMP GetAttributesOf( UINT cidl, PCUITEMID_CHILD_ARRAY apidl, - SFGAOF *rgfInOut) + SFGAOF *rgfInOut) override { const TItemId * info; @@ -398,13 +397,13 @@ class CCommonFolder : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE GetUIObjectOf( + STDMETHODIMP GetUIObjectOf( HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, - void **ppvOut) + void **ppvOut) override { DWORD res; TRACE("GetUIObjectOf\n"); @@ -499,10 +498,10 @@ class CCommonFolder : return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE GetDisplayNameOf( + STDMETHODIMP GetDisplayNameOf( LPCITEMIDLIST pidl, SHGDNF uFlags, - STRRET *lpName) + STRRET *lpName) override { const TItemId * info; @@ -566,36 +565,34 @@ class CCommonFolder : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE SetNameOf( + STDMETHODIMP SetNameOf( HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR lpszName, SHGDNF uFlags, - LPITEMIDLIST *ppidlOut) + LPITEMIDLIST *ppidlOut) override { UNIMPLEMENTED; return E_NOTIMPL; } // IShellFolder2 - virtual HRESULT STDMETHODCALLTYPE GetDefaultSearchGUID( - GUID *lpguid) + STDMETHODIMP GetDefaultSearchGUID(GUID *lpguid) override { UNIMPLEMENTED; return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE EnumSearches( - IEnumExtraSearch **ppenum) + STDMETHODIMP EnumSearches(IEnumExtraSearch **ppenum) override { UNIMPLEMENTED; return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE GetDefaultColumn( + STDMETHODIMP GetDefaultColumn( DWORD dwReserved, ULONG *pSort, - ULONG *pDisplay) + ULONG *pDisplay) override { if (pSort) *pSort = 0; @@ -604,26 +601,26 @@ class CCommonFolder : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnState( + STDMETHOD(GetDefaultColumnState)( UINT iColumn, SHCOLSTATEF *pcsFlags) PURE; - virtual HRESULT STDMETHODCALLTYPE GetDetailsEx( + STDMETHOD(GetDetailsEx)( LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, VARIANT *pv) PURE; - virtual HRESULT STDMETHODCALLTYPE GetDetailsOf( + STDMETHOD(GetDetailsOf)( LPCITEMIDLIST pidl, UINT iColumn, SHELLDETAILS *psd) PURE; - virtual HRESULT STDMETHODCALLTYPE MapColumnToSCID( + STDMETHOD(MapColumnToSCID)( UINT iColumn, SHCOLUMNID *pscid) PURE; // IPersist - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *lpClassId) + STDMETHODIMP GetClassID(CLSID *lpClassId) override { if (!lpClassId) return E_POINTER; @@ -633,7 +630,7 @@ class CCommonFolder : } // IPersistFolder - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidl) + STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidl) override { m_shellPidl = ILClone(pidl); @@ -643,7 +640,7 @@ class CCommonFolder : } // IPersistFolder2 - virtual HRESULT STDMETHODCALLTYPE GetCurFolder(PIDLIST_ABSOLUTE * pidl) + STDMETHODIMP GetCurFolder(PIDLIST_ABSOLUTE * pidl) override { if (pidl) *pidl = ILClone(m_shellPidl); @@ -654,16 +651,16 @@ class CCommonFolder : // Internal protected: - virtual HRESULT STDMETHODCALLTYPE CompareIDs( + STDMETHOD(CompareIDs)( LPARAM lParam, const TItemId * first, const TItemId * second) PURE; - virtual ULONG STDMETHODCALLTYPE ConvertAttributes( + STDMETHOD_(ULONG, ConvertAttributes)( const TItemId * entry, PULONG inMask) PURE; - virtual BOOL STDMETHODCALLTYPE IsFolder(LPCITEMIDLIST pcidl) + STDMETHOD_(BOOL, IsFolder)(LPCITEMIDLIST pcidl) { const TItemId * info; @@ -674,9 +671,9 @@ class CCommonFolder : return IsFolder(info); } - virtual BOOL STDMETHODCALLTYPE IsFolder(const TItemId * info) PURE; + STDMETHOD_(BOOL, IsFolder)(const TItemId * info) PURE; - virtual BOOL STDMETHODCALLTYPE IsSymLink(LPCITEMIDLIST pcidl) + STDMETHOD_(BOOL, IsSymLink)(LPCITEMIDLIST pcidl) { const TItemId * info; @@ -687,7 +684,7 @@ class CCommonFolder : return IsSymLink(info); } - virtual BOOL STDMETHODCALLTYPE IsSymLink(const TItemId * info) + STDMETHOD_(BOOL, IsSymLink)(const TItemId * info) { return FALSE; } diff --git a/dll/shellext/ntobjshex/ntobjenum.cpp b/dll/shellext/ntobjshex/ntobjenum.cpp index 1d2c6c5f690..ce41c779ec9 100644 --- a/dll/shellext/ntobjshex/ntobjenum.cpp +++ b/dll/shellext/ntobjshex/ntobjenum.cpp @@ -243,7 +243,7 @@ class CEnumRegRoot : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) + STDMETHODIMP Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) override { if (pceltFetched) *pceltFetched = 0; @@ -263,7 +263,7 @@ class CEnumRegRoot : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt) + STDMETHODIMP Skip(ULONG celt) override { while (celt > 0) { @@ -277,12 +277,12 @@ class CEnumRegRoot : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE Reset() + STDMETHODIMP Reset() override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum) + STDMETHODIMP Clone(IEnumIDList **ppenum) override { return E_NOTIMPL; } @@ -495,7 +495,7 @@ class CEnumRegKey : return NextValue(ppidl); } - virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) + STDMETHODIMP Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) override { if (pceltFetched) *pceltFetched = 0; @@ -515,7 +515,7 @@ class CEnumRegKey : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt) + STDMETHODIMP Skip(ULONG celt) override { while (celt > 0) { @@ -529,12 +529,12 @@ class CEnumRegKey : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE Reset() + STDMETHODIMP Reset() override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum) + STDMETHODIMP Clone(IEnumIDList **ppenum) override { return E_NOTIMPL; } @@ -672,7 +672,7 @@ class CEnumNTDirectory : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) + STDMETHODIMP Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) override { if (pceltFetched) *pceltFetched = 0; @@ -692,7 +692,7 @@ class CEnumNTDirectory : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt) + STDMETHODIMP Skip(ULONG celt) override { while (celt > 0) { @@ -706,12 +706,12 @@ class CEnumNTDirectory : return S_OK; } - virtual HRESULT STDMETHODCALLTYPE Reset() + STDMETHODIMP Reset() override { return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum) + STDMETHODIMP Clone(IEnumIDList **ppenum) override { return E_NOTIMPL; } diff --git a/dll/shellext/ntobjshex/ntobjfolder.h b/dll/shellext/ntobjshex/ntobjfolder.h index 58e3c09990f..c3e3e205a1d 100644 --- a/dll/shellext/ntobjshex/ntobjfolder.h +++ b/dll/shellext/ntobjshex/ntobjfolder.h @@ -23,19 +23,19 @@ class CNtObjectFolderExtractIcon : HRESULT Initialize(LPCWSTR ntPath, PCIDLIST_ABSOLUTE parent, UINT cidl, PCUITEMID_CHILD_ARRAY apidl); - virtual HRESULT STDMETHODCALLTYPE GetIconLocation( + STDMETHOD(GetIconLocation)( UINT uFlags, LPWSTR szIconFile, UINT cchMax, INT *piIndex, - UINT *pwFlags); + UINT *pwFlags) override; - virtual HRESULT STDMETHODCALLTYPE Extract( + STDMETHOD(Extract)( LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, - UINT nIconSize); + UINT nIconSize) override; DECLARE_NOT_AGGREGATABLE(CNtObjectFolderExtractIcon) DECLARE_PROTECT_FINAL_CONSTRUCT() @@ -58,55 +58,55 @@ class CNtObjectFolder : // IShellFolder - virtual HRESULT STDMETHODCALLTYPE EnumObjects( + STDMETHOD(EnumObjects)( HWND hwndOwner, SHCONTF grfFlags, - IEnumIDList **ppenumIDList); + IEnumIDList **ppenumIDList) override; protected: - virtual HRESULT STDMETHODCALLTYPE InternalBindToObject( + STDMETHOD(InternalBindToObject)( PWSTR path, const NtPidlEntry * info, LPITEMIDLIST first, LPCITEMIDLIST rest, LPITEMIDLIST fullPidl, LPBC pbcReserved, - IShellFolder** ppsfChild); + IShellFolder** ppsfChild) override; - virtual HRESULT STDMETHODCALLTYPE ResolveSymLink( + STDMETHOD(ResolveSymLink)( const NtPidlEntry * info, - LPITEMIDLIST * fullPidl); + LPITEMIDLIST * fullPidl) override; public: - virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnState( + STDMETHOD(GetDefaultColumnState)( UINT iColumn, - SHCOLSTATEF *pcsFlags); + SHCOLSTATEF *pcsFlags) override; - virtual HRESULT STDMETHODCALLTYPE GetDetailsEx( + STDMETHOD(GetDetailsEx)( LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, - VARIANT *pv); + VARIANT *pv) override; - virtual HRESULT STDMETHODCALLTYPE GetDetailsOf( + STDMETHOD(GetDetailsOf)( LPCITEMIDLIST pidl, UINT iColumn, - SHELLDETAILS *psd); + SHELLDETAILS *psd) override; - virtual HRESULT STDMETHODCALLTYPE MapColumnToSCID( + STDMETHOD(MapColumnToSCID)( UINT iColumn, - SHCOLUMNID *pscid); + SHCOLUMNID *pscid) override; // IPersistFolder - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // Internal HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidl, PCWSTR ntPath); protected: - virtual HRESULT STDMETHODCALLTYPE CompareIDs(LPARAM lParam, const NtPidlEntry * first, const NtPidlEntry * second); - virtual ULONG STDMETHODCALLTYPE ConvertAttributes(const NtPidlEntry * entry, PULONG inMask); - virtual BOOL STDMETHODCALLTYPE IsFolder(const NtPidlEntry * info); - virtual BOOL STDMETHODCALLTYPE IsSymLink(const NtPidlEntry * info); + STDMETHOD(CompareIDs)(LPARAM lParam, const NtPidlEntry * first, const NtPidlEntry * second) override; + STDMETHOD_(ULONG, ConvertAttributes)(const NtPidlEntry * entry, PULONG inMask) override; + STDMETHOD_(BOOL, IsFolder)(const NtPidlEntry * info) override; + STDMETHOD_(BOOL, IsSymLink)(const NtPidlEntry * info) override; virtual HRESULT GetInfoFromPidl(LPCITEMIDLIST pcidl, const NtPidlEntry ** pentry); diff --git a/dll/shellext/ntobjshex/regfolder.h b/dll/shellext/ntobjshex/regfolder.h index 5780d075f40..75be7862782 100644 --- a/dll/shellext/ntobjshex/regfolder.h +++ b/dll/shellext/ntobjshex/regfolder.h @@ -23,19 +23,19 @@ class CRegistryFolderExtractIcon : HRESULT Initialize(LPCWSTR ntPath, PCIDLIST_ABSOLUTE parent, UINT cidl, PCUITEMID_CHILD_ARRAY apidl); - virtual HRESULT STDMETHODCALLTYPE GetIconLocation( + STDMETHOD(GetIconLocation)( UINT uFlags, LPWSTR szIconFile, UINT cchMax, INT *piIndex, - UINT *pwFlags); + UINT *pwFlags) override; - virtual HRESULT STDMETHODCALLTYPE Extract( + STDMETHOD(Extract)( LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, - UINT nIconSize); + UINT nIconSize) override; DECLARE_NOT_AGGREGATABLE(CRegistryFolderExtractIcon) DECLARE_PROTECT_FINAL_CONSTRUCT() @@ -59,50 +59,50 @@ class CRegistryFolder : virtual ~CRegistryFolder(); // IShellFolder - virtual HRESULT STDMETHODCALLTYPE EnumObjects( + STDMETHOD(EnumObjects)( HWND hwndOwner, SHCONTF grfFlags, - IEnumIDList **ppenumIDList); + IEnumIDList **ppenumIDList) override; protected: - virtual HRESULT STDMETHODCALLTYPE InternalBindToObject( + STDMETHOD(InternalBindToObject)( PWSTR path, const RegPidlEntry * info, LPITEMIDLIST first, LPCITEMIDLIST rest, LPITEMIDLIST fullPidl, LPBC pbcReserved, - IShellFolder** ppsfChild); + IShellFolder** ppsfChild) override; public: - virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnState( + STDMETHOD(GetDefaultColumnState)( UINT iColumn, - SHCOLSTATEF *pcsFlags); + SHCOLSTATEF *pcsFlags) override; - virtual HRESULT STDMETHODCALLTYPE GetDetailsEx( + STDMETHOD(GetDetailsEx)( LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, - VARIANT *pv); + VARIANT *pv) override; - virtual HRESULT STDMETHODCALLTYPE GetDetailsOf( + STDMETHOD(GetDetailsOf)( LPCITEMIDLIST pidl, UINT iColumn, - SHELLDETAILS *psd); + SHELLDETAILS *psd) override; - virtual HRESULT STDMETHODCALLTYPE MapColumnToSCID( + STDMETHOD(MapColumnToSCID)( UINT iColumn, - SHCOLUMNID *pscid); + SHCOLUMNID *pscid) override; // IPersistFolder - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // Internal - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidl, PCWSTR ntPath, HKEY hRoot); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl, PCWSTR ntPath, HKEY hRoot); protected: - virtual HRESULT STDMETHODCALLTYPE CompareIDs(LPARAM lParam, const RegPidlEntry * first, const RegPidlEntry * second); - virtual ULONG STDMETHODCALLTYPE ConvertAttributes(const RegPidlEntry * entry, PULONG inMask); - virtual BOOL STDMETHODCALLTYPE IsFolder(const RegPidlEntry * info); + STDMETHOD(CompareIDs)(LPARAM lParam, const RegPidlEntry * first, const RegPidlEntry * second); + STDMETHOD_(ULONG, ConvertAttributes)(const RegPidlEntry * entry, PULONG inMask); + STDMETHOD_(BOOL, IsFolder)(const RegPidlEntry * info); virtual HRESULT GetInfoFromPidl(LPCITEMIDLIST pcidl, const RegPidlEntry ** pentry); diff --git a/dll/win32/browseui/CProgressDialog.h b/dll/win32/browseui/CProgressDialog.h index 36b6204a50b..3c2306d01e4 100644 --- a/dll/win32/browseui/CProgressDialog.h +++ b/dll/win32/browseui/CProgressDialog.h @@ -55,20 +55,20 @@ class CProgressDialog : ~CProgressDialog(); // IProgressDialog - virtual HRESULT WINAPI StartProgressDialog(HWND hwndParent, IUnknown *punkEnableModeless, DWORD dwFlags, LPCVOID reserved); - virtual HRESULT WINAPI StopProgressDialog(); - virtual HRESULT WINAPI SetTitle(LPCWSTR pwzTitle); - virtual HRESULT WINAPI SetAnimation(HINSTANCE hInstance, UINT uiResourceId); - virtual BOOL WINAPI HasUserCancelled(); - virtual HRESULT WINAPI SetProgress64(ULONGLONG ullCompleted, ULONGLONG ullTotal); - virtual HRESULT WINAPI SetProgress(DWORD dwCompleted, DWORD dwTotal); - virtual HRESULT WINAPI SetLine(DWORD dwLineNum, LPCWSTR pwzLine, BOOL bPath, LPCVOID reserved); - virtual HRESULT WINAPI SetCancelMsg(LPCWSTR pwzMsg, LPCVOID reserved); - virtual HRESULT WINAPI Timer(DWORD dwTimerAction, LPCVOID reserved); + STDMETHOD(StartProgressDialog)(HWND hwndParent, IUnknown *punkEnableModeless, DWORD dwFlags, LPCVOID reserved) override; + STDMETHOD(StopProgressDialog)() override; + STDMETHOD(SetTitle)(LPCWSTR pwzTitle) override; + STDMETHOD(SetAnimation)(HINSTANCE hInstance, UINT uiResourceId) override; + STDMETHOD_(BOOL, HasUserCancelled)() override; + STDMETHOD(SetProgress64)(ULONGLONG ullCompleted, ULONGLONG ullTotal) override; + STDMETHOD(SetProgress)(DWORD dwCompleted, DWORD dwTotal) override; + STDMETHOD(SetLine)(DWORD dwLineNum, LPCWSTR pwzLine, BOOL bPath, LPCVOID reserved) override; + STDMETHOD(SetCancelMsg)(LPCWSTR pwzMsg, LPCVOID reserved) override; + STDMETHOD(Timer)(DWORD dwTimerAction, LPCVOID reserved) override; - //////// IOleWindow - virtual HRESULT WINAPI GetWindow(HWND* phwnd); - virtual HRESULT WINAPI ContextSensitiveHelp(BOOL fEnterMode); + // IOleWindow + STDMETHOD(GetWindow)(HWND* phwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; DECLARE_REGISTRY_RESOURCEID(IDR_PROGRESSDIALOG) DECLARE_NOT_AGGREGATABLE(CProgressDialog) diff --git a/dll/win32/browseui/CTaskbarList.h b/dll/win32/browseui/CTaskbarList.h index 60cc51abb7c..8975e0a3cb8 100644 --- a/dll/win32/browseui/CTaskbarList.h +++ b/dll/win32/browseui/CTaskbarList.h @@ -24,15 +24,14 @@ class CTaskbarList : virtual ~CTaskbarList(); /*** ITaskbarList2 methods ***/ - virtual HRESULT WINAPI MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen); + STDMETHOD(MarkFullscreenWindow)(HWND hwnd, BOOL fFullscreen) override; /*** ITaskbarList methods ***/ - virtual HRESULT STDMETHODCALLTYPE HrInit(); - virtual HRESULT STDMETHODCALLTYPE AddTab(HWND hwnd); - virtual HRESULT STDMETHODCALLTYPE DeleteTab(HWND hwnd); - virtual HRESULT STDMETHODCALLTYPE ActivateTab(HWND hwnd); - virtual HRESULT STDMETHODCALLTYPE SetActiveAlt(HWND hwnd); - + STDMETHOD(HrInit)() override; + STDMETHOD(AddTab)(HWND hwnd) override; + STDMETHOD(DeleteTab)(HWND hwnd) override; + STDMETHOD(ActivateTab)(HWND hwnd) override; + STDMETHOD(SetActiveAlt)(HWND hwnd) override; DECLARE_REGISTRY_RESOURCEID(IDR_TASKBARLIST) DECLARE_NOT_AGGREGATABLE(CTaskbarList) diff --git a/dll/win32/browseui/aclistisf.h b/dll/win32/browseui/aclistisf.h index d09b47c3c8f..d85770ee29e 100644 --- a/dll/win32/browseui/aclistisf.h +++ b/dll/win32/browseui/aclistisf.h @@ -62,32 +62,30 @@ class CACListISF : CComHeapPtr& pszExpanded); // *** IEnumString methods *** - STDMETHODIMP Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) override; - STDMETHODIMP Skip(ULONG celt) override; - STDMETHODIMP Reset() override; - STDMETHODIMP Clone(IEnumString **ppenum) override; + STDMETHOD(Next)(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) override; + STDMETHOD(Skip)(ULONG celt) override; + STDMETHOD(Reset)() override; + STDMETHOD(Clone)(IEnumString **ppenum) override; // *** IACList methods *** - STDMETHODIMP Expand(LPCOLESTR pszExpand) override; + STDMETHOD(Expand)(LPCOLESTR pszExpand) override; // *** IACList2 methods *** - STDMETHODIMP SetOptions(DWORD dwFlag) override; - STDMETHODIMP GetOptions(DWORD* pdwFlag) override; - - // FIXME: These virtual keywords below should be removed. + STDMETHOD(SetOptions)(DWORD dwFlag) override; + STDMETHOD(GetOptions)(DWORD* pdwFlag) override; // *** IShellService methods *** - virtual STDMETHODIMP SetOwner(IUnknown *punkOwner) override; + STDMETHOD(SetOwner)(IUnknown *punkOwner) override; // *** IPersist methods *** - virtual STDMETHODIMP GetClassID(CLSID *pClassID) override; + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistFolder methods *** - virtual STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidl) override; + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // *** ICurrentWorkingDirectory methods *** - STDMETHODIMP GetDirectory(LPWSTR pwzPath, DWORD cchSize) override; - STDMETHODIMP SetDirectory(LPCWSTR pwzPath) override; + STDMETHOD(GetDirectory)(LPWSTR pwzPath, DWORD cchSize) override; + STDMETHOD(SetDirectory)(LPCWSTR pwzPath) override; public: DECLARE_REGISTRY_RESOURCEID(IDR_ACLISTISF) diff --git a/dll/win32/browseui/aclmulti.h b/dll/win32/browseui/aclmulti.h index 66c740b51b2..e322beb3064 100644 --- a/dll/win32/browseui/aclmulti.h +++ b/dll/win32/browseui/aclmulti.h @@ -44,17 +44,17 @@ class CACLMulti : ~CACLMulti(); // *** IEnumString methods *** - virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched); - virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt); - virtual HRESULT STDMETHODCALLTYPE Reset(); - virtual HRESULT STDMETHODCALLTYPE Clone(IEnumString **ppenum); + STDMETHOD(Next)(ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) override; + STDMETHOD(Skip)(ULONG celt) override; + STDMETHOD(Reset)() override; + STDMETHOD(Clone)(IEnumString **ppenum) override; // *** IACList methods *** - virtual HRESULT STDMETHODCALLTYPE Expand(LPCOLESTR pszExpand); + STDMETHOD(Expand)(LPCOLESTR pszExpand) override; // *** IObjMgr methods *** - virtual HRESULT STDMETHODCALLTYPE Append(IUnknown *punk); - virtual HRESULT STDMETHODCALLTYPE Remove(IUnknown *punk); + STDMETHOD(Append)(IUnknown *punk) override; + STDMETHOD(Remove)(IUnknown *punk) override; private: void release_obj(struct ACLMultiSublist *obj); diff --git a/dll/win32/browseui/addressband.h b/dll/win32/browseui/addressband.h index 465e1ab1098..1ffa7cea0d8 100644 --- a/dll/win32/browseui/addressband.h +++ b/dll/win32/browseui/addressband.h @@ -52,52 +52,52 @@ class CAddressBand : void CreateGoButton(); public: // *** IDeskBand methods *** - virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi); + STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IDockingWindow methods *** - virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); - virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved); - virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); + STDMETHOD(CloseDW)(DWORD dwReserved) override; + STDMETHOD(ResizeBorderDW)(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override; + STDMETHOD(ShowDW)(BOOL fShow) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // *** IWinEventHandler methods *** - virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override; + STDMETHOD(IsWindowOwner)(HWND hWnd) override; // *** IAddressBand methods *** - virtual HRESULT STDMETHODCALLTYPE FileSysChange(long param8, long paramC); - virtual HRESULT STDMETHODCALLTYPE Refresh(long param8); + STDMETHOD(FileSysChange)(long param8, long paramC) override; + STDMETHOD(Refresh)(long param8) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IInputObjectSite methods *** - virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus); + STDMETHOD(OnFocusChangeIS)(IUnknown *punkObj, BOOL fSetFocus) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // message handlers LRESULT OnNotifyClick(WPARAM wParam, NMHDR *notifyHeader, BOOL &bHandled); diff --git a/dll/win32/browseui/addresseditbox.h b/dll/win32/browseui/addresseditbox.h index beb043e1e1e..cab0e7a5c4c 100644 --- a/dll/win32/browseui/addresseditbox.h +++ b/dll/win32/browseui/addresseditbox.h @@ -54,41 +54,41 @@ class CAddressEditBox : HRESULT RefreshAddress(); public: // *** IShellService methods *** - virtual HRESULT STDMETHODCALLTYPE SetOwner(IUnknown *); + STDMETHOD(SetOwner)(IUnknown *) override; // *** IAddressBand methods *** - virtual HRESULT STDMETHODCALLTYPE FileSysChange(long param8, long paramC); - virtual HRESULT STDMETHODCALLTYPE Refresh(long param8); + STDMETHOD(FileSysChange)(long param8, long paramC) override; + STDMETHOD(Refresh)(long param8) override; // *** IAddressEditBox methods *** - virtual HRESULT STDMETHODCALLTYPE Init(HWND comboboxEx, HWND editControl, long param14, IUnknown *param18); - virtual HRESULT STDMETHODCALLTYPE SetCurrentDir(long paramC); - virtual HRESULT STDMETHODCALLTYPE ParseNow(long paramC); - virtual HRESULT STDMETHODCALLTYPE Execute(long paramC); - virtual HRESULT STDMETHODCALLTYPE Save(long paramC); + STDMETHOD(Init)(HWND comboboxEx, HWND editControl, long param14, IUnknown *param18) override; + STDMETHOD(SetCurrentDir)(long paramC) override; + STDMETHOD(ParseNow)(long paramC) override; + STDMETHOD(Execute)(long paramC) override; + STDMETHOD(Save)(long paramC) override; // *** IWinEventHandler methods *** - virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override; + STDMETHOD(IsWindowOwner)(HWND hWnd) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IDispatch methods *** - virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); - virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); - virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); - virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); + STDMETHOD(GetTypeInfoCount)(UINT *pctinfo) override; + STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override; + STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override; + STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // message handlers LRESULT OnSettingChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); diff --git a/dll/win32/browseui/bandproxy.h b/dll/win32/browseui/bandproxy.h index 406ce7b6857..47e87cd52e8 100644 --- a/dll/win32/browseui/bandproxy.h +++ b/dll/win32/browseui/bandproxy.h @@ -33,12 +33,12 @@ class CBandProxy : HRESULT FindBrowserWindow(IUnknown **browser); // *** IBandProxy methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *paramC); - virtual HRESULT STDMETHODCALLTYPE CreateNewWindow(long paramC); - virtual HRESULT STDMETHODCALLTYPE GetBrowserWindow(IUnknown **paramC); - virtual HRESULT STDMETHODCALLTYPE IsConnected(); - virtual HRESULT STDMETHODCALLTYPE NavigateToPIDL(LPCITEMIDLIST pidl); - virtual HRESULT STDMETHODCALLTYPE NavigateToURL(long paramC, long param10); + STDMETHOD(SetSite)(IUnknown *paramC) override; + STDMETHOD(CreateNewWindow)(long paramC) override; + STDMETHOD(GetBrowserWindow)(IUnknown **paramC) override; + STDMETHOD(IsConnected)() override; + STDMETHOD(NavigateToPIDL)(LPCITEMIDLIST pidl) override; + STDMETHOD(NavigateToURL)(long paramC, long param10) override; DECLARE_REGISTRY_RESOURCEID(IDR_BANDPROXY) DECLARE_NOT_AGGREGATABLE(CBandProxy) diff --git a/dll/win32/browseui/basebarsite.cpp b/dll/win32/browseui/basebarsite.cpp index 352e8c4a03f..eee836d846d 100644 --- a/dll/win32/browseui/basebarsite.cpp +++ b/dll/win32/browseui/basebarsite.cpp @@ -75,56 +75,56 @@ class CBaseBarSite : HRESULT InsertBar(IUnknown *newBar); // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IWinEventHandler methods *** - virtual HRESULT STDMETHODCALLTYPE OnWinEvent( - HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + STDMETHOD(OnWinEvent)( + HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override; + STDMETHOD(IsWindowOwner)(HWND hWnd) override; // *** IInputObjectSite specific methods *** - virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus); + STDMETHOD(OnFocusChangeIS)(IUnknown *punkObj, BOOL fSetFocus) override; // *** IDeskBarClient methods *** - virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite); - virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode); - virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState); - virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc); + STDMETHOD(SetDeskBarSite)(IUnknown *punkSite) override; + STDMETHOD(SetModeDBC)(DWORD dwMode) override; + STDMETHOD(UIActivateDBC)(DWORD dwState) override; + STDMETHOD(GetSize)(DWORD dwWhich, LPRECT prc) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, - OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, - DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, + OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, + DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IBandSite specific methods *** - virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk); - virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID); - virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, - LPWSTR pszName, int cchName); - virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState); - virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID); - virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, void **ppv); - virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo); - virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo); + STDMETHOD(AddBand)(IUnknown *punk) override; + STDMETHOD(EnumBands)(UINT uBand, DWORD *pdwBandID) override; + STDMETHOD(QueryBand)(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, + LPWSTR pszName, int cchName) override; + STDMETHOD(SetBandState)(DWORD dwBandID, DWORD dwMask, DWORD dwState) override; + STDMETHOD(RemoveBand)(DWORD dwBandID) override; + STDMETHOD(GetBandObject)(DWORD dwBandID, REFIID riid, void **ppv) override; + STDMETHOD(SetBandSiteInfo)(const BANDSITEINFO *pbsinfo) override; + STDMETHOD(GetBandSiteInfo)(BANDSITEINFO *pbsinfo) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // message handlers LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); diff --git a/dll/win32/browseui/brandband.h b/dll/win32/browseui/brandband.h index d7999c4a495..415366e6e28 100644 --- a/dll/win32/browseui/brandband.h +++ b/dll/win32/browseui/brandband.h @@ -49,51 +49,51 @@ class CBrandBand : void SelectImage(); public: // *** IDeskBand methods *** - virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi); + STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown* pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown* pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IDockingWindow methods *** - virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); - virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved); - virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); + STDMETHOD(CloseDW)(DWORD dwReserved) override; + STDMETHOD(ResizeBorderDW)(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved) override; + STDMETHOD(ShowDW)(BOOL fShow) override; // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // *** IWinEventHandler methods *** - virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override; + STDMETHOD(IsWindowOwner)(HWND hWnd) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IDispatch methods *** - virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); - virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); - virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); - virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); + STDMETHOD(GetTypeInfoCount)(UINT *pctinfo) override; + STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override; + STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override; + STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override; // message handlers LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); diff --git a/dll/win32/browseui/commonbrowser.h b/dll/win32/browseui/commonbrowser.h index c6060b7a093..fb82a3b939a 100644 --- a/dll/win32/browseui/commonbrowser.h +++ b/dll/win32/browseui/commonbrowser.h @@ -39,152 +39,152 @@ class CCommonBrowser : ~CCommonBrowser(); // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IBrowserService methods *** - virtual HRESULT STDMETHODCALLTYPE GetParentSite(IOleInPlaceSite **ppipsite); - virtual HRESULT STDMETHODCALLTYPE SetTitle(IShellView *psv, LPCWSTR pszName); - virtual HRESULT STDMETHODCALLTYPE GetTitle(IShellView *psv, LPWSTR pszName, DWORD cchName); - virtual HRESULT STDMETHODCALLTYPE GetOleObject(IOleObject **ppobjv); - virtual HRESULT STDMETHODCALLTYPE GetTravelLog(ITravelLog **pptl); - virtual HRESULT STDMETHODCALLTYPE ShowControlWindow(UINT id, BOOL fShow); - virtual HRESULT STDMETHODCALLTYPE IsControlWindowShown(UINT id, BOOL *pfShown); - virtual HRESULT STDMETHODCALLTYPE IEGetDisplayName(LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags); - virtual HRESULT STDMETHODCALLTYPE IEParseDisplayName(UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST *ppidlOut); - virtual HRESULT STDMETHODCALLTYPE DisplayParseError(HRESULT hres, LPCWSTR pwszPath); - virtual HRESULT STDMETHODCALLTYPE NavigateToPidl(LPCITEMIDLIST pidl, DWORD grfHLNF); - virtual HRESULT STDMETHODCALLTYPE SetNavigateState(BNSTATE bnstate); - virtual HRESULT STDMETHODCALLTYPE GetNavigateState(BNSTATE *pbnstate); - virtual HRESULT STDMETHODCALLTYPE NotifyRedirect(IShellView *psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse); - virtual HRESULT STDMETHODCALLTYPE UpdateWindowList(); - virtual HRESULT STDMETHODCALLTYPE UpdateBackForwardState(); - virtual HRESULT STDMETHODCALLTYPE SetFlags(DWORD dwFlags, DWORD dwFlagMask); - virtual HRESULT STDMETHODCALLTYPE GetFlags(DWORD *pdwFlags); - virtual HRESULT STDMETHODCALLTYPE CanNavigateNow(); - virtual HRESULT STDMETHODCALLTYPE GetPidl(LPITEMIDLIST *ppidl); - virtual HRESULT STDMETHODCALLTYPE SetReferrer(LPCITEMIDLIST pidl); - virtual DWORD STDMETHODCALLTYPE GetBrowserIndex(); - virtual HRESULT STDMETHODCALLTYPE GetBrowserByIndex(DWORD dwID, IUnknown **ppunk); - virtual HRESULT STDMETHODCALLTYPE GetHistoryObject(IOleObject **ppole, IStream **pstm, IBindCtx **ppbc); - virtual HRESULT STDMETHODCALLTYPE SetHistoryObject(IOleObject *pole, BOOL fIsLocalAnchor); - virtual HRESULT STDMETHODCALLTYPE CacheOLEServer(IOleObject *pole); - virtual HRESULT STDMETHODCALLTYPE GetSetCodePage(VARIANT *pvarIn, VARIANT *pvarOut); - virtual HRESULT STDMETHODCALLTYPE OnHttpEquiv(IShellView *psv, BOOL fDone, VARIANT *pvarargIn, VARIANT *pvarargOut); - virtual HRESULT STDMETHODCALLTYPE GetPalette(HPALETTE *hpal); - virtual HRESULT STDMETHODCALLTYPE RegisterWindow(BOOL fForceRegister, int swc); + STDMETHOD(GetParentSite)(IOleInPlaceSite **ppipsite) override; + STDMETHOD(SetTitle)(IShellView *psv, LPCWSTR pszName) override; + STDMETHOD(GetTitle)(IShellView *psv, LPWSTR pszName, DWORD cchName) override; + STDMETHOD(GetOleObject)(IOleObject **ppobjv) override; + STDMETHOD(GetTravelLog)(ITravelLog **pptl) override; + STDMETHOD(ShowControlWindow)(UINT id, BOOL fShow) override; + STDMETHOD(IsControlWindowShown)(UINT id, BOOL *pfShown) override; + STDMETHOD(IEGetDisplayName)(LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags) override; + STDMETHOD(IEParseDisplayName)(UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST *ppidlOut) override; + STDMETHOD(DisplayParseError)(HRESULT hres, LPCWSTR pwszPath) override; + STDMETHOD(NavigateToPidl)(LPCITEMIDLIST pidl, DWORD grfHLNF) override; + STDMETHOD(SetNavigateState)(BNSTATE bnstate) override; + STDMETHOD(GetNavigateState)(BNSTATE *pbnstate) override; + STDMETHOD(NotifyRedirect)(IShellView *psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse) override; + STDMETHOD(UpdateWindowList)() override; + STDMETHOD(UpdateBackForwardState)() override; + STDMETHOD(SetFlags)(DWORD dwFlags, DWORD dwFlagMask) override; + STDMETHOD(GetFlags)(DWORD *pdwFlags) override; + STDMETHOD(CanNavigateNow)() override; + STDMETHOD(GetPidl)(LPITEMIDLIST *ppidl) override; + STDMETHOD(SetReferrer)(LPCITEMIDLIST pidl) override; + STDMETHOD_(DWORD, GetBrowserIndex)() override; + STDMETHOD(GetBrowserByIndex)(DWORD dwID, IUnknown **ppunk) override; + STDMETHOD(GetHistoryObject)(IOleObject **ppole, IStream **pstm, IBindCtx **ppbc) override; + STDMETHOD(SetHistoryObject)(IOleObject *pole, BOOL fIsLocalAnchor) override; + STDMETHOD(CacheOLEServer)(IOleObject *pole) override; + STDMETHOD(GetSetCodePage)(VARIANT *pvarIn, VARIANT *pvarOut) override; + STDMETHOD(OnHttpEquiv)(IShellView *psv, BOOL fDone, VARIANT *pvarargIn, VARIANT *pvarargOut) override; + STDMETHOD(GetPalette)(HPALETTE *hpal) override; + STDMETHOD(RegisterWindow)(BOOL fForceRegister, int swc) override; // *** IBrowserService2 methods *** - virtual LRESULT STDMETHODCALLTYPE WndProcBS(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE SetAsDefFolderSettings(); - virtual HRESULT STDMETHODCALLTYPE GetViewRect(RECT *prc); - virtual HRESULT STDMETHODCALLTYPE OnSize(WPARAM wParam); - virtual HRESULT STDMETHODCALLTYPE OnCreate(struct tagCREATESTRUCTW *pcs); - virtual LRESULT STDMETHODCALLTYPE OnCommand(WPARAM wParam, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE OnDestroy(); - virtual LRESULT STDMETHODCALLTYPE OnNotify(struct tagNMHDR *pnm); - virtual HRESULT STDMETHODCALLTYPE OnSetFocus(); - virtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivateBS(BOOL fActive); - virtual HRESULT STDMETHODCALLTYPE ReleaseShellView(); - virtual HRESULT STDMETHODCALLTYPE ActivatePendingView(); - virtual HRESULT STDMETHODCALLTYPE CreateViewWindow(IShellView *psvNew, IShellView *psvOld, LPRECT prcView, HWND *phwnd); - virtual HRESULT STDMETHODCALLTYPE CreateBrowserPropSheetExt(REFIID riid, void **ppv); - virtual HRESULT STDMETHODCALLTYPE GetViewWindow(HWND *phwndView); - virtual HRESULT STDMETHODCALLTYPE GetBaseBrowserData(LPCBASEBROWSERDATA *pbbd); - virtual LPBASEBROWSERDATA STDMETHODCALLTYPE PutBaseBrowserData(); - virtual HRESULT STDMETHODCALLTYPE InitializeTravelLog(ITravelLog *ptl, DWORD dw); - virtual HRESULT STDMETHODCALLTYPE SetTopBrowser(); - virtual HRESULT STDMETHODCALLTYPE Offline(int iCmd); - virtual HRESULT STDMETHODCALLTYPE AllowViewResize(BOOL f); - virtual HRESULT STDMETHODCALLTYPE SetActivateState(UINT u); - virtual HRESULT STDMETHODCALLTYPE UpdateSecureLockIcon(int eSecureLock); - virtual HRESULT STDMETHODCALLTYPE InitializeDownloadManager(); - virtual HRESULT STDMETHODCALLTYPE InitializeTransitionSite(); - virtual HRESULT STDMETHODCALLTYPE _Initialize(HWND hwnd, IUnknown *pauto); - virtual HRESULT STDMETHODCALLTYPE _CancelPendingNavigationAsync(); - virtual HRESULT STDMETHODCALLTYPE _CancelPendingView(); - virtual HRESULT STDMETHODCALLTYPE _MaySaveChanges(); - virtual HRESULT STDMETHODCALLTYPE _PauseOrResumeView(BOOL fPaused); - virtual HRESULT STDMETHODCALLTYPE _DisableModeless(); - virtual HRESULT STDMETHODCALLTYPE _NavigateToPidl(LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags); - virtual HRESULT STDMETHODCALLTYPE _TryShell2Rename(IShellView *psv, LPCITEMIDLIST pidlNew); - virtual HRESULT STDMETHODCALLTYPE _SwitchActivationNow(); - virtual HRESULT STDMETHODCALLTYPE _ExecChildren(IUnknown *punkBar, BOOL fBroadcast, const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut); - virtual HRESULT STDMETHODCALLTYPE _SendChildren(HWND hwndBar, BOOL fBroadcast, UINT uMsg, WPARAM wParam, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE GetFolderSetData(struct tagFolderSetData *pfsd); - virtual HRESULT STDMETHODCALLTYPE _OnFocusChange(UINT itb); - virtual HRESULT STDMETHODCALLTYPE v_ShowHideChildWindows(BOOL fChildOnly); - virtual UINT STDMETHODCALLTYPE _get_itbLastFocus(); - virtual HRESULT STDMETHODCALLTYPE _put_itbLastFocus(UINT itbLastFocus); - virtual HRESULT STDMETHODCALLTYPE _UIActivateView(UINT uState); - virtual HRESULT STDMETHODCALLTYPE _GetViewBorderRect(RECT *prc); - virtual HRESULT STDMETHODCALLTYPE _UpdateViewRectSize(); - virtual HRESULT STDMETHODCALLTYPE _ResizeNextBorder(UINT itb); - virtual HRESULT STDMETHODCALLTYPE _ResizeView(); - virtual HRESULT STDMETHODCALLTYPE _GetEffectiveClientArea(LPRECT lprectBorder, HMONITOR hmon); - virtual IStream *STDMETHODCALLTYPE v_GetViewStream(LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName); - virtual LRESULT STDMETHODCALLTYPE ForwardViewMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE SetAcceleratorMenu(HACCEL hacc); - virtual int STDMETHODCALLTYPE _GetToolbarCount(); - virtual LPTOOLBARITEM STDMETHODCALLTYPE _GetToolbarItem(int itb); - virtual HRESULT STDMETHODCALLTYPE _SaveToolbars(IStream *pstm); - virtual HRESULT STDMETHODCALLTYPE _LoadToolbars(IStream *pstm); - virtual HRESULT STDMETHODCALLTYPE _CloseAndReleaseToolbars(BOOL fClose); - virtual HRESULT STDMETHODCALLTYPE v_MayGetNextToolbarFocus(LPMSG lpMsg, UINT itbNext, int citb, LPTOOLBARITEM *pptbi, HWND *phwnd); - virtual HRESULT STDMETHODCALLTYPE _ResizeNextBorderHelper(UINT itb, BOOL bUseHmonitor); - virtual UINT STDMETHODCALLTYPE _FindTBar(IUnknown *punkSrc); - virtual HRESULT STDMETHODCALLTYPE _SetFocus(LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE v_MayTranslateAccelerator(MSG *pmsg); - virtual HRESULT STDMETHODCALLTYPE _GetBorderDWHelper(IUnknown *punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor); - virtual HRESULT STDMETHODCALLTYPE v_CheckZoneCrossing(LPCITEMIDLIST pidl); + STDMETHOD_(LRESULT, WndProcBS)(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) override; + STDMETHOD(SetAsDefFolderSettings)() override; + STDMETHOD(GetViewRect)(RECT *prc) override; + STDMETHOD(OnSize)(WPARAM wParam) override; + STDMETHOD(OnCreate)(struct tagCREATESTRUCTW *pcs) override; + STDMETHOD_(LRESULT, OnCommand)(WPARAM wParam, LPARAM lParam) override; + STDMETHOD(OnDestroy)() override; + STDMETHOD_(LRESULT, OnNotify)(struct tagNMHDR *pnm) override; + STDMETHOD(OnSetFocus)() override; + STDMETHOD(OnFrameWindowActivateBS)(BOOL fActive) override; + STDMETHOD(ReleaseShellView)() override; + STDMETHOD(ActivatePendingView)() override; + STDMETHOD(CreateViewWindow)(IShellView *psvNew, IShellView *psvOld, LPRECT prcView, HWND *phwnd) override; + STDMETHOD(CreateBrowserPropSheetExt)(REFIID riid, void **ppv) override; + STDMETHOD(GetViewWindow)(HWND *phwndView) override; + STDMETHOD(GetBaseBrowserData)(LPCBASEBROWSERDATA *pbbd) override; + STDMETHOD_(LPBASEBROWSERDATA, PutBaseBrowserData)() override; + STDMETHOD(InitializeTravelLog)(ITravelLog *ptl, DWORD dw) override; + STDMETHOD(SetTopBrowser)() override; + STDMETHOD(Offline)(int iCmd) override; + STDMETHOD(AllowViewResize)(BOOL f) override; + STDMETHOD(SetActivateState)(UINT u) override; + STDMETHOD(UpdateSecureLockIcon)(int eSecureLock) override; + STDMETHOD(InitializeDownloadManager)() override; + STDMETHOD(InitializeTransitionSite)() override; + STDMETHOD(_Initialize)(HWND hwnd, IUnknown *pauto) override; + STDMETHOD(_CancelPendingNavigationAsync)() override; + STDMETHOD(_CancelPendingView)() override; + STDMETHOD(_MaySaveChanges)() override; + STDMETHOD(_PauseOrResumeView)(BOOL fPaused) override; + STDMETHOD(_DisableModeless)() override; + STDMETHOD(_NavigateToPidl)(LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags) override; + STDMETHOD(_TryShell2Rename)(IShellView *psv, LPCITEMIDLIST pidlNew) override; + STDMETHOD(_SwitchActivationNow)() override; + STDMETHOD(_ExecChildren)(IUnknown *punkBar, BOOL fBroadcast, const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut) override; + STDMETHOD(_SendChildren)(HWND hwndBar, BOOL fBroadcast, UINT uMsg, WPARAM wParam, LPARAM lParam) override; + STDMETHOD(GetFolderSetData)(struct tagFolderSetData *pfsd) override; + STDMETHOD(_OnFocusChange)(UINT itb) override; + STDMETHOD(v_ShowHideChildWindows)(BOOL fChildOnly) override; + STDMETHOD_(UINT, _get_itbLastFocus)() override; + STDMETHOD(_put_itbLastFocus)(UINT itbLastFocus) override; + STDMETHOD(_UIActivateView)(UINT uState) override; + STDMETHOD(_GetViewBorderRect)(RECT *prc) override; + STDMETHOD(_UpdateViewRectSize)() override; + STDMETHOD(_ResizeNextBorder)(UINT itb) override; + STDMETHOD(_ResizeView)() override; + STDMETHOD(_GetEffectiveClientArea)(LPRECT lprectBorder, HMONITOR hmon) override; + STDMETHOD_(IStream *, v_GetViewStream)(LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName) override; + STDMETHOD_(LRESULT, ForwardViewMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; + STDMETHOD(SetAcceleratorMenu)(HACCEL hacc) override; + STDMETHOD_(int, _GetToolbarCount)() override; + STDMETHOD_(LPTOOLBARITEM, _GetToolbarItem)(int itb) override; + STDMETHOD(_SaveToolbars)(IStream *pstm) override; + STDMETHOD(_LoadToolbars)(IStream *pstm) override; + STDMETHOD(_CloseAndReleaseToolbars)(BOOL fClose) override; + STDMETHOD(v_MayGetNextToolbarFocus)(LPMSG lpMsg, UINT itbNext, int citb, LPTOOLBARITEM *pptbi, HWND *phwnd) override; + STDMETHOD(_ResizeNextBorderHelper)(UINT itb, BOOL bUseHmonitor) override; + STDMETHOD_(UINT, _FindTBar)(IUnknown *punkSrc) override; + STDMETHOD(_SetFocus)(LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg) override; + STDMETHOD(v_MayTranslateAccelerator)(MSG *pmsg) override; + STDMETHOD(_GetBorderDWHelper)(IUnknown *punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor) override; + STDMETHOD(v_CheckZoneCrossing)(LPCITEMIDLIST pidl) override; // *** IBrowserService3 methods *** - virtual HRESULT STDMETHODCALLTYPE _PositionViewWindow(HWND, RECT *); - virtual HRESULT STDMETHODCALLTYPE IEParseDisplayNameEx(UINT, PCWSTR, DWORD, LPITEMIDLIST *); + STDMETHOD(_PositionViewWindow)(HWND, RECT *) override; + STDMETHOD(IEParseDisplayNameEx)(UINT, PCWSTR, DWORD, LPITEMIDLIST *) override; // *** IShellBrowser methods *** - virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths); - virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject); - virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared); - virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR pszStatusText); - virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(MSG *pmsg, WORD wID); - virtual HRESULT STDMETHODCALLTYPE BrowseObject(LPCITEMIDLIST pidl, UINT wFlags); - virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, IStream **ppStrm); - virtual HRESULT STDMETHODCALLTYPE GetControlWindow(UINT id, HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret); - virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView(struct IShellView **ppshv); - virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(struct IShellView *ppshv); - virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags); + STDMETHOD(InsertMenusSB)(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) override; + STDMETHOD(SetMenuSB)(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject) override; + STDMETHOD(RemoveMenusSB)(HMENU hmenuShared) override; + STDMETHOD(SetStatusTextSB)(LPCOLESTR pszStatusText) override; + STDMETHOD(EnableModelessSB)(BOOL fEnable) override; + STDMETHOD(TranslateAcceleratorSB)(MSG *pmsg, WORD wID) override; + STDMETHOD(BrowseObject)(LPCITEMIDLIST pidl, UINT wFlags) override; + STDMETHOD(GetViewStateStream)(DWORD grfMode, IStream **ppStrm) override; + STDMETHOD(GetControlWindow)(UINT id, HWND *lphwnd) override; + STDMETHOD(SendControlMsg)(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret) override; + STDMETHOD(QueryActiveShellView)(struct IShellView **ppshv) override; + STDMETHOD(OnViewWindowActive)(struct IShellView *ppshv) override; + STDMETHOD(SetToolbarItems)(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags) override; // *** IShellBowserService methods *** - virtual HRESULT STDMETHODCALLTYPE GetPropertyBag(long flags, REFIID riid, void **ppvObject); + STDMETHOD(GetPropertyBag)(long flags, REFIID riid, void **ppvObject) override; // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IDockingWindowSite methods *** - virtual HRESULT STDMETHODCALLTYPE GetBorderDW(IUnknown* punkObj, LPRECT prcBorder); - virtual HRESULT STDMETHODCALLTYPE RequestBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw); - virtual HRESULT STDMETHODCALLTYPE SetBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw); + STDMETHOD(GetBorderDW)(IUnknown* punkObj, LPRECT prcBorder) override; + STDMETHOD(RequestBorderSpaceDW)(IUnknown* punkObj, LPCBORDERWIDTHS pbw) override; + STDMETHOD(SetBorderSpaceDW)(IUnknown* punkObj, LPCBORDERWIDTHS pbw) override; // *** IDockingWindowFrame methods *** - virtual HRESULT STDMETHODCALLTYPE AddToolbar(IUnknown *punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags); - virtual HRESULT STDMETHODCALLTYPE RemoveToolbar(IUnknown *punkSrc, DWORD dwRemoveFlags); - virtual HRESULT STDMETHODCALLTYPE FindToolbar(LPCWSTR pwszItem, REFIID riid, void **ppv); + STDMETHOD(AddToolbar)(IUnknown *punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) override; + STDMETHOD(RemoveToolbar)(IUnknown *punkSrc, DWORD dwRemoveFlags) override; + STDMETHOD(FindToolbar)(LPCWSTR pwszItem, REFIID riid, void **ppv) override; // *** IInputObjectSite specific methods *** - virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus); + STDMETHOD(OnFocusChangeIS)(IUnknown *punkObj, BOOL fSetFocus) override; // *** IDropTarget methods *** - virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragLeave(); - virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + STDMETHOD(DragEnter)(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragOver)(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragLeave)() override; + STDMETHOD(Drop)(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; DECLARE_REGISTRY_RESOURCEID(IDR_COMMONBROWSER) DECLARE_AGGREGATABLE(CCommonBrowser) diff --git a/dll/win32/browseui/explorerband.cpp b/dll/win32/browseui/explorerband.cpp index 18ea0c2fe77..833dfa0de96 100644 --- a/dll/win32/browseui/explorerband.cpp +++ b/dll/win32/browseui/explorerband.cpp @@ -374,27 +374,36 @@ void CExplorerBand::OnSelectionChanged(LPNMTREEVIEW pnmtv) void CExplorerBand::OnTreeItemDragging(LPNMTREEVIEW pnmtv, BOOL isRightClick) { - CComPtr pSrcFolder; - CComPtr pObj; - LPCITEMIDLIST pLast; - HRESULT hr; - DWORD dwEffect; - DWORD dwEffect2; - - dwEffect = DROPEFFECT_COPY | DROPEFFECT_MOVE; if (!pnmtv->itemNew.lParam) return; + NodeInfo* pNodeInfo = GetNodeInfo(pnmtv->itemNew.hItem); + + HRESULT hr; + CComPtr pSrcFolder; + LPCITEMIDLIST pLast; hr = SHBindToParent(pNodeInfo->absolutePidl, IID_PPV_ARG(IShellFolder, &pSrcFolder), &pLast); if (!SUCCEEDED(hr)) return; - hr = pSrcFolder->GetUIObjectOf(m_hWnd, 1, &pLast, IID_IDataObject, 0, reinterpret_cast(&pObj)); + + SFGAOF attrs = SFGAO_CANCOPY | SFGAO_CANMOVE | SFGAO_CANLINK; + pSrcFolder->GetAttributesOf(1, &pLast, &attrs); + + DWORD dwEffect = 0; + if (attrs & SFGAO_CANCOPY) + dwEffect |= DROPEFFECT_COPY; + if (attrs & SFGAO_CANMOVE) + dwEffect |= DROPEFFECT_MOVE; + if (attrs & SFGAO_CANLINK) + dwEffect |= DROPEFFECT_LINK; + + CComPtr pObj; + hr = pSrcFolder->GetUIObjectOf(m_hWnd, 1, &pLast, IID_IDataObject, 0, (LPVOID*)&pObj); if (!SUCCEEDED(hr)) return; - DoDragDrop(pObj, this, dwEffect, &dwEffect2); - return; -} + DoDragDrop(pObj, this, dwEffect, &dwEffect); +} // *** ATL event handlers *** LRESULT CExplorerBand::OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled) diff --git a/dll/win32/browseui/explorerband.h b/dll/win32/browseui/explorerband.h index 6e48e944053..ad4e6aa3830 100644 --- a/dll/win32/browseui/explorerband.h +++ b/dll/win32/browseui/explorerband.h @@ -112,71 +112,71 @@ class CExplorerBand : virtual ~CExplorerBand(); // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IDockingWindow methods *** - virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); - virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved); - virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); + STDMETHOD(CloseDW)(DWORD dwReserved) override; + STDMETHOD(ResizeBorderDW)(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override; + STDMETHOD(ShowDW)(BOOL fShow) override; // *** IDeskBand methods *** - virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi); + STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // *** IWinEventHandler methods *** - virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override; + STDMETHOD(IsWindowOwner)(HWND hWnd) override; // *** IBandNavigate methods *** - virtual HRESULT STDMETHODCALLTYPE Select(long paramC); + STDMETHOD(Select)(long paramC) override; // *** INamespaceProxy *** - virtual HRESULT STDMETHODCALLTYPE GetNavigateTarget(long paramC, long param10, long param14); - virtual HRESULT STDMETHODCALLTYPE Invoke(long paramC); - virtual HRESULT STDMETHODCALLTYPE OnSelectionChanged(long paramC); - virtual HRESULT STDMETHODCALLTYPE RefreshFlags(long paramC, long param10, long param14); - virtual HRESULT STDMETHODCALLTYPE CacheItem(long paramC); + STDMETHOD(GetNavigateTarget)(long paramC, long param10, long param14) override; + STDMETHOD(Invoke)(long paramC) override; + STDMETHOD(OnSelectionChanged)(long paramC) override; + STDMETHOD(RefreshFlags)(long paramC, long param10, long param14) override; + STDMETHOD(CacheItem)(long paramC) override; // *** IDispatch methods *** - virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); - virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); - virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); - virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); + STDMETHOD(GetTypeInfoCount)(UINT *pctinfo) override; + STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override; + STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override; + STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override; // *** IDropTarget methods *** - virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pObj, DWORD glfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD glfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragLeave(); - virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pObj, DWORD glfKeyState, POINTL pt, DWORD *pdwEffect); + STDMETHOD(DragEnter)(IDataObject *pObj, DWORD glfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragOver)(DWORD glfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragLeave)() override; + STDMETHOD(Drop)(IDataObject *pObj, DWORD glfKeyState, POINTL pt, DWORD *pdwEffect) override; // *** IDropSource methods *** - virtual HRESULT STDMETHODCALLTYPE QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState); - virtual HRESULT STDMETHODCALLTYPE GiveFeedback(DWORD dwEffect); + STDMETHOD(QueryContinueDrag)(BOOL fEscapePressed, DWORD grfKeyState) override; + STDMETHOD(GiveFeedback)(DWORD dwEffect) override; DECLARE_REGISTRY_RESOURCEID(IDR_EXPLORERBAND) DECLARE_NOT_AGGREGATABLE(CExplorerBand) diff --git a/dll/win32/browseui/globalfoldersettings.h b/dll/win32/browseui/globalfoldersettings.h index abe476a9024..009e0264f3e 100644 --- a/dll/win32/browseui/globalfoldersettings.h +++ b/dll/win32/browseui/globalfoldersettings.h @@ -31,8 +31,8 @@ class CGlobalFolderSettings : ~CGlobalFolderSettings(); // *** IGlobalFolderSettings methods *** - virtual HRESULT STDMETHODCALLTYPE Get(DEFFOLDERSETTINGS *paramC, int param10); - virtual HRESULT STDMETHODCALLTYPE Set(const DEFFOLDERSETTINGS *paramC, int param10, unsigned int param14); + STDMETHOD(Get)(DEFFOLDERSETTINGS *paramC, int param10) override; + STDMETHOD(Set)(const DEFFOLDERSETTINGS *paramC, int param10, unsigned int param14) override; DECLARE_REGISTRY_RESOURCEID(IDR_GLOBALFOLDERSETTINGS) DECLARE_NOT_AGGREGATABLE(CGlobalFolderSettings) diff --git a/dll/win32/browseui/internettoolbar.cpp b/dll/win32/browseui/internettoolbar.cpp index 80f962d181c..5d16b051e4f 100644 --- a/dll/win32/browseui/internettoolbar.cpp +++ b/dll/win32/browseui/internettoolbar.cpp @@ -29,10 +29,10 @@ toolbar, and address band for an explorer window interface IAugmentedShellFolder : public IShellFolder { - virtual HRESULT STDMETHODCALLTYPE AddNameSpace(LPGUID, IShellFolder *, LPCITEMIDLIST, ULONG) = 0; - virtual HRESULT STDMETHODCALLTYPE GetNameSpaceID(LPCITEMIDLIST, LPGUID) = 0; - virtual HRESULT STDMETHODCALLTYPE QueryNameSpace(ULONG, LPGUID, IShellFolder **) = 0; - virtual HRESULT STDMETHODCALLTYPE EnumNameSpace(ULONG, PULONG) = 0; + STDMETHOD(AddNameSpace)(LPGUID, IShellFolder *, LPCITEMIDLIST, ULONG) PURE; + STDMETHOD(GetNameSpaceID)(LPCITEMIDLIST, LPGUID) PURE; + STDMETHOD(QueryNameSpace)(ULONG, LPGUID, IShellFolder **) PURE; + STDMETHOD(EnumNameSpace)(ULONG, PULONG) PURE; }; #endif @@ -150,25 +150,25 @@ class CDockSite : private: // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IDockingWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetBorderDW(IUnknown* punkObj, LPRECT prcBorder); - virtual HRESULT STDMETHODCALLTYPE RequestBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw); - virtual HRESULT STDMETHODCALLTYPE SetBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw); + STDMETHOD(GetBorderDW)(IUnknown* punkObj, LPRECT prcBorder) override; + STDMETHOD(RequestBorderSpaceDW)(IUnknown* punkObj, LPCBORDERWIDTHS pbw) override; + STDMETHOD(SetBorderSpaceDW)(IUnknown* punkObj, LPCBORDERWIDTHS pbw) override; // *** IInputObjectSite specific methods *** - virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus); + STDMETHOD(OnFocusChangeIS)(IUnknown *punkObj, BOOL fSetFocus) override; // *** IOleCommandTarget specific methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, - OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, - DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, + OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, + DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; BEGIN_COM_MAP(CDockSite) COM_INTERFACE_ENTRY_IID(IID_IOleWindow, IOleWindow) diff --git a/dll/win32/browseui/internettoolbar.h b/dll/win32/browseui/internettoolbar.h index 0b154ab07b0..997b0a10a13 100644 --- a/dll/win32/browseui/internettoolbar.h +++ b/dll/win32/browseui/internettoolbar.h @@ -110,76 +110,76 @@ class CInternetToolbar : public: // *** IInputObject specific methods *** - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IDockingWindow methods *** - virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); - virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); - virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved); + STDMETHOD(ShowDW)(BOOL fShow) override; + STDMETHOD(CloseDW)(DWORD dwReserved) override; + STDMETHOD(ResizeBorderDW)(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStreamInit methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); - virtual HRESULT STDMETHODCALLTYPE InitNew(); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; + STDMETHOD(InitNew)() override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IDispatch methods *** - virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); - virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); - virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); - virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); + STDMETHOD(GetTypeInfoCount)(UINT *pctinfo) override; + STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override; + STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override; + STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override; // *** IExplorerToolbar methods *** - virtual HRESULT STDMETHODCALLTYPE SetCommandTarget(IUnknown *theTarget, GUID *category, long param14); - virtual HRESULT STDMETHODCALLTYPE Unknown1(); - virtual HRESULT STDMETHODCALLTYPE AddButtons(const GUID *pguidCmdGroup, long buttonCount, TBBUTTON *buttons); - virtual HRESULT STDMETHODCALLTYPE AddString(const GUID *pguidCmdGroup, HINSTANCE param10, LPCTSTR param14, long *param18); - virtual HRESULT STDMETHODCALLTYPE GetButton(const GUID *pguidCmdGroup, long param10, long param14); - virtual HRESULT STDMETHODCALLTYPE GetState(const GUID *pguidCmdGroup, long commandID, long *theState); - virtual HRESULT STDMETHODCALLTYPE SetState(const GUID *pguidCmdGroup, long commandID, long theState); - virtual HRESULT STDMETHODCALLTYPE AddBitmap(const GUID *pguidCmdGroup, long param10, long buttonCount, TBADDBITMAP *lParam, long *newIndex, COLORREF param20); - virtual HRESULT STDMETHODCALLTYPE GetBitmapSize(long *paramC); - virtual HRESULT STDMETHODCALLTYPE SendToolbarMsg(const GUID *pguidCmdGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *result); - virtual HRESULT STDMETHODCALLTYPE SetImageList(const GUID *pguidCmdGroup, HIMAGELIST param10, HIMAGELIST param14, HIMAGELIST param18); - virtual HRESULT STDMETHODCALLTYPE ModifyButton(const GUID *pguidCmdGroup, long param10, long param14); + STDMETHOD(SetCommandTarget)(IUnknown *theTarget, GUID *category, long param14) override; + STDMETHOD(Unknown1)() override; + STDMETHOD(AddButtons)(const GUID *pguidCmdGroup, long buttonCount, TBBUTTON *buttons) override; + STDMETHOD(AddString)(const GUID *pguidCmdGroup, HINSTANCE param10, LPCTSTR param14, long *param18) override; + STDMETHOD(GetButton)(const GUID *pguidCmdGroup, long param10, long param14) override; + STDMETHOD(GetState)(const GUID *pguidCmdGroup, long commandID, long *theState) override; + STDMETHOD(SetState)(const GUID *pguidCmdGroup, long commandID, long theState) override; + STDMETHOD(AddBitmap)(const GUID *pguidCmdGroup, long param10, long buttonCount, TBADDBITMAP *lParam, long *newIndex, COLORREF param20) override; + STDMETHOD(GetBitmapSize)(long *paramC) override; + STDMETHOD(SendToolbarMsg)(const GUID *pguidCmdGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *result) override; + STDMETHOD(SetImageList)(const GUID *pguidCmdGroup, HIMAGELIST param10, HIMAGELIST param14, HIMAGELIST param18) override; + STDMETHOD(ModifyButton)(const GUID *pguidCmdGroup, long param10, long param14) override; // *** IShellChangeNotify methods *** - virtual HRESULT STDMETHODCALLTYPE OnChange(LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2); + STDMETHOD(OnChange)(LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IWinEventHandler methods *** - virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override; + STDMETHOD(IsWindowOwner)(HWND hWnd) override; // *** IBandSite specific methods *** - virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk); - virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID); - virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName); - virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState); - virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID); - virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, void **ppv); - virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo); - virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo); + STDMETHOD(AddBand)(IUnknown *punk) override; + STDMETHOD(EnumBands)(UINT uBand, DWORD *pdwBandID) override; + STDMETHOD(QueryBand)(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName) override; + STDMETHOD(SetBandState)(DWORD dwBandID, DWORD dwMask, DWORD dwState) override; + STDMETHOD(RemoveBand)(DWORD dwBandID) override; + STDMETHOD(GetBandObject)(DWORD dwBandID, REFIID riid, void **ppv) override; + STDMETHOD(SetBandSiteInfo)(const BANDSITEINFO *pbsinfo) override; + STDMETHOD(GetBandSiteInfo)(BANDSITEINFO *pbsinfo) override; // message handlers LRESULT OnTravelBack(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled); diff --git a/dll/win32/browseui/lang/bg-BG.rc b/dll/win32/browseui/lang/bg-BG.rc index e05cea2891a..b2020bef3a5 100644 --- a/dll/win32/browseui/lang/bg-BG.rc +++ b/dll/win32/browseui/lang/bg-BG.rc @@ -145,7 +145,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Търси в:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Тър&сене", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Спри", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/de-DE.rc b/dll/win32/browseui/lang/de-DE.rc index a9f75d5a7b9..4a2c793d5dd 100644 --- a/dll/win32/browseui/lang/de-DE.rc +++ b/dll/win32/browseui/lang/de-DE.rc @@ -152,7 +152,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Suchen in:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "&Jetzt suchen", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "Abbrec&hen", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/en-US.rc b/dll/win32/browseui/lang/en-US.rc index a137da8cbf1..bced60137f9 100644 --- a/dll/win32/browseui/lang/en-US.rc +++ b/dll/win32/browseui/lang/en-US.rc @@ -163,7 +163,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Look in:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Sea&rch", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Stop", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/es-ES.rc b/dll/win32/browseui/lang/es-ES.rc index b32bc18cff4..38596cbd233 100644 --- a/dll/win32/browseui/lang/es-ES.rc +++ b/dll/win32/browseui/lang/es-ES.rc @@ -154,7 +154,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Buscar en:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Bus&car", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Parar", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/et-EE.rc b/dll/win32/browseui/lang/et-EE.rc index 9f3c87fc6bf..f81e4672828 100644 --- a/dll/win32/browseui/lang/et-EE.rc +++ b/dll/win32/browseui/lang/et-EE.rc @@ -152,7 +152,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Look in:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Sea&rch", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Stop", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/eu-ES.rc b/dll/win32/browseui/lang/eu-ES.rc index 1c4f0c804c2..6668a426355 100644 --- a/dll/win32/browseui/lang/eu-ES.rc +++ b/dll/win32/browseui/lang/eu-ES.rc @@ -152,7 +152,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Buscar en:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Bus&car", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Parar", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/fr-FR.rc b/dll/win32/browseui/lang/fr-FR.rc index eef8e1df387..4dd32e01164 100644 --- a/dll/win32/browseui/lang/fr-FR.rc +++ b/dll/win32/browseui/lang/fr-FR.rc @@ -163,7 +163,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Chercher dans :", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Che&rcher", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Arrêter", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/he-IL.rc b/dll/win32/browseui/lang/he-IL.rc index ac7c2534ab2..b7e15d3d5c5 100644 --- a/dll/win32/browseui/lang/he-IL.rc +++ b/dll/win32/browseui/lang/he-IL.rc @@ -147,7 +147,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&חפש ב:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "&חפש", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&עצור", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/hi-IN.rc b/dll/win32/browseui/lang/hi-IN.rc index aefe0f9a268..a9869c7f850 100644 --- a/dll/win32/browseui/lang/hi-IN.rc +++ b/dll/win32/browseui/lang/hi-IN.rc @@ -145,7 +145,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Look in:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Sea&rch", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Stop", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/hu-HU.rc b/dll/win32/browseui/lang/hu-HU.rc index 4d446c9cae2..09f344e1234 100644 --- a/dll/win32/browseui/lang/hu-HU.rc +++ b/dll/win32/browseui/lang/hu-HU.rc @@ -163,7 +163,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "Keresés &itt:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "&Keresés", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Megállítás", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/id-ID.rc b/dll/win32/browseui/lang/id-ID.rc index 2d591e6e1f1..a1246ea7344 100644 --- a/dll/win32/browseui/lang/id-ID.rc +++ b/dll/win32/browseui/lang/id-ID.rc @@ -164,7 +164,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Cari di:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Ca&ri", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Berhenti", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/it-IT.rc b/dll/win32/browseui/lang/it-IT.rc index 692a5be0863..aa9baebfb2c 100644 --- a/dll/win32/browseui/lang/it-IT.rc +++ b/dll/win32/browseui/lang/it-IT.rc @@ -145,7 +145,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Look in:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Sea&rch", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Stop", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/ja-JP.rc b/dll/win32/browseui/lang/ja-JP.rc index a4acdb5e6c3..955617acdeb 100644 --- a/dll/win32/browseui/lang/ja-JP.rc +++ b/dll/win32/browseui/lang/ja-JP.rc @@ -163,7 +163,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "次のフォルダ内部(&L):", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "検索(&R)", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "停止(&S)", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/pl-PL.rc b/dll/win32/browseui/lang/pl-PL.rc index 87e5879fba3..a40eaa139e7 100644 --- a/dll/win32/browseui/lang/pl-PL.rc +++ b/dll/win32/browseui/lang/pl-PL.rc @@ -154,7 +154,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "Szu&kaj w:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Wy&szukaj", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Zatrzymaj", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/pt-BR.rc b/dll/win32/browseui/lang/pt-BR.rc index 4425305834d..203de502390 100644 --- a/dll/win32/browseui/lang/pt-BR.rc +++ b/dll/win32/browseui/lang/pt-BR.rc @@ -147,7 +147,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Look in:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Sea&rch", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Stop", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/pt-PT.rc b/dll/win32/browseui/lang/pt-PT.rc index cf33c617007..7ed957e08a9 100644 --- a/dll/win32/browseui/lang/pt-PT.rc +++ b/dll/win32/browseui/lang/pt-PT.rc @@ -147,7 +147,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Procurar em:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Pro&curar", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "Pa&rar", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/ro-RO.rc b/dll/win32/browseui/lang/ro-RO.rc index 85906ebb2d0..2e3909c6bb1 100644 --- a/dll/win32/browseui/lang/ro-RO.rc +++ b/dll/win32/browseui/lang/ro-RO.rc @@ -153,7 +153,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Uită-te în:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "&Căutare", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Oprește", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/ru-RU.rc b/dll/win32/browseui/lang/ru-RU.rc index 25b3b97bcb1..82c281cad18 100644 --- a/dll/win32/browseui/lang/ru-RU.rc +++ b/dll/win32/browseui/lang/ru-RU.rc @@ -154,7 +154,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "П&оиск в:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Най&ти", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "Остановит&ь", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/sq-AL.rc b/dll/win32/browseui/lang/sq-AL.rc index 1bb72cb269d..0c5739716cc 100644 --- a/dll/win32/browseui/lang/sq-AL.rc +++ b/dll/win32/browseui/lang/sq-AL.rc @@ -164,7 +164,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Look in:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Sea&rch", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Stop", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/tr-TR.rc b/dll/win32/browseui/lang/tr-TR.rc index f6da211a725..dbeb3549c38 100644 --- a/dll/win32/browseui/lang/tr-TR.rc +++ b/dll/win32/browseui/lang/tr-TR.rc @@ -147,7 +147,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Şurada ara:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "&Ara", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Durdur", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/uk-UA.rc b/dll/win32/browseui/lang/uk-UA.rc index ea3477c0daa..09145d73dbb 100644 --- a/dll/win32/browseui/lang/uk-UA.rc +++ b/dll/win32/browseui/lang/uk-UA.rc @@ -153,7 +153,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "&Look in:", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "Sea&rch", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "&Stop", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/zh-CN.rc b/dll/win32/browseui/lang/zh-CN.rc index e2679fd8d85..b1403c30992 100644 --- a/dll/win32/browseui/lang/zh-CN.rc +++ b/dll/win32/browseui/lang/zh-CN.rc @@ -167,7 +167,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "搜索范围(&L):", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "搜索(&R)", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "停止搜索(&S)", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/lang/zh-TW.rc b/dll/win32/browseui/lang/zh-TW.rc index af9f33ad70a..9f752251035 100644 --- a/dll/win32/browseui/lang/zh-TW.rc +++ b/dll/win32/browseui/lang/zh-TW.rc @@ -169,7 +169,7 @@ BEGIN EDITTEXT IDC_SEARCH_QUERY, 10, 60, 100, 12, ES_AUTOHSCROLL | WS_BORDER | WS_TABSTOP LTEXT "在以下資料夾搜尋(&L):", -1, 10, 75, 500, 10 - CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY | CBS_OWNERDRAWFIXED, 10, 85, 200, 200 + CONTROL "", IDC_SEARCH_COMBOBOX, WC_COMBOBOXEXW, WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_TABSTOP | CCS_NODIVIDER | CCS_NOMOVEY, 10, 85, 200, 200 DEFPUSHBUTTON "搜尋(&R)", IDC_SEARCH_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP | WS_VISIBLE PUSHBUTTON "停止(&S)", IDC_SEARCH_STOP_BUTTON, 80, 110, 40, 15, WS_GROUP | WS_TABSTOP diff --git a/dll/win32/browseui/regtreeoptions.h b/dll/win32/browseui/regtreeoptions.h index eafdd322863..7c87c3e152b 100644 --- a/dll/win32/browseui/regtreeoptions.h +++ b/dll/win32/browseui/regtreeoptions.h @@ -32,14 +32,14 @@ class CRegTreeOptions : ~CRegTreeOptions(); // *** IRegTreeOptions methods *** - virtual HRESULT STDMETHODCALLTYPE InitTree(HWND paramC, HKEY param10, char const *param14, char const *param18); - virtual HRESULT STDMETHODCALLTYPE WalkTree(WALK_TREE_CMD paramC); - virtual HRESULT STDMETHODCALLTYPE ToggleItem(HTREEITEM paramC); - virtual HRESULT STDMETHODCALLTYPE ShowHelp(HTREEITEM paramC, unsigned long param10); + STDMETHOD(InitTree)(HWND paramC, HKEY param10, char const *param14, char const *param18) override; + STDMETHOD(WalkTree)(WALK_TREE_CMD paramC) override; + STDMETHOD(ToggleItem)(HTREEITEM paramC) override; + STDMETHOD(ShowHelp)(HTREEITEM paramC, unsigned long param10) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; DECLARE_REGISTRY_RESOURCEID(IDR_REGTREEOPTIONS) DECLARE_NOT_AGGREGATABLE(CRegTreeOptions) diff --git a/dll/win32/browseui/shellbars/CBandSite.h b/dll/win32/browseui/shellbars/CBandSite.h index be2245089e6..8f239fd1a4c 100644 --- a/dll/win32/browseui/shellbars/CBandSite.h +++ b/dll/win32/browseui/shellbars/CBandSite.h @@ -61,62 +61,62 @@ class CBandSiteBase : ~CBandSiteBase(); // *** IBandSite methods *** - virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk); - virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID); - virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName); - virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState); - virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID); - virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, void **ppv); - virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo); - virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo); + STDMETHOD(AddBand)(IUnknown *punk) override; + STDMETHOD(EnumBands)(UINT uBand, DWORD *pdwBandID) override; + STDMETHOD(QueryBand)(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName) override; + STDMETHOD(SetBandState)(DWORD dwBandID, DWORD dwMask, DWORD dwState) override; + STDMETHOD(RemoveBand)(DWORD dwBandID) override; + STDMETHOD(GetBandObject)(DWORD dwBandID, REFIID riid, void **ppv) override; + STDMETHOD(SetBandSiteInfo)(const BANDSITEINFO *pbsinfo) override; + STDMETHOD(GetBandSiteInfo)(BANDSITEINFO *pbsinfo) override; // *** IWinEventHandler methods *** - virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override; + STDMETHOD(IsWindowOwner)(HWND hWnd) override; // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IDeskBarClient methods *** - virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite); - virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode); - virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState); - virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc); + STDMETHOD(SetDeskBarSite)(IUnknown *punkSite) override; + STDMETHOD(SetModeDBC)(DWORD dwMode) override; + STDMETHOD(UIActivateDBC)(DWORD dwState) override; + STDMETHOD(GetSize)(DWORD dwWhich, LPRECT prc) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // *** IInputObjectSite methods *** - virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(struct IUnknown *paramC, int param10); + STDMETHOD(OnFocusChangeIS)(struct IUnknown *paramC, int param10) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // *** IDropTarget methods *** - virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragLeave(); - virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + STDMETHOD(DragEnter)(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragOver)(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragLeave)() override; + STDMETHOD(Drop)(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; // *** IBandSiteHelper methods *** - virtual HRESULT STDMETHODCALLTYPE LoadFromStreamBS(IStream *, const GUID &, void **); - virtual HRESULT STDMETHODCALLTYPE SaveToStreamBS(IUnknown *, IStream *); + STDMETHOD(LoadFromStreamBS)(IStream *, const GUID &, void **) override; + STDMETHOD(SaveToStreamBS)(IUnknown *, IStream *) override; private: UINT _GetBandID(struct BandObject *Band); diff --git a/dll/win32/browseui/shellbars/CBandSiteMenu.h b/dll/win32/browseui/shellbars/CBandSiteMenu.h index 89d4e537fdb..05116917a02 100644 --- a/dll/win32/browseui/shellbars/CBandSiteMenu.h +++ b/dll/win32/browseui/shellbars/CBandSiteMenu.h @@ -51,18 +51,18 @@ class CBandSiteMenu : HRESULT WINAPI FinalConstruct(); // *** IShellService methods *** - virtual HRESULT STDMETHODCALLTYPE SetOwner(IUnknown *); + STDMETHOD(SetOwner)(IUnknown *) override; // *** IContextMenu methods *** - virtual HRESULT STDMETHODCALLTYPE QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT STDMETHODCALLTYPE InvokeCommand(LPCMINVOKECOMMANDINFO lpici); - virtual HRESULT STDMETHODCALLTYPE GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax); + STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici) override; + STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override; // *** IContextMenu2 methods *** - virtual HRESULT STDMETHODCALLTYPE HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(HandleMenuMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; // *** IContextMenu3 methods *** - virtual HRESULT STDMETHODCALLTYPE HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult); + STDMETHOD(HandleMenuMsg2)(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) override; DECLARE_REGISTRY_RESOURCEID(IDR_BANDSITEMENU) DECLARE_NOT_AGGREGATABLE(CBandSiteMenu) diff --git a/dll/win32/browseui/shellbars/CBaseBar.cpp b/dll/win32/browseui/shellbars/CBaseBar.cpp index ebc3d06f7b3..bf1e061ab6c 100644 --- a/dll/win32/browseui/shellbars/CBaseBar.cpp +++ b/dll/win32/browseui/shellbars/CBaseBar.cpp @@ -70,56 +70,56 @@ class CBaseBar : HRESULT ReserveBorderSpace(); // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IInputObjectSite specific methods *** - virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus); + STDMETHOD(OnFocusChangeIS)(IUnknown *punkObj, BOOL fSetFocus) override; // *** IOleCommandTarget specific methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, - OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, - DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, + OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, + DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IInputObject methods *** // forward the methods to the contained active bar - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // *** IDeskBar methods *** - virtual HRESULT STDMETHODCALLTYPE SetClient(IUnknown *punkClient); - virtual HRESULT STDMETHODCALLTYPE GetClient(IUnknown **ppunkClient); - virtual HRESULT STDMETHODCALLTYPE OnPosRectChangeDB(LPRECT prc); + STDMETHOD(SetClient)(IUnknown *punkClient) override; + STDMETHOD(GetClient)(IUnknown **ppunkClient) override; + STDMETHOD(OnPosRectChangeDB)(LPRECT prc) override; // *** IDockingWindow methods *** - virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); - virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); - virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved); + STDMETHOD(ShowDW)(BOOL fShow) override; + STDMETHOD(CloseDW)(DWORD dwReserved) override; + STDMETHOD(ResizeBorderDW)(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // *** IPersistStreamInit methods *** - virtual HRESULT STDMETHODCALLTYPE InitNew(); + STDMETHOD(InitNew)() override; // *** IPersistPropertyBag methods *** - virtual HRESULT STDMETHODCALLTYPE Load(IPropertyBag *pPropBag, IErrorLog *pErrorLog); - virtual HRESULT STDMETHODCALLTYPE Save(IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties); + STDMETHOD(Load)(IPropertyBag *pPropBag, IErrorLog *pErrorLog) override; + STDMETHOD(Save)(IPropertyBag *pPropBag, BOOL fClearDirty, BOOL fSaveAllProperties) override; // message handlers LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); diff --git a/dll/win32/browseui/shellbars/CISFBand.h b/dll/win32/browseui/shellbars/CISFBand.h index 88526adfc4b..704d5191455 100644 --- a/dll/win32/browseui/shellbars/CISFBand.h +++ b/dll/win32/browseui/shellbars/CISFBand.h @@ -41,137 +41,137 @@ class CISFBand : // Personal Methods HRESULT CreateSimpleToolbar(HWND hWndParent); + STDMETHOD(ContainsWindow)( + IN HWND hWnd + ); + // IObjectWithSite - virtual STDMETHODIMP GetSite( + STDMETHOD(GetSite)( IN REFIID riid, OUT void **ppvSite - ); + ) override; - virtual STDMETHODIMP SetSite( + STDMETHOD(SetSite)( IN IUnknown *pUnkSite - ); + ) override; // IDeskBand - virtual STDMETHODIMP GetWindow( + STDMETHOD(GetWindow)( OUT HWND *phwnd - ); + ) override; - virtual STDMETHODIMP ContextSensitiveHelp( + STDMETHOD(ContextSensitiveHelp)( IN BOOL fEnterMode - ); + ) override; - virtual STDMETHODIMP ShowDW( + STDMETHOD(ShowDW)( IN BOOL bShow - ); + ) override; - virtual STDMETHODIMP CloseDW( + STDMETHOD(CloseDW)( IN DWORD dwReserved - ); + ) override; - virtual STDMETHODIMP ResizeBorderDW( + STDMETHOD(ResizeBorderDW)( LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved - ); + ) override; - virtual STDMETHODIMP GetBandInfo( + STDMETHOD(GetBandInfo)( IN DWORD dwBandID, IN DWORD dwViewMode, IN OUT DESKBANDINFO *pdbi - ); + ) override; // IPersistStream - virtual STDMETHODIMP GetClassID( + STDMETHOD(GetClassID)( OUT CLSID *pClassID - ); + ) override; - virtual STDMETHODIMP GetSizeMax( + STDMETHOD(GetSizeMax)( OUT ULARGE_INTEGER *pcbSize - ); + ) override; - virtual STDMETHODIMP IsDirty(); + STDMETHOD(IsDirty)() override; - virtual STDMETHODIMP Load( + STDMETHOD(Load)( IN IStream *pStm - ); + ) override; - virtual STDMETHODIMP Save( + STDMETHOD(Save)( IN IStream *pStm, IN BOOL fClearDirty - ); + ) override; // IWinEventHandler - virtual STDMETHODIMP ContainsWindow( - IN HWND hWnd - ); - - virtual STDMETHODIMP OnWinEvent( + STDMETHOD(OnWinEvent)( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult - ); + ) override; - virtual STDMETHODIMP IsWindowOwner( + STDMETHOD(IsWindowOwner)( HWND hWnd - ); + ) override; // IOleCommandTarget - virtual STDMETHODIMP Exec( + STDMETHOD(Exec)( IN const GUID *pguidCmdGroup, IN DWORD nCmdID, IN DWORD nCmdexecopt, IN VARIANT *pvaIn, IN OUT VARIANT *pvaOut - ); + ) override; - virtual STDMETHODIMP QueryStatus( + STDMETHOD(QueryStatus)( IN const GUID *pguidCmdGroup, IN ULONG cCmds, IN OUT OLECMD prgCmds[], IN OUT OLECMDTEXT *pCmdText - ); + ) override; // IShellFolderBand - virtual STDMETHODIMP GetBandInfoSFB( + STDMETHOD(GetBandInfoSFB)( PBANDINFOSFB pbi - ); + ) override; - virtual STDMETHODIMP InitializeSFB( + STDMETHOD(InitializeSFB)( IShellFolder *psf, PCIDLIST_ABSOLUTE pidl - ); + ) override; - virtual STDMETHODIMP SetBandInfoSFB( + STDMETHOD(SetBandInfoSFB)( PBANDINFOSFB pbi - ); + ) override; // IContextMenu - virtual STDMETHODIMP GetCommandString( + STDMETHOD(GetCommandString)( UINT_PTR idCmd, UINT uFlags, UINT *pwReserved, LPSTR pszName, UINT cchMax - ); + ) override; - virtual STDMETHODIMP InvokeCommand( + STDMETHOD(InvokeCommand)( LPCMINVOKECOMMANDINFO pici - ); + ) override; - virtual STDMETHODIMP QueryContextMenu( + STDMETHOD(QueryContextMenu)( HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags - ); + ) override; //***************************************************************************************************** diff --git a/dll/win32/browseui/shellbars/CSHEnumClassesOfCategories.cpp b/dll/win32/browseui/shellbars/CSHEnumClassesOfCategories.cpp index 1a1803a334b..9a3573704f4 100644 --- a/dll/win32/browseui/shellbars/CSHEnumClassesOfCategories.cpp +++ b/dll/win32/browseui/shellbars/CSHEnumClassesOfCategories.cpp @@ -222,12 +222,13 @@ class CSHEnumClassesOfCategories : public: CSHEnumClassesOfCategories(); virtual ~CSHEnumClassesOfCategories(); - virtual HRESULT STDMETHODCALLTYPE Initialize(ULONG cImplemented, CATID *pImplemented, ULONG cRequired, CATID *pRequired); + STDMETHOD(Initialize)(ULONG cImplemented, CATID *pImplemented, ULONG cRequired, CATID *pRequired); + // *** IEnumGUID methods *** - virtual HRESULT STDMETHODCALLTYPE Clone(IEnumCLSID **ppvOut); - virtual HRESULT STDMETHODCALLTYPE Next(ULONG cElt, CLSID *pElts, ULONG *pFetched); - virtual HRESULT STDMETHODCALLTYPE Reset(); - virtual HRESULT STDMETHODCALLTYPE Skip(ULONG nbElts); + STDMETHOD(Clone)(IEnumCLSID **ppvOut) override; + STDMETHOD(Next)(ULONG cElt, CLSID *pElts, ULONG *pFetched) override; + STDMETHOD(Reset)() override; + STDMETHOD(Skip)(ULONG nbElts) override; BEGIN_COM_MAP(CSHEnumClassesOfCategories) COM_INTERFACE_ENTRY_IID(IID_IEnumGUID, IEnumGUID) diff --git a/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp index 0126cf30d41..933a2276443 100644 --- a/dll/win32/browseui/shellbrowser.cpp +++ b/dll/win32/browseui/shellbrowser.cpp @@ -353,246 +353,246 @@ class CShellBrowser : void UpdateWindowTitle(); /* // *** IDockingWindowFrame methods *** - virtual HRESULT STDMETHODCALLTYPE AddToolbar(IUnknown *punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags); - virtual HRESULT STDMETHODCALLTYPE RemoveToolbar(IUnknown *punkSrc, DWORD dwRemoveFlags); - virtual HRESULT STDMETHODCALLTYPE FindToolbar(LPCWSTR pwszItem, REFIID riid, void **ppv); + STDMETHOD(AddToolbar)(IUnknown *punkSrc, LPCWSTR pwszItem, DWORD dwAddFlags) override; + STDMETHOD(RemoveToolbar)(IUnknown *punkSrc, DWORD dwRemoveFlags) override; + STDMETHOD(FindToolbar)(LPCWSTR pwszItem, REFIID riid, void **ppv) override; */ // *** IDockingWindowSite methods *** - virtual HRESULT STDMETHODCALLTYPE GetBorderDW(IUnknown* punkObj, LPRECT prcBorder); - virtual HRESULT STDMETHODCALLTYPE RequestBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw); - virtual HRESULT STDMETHODCALLTYPE SetBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw); + STDMETHOD(GetBorderDW)(IUnknown* punkObj, LPRECT prcBorder) override; + STDMETHOD(RequestBorderSpaceDW)(IUnknown* punkObj, LPCBORDERWIDTHS pbw) override; + STDMETHOD(SetBorderSpaceDW)(IUnknown* punkObj, LPCBORDERWIDTHS pbw) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, - OLECMD prgCmds[ ], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, - DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, + OLECMD prgCmds[ ], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, + DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IShellBrowser methods *** - virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths); - virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject); - virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared); - virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR pszStatusText); - virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(MSG *pmsg, WORD wID); - virtual HRESULT STDMETHODCALLTYPE BrowseObject(LPCITEMIDLIST pidl, UINT wFlags); - virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, IStream **ppStrm); - virtual HRESULT STDMETHODCALLTYPE GetControlWindow(UINT id, HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret); - virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView(IShellView **ppshv); - virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(IShellView *ppshv); - virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags); + STDMETHOD(InsertMenusSB)(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) override; + STDMETHOD(SetMenuSB)(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject) override; + STDMETHOD(RemoveMenusSB)(HMENU hmenuShared) override; + STDMETHOD(SetStatusTextSB)(LPCOLESTR pszStatusText) override; + STDMETHOD(EnableModelessSB)(BOOL fEnable) override; + STDMETHOD(TranslateAcceleratorSB)(MSG *pmsg, WORD wID) override; + STDMETHOD(BrowseObject)(LPCITEMIDLIST pidl, UINT wFlags) override; + STDMETHOD(GetViewStateStream)(DWORD grfMode, IStream **ppStrm) override; + STDMETHOD(GetControlWindow)(UINT id, HWND *lphwnd) override; + STDMETHOD(SendControlMsg)(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret) override; + STDMETHOD(QueryActiveShellView)(IShellView **ppshv) override; + STDMETHOD(OnViewWindowActive)(IShellView *ppshv) override; + STDMETHOD(SetToolbarItems)(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags) override; // *** IDropTarget methods *** - virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragLeave(); - virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + STDMETHOD(DragEnter)(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragOver)(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragLeave)() override; + STDMETHOD(Drop)(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IShellBowserService methods *** - virtual HRESULT STDMETHODCALLTYPE GetPropertyBag(long flags, REFIID riid, void **ppvObject); + STDMETHOD(GetPropertyBag)(long flags, REFIID riid, void **ppvObject) override; // *** IDispatch methods *** - virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); - virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); - virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames( - REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); - virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, - DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); + STDMETHOD(GetTypeInfoCount)(UINT *pctinfo) override; + STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override; + STDMETHOD(GetIDsOfNames)( + REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override; + STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, + DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override; // *** IBrowserService methods *** - virtual HRESULT STDMETHODCALLTYPE GetParentSite(IOleInPlaceSite **ppipsite); - virtual HRESULT STDMETHODCALLTYPE SetTitle(IShellView *psv, LPCWSTR pszName); - virtual HRESULT STDMETHODCALLTYPE GetTitle(IShellView *psv, LPWSTR pszName, DWORD cchName); - virtual HRESULT STDMETHODCALLTYPE GetOleObject(IOleObject **ppobjv); - virtual HRESULT STDMETHODCALLTYPE GetTravelLog(ITravelLog **pptl); - virtual HRESULT STDMETHODCALLTYPE ShowControlWindow(UINT id, BOOL fShow); - virtual HRESULT STDMETHODCALLTYPE IsControlWindowShown(UINT id, BOOL *pfShown); - virtual HRESULT STDMETHODCALLTYPE IEGetDisplayName(LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags); - virtual HRESULT STDMETHODCALLTYPE IEParseDisplayName(UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST *ppidlOut); - virtual HRESULT STDMETHODCALLTYPE DisplayParseError(HRESULT hres, LPCWSTR pwszPath); - virtual HRESULT STDMETHODCALLTYPE NavigateToPidl(LPCITEMIDLIST pidl, DWORD grfHLNF); - virtual HRESULT STDMETHODCALLTYPE SetNavigateState(BNSTATE bnstate); - virtual HRESULT STDMETHODCALLTYPE GetNavigateState(BNSTATE *pbnstate); - virtual HRESULT STDMETHODCALLTYPE NotifyRedirect(IShellView *psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse); - virtual HRESULT STDMETHODCALLTYPE UpdateWindowList(); - virtual HRESULT STDMETHODCALLTYPE UpdateBackForwardState(); - virtual HRESULT STDMETHODCALLTYPE SetFlags(DWORD dwFlags, DWORD dwFlagMask); - virtual HRESULT STDMETHODCALLTYPE GetFlags(DWORD *pdwFlags); - virtual HRESULT STDMETHODCALLTYPE CanNavigateNow( void); - virtual HRESULT STDMETHODCALLTYPE GetPidl(LPITEMIDLIST *ppidl); - virtual HRESULT STDMETHODCALLTYPE SetReferrer(LPCITEMIDLIST pidl); - virtual DWORD STDMETHODCALLTYPE GetBrowserIndex(); - virtual HRESULT STDMETHODCALLTYPE GetBrowserByIndex(DWORD dwID, IUnknown **ppunk); - virtual HRESULT STDMETHODCALLTYPE GetHistoryObject(IOleObject **ppole, IStream **pstm, IBindCtx **ppbc); - virtual HRESULT STDMETHODCALLTYPE SetHistoryObject(IOleObject *pole, BOOL fIsLocalAnchor); - virtual HRESULT STDMETHODCALLTYPE CacheOLEServer(IOleObject *pole); - virtual HRESULT STDMETHODCALLTYPE GetSetCodePage(VARIANT *pvarIn, VARIANT *pvarOut); - virtual HRESULT STDMETHODCALLTYPE OnHttpEquiv(IShellView *psv, BOOL fDone, VARIANT *pvarargIn, VARIANT *pvarargOut); - virtual HRESULT STDMETHODCALLTYPE GetPalette(HPALETTE *hpal); - virtual HRESULT STDMETHODCALLTYPE RegisterWindow(BOOL fForceRegister, int swc); + STDMETHOD(GetParentSite)(IOleInPlaceSite **ppipsite) override; + STDMETHOD(SetTitle)(IShellView *psv, LPCWSTR pszName) override; + STDMETHOD(GetTitle)(IShellView *psv, LPWSTR pszName, DWORD cchName) override; + STDMETHOD(GetOleObject)(IOleObject **ppobjv) override; + STDMETHOD(GetTravelLog)(ITravelLog **pptl) override; + STDMETHOD(ShowControlWindow)(UINT id, BOOL fShow) override; + STDMETHOD(IsControlWindowShown)(UINT id, BOOL *pfShown) override; + STDMETHOD(IEGetDisplayName)(LPCITEMIDLIST pidl, LPWSTR pwszName, UINT uFlags) override; + STDMETHOD(IEParseDisplayName)(UINT uiCP, LPCWSTR pwszPath, LPITEMIDLIST *ppidlOut) override; + STDMETHOD(DisplayParseError)(HRESULT hres, LPCWSTR pwszPath) override; + STDMETHOD(NavigateToPidl)(LPCITEMIDLIST pidl, DWORD grfHLNF) override; + STDMETHOD(SetNavigateState)(BNSTATE bnstate) override; + STDMETHOD(GetNavigateState)(BNSTATE *pbnstate) override; + STDMETHOD(NotifyRedirect)(IShellView *psv, LPCITEMIDLIST pidl, BOOL *pfDidBrowse) override; + STDMETHOD(UpdateWindowList)() override; + STDMETHOD(UpdateBackForwardState)() override; + STDMETHOD(SetFlags)(DWORD dwFlags, DWORD dwFlagMask) override; + STDMETHOD(GetFlags)(DWORD *pdwFlags) override; + STDMETHOD(CanNavigateNow)( void) override; + STDMETHOD(GetPidl)(LPITEMIDLIST *ppidl) override; + STDMETHOD(SetReferrer)(LPCITEMIDLIST pidl) override; + STDMETHOD_(DWORD, GetBrowserIndex)() override; + STDMETHOD(GetBrowserByIndex)(DWORD dwID, IUnknown **ppunk) override; + STDMETHOD(GetHistoryObject)(IOleObject **ppole, IStream **pstm, IBindCtx **ppbc) override; + STDMETHOD(SetHistoryObject)(IOleObject *pole, BOOL fIsLocalAnchor) override; + STDMETHOD(CacheOLEServer)(IOleObject *pole) override; + STDMETHOD(GetSetCodePage)(VARIANT *pvarIn, VARIANT *pvarOut) override; + STDMETHOD(OnHttpEquiv)(IShellView *psv, BOOL fDone, VARIANT *pvarargIn, VARIANT *pvarargOut) override; + STDMETHOD(GetPalette)(HPALETTE *hpal) override; + STDMETHOD(RegisterWindow)(BOOL fForceRegister, int swc) override; // *** IBrowserService2 methods *** - virtual LRESULT STDMETHODCALLTYPE WndProcBS(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE SetAsDefFolderSettings(); - virtual HRESULT STDMETHODCALLTYPE GetViewRect(RECT *prc); - virtual HRESULT STDMETHODCALLTYPE OnSize(WPARAM wParam); - virtual HRESULT STDMETHODCALLTYPE OnCreate(struct tagCREATESTRUCTW *pcs); - virtual LRESULT STDMETHODCALLTYPE OnCommand(WPARAM wParam, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE OnDestroy(); - virtual LRESULT STDMETHODCALLTYPE OnNotify(struct tagNMHDR *pnm); - virtual HRESULT STDMETHODCALLTYPE OnSetFocus(); - virtual HRESULT STDMETHODCALLTYPE OnFrameWindowActivateBS(BOOL fActive); - virtual HRESULT STDMETHODCALLTYPE ReleaseShellView(); - virtual HRESULT STDMETHODCALLTYPE ActivatePendingView(); - virtual HRESULT STDMETHODCALLTYPE CreateViewWindow(IShellView *psvNew, IShellView *psvOld, LPRECT prcView, HWND *phwnd); - virtual HRESULT STDMETHODCALLTYPE CreateBrowserPropSheetExt(REFIID riid, void **ppv); - virtual HRESULT STDMETHODCALLTYPE GetViewWindow(HWND *phwndView); - virtual HRESULT STDMETHODCALLTYPE GetBaseBrowserData(LPCBASEBROWSERDATA *pbbd); - virtual LPBASEBROWSERDATA STDMETHODCALLTYPE PutBaseBrowserData( void); - virtual HRESULT STDMETHODCALLTYPE InitializeTravelLog(ITravelLog *ptl, DWORD dw); - virtual HRESULT STDMETHODCALLTYPE SetTopBrowser(); - virtual HRESULT STDMETHODCALLTYPE Offline(int iCmd); - virtual HRESULT STDMETHODCALLTYPE AllowViewResize(BOOL f); - virtual HRESULT STDMETHODCALLTYPE SetActivateState(UINT u); - virtual HRESULT STDMETHODCALLTYPE UpdateSecureLockIcon(int eSecureLock); - virtual HRESULT STDMETHODCALLTYPE InitializeDownloadManager(); - virtual HRESULT STDMETHODCALLTYPE InitializeTransitionSite(); - virtual HRESULT STDMETHODCALLTYPE _Initialize(HWND hwnd, IUnknown *pauto); - virtual HRESULT STDMETHODCALLTYPE _CancelPendingNavigationAsync( void); - virtual HRESULT STDMETHODCALLTYPE _CancelPendingView(); - virtual HRESULT STDMETHODCALLTYPE _MaySaveChanges(); - virtual HRESULT STDMETHODCALLTYPE _PauseOrResumeView(BOOL fPaused); - virtual HRESULT STDMETHODCALLTYPE _DisableModeless(); - virtual HRESULT STDMETHODCALLTYPE _NavigateToPidl(LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags); - virtual HRESULT STDMETHODCALLTYPE _TryShell2Rename(IShellView *psv, LPCITEMIDLIST pidlNew); - virtual HRESULT STDMETHODCALLTYPE _SwitchActivationNow(); - virtual HRESULT STDMETHODCALLTYPE _ExecChildren(IUnknown *punkBar, BOOL fBroadcast, const GUID *pguidCmdGroup, - DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut); - virtual HRESULT STDMETHODCALLTYPE _SendChildren( - HWND hwndBar, BOOL fBroadcast, UINT uMsg, WPARAM wParam, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE GetFolderSetData(struct tagFolderSetData *pfsd); - virtual HRESULT STDMETHODCALLTYPE _OnFocusChange(UINT itb); - virtual HRESULT STDMETHODCALLTYPE v_ShowHideChildWindows(BOOL fChildOnly); - virtual UINT STDMETHODCALLTYPE _get_itbLastFocus(); - virtual HRESULT STDMETHODCALLTYPE _put_itbLastFocus(UINT itbLastFocus); - virtual HRESULT STDMETHODCALLTYPE _UIActivateView(UINT uState); - virtual HRESULT STDMETHODCALLTYPE _GetViewBorderRect(RECT *prc); - virtual HRESULT STDMETHODCALLTYPE _UpdateViewRectSize(); - virtual HRESULT STDMETHODCALLTYPE _ResizeNextBorder(UINT itb); - virtual HRESULT STDMETHODCALLTYPE _ResizeView(); - virtual HRESULT STDMETHODCALLTYPE _GetEffectiveClientArea(LPRECT lprectBorder, HMONITOR hmon); - virtual IStream *STDMETHODCALLTYPE v_GetViewStream(LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName); - virtual LRESULT STDMETHODCALLTYPE ForwardViewMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE SetAcceleratorMenu(HACCEL hacc); - virtual int STDMETHODCALLTYPE _GetToolbarCount(); - virtual LPTOOLBARITEM STDMETHODCALLTYPE _GetToolbarItem(int itb); - virtual HRESULT STDMETHODCALLTYPE _SaveToolbars(IStream *pstm); - virtual HRESULT STDMETHODCALLTYPE _LoadToolbars(IStream *pstm); - virtual HRESULT STDMETHODCALLTYPE _CloseAndReleaseToolbars(BOOL fClose); - virtual HRESULT STDMETHODCALLTYPE v_MayGetNextToolbarFocus(LPMSG lpMsg, UINT itbNext, - int citb, LPTOOLBARITEM *pptbi, HWND *phwnd); - virtual HRESULT STDMETHODCALLTYPE _ResizeNextBorderHelper(UINT itb, BOOL bUseHmonitor); - virtual UINT STDMETHODCALLTYPE _FindTBar(IUnknown *punkSrc); - virtual HRESULT STDMETHODCALLTYPE _SetFocus(LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE v_MayTranslateAccelerator(MSG *pmsg); - virtual HRESULT STDMETHODCALLTYPE _GetBorderDWHelper(IUnknown *punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor); - virtual HRESULT STDMETHODCALLTYPE v_CheckZoneCrossing(LPCITEMIDLIST pidl); + STDMETHOD_(LRESULT, WndProcBS)(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) override; + STDMETHOD(SetAsDefFolderSettings)() override; + STDMETHOD(GetViewRect)(RECT *prc) override; + STDMETHOD(OnSize)(WPARAM wParam) override; + STDMETHOD(OnCreate)(struct tagCREATESTRUCTW *pcs) override; + STDMETHOD_(LRESULT, OnCommand)(WPARAM wParam, LPARAM lParam) override; + STDMETHOD(OnDestroy)() override; + STDMETHOD_(LRESULT, OnNotify)(struct tagNMHDR *pnm) override; + STDMETHOD(OnSetFocus)() override; + STDMETHOD(OnFrameWindowActivateBS)(BOOL fActive) override; + STDMETHOD(ReleaseShellView)() override; + STDMETHOD(ActivatePendingView)() override; + STDMETHOD(CreateViewWindow)(IShellView *psvNew, IShellView *psvOld, LPRECT prcView, HWND *phwnd) override; + STDMETHOD(CreateBrowserPropSheetExt)(REFIID riid, void **ppv) override; + STDMETHOD(GetViewWindow)(HWND *phwndView) override; + STDMETHOD(GetBaseBrowserData)(LPCBASEBROWSERDATA *pbbd) override; + STDMETHOD_(LPBASEBROWSERDATA, PutBaseBrowserData)(void) override; + STDMETHOD(InitializeTravelLog)(ITravelLog *ptl, DWORD dw) override; + STDMETHOD(SetTopBrowser)() override; + STDMETHOD(Offline)(int iCmd) override; + STDMETHOD(AllowViewResize)(BOOL f) override; + STDMETHOD(SetActivateState)(UINT u) override; + STDMETHOD(UpdateSecureLockIcon)(int eSecureLock) override; + STDMETHOD(InitializeDownloadManager)() override; + STDMETHOD(InitializeTransitionSite)() override; + STDMETHOD(_Initialize)(HWND hwnd, IUnknown *pauto) override; + STDMETHOD(_CancelPendingNavigationAsync)( void) override; + STDMETHOD(_CancelPendingView)() override; + STDMETHOD(_MaySaveChanges)() override; + STDMETHOD(_PauseOrResumeView)(BOOL fPaused) override; + STDMETHOD(_DisableModeless)() override; + STDMETHOD(_NavigateToPidl)(LPCITEMIDLIST pidl, DWORD grfHLNF, DWORD dwFlags) override; + STDMETHOD(_TryShell2Rename)(IShellView *psv, LPCITEMIDLIST pidlNew) override; + STDMETHOD(_SwitchActivationNow)() override; + STDMETHOD(_ExecChildren)(IUnknown *punkBar, BOOL fBroadcast, const GUID *pguidCmdGroup, + DWORD nCmdID, DWORD nCmdexecopt, VARIANTARG *pvarargIn, VARIANTARG *pvarargOut) override; + STDMETHOD(_SendChildren)( + HWND hwndBar, BOOL fBroadcast, UINT uMsg, WPARAM wParam, LPARAM lParam) override; + STDMETHOD(GetFolderSetData)(struct tagFolderSetData *pfsd) override; + STDMETHOD(_OnFocusChange)(UINT itb) override; + STDMETHOD(v_ShowHideChildWindows)(BOOL fChildOnly) override; + STDMETHOD_(UINT, _get_itbLastFocus)() override; + STDMETHOD(_put_itbLastFocus)(UINT itbLastFocus) override; + STDMETHOD(_UIActivateView)(UINT uState) override; + STDMETHOD(_GetViewBorderRect)(RECT *prc) override; + STDMETHOD(_UpdateViewRectSize)() override; + STDMETHOD(_ResizeNextBorder)(UINT itb) override; + STDMETHOD(_ResizeView)() override; + STDMETHOD(_GetEffectiveClientArea)(LPRECT lprectBorder, HMONITOR hmon) override; + STDMETHOD_(IStream *, v_GetViewStream)(LPCITEMIDLIST pidl, DWORD grfMode, LPCWSTR pwszName) override; + STDMETHOD_(LRESULT, ForwardViewMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; + STDMETHOD(SetAcceleratorMenu)(HACCEL hacc) override; + STDMETHOD_(int, _GetToolbarCount)() override; + STDMETHOD_(LPTOOLBARITEM, _GetToolbarItem)(int itb) override; + STDMETHOD(_SaveToolbars)(IStream *pstm) override; + STDMETHOD(_LoadToolbars)(IStream *pstm) override; + STDMETHOD(_CloseAndReleaseToolbars)(BOOL fClose) override; + STDMETHOD(v_MayGetNextToolbarFocus)(LPMSG lpMsg, UINT itbNext, + int citb, LPTOOLBARITEM *pptbi, HWND *phwnd) override; + STDMETHOD(_ResizeNextBorderHelper)(UINT itb, BOOL bUseHmonitor) override; + STDMETHOD_(UINT, _FindTBar)(IUnknown *punkSrc) override; + STDMETHOD(_SetFocus)(LPTOOLBARITEM ptbi, HWND hwnd, LPMSG lpMsg) override; + STDMETHOD(v_MayTranslateAccelerator)(MSG *pmsg) override; + STDMETHOD(_GetBorderDWHelper)(IUnknown *punkSrc, LPRECT lprectBorder, BOOL bUseHmonitor) override; + STDMETHOD(v_CheckZoneCrossing)(LPCITEMIDLIST pidl) override; // *** IWebBrowser methods *** - virtual HRESULT STDMETHODCALLTYPE GoBack(); - virtual HRESULT STDMETHODCALLTYPE GoForward(); - virtual HRESULT STDMETHODCALLTYPE GoHome(); - virtual HRESULT STDMETHODCALLTYPE GoSearch(); - virtual HRESULT STDMETHODCALLTYPE Navigate(BSTR URL, VARIANT *Flags, VARIANT *TargetFrameName, - VARIANT *PostData, VARIANT *Headers); - virtual HRESULT STDMETHODCALLTYPE Refresh(); - virtual HRESULT STDMETHODCALLTYPE Refresh2(VARIANT *Level); - virtual HRESULT STDMETHODCALLTYPE Stop(); - virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppDisp); - virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppDisp); - virtual HRESULT STDMETHODCALLTYPE get_Container(IDispatch **ppDisp); - virtual HRESULT STDMETHODCALLTYPE get_Document(IDispatch **ppDisp); - virtual HRESULT STDMETHODCALLTYPE get_TopLevelContainer(VARIANT_BOOL *pBool); - virtual HRESULT STDMETHODCALLTYPE get_Type(BSTR *Type); - virtual HRESULT STDMETHODCALLTYPE get_Left(long *pl); - virtual HRESULT STDMETHODCALLTYPE put_Left(long Left); - virtual HRESULT STDMETHODCALLTYPE get_Top(long *pl); - virtual HRESULT STDMETHODCALLTYPE put_Top(long Top); - virtual HRESULT STDMETHODCALLTYPE get_Width(long *pl); - virtual HRESULT STDMETHODCALLTYPE put_Width(long Width); - virtual HRESULT STDMETHODCALLTYPE get_Height(long *pl); - virtual HRESULT STDMETHODCALLTYPE put_Height(long Height); - virtual HRESULT STDMETHODCALLTYPE get_LocationName(BSTR *LocationName); - virtual HRESULT STDMETHODCALLTYPE get_LocationURL(BSTR *LocationURL); - virtual HRESULT STDMETHODCALLTYPE get_Busy(VARIANT_BOOL *pBool); + STDMETHOD(GoBack)() override; + STDMETHOD(GoForward)() override; + STDMETHOD(GoHome)() override; + STDMETHOD(GoSearch)() override; + STDMETHOD(Navigate)(BSTR URL, VARIANT *Flags, VARIANT *TargetFrameName, + VARIANT *PostData, VARIANT *Headers) override; + STDMETHOD(Refresh)() override; + STDMETHOD(Refresh2)(VARIANT *Level) override; + STDMETHOD(Stop)() override; + STDMETHOD(get_Application)(IDispatch **ppDisp) override; + STDMETHOD(get_Parent)(IDispatch **ppDisp) override; + STDMETHOD(get_Container)(IDispatch **ppDisp) override; + STDMETHOD(get_Document)(IDispatch **ppDisp) override; + STDMETHOD(get_TopLevelContainer)(VARIANT_BOOL *pBool) override; + STDMETHOD(get_Type)(BSTR *Type) override; + STDMETHOD(get_Left)(long *pl) override; + STDMETHOD(put_Left)(long Left) override; + STDMETHOD(get_Top)(long *pl) override; + STDMETHOD(put_Top)(long Top) override; + STDMETHOD(get_Width)(long *pl) override; + STDMETHOD(put_Width)(long Width) override; + STDMETHOD(get_Height)(long *pl) override; + STDMETHOD(put_Height)(long Height) override; + STDMETHOD(get_LocationName)(BSTR *LocationName) override; + STDMETHOD(get_LocationURL)(BSTR *LocationURL) override; + STDMETHOD(get_Busy)(VARIANT_BOOL *pBool) override; // *** IWebBrowserApp methods *** - virtual HRESULT STDMETHODCALLTYPE Quit(); - virtual HRESULT STDMETHODCALLTYPE ClientToWindow(int *pcx, int *pcy); - virtual HRESULT STDMETHODCALLTYPE PutProperty(BSTR Property, VARIANT vtValue); - virtual HRESULT STDMETHODCALLTYPE GetProperty(BSTR Property, VARIANT *pvtValue); - virtual HRESULT STDMETHODCALLTYPE get_Name(BSTR *Name); - virtual HRESULT STDMETHODCALLTYPE get_HWND(SHANDLE_PTR *pHWND); - virtual HRESULT STDMETHODCALLTYPE get_FullName(BSTR *FullName); - virtual HRESULT STDMETHODCALLTYPE get_Path(BSTR *Path); - virtual HRESULT STDMETHODCALLTYPE get_Visible(VARIANT_BOOL *pBool); - virtual HRESULT STDMETHODCALLTYPE put_Visible(VARIANT_BOOL Value); - virtual HRESULT STDMETHODCALLTYPE get_StatusBar(VARIANT_BOOL *pBool); - virtual HRESULT STDMETHODCALLTYPE put_StatusBar(VARIANT_BOOL Value); - virtual HRESULT STDMETHODCALLTYPE get_StatusText(BSTR *StatusText); - virtual HRESULT STDMETHODCALLTYPE put_StatusText(BSTR StatusText); - virtual HRESULT STDMETHODCALLTYPE get_ToolBar(int *Value); - virtual HRESULT STDMETHODCALLTYPE put_ToolBar(int Value); - virtual HRESULT STDMETHODCALLTYPE get_MenuBar(VARIANT_BOOL *Value); - virtual HRESULT STDMETHODCALLTYPE put_MenuBar(VARIANT_BOOL Value); - virtual HRESULT STDMETHODCALLTYPE get_FullScreen(VARIANT_BOOL *pbFullScreen); - virtual HRESULT STDMETHODCALLTYPE put_FullScreen(VARIANT_BOOL bFullScreen); + STDMETHOD(Quit)() override; + STDMETHOD(ClientToWindow)(int *pcx, int *pcy) override; + STDMETHOD(PutProperty)(BSTR Property, VARIANT vtValue) override; + STDMETHOD(GetProperty)(BSTR Property, VARIANT *pvtValue) override; + STDMETHOD(get_Name)(BSTR *Name) override; + STDMETHOD(get_HWND)(SHANDLE_PTR *pHWND) override; + STDMETHOD(get_FullName)(BSTR *FullName) override; + STDMETHOD(get_Path)(BSTR *Path) override; + STDMETHOD(get_Visible)(VARIANT_BOOL *pBool) override; + STDMETHOD(put_Visible)(VARIANT_BOOL Value) override; + STDMETHOD(get_StatusBar)(VARIANT_BOOL *pBool) override; + STDMETHOD(put_StatusBar)(VARIANT_BOOL Value) override; + STDMETHOD(get_StatusText)(BSTR *StatusText) override; + STDMETHOD(put_StatusText)(BSTR StatusText) override; + STDMETHOD(get_ToolBar)(int *Value) override; + STDMETHOD(put_ToolBar)(int Value) override; + STDMETHOD(get_MenuBar)(VARIANT_BOOL *Value) override; + STDMETHOD(put_MenuBar)(VARIANT_BOOL Value) override; + STDMETHOD(get_FullScreen)(VARIANT_BOOL *pbFullScreen) override; + STDMETHOD(put_FullScreen)(VARIANT_BOOL bFullScreen) override; // *** IWebBrowser2 methods *** - virtual HRESULT STDMETHODCALLTYPE Navigate2(VARIANT *URL, VARIANT *Flags, VARIANT *TargetFrameName, - VARIANT *PostData, VARIANT *Headers); - virtual HRESULT STDMETHODCALLTYPE QueryStatusWB(OLECMDID cmdID, OLECMDF *pcmdf); - virtual HRESULT STDMETHODCALLTYPE ExecWB(OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, - VARIANT *pvaIn, VARIANT *pvaOut); - virtual HRESULT STDMETHODCALLTYPE ShowBrowserBar(VARIANT *pvaClsid, VARIANT *pvarShow, VARIANT *pvarSize); - virtual HRESULT STDMETHODCALLTYPE get_ReadyState(READYSTATE *plReadyState); - virtual HRESULT STDMETHODCALLTYPE get_Offline(VARIANT_BOOL *pbOffline); - virtual HRESULT STDMETHODCALLTYPE put_Offline(VARIANT_BOOL bOffline); - virtual HRESULT STDMETHODCALLTYPE get_Silent(VARIANT_BOOL *pbSilent); - virtual HRESULT STDMETHODCALLTYPE put_Silent(VARIANT_BOOL bSilent); - virtual HRESULT STDMETHODCALLTYPE get_RegisterAsBrowser(VARIANT_BOOL *pbRegister); - virtual HRESULT STDMETHODCALLTYPE put_RegisterAsBrowser(VARIANT_BOOL bRegister); - virtual HRESULT STDMETHODCALLTYPE get_RegisterAsDropTarget(VARIANT_BOOL *pbRegister); - virtual HRESULT STDMETHODCALLTYPE put_RegisterAsDropTarget(VARIANT_BOOL bRegister); - virtual HRESULT STDMETHODCALLTYPE get_TheaterMode(VARIANT_BOOL *pbRegister); - virtual HRESULT STDMETHODCALLTYPE put_TheaterMode(VARIANT_BOOL bRegister); - virtual HRESULT STDMETHODCALLTYPE get_AddressBar(VARIANT_BOOL *Value); - virtual HRESULT STDMETHODCALLTYPE put_AddressBar(VARIANT_BOOL Value); - virtual HRESULT STDMETHODCALLTYPE get_Resizable(VARIANT_BOOL *Value); - virtual HRESULT STDMETHODCALLTYPE put_Resizable(VARIANT_BOOL Value); + STDMETHOD(Navigate2)(VARIANT *URL, VARIANT *Flags, VARIANT *TargetFrameName, + VARIANT *PostData, VARIANT *Headers) override; + STDMETHOD(QueryStatusWB)(OLECMDID cmdID, OLECMDF *pcmdf) override; + STDMETHOD(ExecWB)(OLECMDID cmdID, OLECMDEXECOPT cmdexecopt, + VARIANT *pvaIn, VARIANT *pvaOut) override; + STDMETHOD(ShowBrowserBar)(VARIANT *pvaClsid, VARIANT *pvarShow, VARIANT *pvarSize) override; + STDMETHOD(get_ReadyState)(READYSTATE *plReadyState) override; + STDMETHOD(get_Offline)(VARIANT_BOOL *pbOffline) override; + STDMETHOD(put_Offline)(VARIANT_BOOL bOffline) override; + STDMETHOD(get_Silent)(VARIANT_BOOL *pbSilent) override; + STDMETHOD(put_Silent)(VARIANT_BOOL bSilent) override; + STDMETHOD(get_RegisterAsBrowser)(VARIANT_BOOL *pbRegister) override; + STDMETHOD(put_RegisterAsBrowser)(VARIANT_BOOL bRegister) override; + STDMETHOD(get_RegisterAsDropTarget)(VARIANT_BOOL *pbRegister) override; + STDMETHOD(put_RegisterAsDropTarget)(VARIANT_BOOL bRegister) override; + STDMETHOD(get_TheaterMode)(VARIANT_BOOL *pbRegister) override; + STDMETHOD(put_TheaterMode)(VARIANT_BOOL bRegister) override; + STDMETHOD(get_AddressBar)(VARIANT_BOOL *Value) override; + STDMETHOD(put_AddressBar)(VARIANT_BOOL Value) override; + STDMETHOD(get_Resizable)(VARIANT_BOOL *Value) override; + STDMETHOD(put_Resizable)(VARIANT_BOOL Value) override; // *** ITravelLogClient methods *** - virtual HRESULT STDMETHODCALLTYPE FindWindowByIndex(DWORD dwID, IUnknown **ppunk); - virtual HRESULT STDMETHODCALLTYPE GetWindowData(IStream *pStream, LPWINDOWDATA pWinData); - virtual HRESULT STDMETHODCALLTYPE LoadHistoryPosition(LPWSTR pszUrlLocation, DWORD dwPosition); + STDMETHOD(FindWindowByIndex)(DWORD dwID, IUnknown **ppunk) override; + STDMETHOD(GetWindowData)(IStream *pStream, LPWINDOWDATA pWinData) override; + STDMETHOD(LoadHistoryPosition)(LPWSTR pszUrlLocation, DWORD dwPosition) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistHistory methods *** - virtual HRESULT STDMETHODCALLTYPE LoadHistory(IStream *pStream, IBindCtx *pbc); - virtual HRESULT STDMETHODCALLTYPE SaveHistory(IStream *pStream); - virtual HRESULT STDMETHODCALLTYPE SetPositionCookie(DWORD dwPositioncookie); - virtual HRESULT STDMETHODCALLTYPE GetPositionCookie(DWORD *pdwPositioncookie); + STDMETHOD(LoadHistory)(IStream *pStream, IBindCtx *pbc) override; + STDMETHOD(SaveHistory)(IStream *pStream) override; + STDMETHOD(SetPositionCookie)(DWORD dwPositioncookie) override; + STDMETHOD(GetPositionCookie)(DWORD *pdwPositioncookie) override; // message handlers LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); diff --git a/dll/win32/browseui/shellfind/CSearchBar.h b/dll/win32/browseui/shellfind/CSearchBar.h index bee5989c7a4..c6795ced539 100644 --- a/dll/win32/browseui/shellfind/CSearchBar.h +++ b/dll/win32/browseui/shellfind/CSearchBar.h @@ -43,40 +43,40 @@ class CSearchBar : virtual ~CSearchBar(); // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IDockingWindow methods *** - virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); - virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved); - virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); + STDMETHOD(CloseDW)(DWORD dwReserved) override; + STDMETHOD(ResizeBorderDW)(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override; + STDMETHOD(ShowDW)(BOOL fShow) override; // *** IDeskBand methods *** - virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi); + STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // *** IDispatch methods *** - virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo); - virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo); - virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId); - virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr); + STDMETHOD(GetTypeInfoCount)(UINT *pctinfo) override; + STDMETHOD(GetTypeInfo)(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) override; + STDMETHOD(GetIDsOfNames)(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) override; + STDMETHOD(Invoke)(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) override; enum { IDD = IDD_SEARCH_DLG }; diff --git a/dll/win32/browseui/toolsband.cpp b/dll/win32/browseui/toolsband.cpp index cf167422420..3c78013a705 100644 --- a/dll/win32/browseui/toolsband.cpp +++ b/dll/win32/browseui/toolsband.cpp @@ -41,34 +41,34 @@ class CToolsBand : virtual ~CToolsBand(); public: // *** IDeskBand methods *** - virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi); + STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO* pdbi) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown* pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown* pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IDockingWindow methods *** - virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); - virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved); - virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); + STDMETHOD(CloseDW)(DWORD dwReserved) override; + STDMETHOD(ResizeBorderDW)(const RECT* prcBorder, IUnknown* punkToolbarSite, BOOL fReserved) override; + STDMETHOD(ShowDW)(BOOL fShow) override; // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // message handlers LRESULT OnGetButtonInfo(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled); diff --git a/dll/win32/browseui/travellog.cpp b/dll/win32/browseui/travellog.cpp index be27ae8ee6a..82cef056d76 100644 --- a/dll/win32/browseui/travellog.cpp +++ b/dll/win32/browseui/travellog.cpp @@ -60,9 +60,9 @@ class CTravelEntry : long GetSize() const; // *** ITravelEntry methods *** - virtual HRESULT STDMETHODCALLTYPE Invoke(IUnknown *punk); - virtual HRESULT STDMETHODCALLTYPE Update(IUnknown *punk, BOOL fIsLocalAnchor); - virtual HRESULT STDMETHODCALLTYPE GetPidl(LPITEMIDLIST *ppidl); + STDMETHOD(Invoke)(IUnknown *punk) override; + STDMETHOD(Update)(IUnknown *punk, BOOL fIsLocalAnchor) override; + STDMETHOD(GetPidl)(LPITEMIDLIST *ppidl) override; BEGIN_COM_MAP(CTravelEntry) COM_INTERFACE_ENTRY_IID(IID_ITravelEntry, ITravelEntry) @@ -90,17 +90,17 @@ class CTravelLog : public: // *** ITravelLog methods *** - virtual HRESULT STDMETHODCALLTYPE AddEntry(IUnknown *punk, BOOL fIsLocalAnchor); - virtual HRESULT STDMETHODCALLTYPE UpdateEntry(IUnknown *punk, BOOL fIsLocalAnchor); - virtual HRESULT STDMETHODCALLTYPE UpdateExternal(IUnknown *punk, IUnknown *punkHLBrowseContext); - virtual HRESULT STDMETHODCALLTYPE Travel(IUnknown *punk, int iOffset); - virtual HRESULT STDMETHODCALLTYPE GetTravelEntry(IUnknown *punk, int iOffset, ITravelEntry **ppte); - virtual HRESULT STDMETHODCALLTYPE FindTravelEntry(IUnknown *punk, LPCITEMIDLIST pidl, ITravelEntry **ppte); - virtual HRESULT STDMETHODCALLTYPE GetToolTipText(IUnknown *punk, int iOffset, int idsTemplate, LPWSTR pwzText, DWORD cchText); - virtual HRESULT STDMETHODCALLTYPE InsertMenuEntries(IUnknown *punk, HMENU hmenu, int nPos, int idFirst, int idLast, DWORD dwFlags); - virtual HRESULT STDMETHODCALLTYPE Clone(ITravelLog **pptl); - virtual DWORD STDMETHODCALLTYPE CountEntries(IUnknown *punk); - virtual HRESULT STDMETHODCALLTYPE Revert(); + STDMETHOD(AddEntry)(IUnknown *punk, BOOL fIsLocalAnchor) override; + STDMETHOD(UpdateEntry)(IUnknown *punk, BOOL fIsLocalAnchor) override; + STDMETHOD(UpdateExternal)(IUnknown *punk, IUnknown *punkHLBrowseContext) override; + STDMETHOD(Travel)(IUnknown *punk, int iOffset) override; + STDMETHOD(GetTravelEntry)(IUnknown *punk, int iOffset, ITravelEntry **ppte) override; + STDMETHOD(FindTravelEntry)(IUnknown *punk, LPCITEMIDLIST pidl, ITravelEntry **ppte) override; + STDMETHOD(GetToolTipText)(IUnknown *punk, int iOffset, int idsTemplate, LPWSTR pwzText, DWORD cchText) override; + STDMETHOD(InsertMenuEntries)(IUnknown *punk, HMENU hmenu, int nPos, int idFirst, int idLast, DWORD dwFlags) override; + STDMETHOD(Clone)(ITravelLog **pptl) override; + STDMETHOD_(DWORD, CountEntries)(IUnknown *punk) override; + STDMETHOD(Revert)() override; BEGIN_COM_MAP(CTravelLog) COM_INTERFACE_ENTRY_IID(IID_ITravelLog, ITravelLog) diff --git a/dll/win32/comctl32/treeview.c b/dll/win32/comctl32/treeview.c index d3066d72e2a..945084d60bf 100644 --- a/dll/win32/comctl32/treeview.c +++ b/dll/win32/comctl32/treeview.c @@ -2334,8 +2334,18 @@ TREEVIEW_GetCount(const TREEVIEW_INFO *infoPtr) return (LRESULT)infoPtr->uNumItems; } +#ifdef __REACTOS__ +static LRESULT +TREEVIEW_SelectItem(TREEVIEW_INFO *infoPtr, INT wParam, HTREEITEM item); +#endif + +#ifdef __REACTOS__ +static VOID +TREEVIEW_ToggleItemState(TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item) +#else static VOID TREEVIEW_ToggleItemState(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item) +#endif { if (infoPtr->dwStyle & TVS_CHECKBOXES) { @@ -2353,6 +2363,9 @@ TREEVIEW_ToggleItemState(const TREEVIEW_INFO *infoPtr, TREEVIEW_ITEM *item) item->state |= INDEXTOSTATEIMAGEMASK(state); TRACE("state: 0x%x\n", state); +#ifdef __REACTOS__ + TREEVIEW_SelectItem(infoPtr, TVGN_CARET, item); +#endif TREEVIEW_Invalidate(infoPtr, item); } } diff --git a/dll/win32/comdlg32/lang/cdlg_Ja.rc b/dll/win32/comdlg32/lang/cdlg_Ja.rc index 2edd500f428..3baeb3b7d4a 100644 --- a/dll/win32/comdlg32/lang/cdlg_Ja.rc +++ b/dll/win32/comdlg32/lang/cdlg_Ja.rc @@ -34,7 +34,7 @@ STRINGTABLE / : < > |" IDS_PATHNOTEXISTING "パスが見つかりません" IDS_FILENOTEXISTING "ファイルが見つかりません" - IDS_INVALID_FOLDERNAME "The selection contains a non-folder object" + IDS_INVALID_FOLDERNAME "フォルダ以外のオブジェクトを選択しています" } STRINGTABLE @@ -131,14 +131,14 @@ STRINGTABLE /* Color names */ STRINGTABLE { - IDS_FONT_SIZE "フォントサイズを %1!d! ポイントから %2!d! ポイントの間で選択してください。" + IDS_FONT_SIZE "フォントサイズを %1!d! ~ %2!d! ポイントの範囲内で選択してください。" IDS_SAVE_BUTTON "保存(&S)" IDS_SAVE_IN "保存する場所(&I):" IDS_SAVE "保存" IDS_SAVE_AS "名前を付けて保存" IDS_OPEN_FILE "ファイルを開く" - IDS_SELECT_FOLDER "Select Folder" - IDS_FONT_SIZE_INPUT "Font size has to be a number." + IDS_SELECT_FOLDER "フォルダの選択" + IDS_FONT_SIZE_INPUT "フォント サイズは数字でなければいけません。" } /* @@ -408,7 +408,7 @@ BEGIN GROUPBOX "用紙", grp2, 8, 92, 164,56, WS_GROUP LTEXT "サイズ(&Z):", stc2, 16,108, 36, 8 COMBOBOX cmb2, 52,106, 112,112,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP - LTEXT "&Source:", stc3, 16,128, 36, 8 + LTEXT "ソース(&S):", stc3, 16,128, 36, 8 COMBOBOX cmb3, 52,126, 112,112,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_GROUP | WS_TABSTOP GROUPBOX "方向", grp1, 180, 92, 100,56, WS_GROUP @@ -452,20 +452,20 @@ STYLE DS_SHELLFONT | DS_MODALFRAME | DS_CONTEXTHELP | WS_VISIBLE | WS_POPUP | WS CAPTION "開く" FONT 9, "MS UI Gothic" { - LTEXT "ファイルの場所(&I):",IDC_LOOKINSTATIC,4,6,43,8, SS_NOTIFY - COMBOBOX IDC_LOOKIN,49,3,132,100,CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + LTEXT "ファイルの場所(&I):", IDC_LOOKINSTATIC, 4, 6, 61, 8, SS_NOTIFY + COMBOBOX IDC_LOOKIN, 70, 3, 111, 300, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP LTEXT "" , IDC_TOOLBARSTATIC, 181, 2, 102, 17, NOT WS_GROUP | NOT WS_VISIBLE LISTBOX IDC_SHELLSTATIC,4,20,272,85, LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_HSCROLL | NOT WS_VISIBLE - LTEXT "ファイル名(&N):",IDC_FILENAMESTATIC,5,112,56,16, SS_NOTIFY - EDITTEXT IDC_FILENAME,63,110,150,12,ES_AUTOHSCROLL - CONTROL "", cmb13, "ComboBoxEx32", CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP, 63,110,150,150 + LTEXT "ファイル名(&N):",IDC_FILENAMESTATIC, 5, 112, 62, 16, SS_NOTIFY + EDITTEXT IDC_FILENAME, 70, 110, 150, 12, ES_AUTOHSCROLL + CONTROL "", cmb13, "ComboBoxEx32", CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP, 70, 110, 150, 150 - LTEXT "ファイルの種類(&T):",IDC_FILETYPESTATIC,5,130,56,16, SS_NOTIFY - COMBOBOX IDC_FILETYPE,63,128,150,53,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "ファイルの種類(&T):", IDC_FILETYPESTATIC , 5, 130, 62, 16, SS_NOTIFY + COMBOBOX IDC_FILETYPE, 70, 128, 150, 53, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "読み取り専用ファイルとして開く(&R)",IDC_OPENREADONLY,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,63,148,150,10 + CONTROL "読み込み専用で開く(&R)", IDC_OPENREADONLY, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 70, 148, 150, 10 DEFPUSHBUTTON "開く(&O)", IDOK,222,110,54,14 PUSHBUTTON "キャンセル", IDCANCEL,222,128,54,14 @@ -474,28 +474,28 @@ FONT 9, "MS UI Gothic" NEWFILEOPENV2ORD DIALOG 0, 0, 370, 237 STYLE DS_MODALFRAME | WS_VISIBLE | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_CLIPCHILDREN -CAPTION "Open" -FONT 8, "MS Shell Dlg" +CAPTION "開く" +FONT 9, "MS UI Gothic" { - LTEXT "Look &in:", IDC_LOOKINSTATIC, 28, 6, 43, 8, SS_NOTIFY - COMBOBOX IDC_LOOKIN, 64, 3, 150, 100, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP + LTEXT "ファイルの場所(&I):", IDC_LOOKINSTATIC, 5, 6, 61, 8, SS_NOTIFY + COMBOBOX IDC_LOOKIN, 70, 3, 130, 300, CBS_DROPDOWNLIST | CBS_OWNERDRAWFIXED | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP LTEXT "" , IDC_TOOLBARSTATIC, 209, 2, 102, 17, NOT WS_GROUP | NOT WS_VISIBLE CONTROL "", IDC_TOOLBARPLACES, "ToolbarWindow32", 0x800 | CCS_NORESIZE | CCS_TOP | CCS_NOPARENTALIGN | CCS_NODIVIDER, 4, 20, 56, 192 LISTBOX IDC_SHELLSTATIC, 64, 20, 300, 155, LBS_SORT | LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | WS_HSCROLL | NOT WS_VISIBLE - LTEXT "File &name:", IDC_FILENAMESTATIC, 65, 182, 56, 16, SS_NOTIFY - EDITTEXT IDC_FILENAME, 123, 180, 180, 12, ES_AUTOHSCROLL - CONTROL "", cmb13, "ComboBoxEx32", CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP, 123, 180, 180, 150 + LTEXT "ファイル名(&N):", IDC_FILENAMESTATIC, 65, 182, 63, 16, SS_NOTIFY + EDITTEXT IDC_FILENAME, 130, 180, 170, 12, ES_AUTOHSCROLL + CONTROL "", cmb13, "ComboBoxEx32", CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP, 130, 180, 170, 150 - LTEXT "Files of &type:", IDC_FILETYPESTATIC, 65, 200, 56, 16, SS_NOTIFY - COMBOBOX IDC_FILETYPE, 123, 198, 180, 53, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "ファイルの種類(&T):", IDC_FILETYPESTATIC, 65, 200, 63, 16, SS_NOTIFY + COMBOBOX IDC_FILETYPE, 130, 198, 170, 53, CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - CONTROL "Open as &read-only", IDC_OPENREADONLY, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 123, 218, 150, 10 + CONTROL "読み込み専用で開く(&R)", IDC_OPENREADONLY, "Button", BS_AUTOCHECKBOX | WS_TABSTOP, 130, 218, 150, 10 - DEFPUSHBUTTON "&Open", IDOK, 310, 180, 54, 14 - PUSHBUTTON "Cancel", IDCANCEL, 310, 198, 54, 14 - PUSHBUTTON "&Help", pshHelp, 310, 215, 54, 14 + DEFPUSHBUTTON "開く(&O)", IDOK, 310, 180, 54, 14 + PUSHBUTTON "キャンセル", IDCANCEL, 310, 198, 54, 14 + PUSHBUTTON "ヘルプ(&H)", pshHelp, 310, 215, 54, 14 } NEWFILEOPENV3ORD DIALOG 0, 0, 440, 300 diff --git a/dll/win32/kernel32/client/console/readwrite.c b/dll/win32/kernel32/client/console/readwrite.c index 00fbf7761cb..297fb71dc7d 100644 --- a/dll/win32/kernel32/client/console/readwrite.c +++ b/dll/win32/kernel32/client/console/readwrite.c @@ -1222,7 +1222,7 @@ PeekConsoleInputW(IN HANDLE hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead, - CONSOLE_READ_KEEPEVENT | CONSOLE_READ_CONTINUE, + CONSOLE_READ_NOREMOVE | CONSOLE_READ_NOWAIT, TRUE); } @@ -1242,7 +1242,7 @@ PeekConsoleInputA(IN HANDLE hConsoleInput, lpBuffer, nLength, lpNumberOfEventsRead, - CONSOLE_READ_KEEPEVENT | CONSOLE_READ_CONTINUE, + CONSOLE_READ_NOREMOVE | CONSOLE_READ_NOWAIT, FALSE); } diff --git a/dll/win32/msctf/CMakeLists.txt b/dll/win32/msctf/CMakeLists.txt index a167162dc58..896fc3cc943 100644 --- a/dll/win32/msctf/CMakeLists.txt +++ b/dll/win32/msctf/CMakeLists.txt @@ -21,6 +21,7 @@ list(APPEND SOURCE ${CMAKE_CURRENT_BINARY_DIR}/msctf_stubs.c) list(APPEND PCH_SKIP_SOURCE + mlng.cpp utils.cpp) add_library(msctf MODULE @@ -32,6 +33,6 @@ add_library(msctf MODULE set_module_type(msctf win32dll UNICODE) target_link_libraries(msctf uuid wine cicero) add_importlibs(msctf user32 advapi32 advapi32_vista msvcrt kernel32 ntdll) -add_delay_importlibs(msctf ole32 oleaut32) +add_delay_importlibs(msctf shell32 shlwapi ole32 oleaut32 imm32 gdi32) add_pch(msctf precomp.h SOURCE) add_cd_file(TARGET msctf DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/msctf/mlng.cpp b/dll/win32/msctf/mlng.cpp new file mode 100644 index 00000000000..6ec66d099f4 --- /dev/null +++ b/dll/win32/msctf/mlng.cpp @@ -0,0 +1,694 @@ +/* + * PROJECT: ReactOS msctf.dll + * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) + * PURPOSE: Multi-language handling of Cicero + * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ + */ + +#define WIN32_NO_STATUS + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include "mlng.h" + +WINE_DEFAULT_DEBUG_CHANNEL(msctf); + +extern CRITICAL_SECTION g_cs; + +CicArray *g_pMlngInfo = NULL; +INT CStaticIconList::s_cx = 0; +INT CStaticIconList::s_cy = 0; +CStaticIconList g_IconList; + +// Cache for GetSpecialKLID +static HKL s_hCacheKL = NULL; +static DWORD s_dwCacheKLID = 0; + +/*********************************************************************** + * The helper funtions + */ + +/// @implemented +DWORD GetSpecialKLID(_In_ HKL hKL) +{ + assert(IS_SPECIAL_HKL(hKL)); + + if (s_hCacheKL == hKL && s_dwCacheKLID != 0) + return s_dwCacheKLID; + + s_dwCacheKLID = 0; + + CicRegKey regKey1; + LSTATUS error = regKey1.Open(HKEY_LOCAL_MACHINE, + L"SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts"); + if (error != ERROR_SUCCESS) + return 0; + + WCHAR szName[16], szLayoutId[16]; + const DWORD dwSpecialId = SPECIALIDFROMHKL(hKL); + for (DWORD dwIndex = 0; ; ++dwIndex) + { + error = ::RegEnumKeyW(regKey1, dwIndex, szName, _countof(szName)); + szName[_countof(szName) - 1] = UNICODE_NULL; // Avoid buffer overrun + if (error != ERROR_SUCCESS) + break; + + CicRegKey regKey2; + error = regKey2.Open(regKey1, szName); + if (error != ERROR_SUCCESS) + break; + + error = regKey2.QuerySz(L"Layout Id", szLayoutId, _countof(szLayoutId)); + szLayoutId[_countof(szLayoutId) - 1] = UNICODE_NULL; // Avoid buffer overrun + if (error == ERROR_SUCCESS) + continue; + + DWORD dwLayoutId = wcstoul(szLayoutId, NULL, 16); + if (dwLayoutId == dwSpecialId) + { + s_hCacheKL = hKL; + s_dwCacheKLID = wcstoul(szName, NULL, 16); + break; + } + } + + return s_dwCacheKLID; +} + +/// @implemented +DWORD GetHKLSubstitute(_In_ HKL hKL) +{ + if (IS_IME_HKL(hKL)) + return HandleToUlong(hKL); + + DWORD dwKLID; + if (HIWORD(hKL) == LOWORD(hKL)) + dwKLID = LOWORD(hKL); + else if (IS_SPECIAL_HKL(hKL)) + dwKLID = GetSpecialKLID(hKL); + else + dwKLID = HandleToUlong(hKL); + + if (dwKLID == 0) + return HandleToUlong(hKL); + + CicRegKey regKey; + LSTATUS error = regKey.Open(HKEY_CURRENT_USER, L"Keyboard Layout\\Substitutes"); + if (error == ERROR_SUCCESS) + { + WCHAR szName[MAX_PATH], szValue[MAX_PATH]; + DWORD dwIndex, dwValue; + for (dwIndex = 0; ; ++dwIndex) + { + error = regKey.EnumValue(dwIndex, szName, _countof(szName)); + szName[_countof(szName) - 1] = UNICODE_NULL; // Avoid buffer overrun + if (error != ERROR_SUCCESS) + break; + + error = regKey.QuerySz(szName, szValue, _countof(szValue)); + szValue[_countof(szValue) - 1] = UNICODE_NULL; // Avoid buffer overrun + if (error != ERROR_SUCCESS) + break; + + dwValue = wcstoul(szValue, NULL, 16); + if ((dwKLID & ~SPECIAL_MASK) == dwValue) + { + dwKLID = wcstoul(szName, NULL, 16); + break; + } + } + } + + return dwKLID; +} + +/// @implemented +static BOOL +GetKbdLayoutNameFromReg(_In_ HKL hKL, _Out_ LPWSTR pszDesc, _In_ UINT cchDesc) +{ + const DWORD dwKLID = GetHKLSubstitute(hKL); + + WCHAR szSubKey[MAX_PATH]; + StringCchPrintfW(szSubKey, _countof(szSubKey), + L"SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\%08lX", + dwKLID); + + CicRegKey regKey; + LSTATUS error = regKey.Open(HKEY_LOCAL_MACHINE, szSubKey); + if (error != ERROR_SUCCESS) + return FALSE; + + if (SHLoadRegUIStringW(regKey, L"Layout Display Name", pszDesc, cchDesc) == S_OK) + { + pszDesc[cchDesc - 1] = UNICODE_NULL; // Avoid buffer overrun + return TRUE; + } + + error = regKey.QuerySz(L"Layout Text", pszDesc, cchDesc); + pszDesc[cchDesc - 1] = UNICODE_NULL; // Avoid buffer overrun + return (error == ERROR_SUCCESS); +} + +/// @implemented +static BOOL +GetHKLName(_In_ HKL hKL, _Out_ LPWSTR pszDesc, _In_ UINT cchDesc) +{ + if (::GetLocaleInfoW(LOWORD(hKL), LOCALE_SLANGUAGE, pszDesc, cchDesc)) + return TRUE; + + *pszDesc = UNICODE_NULL; + + if (LOWORD(hKL) == HIWORD(hKL)) + return FALSE; + + return GetKbdLayoutNameFromReg(hKL, pszDesc, cchDesc); +} + +/// @implemented +static BOOL +GetHKLDesctription( + _In_ HKL hKL, + _Out_ LPWSTR pszDesc, + _In_ UINT cchDesc, + _Out_ LPWSTR pszImeFileName, + _In_ UINT cchImeFileName) +{ + pszDesc[0] = pszImeFileName[0] = UNICODE_NULL; + + if (!IS_IME_HKL(hKL)) + return GetHKLName(hKL, pszDesc, cchDesc); + + if (GetKbdLayoutNameFromReg(hKL, pszDesc, cchDesc)) + return TRUE; + + if (!::ImmGetDescriptionW(hKL, pszDesc, cchDesc)) + { + *pszDesc = UNICODE_NULL; + return GetHKLName(hKL, pszDesc, cchDesc); + } + + if (!::ImmGetIMEFileNameW(hKL, pszImeFileName, cchImeFileName)) + *pszImeFileName = UNICODE_NULL; + + return TRUE; +} + +/// @implemented +HICON GetIconFromFile(_In_ INT cx, _In_ INT cy, _In_ LPCWSTR pszFileName, _In_ INT iIcon) +{ + HICON hIcon; + + if (cx <= GetSystemMetrics(SM_CXSMICON)) + ::ExtractIconExW(pszFileName, iIcon, NULL, &hIcon, 1); + else + ::ExtractIconExW(pszFileName, iIcon, &hIcon, NULL, 1); + + return hIcon; +} + +/// @implemented +static BOOL EnsureIconImageList(VOID) +{ + if (!CStaticIconList::s_cx) + g_IconList.Init(::GetSystemMetrics(SM_CYSMICON), ::GetSystemMetrics(SM_CXSMICON)); + + return TRUE; +} + +/// @implemented +static INT GetPhysicalFontHeight(LOGFONTW *plf) +{ + HDC hDC = ::GetDC(NULL); + HFONT hFont = ::CreateFontIndirectW(plf); + HGDIOBJ hFontOld = ::SelectObject(hDC, hFont); + TEXTMETRICW tm; + ::GetTextMetricsW(hDC, &tm); + INT ret = tm.tmExternalLeading + tm.tmHeight; + ::SelectObject(hDC, hFontOld); + ::DeleteObject(hFont); + ::ReleaseDC(NULL, hDC); + return ret; +} + +/*********************************************************************** + * Inat helper functions + */ + +/// @implemented +INT InatAddIcon(_In_ HICON hIcon) +{ + if (!EnsureIconImageList()) + return -1; + return g_IconList.AddIcon(hIcon); +} + +/// @implemented +HICON +InatCreateIconBySize( + _In_ LANGID LangID, + _In_ INT nWidth, + _In_ INT nHeight, + _In_ const LOGFONTW *plf) +{ + WCHAR szText[64]; + BOOL ret = ::GetLocaleInfoW(LangID, LOCALE_NOUSEROVERRIDE | LOCALE_SABBREVLANGNAME, + szText, _countof(szText)); + if (!ret) + szText[0] = szText[1] = L'?'; + + szText[2] = UNICODE_NULL; + CharUpperW(szText); + + HFONT hFont = ::CreateFontIndirectW(plf); + if (!hFont) + return NULL; + + HDC hDC = ::GetDC(NULL); + HDC hMemDC = ::CreateCompatibleDC(hDC); + HBITMAP hbmColor = ::CreateCompatibleBitmap(hDC, nWidth, nHeight); + HBITMAP hbmMask = ::CreateBitmap(nWidth, nHeight, 1, 1, NULL); + ::ReleaseDC(NULL, hDC); + + HICON hIcon = NULL; + HGDIOBJ hbmOld = ::SelectObject(hMemDC, hbmColor); + HGDIOBJ hFontOld = ::SelectObject(hMemDC, hFont); + if (hMemDC && hbmColor && hbmMask) + { + ::SetBkColor(hMemDC, ::GetSysColor(COLOR_HIGHLIGHT)); + ::SetTextColor(hMemDC, ::GetSysColor(COLOR_HIGHLIGHTTEXT)); + + RECT rc = { 0, 0, nWidth, nHeight }; + ::ExtTextOutW(hMemDC, 0, 0, ETO_OPAQUE, &rc, L"", 0, NULL); + + ::DrawTextW(hMemDC, szText, 2, &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER); + ::SelectObject(hMemDC, hbmMask); + + ::PatBlt(hMemDC, 0, 0, nWidth, nHeight, BLACKNESS); + + ICONINFO IconInfo = { TRUE, 0, 0, hbmMask, hbmColor }; + hIcon = ::CreateIconIndirect(&IconInfo); + } + ::SelectObject(hMemDC, hFontOld); + ::SelectObject(hMemDC, hbmOld); + + ::DeleteObject(hbmMask); + ::DeleteObject(hbmColor); + ::DeleteDC(hMemDC); + ::DeleteObject(hFont); + return hIcon; +} + +/// @implemented +HICON InatCreateIcon(_In_ LANGID LangID) +{ + INT cxSmIcon = ::GetSystemMetrics(SM_CXSMICON), cySmIcon = ::GetSystemMetrics(SM_CYSMICON); + + LOGFONTW lf; + if (!SystemParametersInfoW(SPI_GETICONTITLELOGFONT, sizeof(LOGFONTW), &lf, 0)) + return NULL; + + if (cySmIcon < GetPhysicalFontHeight(&lf)) + { + lf.lfWidth = 0; + lf.lfHeight = - (7 * cySmIcon) / 10; + } + + return InatCreateIconBySize(LangID, cxSmIcon, cySmIcon, &lf); +} + +/// @implemented +BOOL InatGetIconSize(_Out_ INT *pcx, _Out_ INT *pcy) +{ + g_IconList.GetIconSize(pcx, pcy); + return TRUE; +} + +/// @implemented +INT InatGetImageCount(VOID) +{ + return g_IconList.GetImageCount(); +} + +/// @implemented +VOID InatRemoveAll(VOID) +{ + if (CStaticIconList::s_cx) + g_IconList.RemoveAll(FALSE); +} + +/// @implemented +VOID UninitINAT(VOID) +{ + g_IconList.RemoveAll(TRUE); + + if (g_pMlngInfo) + { + delete g_pMlngInfo; + g_pMlngInfo = NULL; + } +} + +/*********************************************************************** + * MLNGINFO + */ + +/// @implemented +void MLNGINFO::InitDesc() +{ + if (m_bInitDesc) + return; + + WCHAR szDesc[MAX_PATH], szImeFileName[MAX_PATH]; + GetHKLDesctription(m_hKL, szDesc, (UINT)_countof(szDesc), + szImeFileName, (UINT)_countof(szImeFileName)); + SetDesc(szDesc); + m_bInitDesc = TRUE; +} + +/// @implemented +void MLNGINFO::InitIcon() +{ + if (m_bInitIcon) + return; + + WCHAR szDesc[MAX_PATH], szImeFileName[MAX_PATH]; + GetHKLDesctription(m_hKL, szDesc, (UINT)_countof(szDesc), + szImeFileName, (UINT)_countof(szImeFileName)); + SetDesc(szDesc); + m_bInitDesc = TRUE; + + INT cxIcon, cyIcon; + InatGetIconSize(&cxIcon, &cyIcon); + + HICON hIcon = NULL; + if (szImeFileName[0]) + hIcon = GetIconFromFile(cxIcon, cyIcon, szImeFileName, 0); + + if (!hIcon) + hIcon = InatCreateIcon(LOWORD(m_hKL)); + + if (hIcon) + { + m_iIconIndex = InatAddIcon(hIcon); + ::DestroyIcon(hIcon); + } + + m_bInitIcon = TRUE; +} + +/// @implemented +LPCWSTR MLNGINFO::GetDesc() +{ + if (!m_bInitDesc) + InitDesc(); + + return m_szDesc; +} + +/// @implemented +void MLNGINFO::SetDesc(LPCWSTR pszDesc) +{ + StringCchCopyW(m_szDesc, _countof(m_szDesc), pszDesc); +} + +/// @implemented +INT MLNGINFO::GetIconIndex() +{ + if (!m_bInitIcon) + InitIcon(); + + return m_iIconIndex; +} + +/*********************************************************************** + * CStaticIconList + */ + +/// @implemented +void CStaticIconList::Init(INT cxIcon, INT cyIcon) +{ + ::EnterCriticalSection(&g_cs); + s_cx = cxIcon; + s_cy = cyIcon; + ::LeaveCriticalSection(&g_cs); +} + +/// @implemented +INT CStaticIconList::AddIcon(HICON hIcon) +{ + ::EnterCriticalSection(&g_cs); + + INT iItem = -1; + HICON hCopyIcon = ::CopyIcon(hIcon); + if (hCopyIcon) + { + if (g_IconList.Add(hIcon)) + iItem = INT(g_IconList.size() - 1); + } + + ::LeaveCriticalSection(&g_cs); + return iItem; +} + +/// @implemented +HICON CStaticIconList::ExtractIcon(INT iIcon) +{ + HICON hCopyIcon = NULL; + ::EnterCriticalSection(&g_cs); + if (iIcon <= (INT)g_IconList.size()) + hCopyIcon = ::CopyIcon(g_IconList[iIcon]); + ::LeaveCriticalSection(&g_cs); + return hCopyIcon; +} + +/// @implemented +void CStaticIconList::GetIconSize(INT *pcx, INT *pcy) +{ + ::EnterCriticalSection(&g_cs); + *pcx = s_cx; + *pcy = s_cy; + ::LeaveCriticalSection(&g_cs); +} + +/// @implemented +INT CStaticIconList::GetImageCount() +{ + ::EnterCriticalSection(&g_cs); + INT cItems = (INT)g_IconList.size(); + ::LeaveCriticalSection(&g_cs); + return cItems; +} + +/// @implemented +void CStaticIconList::RemoveAll(BOOL bNoLock) +{ + if (!bNoLock) + ::EnterCriticalSection(&g_cs); + + for (size_t iItem = 0; iItem < g_IconList.size(); ++iItem) + { + ::DestroyIcon(g_IconList[iItem]); + } + + clear(); + + if (!bNoLock) + ::LeaveCriticalSection(&g_cs); +} + +/// @implemented +static BOOL CheckMlngInfo(VOID) +{ + if (!g_pMlngInfo) + return TRUE; // Needs creation + + INT cKLs = ::GetKeyboardLayoutList(0, NULL); + if (cKLs != TF_MlngInfoCount()) + return TRUE; // Needs refresh + + if (!cKLs) + return FALSE; + + HKL *phKLs = (HKL*)cicMemAlloc(cKLs * sizeof(HKL)); + if (!phKLs) + return FALSE; + + ::GetKeyboardLayoutList(cKLs, phKLs); + + assert(g_pMlngInfo); + + BOOL ret = FALSE; + for (INT iKL = 0; iKL < cKLs; ++iKL) + { + if ((*g_pMlngInfo)[iKL].m_hKL != phKLs[iKL]) + { + ret = TRUE; // Needs refresh + break; + } + } + + cicMemFree(phKLs); + return ret; +} + +/// @implemented +static VOID DestroyMlngInfo(VOID) +{ + if (!g_pMlngInfo) + return; + + delete g_pMlngInfo; + g_pMlngInfo = NULL; +} + +/// @implemented +static VOID CreateMlngInfo(VOID) +{ + if (!g_pMlngInfo) + { + g_pMlngInfo = new(cicNoThrow) CicArray(); + if (!g_pMlngInfo) + return; + } + + if (!EnsureIconImageList()) + return; + + INT cKLs = ::GetKeyboardLayoutList(0, NULL); + HKL *phKLs = (HKL*)cicMemAllocClear(cKLs * sizeof(HKL)); + if (!phKLs) + return; + + ::GetKeyboardLayoutList(cKLs, phKLs); + + for (INT iKL = 0; iKL < cKLs; ++iKL) + { + MLNGINFO& info = (*g_pMlngInfo)[iKL]; + info.m_hKL = phKLs[iKL]; + info.m_bInitDesc = FALSE; + info.m_bInitIcon = FALSE; + } + + cicMemFree(phKLs); +} + +/*********************************************************************** + * TF_InitMlngInfo (MSCTF.@) + * + * @implemented + */ +EXTERN_C VOID WINAPI TF_InitMlngInfo(VOID) +{ + TRACE("()\n"); + + ::EnterCriticalSection(&g_cs); + + if (CheckMlngInfo()) + { + DestroyMlngInfo(); + CreateMlngInfo(); + } + + ::LeaveCriticalSection(&g_cs); +} + +/*********************************************************************** + * TF_MlngInfoCount (MSCTF.@) + * + * @implemented + */ +EXTERN_C INT WINAPI TF_MlngInfoCount(VOID) +{ + TRACE("()\n"); + + if (!g_pMlngInfo) + return 0; + + return (INT)g_pMlngInfo->size(); +} + +/*********************************************************************** + * TF_InatExtractIcon (MSCTF.@) + * + * @implemented + */ +EXTERN_C HICON WINAPI TF_InatExtractIcon(_In_ INT iKL) +{ + TRACE("(%d)\n", iKL); + return g_IconList.ExtractIcon(iKL); +} + +/*********************************************************************** + * TF_GetMlngIconIndex (MSCTF.@) + * + * @implemented + */ +EXTERN_C INT WINAPI TF_GetMlngIconIndex(_In_ INT iKL) +{ + TRACE("(%d)\n", iKL); + + INT iIcon = -1; + + ::EnterCriticalSection(&g_cs); + + assert(g_pMlngInfo); + + if (iKL < (INT)g_pMlngInfo->size()) + iIcon = (*g_pMlngInfo)[iKL].GetIconIndex(); + + ::LeaveCriticalSection(&g_cs); + + return iIcon; +} + +/*********************************************************************** + * TF_GetMlngHKL (MSCTF.@) + * + * @implemented + */ +EXTERN_C BOOL WINAPI +TF_GetMlngHKL( + _In_ INT iKL, + _Out_opt_ HKL *phKL, + _Out_opt_ LPWSTR pszDesc, + _In_ INT cchDesc) +{ + TRACE("(%d, %p, %p, %d)\n", iKL, phKL, pszDesc, cchDesc); + + BOOL ret = FALSE; + + ::EnterCriticalSection(&g_cs); + + assert(g_pMlngInfo); + + if (iKL < (INT)g_pMlngInfo->size()) + { + MLNGINFO& info = (*g_pMlngInfo)[iKL]; + + if (phKL) + *phKL = info.m_hKL; + + if (pszDesc) + StringCchCopyW(pszDesc, cchDesc, info.GetDesc()); + + ret = TRUE; + } + + ::LeaveCriticalSection(&g_cs); + + return ret; +} diff --git a/dll/win32/msctf/mlng.h b/dll/win32/msctf/mlng.h new file mode 100644 index 00000000000..e55e8b1ed7a --- /dev/null +++ b/dll/win32/msctf/mlng.h @@ -0,0 +1,59 @@ +/* + * PROJECT: ReactOS msctf.dll + * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) + * PURPOSE: Multi-language handling of Cicero + * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ + */ + +#pragma once + +struct MLNGINFO +{ + HKL m_hKL; + BOOL m_bInitDesc; + BOOL m_bInitIcon; + INT m_iIconIndex; + WCHAR m_szDesc[128]; + + void InitDesc(); + void InitIcon(); + + INT GetIconIndex(); + LPCWSTR GetDesc(); + void SetDesc(LPCWSTR pszDesc); +}; + +class CStaticIconList : public CicArray +{ +public: + static INT s_cx; + static INT s_cy; + + CStaticIconList() { } + + void Init(INT cxIcon, INT cyIcon); + INT AddIcon(HICON hIcon); + HICON ExtractIcon(INT iIcon); + void GetIconSize(INT *pcx, INT *pcy); + INT GetImageCount(); + void RemoveAll(BOOL bNoLock); +}; + +INT InatAddIcon(_In_ HICON hIcon); +HICON InatCreateIcon(_In_ LANGID LangID); + +HICON +InatCreateIconBySize( + _In_ LANGID LangID, + _In_ INT nWidth, + _In_ INT nHeight, + _In_ const LOGFONTW *plf); + +BOOL InatGetIconSize(_Out_ INT *pcx, _Out_ INT *pcy); +INT InatGetImageCount(VOID); +VOID InatRemoveAll(VOID); + +DWORD GetHKLSubstitute(_In_ HKL hKL); +HICON GetIconFromFile(_In_ INT cx, _In_ INT cy, _In_ LPCWSTR pszFileName, _In_ INT iIcon); + +VOID UninitINAT(VOID); diff --git a/dll/win32/msctf/msctf.c b/dll/win32/msctf/msctf.c index c6e3a2ca597..a20d0fd55b6 100644 --- a/dll/win32/msctf/msctf.c +++ b/dll/win32/msctf/msctf.c @@ -697,6 +697,7 @@ HRESULT WINAPI TF_CreateLangBarItemMgr(ITfLangBarItemMgr **pplbim) return E_NOTIMPL; } +#ifndef __REACTOS__ /* See mlng.cpp */ /*********************************************************************** * TF_InitMlngInfo (MSCTF.@) */ @@ -705,3 +706,4 @@ HRESULT WINAPI TF_InitMlngInfo(void) FIXME("stub\n"); return S_OK; } +#endif diff --git a/dll/win32/msctf/msctf.spec b/dll/win32/msctf/msctf.spec index a2cb7984b72..6b036567346 100644 --- a/dll/win32/msctf/msctf.spec +++ b/dll/win32/msctf/msctf.spec @@ -19,11 +19,11 @@ @ stdcall -stub TF_GetGlobalCompartment(ptr) @ stub TF_GetInputScope @ stdcall -stub TF_GetLangIcon(long ptr long) -@ stdcall -stub TF_GetMlngHKL(long ptr ptr long) -@ stdcall -stub TF_GetMlngIconIndex(long) +@ stdcall TF_GetMlngHKL(long ptr ptr long) +@ stdcall TF_GetMlngIconIndex(long) @ stdcall -stub TF_GetThreadFlags(long ptr ptr ptr) @ stdcall TF_GetThreadMgr(ptr) -@ stdcall -stub TF_InatExtractIcon(long) +@ stdcall TF_InatExtractIcon(long) @ stdcall TF_InitMlngInfo() @ stdcall -stub TF_InitSystem() @ stdcall -stub TF_UninitSystem() @@ -31,7 +31,7 @@ @ stdcall TF_InvalidAssemblyListCacheIfExist() @ stdcall TF_IsCtfmonRunning() @ stdcall -stub TF_IsInMarshaling(long) -@ stdcall -stub TF_MlngInfoCount() +@ stdcall TF_MlngInfoCount() @ stdcall TF_RunInputCPL() @ stdcall -stub TF_PostAllThreadMsg(long long) @ stdcall TF_RegisterLangBarAddIn(ptr wstr long) diff --git a/dll/win32/msctf/utils.cpp b/dll/win32/msctf/utils.cpp index ec469ceef28..394c21b316e 100644 --- a/dll/win32/msctf/utils.cpp +++ b/dll/win32/msctf/utils.cpp @@ -23,10 +23,13 @@ #include #include +#include #include #include #include +#include "mlng.h" + #include WINE_DEFAULT_DEBUG_CHANNEL(msctf); @@ -617,6 +620,9 @@ VOID ProcessDetach(HINSTANCE hinstDLL) // FIXME: Call me from DllMain TFUninitLib(); //FIXME } + + UninitINAT(); + //FIXME //TF_UninitThreadSystem(); diff --git a/dll/win32/mshtml/lang/Ro.rc b/dll/win32/mshtml/lang/Ro.rc index 7e37a03f44a..44dd4c11489 100644 --- a/dll/win32/mshtml/lang/Ro.rc +++ b/dll/win32/mshtml/lang/Ro.rc @@ -2,6 +2,7 @@ * Copyright 2005-2006 Jacek Caban * Copyright 2009 Michael Stefaniuc * 2011 Ștefan Fulea + * 2024 Miloiu Andrei * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -43,8 +44,8 @@ FONT 8, "MS Shell Dlg" COMBOBOX IDC_TYPE, 35, 20, 45, 100, WS_TABSTOP | WS_GROUP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_HASSTRINGS LTEXT "&URL:", -1, 10, 42, 24, 10 EDITTEXT IDC_URL, 35, 40, 150, 14, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Con&firmă", IDOK, 200, 10, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "A&nulează", IDCANCEL, 200, 28, 50, 14, WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 200, 10, 50, 14, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Revocare", IDCANCEL, 200, 28, 50, 14, WS_GROUP | WS_TABSTOP } ID_PROMPT_DIALOG DIALOGEX 0, 0, 200, 90 @@ -53,6 +54,6 @@ FONT 8, "MS Shell Dlg" { LTEXT "", ID_PROMPT_PROMPT, 10, 10, 180, 30 EDITTEXT ID_PROMPT_EDIT, 10, 45, 180, 14, ES_AUTOHSCROLL | WS_BORDER | WS_GROUP | WS_TABSTOP - PUSHBUTTON "Con&firmă", IDOK, 40, 65, 50, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP - PUSHBUTTON "A&nulează", IDCANCEL, 110, 65, 50, 15, WS_GROUP | WS_TABSTOP + PUSHBUTTON "OK", IDOK, 40, 65, 50, 15, BS_DEFPUSHBUTTON | WS_GROUP | WS_TABSTOP + PUSHBUTTON "Revocare", IDCANCEL, 110, 65, 50, 15, WS_GROUP | WS_TABSTOP } diff --git a/dll/win32/msutb/msutb.cpp b/dll/win32/msutb/msutb.cpp index 912edc45598..b81e2e23ba1 100644 --- a/dll/win32/msutb/msutb.cpp +++ b/dll/win32/msutb/msutb.cpp @@ -11,6 +11,21 @@ WINE_DEFAULT_DEBUG_CHANNEL(msutb); //#define ENABLE_DESKBAND +typedef struct LANGBARITEMSTATE +{ + CLSID m_clsid; + DWORD m_dwDemoteLevel; + UINT_PTR m_nTimerID; + UINT m_uTimeOut; + BOOL m_bStartedIntentionally; + BOOL m_bDisableDemoting; + + BOOL IsShown() + { + return m_dwDemoteLevel < 2; + } +} LANGBARITEMSTATE, *PLANGBARITEMSTATE; + HINSTANCE g_hInst = NULL; UINT g_wmTaskbarCreated = 0; UINT g_uACP = CP_ACP; @@ -1062,6 +1077,27 @@ class CTipbarGripper : public CUIFGripper /***********************************************************************/ +class CLangBarItemList : public CicArray +{ +public: + BOOL IsStartedIntentionally(REFCLSID rclsid); + + LANGBARITEMSTATE *AddItem(REFCLSID rclsid); + void Clear(); + BOOL SetDemoteLevel(REFCLSID rclsid, DWORD dwDemoteLevel); + + LANGBARITEMSTATE *FindItem(REFCLSID rclsid); + LANGBARITEMSTATE *GetItemStateFromTimerId(UINT_PTR nTimerID); + + void Load(); + void SaveItem(CicRegKey *pRegKey, const LANGBARITEMSTATE *pState); + + void StartDemotingTimer(REFCLSID rclsid, BOOL bIntentional); + UINT_PTR FindDemotingTimerId(); +}; + +/***********************************************************************/ + class CTrayIconWnd { protected: @@ -1300,6 +1336,7 @@ class CTipbarThread void AddUIObjs(); void RemoveUIObjs(); + CTipbarItem *GetItem(REFCLSID rclsid); void GetTextSize(BSTR bstr, LPSIZE pSize); void LocateItems(); void MyMoveWnd(LONG xDelta, LONG yDelta); @@ -1425,7 +1462,7 @@ class CTipbarWnd DWORD m_dwSinkCookie; CModalMenu *m_pModalMenu; CTipbarThread *m_pThread; - CicArray m_TipbarGUIDArray; + CLangBarItemList m_LangBarItemList; DWORD m_dwUnknown20; CUIFWndFrame *m_pWndFrame; CTipbarGripper *m_pTipbarGripper; @@ -1467,6 +1504,7 @@ class CTipbarWnd friend class CTipbarThread; friend class CTipbarItem; friend class CLBarInatItem; + friend class CMainIconItem; friend VOID WINAPI ClosePopupTipbar(VOID); friend BOOL GetTipbarInternal(HWND hWnd, DWORD dwFlags, CDeskBand *pDeskBand); friend LONG MyWaitForInputIdle(DWORD dwThreadId, DWORD dwMilliseconds); @@ -2786,7 +2824,7 @@ CUTBContextMenu::CUTBContextMenu(CTipbarWnd *pTipbarWnd) m_pTipbarWnd = pTipbarWnd; } -/// @unimplemented +/// @implemented BOOL CUTBContextMenu::Init() { m_pTipbarThread = m_pTipbarWnd->m_pFocusThread; @@ -3121,17 +3159,19 @@ STDMETHODIMP_(BOOL) CButtonIconItem::OnDelayMsg(UINT uMsg) * CMainIconItem */ +/// @implemented CMainIconItem::CMainIconItem(CTrayIconWnd *pWnd) : CButtonIconItem(pWnd, 1) { } +/// @implemented BOOL CMainIconItem::Init(HWND hWnd) { return CTrayIconItem::_Init(hWnd, WM_USER, 0, GUID_LBI_TRAYMAIN); } -/// @unimplemented +/// @implemented STDMETHODIMP_(BOOL) CMainIconItem::OnDelayMsg(UINT uMsg) { if (!CButtonIconItem::OnDelayMsg(uMsg)) @@ -3139,14 +3179,12 @@ STDMETHODIMP_(BOOL) CMainIconItem::OnDelayMsg(UINT uMsg) if (uMsg == WM_LBUTTONDBLCLK) { - //FIXME - //if (g_pTipbarWnd->m_dwUnknown20) - // g_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_SHOWNORMAL); + if (g_pTipbarWnd->m_dwUnknown20) + g_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_SHOWNORMAL); } else if (uMsg == WM_LBUTTONDOWN || uMsg == WM_RBUTTONDOWN) { - //FIXME - //g_pTipbarWnd->ShowContextMenu(m_ptCursor, &m_rcClient, uMsg == WM_RBUTTONDOWN); + g_pTipbarWnd->ShowContextMenu(m_ptCursor, &m_rcMenu, uMsg == WM_RBUTTONDOWN); } return TRUE; } @@ -3255,16 +3293,15 @@ HWND CTrayIconWnd::GetNotifyWnd() return m_hNotifyWnd; } -/// @unimplemented +/// @implemented BOOL CTrayIconWnd::OnIconMessage(UINT uMsg, WPARAM wParam, LPARAM lParam) { - //FIXME - //if (g_pTipbarWnd) - // g_pTipbarWnd->AttachFocusThread(); + if (g_pTipbarWnd) + g_pTipbarWnd->AttachFocusThread(); for (size_t iItem = 0; iItem < m_Items.size(); ++iItem) { - auto pItem = m_Items[iItem]; + auto *pItem = m_Items[iItem]; if (pItem) { if (uMsg == pItem->m_uCallbackMessage) @@ -3893,6 +3930,229 @@ STDMETHODIMP_(BOOL) CTipbarGripper::OnSetCursor(UINT uMsg, LONG x, LONG y) return CUIFGripper::OnSetCursor(uMsg, x, y); } +/*********************************************************************** + * CLangBarItemList + */ + +BOOL CLangBarItemList::IsStartedIntentionally(REFCLSID rclsid) +{ + auto *pItem = FindItem(rclsid); + if (!pItem) + return FALSE; + return pItem->m_bStartedIntentionally; +} + +LANGBARITEMSTATE *CLangBarItemList::AddItem(REFCLSID rclsid) +{ + auto *pItem = FindItem(rclsid); + if (pItem) + return pItem; + + pItem = Append(1); + if (!pItem) + return NULL; + + ZeroMemory(pItem, sizeof(*pItem)); + pItem->m_clsid = rclsid; + pItem->m_dwDemoteLevel = 0; + return pItem; +} + +void CLangBarItemList::Clear() +{ + clear(); + + CicRegKey regKey; + LSTATUS error; + error = regKey.Open(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\CTF\\LangBar", KEY_ALL_ACCESS); + if (error == ERROR_SUCCESS) + regKey.RecurseDeleteKey(L"ItemState"); +} + +BOOL CLangBarItemList::SetDemoteLevel(REFCLSID rclsid, DWORD dwDemoteLevel) +{ + auto *pItem = AddItem(rclsid); + if (!pItem) + return TRUE; + + pItem->m_dwDemoteLevel = dwDemoteLevel; + if (!pItem->IsShown()) + { + if (pItem->m_nTimerID) + { + if (g_pTipbarWnd) + g_pTipbarWnd->KillTimer(pItem->m_nTimerID); + pItem->m_nTimerID = 0; + pItem->m_uTimeOut = 0; + } + pItem->m_bDisableDemoting = FALSE; + } + + SaveItem(0, pItem); + return TRUE; +} + +LANGBARITEMSTATE *CLangBarItemList::FindItem(REFCLSID rclsid) +{ + for (size_t iItem = 0; iItem < size(); ++iItem) + { + auto& item = (*this)[iItem]; + if (IsEqualCLSID(item.m_clsid, rclsid)) + return &item; + } + return NULL; +} + +LANGBARITEMSTATE *CLangBarItemList::GetItemStateFromTimerId(UINT_PTR nTimerID) +{ + for (size_t iItem = 0; iItem < size(); ++iItem) + { + auto& item = (*this)[iItem]; + if (item.m_nTimerID == nTimerID) + return &item; + } + return NULL; +} + +void CLangBarItemList::Load() +{ + CicRegKey regKey; + LSTATUS error; + error = regKey.Open(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\CTF\\LangBar\\ItemState"); + if (error != ERROR_SUCCESS) + return; + + WCHAR szKeyName[MAX_PATH]; + for (DWORD dwIndex = 0; ; ++dwIndex) + { + error = ::RegEnumKeyW(regKey, dwIndex, szKeyName, _countof(szKeyName)); + if (error != ERROR_SUCCESS) + break; + + CLSID clsid; + if (::CLSIDFromString(szKeyName, &clsid) != S_OK) + continue; + + CicRegKey regKey2; + error = regKey2.Open(regKey, szKeyName); + if (error != ERROR_SUCCESS) + continue; + + auto *pItem = AddItem(clsid); + if (!pItem) + continue; + + DWORD Data = 0; + regKey2.QueryDword(L"DemoteLevel", &Data); + pItem->m_dwDemoteLevel = Data; + regKey2.QueryDword(L"DisableDemoting", &Data); + pItem->m_bDisableDemoting = !!Data; + } +} + +void CLangBarItemList::SaveItem(CicRegKey *pRegKey, const LANGBARITEMSTATE *pState) +{ + LSTATUS error; + CicRegKey regKey; + + if (!pRegKey) + { + error = regKey.Create(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\CTF\\LangBar\\ItemState"); + if (error != ERROR_SUCCESS) + return; + + pRegKey = ®Key; + } + + WCHAR szSubKey[MAX_PATH]; + ::StringFromGUID2(pState->m_clsid, szSubKey, _countof(szSubKey)); + + if (pState->m_dwDemoteLevel || pState->m_bDisableDemoting) + { + CicRegKey regKey2; + error = regKey2.Create(*pRegKey, szSubKey); + if (error == ERROR_SUCCESS) + { + DWORD dwDemoteLevel = pState->m_dwDemoteLevel; + if (dwDemoteLevel) + regKey2.SetDword(L"DemoteLevel", dwDemoteLevel); + else + regKey2.DeleteValue(L"DemoteLevel"); + + regKey2.SetDword(L"DisableDemoting", pState->m_bDisableDemoting); + } + } + else + { + pRegKey->RecurseDeleteKey(szSubKey); + } +} + +void CLangBarItemList::StartDemotingTimer(REFCLSID rclsid, BOOL bIntentional) +{ + if (!g_bIntelliSense) + return; + + auto *pItem = AddItem(rclsid); + if (!pItem || pItem->m_bDisableDemoting) + return; + + if (pItem->m_nTimerID) + { + if (!bIntentional) + return; + + if (g_pTipbarWnd) + g_pTipbarWnd->KillTimer(pItem->m_nTimerID); + + pItem->m_nTimerID = 0; + } + + pItem->m_bStartedIntentionally |= bIntentional; + + UINT uTimeOut = (bIntentional ? g_uTimeOutIntentional : g_uTimeOutNonIntentional); + pItem->m_uTimeOut += uTimeOut; + + if (pItem->m_uTimeOut < g_uTimeOutMax) + { + UINT_PTR uDemotingTimerId = FindDemotingTimerId(); + pItem->m_nTimerID = uDemotingTimerId; + if (uDemotingTimerId) + { + if (g_pTipbarWnd) + g_pTipbarWnd->SetTimer(uDemotingTimerId, uTimeOut); + } + } + else + { + pItem->m_bDisableDemoting = TRUE; + } +} + +UINT_PTR CLangBarItemList::FindDemotingTimerId() +{ + UINT_PTR nTimerID = 10000; + + if (empty()) + return nTimerID; + + for (;;) + { + size_t iItem = 0; + + while ((*this)[iItem].m_nTimerID != nTimerID) + { + ++iItem; + if (iItem >= size()) + return nTimerID; + } + + ++nTimerID; + if (nTimerID >= 10050) + return 0; + } +} + /*********************************************************************** * CTipbarWnd */ @@ -4358,7 +4618,7 @@ BOOL CTipbarWnd::CheckExcludeCaptionButtonMode(LPRECT prc1, LPCRECT prc2) void CTipbarWnd::ClearLBItemList() { - m_TipbarGUIDArray.clear(); + m_LangBarItemList.Clear(); if (m_pFocusThread) OnThreadItemChange(m_pFocusThread->m_dwThreadId); } @@ -5281,9 +5541,20 @@ STDMETHODIMP_(void) CTipbarWnd::OnTimer(WPARAM wParam) break; default: { - if ((10000 <= wParam) && (wParam <= 10049)) + if (10000 <= wParam && wParam < 10050) { - // FIXME: CLangBarItemList + auto *pItem = m_LangBarItemList.GetItemStateFromTimerId(wParam); + if (pItem) + { + auto& clsid = pItem->m_clsid; + m_LangBarItemList.SetDemoteLevel(pItem->m_clsid, 2); + if (m_pFocusThread) + { + auto *pThreadItem = m_pFocusThread->GetItem(clsid); + if (pThreadItem) + pThreadItem->AddRemoveMeToUI(FALSE); + } + } } break; } @@ -5624,6 +5895,17 @@ void CTipbarThread::RemoveUIObjs() RemoveAllSeparators(); } +CTipbarItem *CTipbarThread::GetItem(REFCLSID rclsid) +{ + for (size_t iItem = 0; iItem < m_UIObjects.size(); ++iItem) + { + auto *pItem = m_UIObjects[iItem]; + if (pItem && IsEqualCLSID(pItem->m_ItemInfo.guidItem, rclsid)) + return pItem; + } + return NULL; +} + void CTipbarThread::GetTextSize(BSTR bstr, LPSIZE pSize) { HWND hWnd = *m_pTipbarWnd->GetWindow(); diff --git a/dll/win32/shell32/CActiveDesktop.h b/dll/win32/shell32/CActiveDesktop.h index d11f751b26b..525295ecaff 100644 --- a/dll/win32/shell32/CActiveDesktop.h +++ b/dll/win32/shell32/CActiveDesktop.h @@ -23,30 +23,29 @@ class CActiveDesktop : virtual ~CActiveDesktop(); /*** IActiveDesktop methods ***/ - virtual HRESULT WINAPI ApplyChanges(DWORD dwFlags); - virtual HRESULT WINAPI GetWallpaper(PWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwFlags); - virtual HRESULT WINAPI SetWallpaper(PCWSTR pwszWallpaper, DWORD dwReserved); - virtual HRESULT WINAPI GetWallpaperOptions(LPWALLPAPEROPT pwpo, DWORD dwReserved); - virtual HRESULT WINAPI SetWallpaperOptions(LPCWALLPAPEROPT pwpo, DWORD dwReserved); - virtual HRESULT WINAPI GetPattern(PWSTR pwszPattern, UINT cchPattern, DWORD dwReserved); - virtual HRESULT WINAPI SetPattern(PCWSTR pwszPattern, DWORD dwReserved); - virtual HRESULT WINAPI GetDesktopItemOptions(LPCOMPONENTSOPT pco, DWORD dwReserved); - virtual HRESULT WINAPI SetDesktopItemOptions(LPCCOMPONENTSOPT pco, DWORD dwReserved); - virtual HRESULT WINAPI AddDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved); - virtual HRESULT WINAPI AddDesktopItemWithUI(HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved); - virtual HRESULT WINAPI ModifyDesktopItem(LPCCOMPONENT pcomp, DWORD dwFlags); - virtual HRESULT WINAPI RemoveDesktopItem(LPCCOMPONENT pcomp, DWORD dwReserved); - virtual HRESULT WINAPI GetDesktopItemCount(int *pcItems, DWORD dwReserved); - virtual HRESULT WINAPI GetDesktopItem(int nComponent, LPCOMPONENT pcomp, DWORD dwReserved); - virtual HRESULT WINAPI GetDesktopItemByID(ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved); - virtual HRESULT WINAPI GenerateDesktopItemHtml(PCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved); - virtual HRESULT WINAPI AddUrl(HWND hwnd, PCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags); - virtual HRESULT WINAPI GetDesktopItemBySource(PCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved); + STDMETHOD(ApplyChanges)(DWORD dwFlags) override; + STDMETHOD(GetWallpaper)(PWSTR pwszWallpaper, UINT cchWallpaper, DWORD dwFlags) override; + STDMETHOD(SetWallpaper)(PCWSTR pwszWallpaper, DWORD dwReserved) override; + STDMETHOD(GetWallpaperOptions)(LPWALLPAPEROPT pwpo, DWORD dwReserved) override; + STDMETHOD(SetWallpaperOptions)(LPCWALLPAPEROPT pwpo, DWORD dwReserved) override; + STDMETHOD(GetPattern)(PWSTR pwszPattern, UINT cchPattern, DWORD dwReserved) override; + STDMETHOD(SetPattern)(PCWSTR pwszPattern, DWORD dwReserved) override; + STDMETHOD(GetDesktopItemOptions)(LPCOMPONENTSOPT pco, DWORD dwReserved) override; + STDMETHOD(SetDesktopItemOptions)(LPCCOMPONENTSOPT pco, DWORD dwReserved) override; + STDMETHOD(AddDesktopItem)(LPCCOMPONENT pcomp, DWORD dwReserved) override; + STDMETHOD(AddDesktopItemWithUI)(HWND hwnd, LPCOMPONENT pcomp, DWORD dwReserved) override; + STDMETHOD(ModifyDesktopItem)(LPCCOMPONENT pcomp, DWORD dwFlags) override; + STDMETHOD(RemoveDesktopItem)(LPCCOMPONENT pcomp, DWORD dwReserved) override; + STDMETHOD(GetDesktopItemCount)(int *pcItems, DWORD dwReserved) override; + STDMETHOD(GetDesktopItem)(int nComponent, LPCOMPONENT pcomp, DWORD dwReserved) override; + STDMETHOD(GetDesktopItemByID)(ULONG_PTR dwID, LPCOMPONENT pcomp, DWORD dwReserved) override; + STDMETHOD(GenerateDesktopItemHtml)(PCWSTR pwszFileName, LPCOMPONENT pcomp, DWORD dwReserved) override; + STDMETHOD(AddUrl)(HWND hwnd, PCWSTR pszSource, LPCOMPONENT pcomp, DWORD dwFlags) override; + STDMETHOD(GetDesktopItemBySource)(PCWSTR pwszSource, LPCOMPONENT pcomp, DWORD dwReserved) override; /*** IPropertyBag methods ***/ - virtual HRESULT STDMETHODCALLTYPE Read(LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog); - virtual HRESULT STDMETHODCALLTYPE Write(LPCOLESTR pszPropName, VARIANT *pVar); - + STDMETHOD(Read)(LPCOLESTR pszPropName, VARIANT *pVar, IErrorLog *pErrorLog) override; + STDMETHOD(Write)(LPCOLESTR pszPropName, VARIANT *pVar) override; DECLARE_REGISTRY_RESOURCEID(IDR_ACTIVEDESKTOP) DECLARE_NOT_AGGREGATABLE(CActiveDesktop) diff --git a/dll/win32/shell32/CDefView.cpp b/dll/win32/shell32/CDefView.cpp index cc5d1624ff7..4eba53fb520 100644 --- a/dll/win32/shell32/CDefView.cpp +++ b/dll/win32/shell32/CDefView.cpp @@ -97,7 +97,7 @@ struct MenuCleanup class CDefView : public CWindowImpl, public CComObjectRootEx, - public IShellView2, + public IShellView3, public IFolderView, public IShellFolderView, public IOleCommandTarget, @@ -200,103 +200,112 @@ class CDefView : LRESULT OnExplorerCommand(UINT uCommand, BOOL bUseSelection); // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IShellView methods *** - virtual HRESULT STDMETHODCALLTYPE TranslateAccelerator(MSG *pmsg); - virtual HRESULT STDMETHODCALLTYPE EnableModeless(BOOL fEnable); - virtual HRESULT STDMETHODCALLTYPE UIActivate(UINT uState); - virtual HRESULT STDMETHODCALLTYPE Refresh(); - virtual HRESULT STDMETHODCALLTYPE CreateViewWindow(IShellView *psvPrevious, LPCFOLDERSETTINGS pfs, IShellBrowser *psb, RECT *prcView, HWND *phWnd); - virtual HRESULT STDMETHODCALLTYPE DestroyViewWindow(); - virtual HRESULT STDMETHODCALLTYPE GetCurrentInfo(LPFOLDERSETTINGS pfs); - virtual HRESULT STDMETHODCALLTYPE AddPropertySheetPages(DWORD dwReserved, LPFNSVADDPROPSHEETPAGE pfn, LPARAM lparam); - virtual HRESULT STDMETHODCALLTYPE SaveViewState(); - virtual HRESULT STDMETHODCALLTYPE SelectItem(PCUITEMID_CHILD pidlItem, SVSIF uFlags); - virtual HRESULT STDMETHODCALLTYPE GetItemObject(UINT uItem, REFIID riid, void **ppv); + STDMETHOD(TranslateAccelerator)(MSG *pmsg) override; + STDMETHOD(EnableModeless)(BOOL fEnable) override; + STDMETHOD(UIActivate)(UINT uState) override; + STDMETHOD(Refresh)() override; + STDMETHOD(CreateViewWindow)(IShellView *psvPrevious, LPCFOLDERSETTINGS pfs, IShellBrowser *psb, RECT *prcView, HWND *phWnd) override; + STDMETHOD(DestroyViewWindow)() override; + STDMETHOD(GetCurrentInfo)(LPFOLDERSETTINGS pfs) override; + STDMETHOD(AddPropertySheetPages)(DWORD dwReserved, LPFNSVADDPROPSHEETPAGE pfn, LPARAM lparam) override; + STDMETHOD(SaveViewState)() override; + STDMETHOD(SelectItem)(PCUITEMID_CHILD pidlItem, SVSIF uFlags) override; + STDMETHOD(GetItemObject)(UINT uItem, REFIID riid, void **ppv) override; // *** IShellView2 methods *** - virtual HRESULT STDMETHODCALLTYPE GetView(SHELLVIEWID *view_guid, ULONG view_type); - virtual HRESULT STDMETHODCALLTYPE CreateViewWindow2(LPSV2CVW2_PARAMS view_params); - virtual HRESULT STDMETHODCALLTYPE HandleRename(LPCITEMIDLIST new_pidl); - virtual HRESULT STDMETHODCALLTYPE SelectAndPositionItem(LPCITEMIDLIST item, UINT flags, POINT *point); + STDMETHOD(GetView)(SHELLVIEWID *view_guid, ULONG view_type) override; + STDMETHOD(CreateViewWindow2)(LPSV2CVW2_PARAMS view_params) override; + STDMETHOD(HandleRename)(LPCITEMIDLIST new_pidl) override; + STDMETHOD(SelectAndPositionItem)(LPCITEMIDLIST item, UINT flags, POINT *point) override; // *** IShellView3 methods *** - virtual HRESULT STDMETHODCALLTYPE CreateViewWindow3(IShellBrowser *psb, IShellView *psvPrevious, SV3CVW3_FLAGS view_flags, FOLDERFLAGS mask, FOLDERFLAGS flags, FOLDERVIEWMODE mode, const SHELLVIEWID *view_id, RECT *prcView, HWND *hwnd); + STDMETHOD(CreateViewWindow3)( + IShellBrowser *psb, + IShellView *psvPrevious, + SV3CVW3_FLAGS view_flags, + FOLDERFLAGS mask, + FOLDERFLAGS flags, + FOLDERVIEWMODE mode, + const SHELLVIEWID *view_id, + const RECT *prcView, + HWND *hwnd) override; // *** IFolderView methods *** - virtual HRESULT STDMETHODCALLTYPE GetCurrentViewMode(UINT *pViewMode); - virtual HRESULT STDMETHODCALLTYPE SetCurrentViewMode(UINT ViewMode); - virtual HRESULT STDMETHODCALLTYPE GetFolder(REFIID riid, void **ppv); - virtual HRESULT STDMETHODCALLTYPE Item(int iItemIndex, PITEMID_CHILD *ppidl); - virtual HRESULT STDMETHODCALLTYPE ItemCount(UINT uFlags, int *pcItems); - virtual HRESULT STDMETHODCALLTYPE Items(UINT uFlags, REFIID riid, void **ppv); - virtual HRESULT STDMETHODCALLTYPE GetSelectionMarkedItem(int *piItem); - virtual HRESULT STDMETHODCALLTYPE GetFocusedItem(int *piItem); - virtual HRESULT STDMETHODCALLTYPE GetItemPosition(PCUITEMID_CHILD pidl, POINT *ppt); - virtual HRESULT STDMETHODCALLTYPE GetSpacing(POINT *ppt); - virtual HRESULT STDMETHODCALLTYPE GetDefaultSpacing(POINT *ppt); - virtual HRESULT STDMETHODCALLTYPE GetAutoArrange(); - virtual HRESULT STDMETHODCALLTYPE SelectItem(int iItem, DWORD dwFlags); - virtual HRESULT STDMETHODCALLTYPE SelectAndPositionItems(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, POINT *apt, DWORD dwFlags); + STDMETHOD(GetCurrentViewMode)(UINT *pViewMode) override; + STDMETHOD(SetCurrentViewMode)(UINT ViewMode) override; + STDMETHOD(GetFolder)(REFIID riid, void **ppv) override; + STDMETHOD(Item)(int iItemIndex, PITEMID_CHILD *ppidl) override; + STDMETHOD(ItemCount)(UINT uFlags, int *pcItems) override; + STDMETHOD(Items)(UINT uFlags, REFIID riid, void **ppv) override; + STDMETHOD(GetSelectionMarkedItem)(int *piItem) override; + STDMETHOD(GetFocusedItem)(int *piItem) override; + STDMETHOD(GetItemPosition)(PCUITEMID_CHILD pidl, POINT *ppt) override; + STDMETHOD(GetSpacing)(POINT *ppt) override; + STDMETHOD(GetDefaultSpacing)(POINT *ppt) override; + STDMETHOD(GetAutoArrange)() override; + STDMETHOD(SelectItem)(int iItem, DWORD dwFlags) override; + STDMETHOD(SelectAndPositionItems)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, POINT *apt, DWORD dwFlags) override; // *** IShellFolderView methods *** - virtual HRESULT STDMETHODCALLTYPE Rearrange(LPARAM sort); - virtual HRESULT STDMETHODCALLTYPE GetArrangeParam(LPARAM *sort); - virtual HRESULT STDMETHODCALLTYPE ArrangeGrid(); - virtual HRESULT STDMETHODCALLTYPE AutoArrange(); - virtual HRESULT STDMETHODCALLTYPE AddObject(PITEMID_CHILD pidl, UINT *item); - virtual HRESULT STDMETHODCALLTYPE GetObject(PITEMID_CHILD *pidl, UINT item); - virtual HRESULT STDMETHODCALLTYPE RemoveObject(PITEMID_CHILD pidl, UINT *item); - virtual HRESULT STDMETHODCALLTYPE GetObjectCount(UINT *count); - virtual HRESULT STDMETHODCALLTYPE SetObjectCount(UINT count, UINT flags); - virtual HRESULT STDMETHODCALLTYPE UpdateObject(PITEMID_CHILD pidl_old, PITEMID_CHILD pidl_new, UINT *item); - virtual HRESULT STDMETHODCALLTYPE RefreshObject(PITEMID_CHILD pidl, UINT *item); - virtual HRESULT STDMETHODCALLTYPE SetRedraw(BOOL redraw); - virtual HRESULT STDMETHODCALLTYPE GetSelectedCount(UINT *count); - virtual HRESULT STDMETHODCALLTYPE GetSelectedObjects(PCUITEMID_CHILD **pidl, UINT *items); - virtual HRESULT STDMETHODCALLTYPE IsDropOnSource(IDropTarget *drop_target); - virtual HRESULT STDMETHODCALLTYPE GetDragPoint(POINT *pt); - virtual HRESULT STDMETHODCALLTYPE GetDropPoint(POINT *pt); - virtual HRESULT STDMETHODCALLTYPE MoveIcons(IDataObject *obj); - virtual HRESULT STDMETHODCALLTYPE SetItemPos(PCUITEMID_CHILD pidl, POINT *pt); - virtual HRESULT STDMETHODCALLTYPE IsBkDropTarget(IDropTarget *drop_target); - virtual HRESULT STDMETHODCALLTYPE SetClipboard(BOOL move); - virtual HRESULT STDMETHODCALLTYPE SetPoints(IDataObject *obj); - virtual HRESULT STDMETHODCALLTYPE GetItemSpacing(ITEMSPACING *spacing); - virtual HRESULT STDMETHODCALLTYPE SetCallback(IShellFolderViewCB *new_cb, IShellFolderViewCB **old_cb); - virtual HRESULT STDMETHODCALLTYPE Select(UINT flags); - virtual HRESULT STDMETHODCALLTYPE QuerySupport(UINT *support); - virtual HRESULT STDMETHODCALLTYPE SetAutomationObject(IDispatch *disp); + STDMETHOD(Rearrange)(LPARAM sort) override; + STDMETHOD(GetArrangeParam)(LPARAM *sort) override; + STDMETHOD(ArrangeGrid)() override; + STDMETHOD(AutoArrange)() override; + STDMETHOD(AddObject)(PITEMID_CHILD pidl, UINT *item) override; + STDMETHOD(GetObject)(PITEMID_CHILD *pidl, UINT item) override; + STDMETHOD(RemoveObject)(PITEMID_CHILD pidl, UINT *item) override; + STDMETHOD(GetObjectCount)(UINT *count) override; + STDMETHOD(SetObjectCount)(UINT count, UINT flags) override; + STDMETHOD(UpdateObject)(PITEMID_CHILD pidl_old, PITEMID_CHILD pidl_new, UINT *item) override; + STDMETHOD(RefreshObject)(PITEMID_CHILD pidl, UINT *item) override; + STDMETHOD(SetRedraw)(BOOL redraw) override; + STDMETHOD(GetSelectedCount)(UINT *count) override; + STDMETHOD(GetSelectedObjects)(PCUITEMID_CHILD **pidl, UINT *items) override; + STDMETHOD(IsDropOnSource)(IDropTarget *drop_target) override; + STDMETHOD(GetDragPoint)(POINT *pt) override; + STDMETHOD(GetDropPoint)(POINT *pt) override; + STDMETHOD(MoveIcons)(IDataObject *obj) override; + STDMETHOD(SetItemPos)(PCUITEMID_CHILD pidl, POINT *pt) override; + STDMETHOD(IsBkDropTarget)(IDropTarget *drop_target) override; + STDMETHOD(SetClipboard)(BOOL move) override; + STDMETHOD(SetPoints)(IDataObject *obj) override; + STDMETHOD(GetItemSpacing)(ITEMSPACING *spacing) override; + STDMETHOD(SetCallback)(IShellFolderViewCB *new_cb, IShellFolderViewCB **old_cb) override; + STDMETHOD(Select)(UINT flags) override; + STDMETHOD(QuerySupport)(UINT *support) override; + STDMETHOD(SetAutomationObject)(IDispatch *disp) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IDropTarget methods *** - virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragLeave(); - virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect); + STDMETHOD(DragEnter)(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragOver)(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragLeave)() override; + STDMETHOD(Drop)(IDataObject *pDataObj, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override; // *** IDropSource methods *** - virtual HRESULT STDMETHODCALLTYPE QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState); - virtual HRESULT STDMETHODCALLTYPE GiveFeedback(DWORD dwEffect); + STDMETHOD(QueryContinueDrag)(BOOL fEscapePressed, DWORD grfKeyState) override; + STDMETHOD(GiveFeedback)(DWORD dwEffect) override; // *** IViewObject methods *** - virtual HRESULT STDMETHODCALLTYPE Draw(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, + STDMETHOD(Draw)(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DVTARGETDEVICE *ptd, HDC hdcTargetDev, HDC hdcDraw, LPCRECTL lprcBounds, LPCRECTL lprcWBounds, - BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue); - virtual HRESULT STDMETHODCALLTYPE GetColorSet(DWORD dwDrawAspect, LONG lindex, void *pvAspect, - DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet); - virtual HRESULT STDMETHODCALLTYPE Freeze(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze); - virtual HRESULT STDMETHODCALLTYPE Unfreeze(DWORD dwFreeze); - virtual HRESULT STDMETHODCALLTYPE SetAdvise(DWORD aspects, DWORD advf, IAdviseSink *pAdvSink); - virtual HRESULT STDMETHODCALLTYPE GetAdvise(DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink); + BOOL (STDMETHODCALLTYPE *pfnContinue)(ULONG_PTR dwContinue), ULONG_PTR dwContinue) override; + STDMETHOD(GetColorSet)(DWORD dwDrawAspect, LONG lindex, void *pvAspect, + DVTARGETDEVICE *ptd, HDC hicTargetDev, LOGPALETTE **ppColorSet) override; + STDMETHOD(Freeze)(DWORD dwDrawAspect, LONG lindex, void *pvAspect, DWORD *pdwFreeze) override; + STDMETHOD(Unfreeze)(DWORD dwFreeze) override; + STDMETHOD(SetAdvise)(DWORD aspects, DWORD advf, IAdviseSink *pAdvSink) override; + STDMETHOD(GetAdvise)(DWORD *pAspects, DWORD *pAdvf, IAdviseSink **ppAdvSink) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // Message handlers LRESULT OnShowWindow(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); @@ -383,6 +392,7 @@ class CDefView : COM_INTERFACE_ENTRY_IID(IID_IShellView, IShellView) COM_INTERFACE_ENTRY_IID(IID_CDefView, IShellView) COM_INTERFACE_ENTRY_IID(IID_IShellView2, IShellView2) + COM_INTERFACE_ENTRY_IID(IID_IShellView3, IShellView3) COM_INTERFACE_ENTRY_IID(IID_IFolderView, IFolderView) COM_INTERFACE_ENTRY_IID(IID_IShellFolderView, IShellFolderView) COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget) @@ -2901,7 +2911,7 @@ HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow2(LPSV2CVW2_PARAMS view_para (FOLDERVIEWMODE)view_params->pfs->ViewMode, view_params->pvid, view_params->prcView, &view_params->hwndView); } -HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow3(IShellBrowser *psb, IShellView *psvPrevious, SV3CVW3_FLAGS view_flags, FOLDERFLAGS mask, FOLDERFLAGS flags, FOLDERVIEWMODE mode, const SHELLVIEWID *view_id, RECT *prcView, HWND *hwnd) +HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow3(IShellBrowser *psb, IShellView *psvPrevious, SV3CVW3_FLAGS view_flags, FOLDERFLAGS mask, FOLDERFLAGS flags, FOLDERVIEWMODE mode, const SHELLVIEWID *view_id, const RECT *prcView, HWND *hwnd) { OLEMENUGROUPWIDTHS omw = { { 0, 0, 0, 0, 0, 0 } }; @@ -2953,7 +2963,8 @@ HRESULT STDMETHODCALLTYPE CDefView::CreateViewWindow3(IShellBrowser *psb, IShell TRACE("-- CommDlgBrowser\n"); } - Create(m_hWndParent, prcView, NULL, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP, 0, 0U); + RECT rcView = *prcView; + Create(m_hWndParent, rcView, NULL, WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_TABSTOP, 0, 0U); if (m_hWnd == NULL) return E_FAIL; diff --git a/dll/win32/shell32/CDefViewBckgrndMenu.cpp b/dll/win32/shell32/CDefViewBckgrndMenu.cpp index 70abed2e754..9dd27c64092 100644 --- a/dll/win32/shell32/CDefViewBckgrndMenu.cpp +++ b/dll/win32/shell32/CDefViewBckgrndMenu.cpp @@ -31,19 +31,19 @@ class CDefViewBckgrndMenu : HRESULT Initialize(IShellFolder* psf); // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + STDMETHOD(QueryContextMenu)(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpcmi) override; + STDMETHOD(GetCommandString)(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override; // IContextMenu2 - virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(HandleMenuMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; // IContextMenu3 - virtual HRESULT WINAPI HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult); + STDMETHOD(HandleMenuMsg2)(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) override; // IObjectWithSite - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; BEGIN_COM_MAP(CDefViewBckgrndMenu) COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) diff --git a/dll/win32/shell32/CDefViewDual.cpp b/dll/win32/shell32/CDefViewDual.cpp index 11f5e02c338..10386b8a7c3 100644 --- a/dll/win32/shell32/CDefViewDual.cpp +++ b/dll/win32/shell32/CDefViewDual.cpp @@ -43,14 +43,14 @@ class CDefViewDual : } // *** IShellFolderViewDual methods *** - virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **app) override + STDMETHOD(get_Application)(IDispatch **app) override { if (!app) return E_INVALIDARG; return CShellDispatch_Constructor(IID_IDispatch, (LPVOID*)app); } - virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **parent) override + STDMETHOD(get_Parent)(IDispatch **parent) override { if (!parent) return E_INVALIDARG; *parent = NULL; @@ -58,7 +58,7 @@ class CDefViewDual : return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_Folder(Folder **folder) override + STDMETHOD(get_Folder)(Folder **folder) override { if (!folder) return E_INVALIDARG; *folder = NULL; @@ -66,7 +66,7 @@ class CDefViewDual : return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE SelectedItems(FolderItems **items) override + STDMETHOD(SelectedItems)(FolderItems **items) override { if (!items) return E_INVALIDARG; *items = NULL; @@ -74,7 +74,7 @@ class CDefViewDual : return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_FocusedItem(FolderItem **item) override + STDMETHOD(get_FocusedItem)(FolderItem **item) override { if (!item) return E_INVALIDARG; *item = NULL; @@ -82,44 +82,44 @@ class CDefViewDual : return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE SelectItem(VARIANT *item, int flags) override + STDMETHOD(SelectItem)(VARIANT *item, int flags) override { FIXME("CDefViewDual::SelectItem is UNIMPLEMENTED (%p, %p, %i)\n", this, item, flags); return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE PopupItemMenu(FolderItem *item, VARIANT vx, VARIANT vy, BSTR *command) override + STDMETHOD(PopupItemMenu)(FolderItem *item, VARIANT vx, VARIANT vy, BSTR *command) override { FIXME("CDefViewDual::PopupItemMenu is UNIMPLEMENTED (%p, %p, %s, %s, %p)\n", this, item, wine_dbgstr_variant(&vx), wine_dbgstr_variant(&vy), command); return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_Script(IDispatch **script) override + STDMETHOD(get_Script)(IDispatch **script) override { FIXME("CDefViewDual::get_Script is UNIMPLEMENTED (%p, %p)\n", this, script); return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE get_ViewOptions(long *options) override + STDMETHOD(get_ViewOptions)(long *options) override { FIXME("CDefViewDual::get_ViewOptions is UNIMPLEMENTED (%p, %p)\n", this, options); return E_NOTIMPL; } // *** IShellFolderViewDual2 methods *** - virtual HRESULT STDMETHODCALLTYPE get_CurrentViewMode(UINT *mode) override + STDMETHOD(get_CurrentViewMode)(UINT *mode) override { FIXME("CDefViewDual::get_CurrentViewMode is UNIMPLEMENTED (%p, %p)\n", this, mode); return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE put_CurrentViewMode(UINT mode) override + STDMETHOD(put_CurrentViewMode)(UINT mode) override { FIXME("CDefViewDual::put_CurrentViewMode is UNIMPLEMENTED (%p, %u)\n", this, mode); return E_NOTIMPL; } - virtual HRESULT STDMETHODCALLTYPE SelectItemRelative(int relative) override + STDMETHOD(SelectItemRelative)(int relative) override { FIXME("CDefViewDual::SelectItemRelative is UNIMPLEMENTED (%p, %i)\n", this, relative); return E_NOTIMPL; diff --git a/dll/win32/shell32/CDefaultContextMenu.cpp b/dll/win32/shell32/CDefaultContextMenu.cpp index 4d0f34a47d4..cfd43b95ae9 100644 --- a/dll/win32/shell32/CDefaultContextMenu.cpp +++ b/dll/win32/shell32/CDefaultContextMenu.cpp @@ -128,19 +128,19 @@ class CDefaultContextMenu : HRESULT WINAPI Initialize(const DEFCONTEXTMENU *pdcm, LPFNDFMCALLBACK lpfn); // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + STDMETHOD(QueryContextMenu)(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpcmi) override; + STDMETHOD(GetCommandString)(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override; // IContextMenu2 - virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(HandleMenuMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; // IContextMenu3 - virtual HRESULT WINAPI HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult); + STDMETHOD(HandleMenuMsg2)(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) override; // IObjectWithSite - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; BEGIN_COM_MAP(CDefaultContextMenu) COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) diff --git a/dll/win32/shell32/CDropTargetHelper.h b/dll/win32/shell32/CDropTargetHelper.h index 5cc7de9b8a3..ae5974dde0b 100644 --- a/dll/win32/shell32/CDropTargetHelper.h +++ b/dll/win32/shell32/CDropTargetHelper.h @@ -37,11 +37,11 @@ class CDropTargetHelper : virtual HRESULT WINAPI InitializeFromBitmap(LPSHDRAGIMAGE pshdi, IDataObject *pDataObject); virtual HRESULT WINAPI InitializeFromWindow(HWND hwnd, POINT *ppt, IDataObject *pDataObject); - virtual HRESULT WINAPI DragEnter (HWND hwndTarget, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect); - virtual HRESULT WINAPI DragLeave(); - virtual HRESULT WINAPI DragOver(POINT *ppt, DWORD dwEffect); - virtual HRESULT WINAPI Drop(IDataObject* pDataObject, POINT* ppt, DWORD dwEffect); - virtual HRESULT WINAPI Show(BOOL fShow); + STDMETHOD(DragEnter)(HWND hwndTarget, IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) override; + STDMETHOD(DragLeave)() override; + STDMETHOD(DragOver)(POINT *ppt, DWORD dwEffect) override; + STDMETHOD(Drop)(IDataObject* pDataObject, POINT* ppt, DWORD dwEffect) override; + STDMETHOD(Show)(BOOL fShow) override; DECLARE_REGISTRY_RESOURCEID(IDR_DRAGDROPHELPER) DECLARE_NOT_AGGREGATABLE(CDropTargetHelper) diff --git a/dll/win32/shell32/CEnumIDListBase.h b/dll/win32/shell32/CEnumIDListBase.h index 262a82461b2..65ec9058c42 100644 --- a/dll/win32/shell32/CEnumIDListBase.h +++ b/dll/win32/shell32/CEnumIDListBase.h @@ -40,10 +40,10 @@ class CEnumIDListBase : HRESULT AppendItemsFromEnumerator(IEnumIDList* pEnum); // *** IEnumIDList methods *** - virtual HRESULT STDMETHODCALLTYPE Next(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched); - virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt); - virtual HRESULT STDMETHODCALLTYPE Reset(); - virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum); + STDMETHOD(Next)(ULONG celt, LPITEMIDLIST *rgelt, ULONG *pceltFetched) override; + STDMETHOD(Skip)(ULONG celt) override; + STDMETHOD(Reset)() override; + STDMETHOD(Clone)(IEnumIDList **ppenum) override; BEGIN_COM_MAP(CEnumIDListBase) COM_INTERFACE_ENTRY_IID(IID_IEnumIDList, IEnumIDList) diff --git a/dll/win32/shell32/CExtractIcon.cpp b/dll/win32/shell32/CExtractIcon.cpp index e82dfec4999..aa8a6a00b75 100644 --- a/dll/win32/shell32/CExtractIcon.cpp +++ b/dll/win32/shell32/CExtractIcon.cpp @@ -35,30 +35,30 @@ class CExtractIcon : ~CExtractIcon(); // IDefaultExtractIconInit - virtual HRESULT STDMETHODCALLTYPE SetDefaultIcon(LPCWSTR pszFile, int iIcon); - virtual HRESULT STDMETHODCALLTYPE SetFlags(UINT uFlags); - virtual HRESULT STDMETHODCALLTYPE SetKey(HKEY hkey); - virtual HRESULT STDMETHODCALLTYPE SetNormalIcon(LPCWSTR pszFile, int iIcon); - virtual HRESULT STDMETHODCALLTYPE SetOpenIcon(LPCWSTR pszFile, int iIcon); - virtual HRESULT STDMETHODCALLTYPE SetShortcutIcon(LPCWSTR pszFile, int iIcon); + STDMETHOD(SetDefaultIcon)(LPCWSTR pszFile, int iIcon) override; + STDMETHOD(SetFlags)(UINT uFlags) override; + STDMETHOD(SetKey)(HKEY hkey) override; + STDMETHOD(SetNormalIcon)(LPCWSTR pszFile, int iIcon) override; + STDMETHOD(SetOpenIcon)(LPCWSTR pszFile, int iIcon) override; + STDMETHOD(SetShortcutIcon)(LPCWSTR pszFile, int iIcon) override; // IExtractIconW - virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, LPWSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags); - virtual HRESULT STDMETHODCALLTYPE Extract(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); + STDMETHOD(GetIconLocation)(UINT uFlags, LPWSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags) override; + STDMETHOD(Extract)(LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) override; // IExtractIconA - virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, LPSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags); - virtual HRESULT STDMETHODCALLTYPE Extract(LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); + STDMETHOD(GetIconLocation)(UINT uFlags, LPSTR szIconFile, UINT cchMax, int *piIndex, UINT *pwFlags) override; + STDMETHOD(Extract)(LPCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) override; // IPersist - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); - virtual HRESULT STDMETHODCALLTYPE IsDirty(); + STDMETHOD(GetClassID)(CLSID *pClassID) override; + STDMETHOD(IsDirty)() override; // IPersistFile - virtual HRESULT STDMETHODCALLTYPE Load(LPCOLESTR pszFileName, DWORD dwMode); - virtual HRESULT STDMETHODCALLTYPE Save(LPCOLESTR pszFileName, BOOL fRemember); - virtual HRESULT STDMETHODCALLTYPE SaveCompleted(LPCOLESTR pszFileName); - virtual HRESULT STDMETHODCALLTYPE GetCurFile(LPOLESTR *ppszFileName); + STDMETHOD(Load)(LPCOLESTR pszFileName, DWORD dwMode) override; + STDMETHOD(Save)(LPCOLESTR pszFileName, BOOL fRemember) override; + STDMETHOD(SaveCompleted)(LPCOLESTR pszFileName) override; + STDMETHOD(GetCurFile)(LPOLESTR *ppszFileName) override; BEGIN_COM_MAP(CExtractIcon) COM_INTERFACE_ENTRY_IID(IID_IDefaultExtractIconInit, IDefaultExtractIconInit) diff --git a/dll/win32/shell32/CFileSysBindData.cpp b/dll/win32/shell32/CFileSysBindData.cpp index c558033a8ac..035dcc1d374 100644 --- a/dll/win32/shell32/CFileSysBindData.cpp +++ b/dll/win32/shell32/CFileSysBindData.cpp @@ -38,8 +38,8 @@ class CFileSysBindData : ~CFileSysBindData(); // *** IFileSystemBindData methods *** - virtual HRESULT STDMETHODCALLTYPE SetFindData(const WIN32_FIND_DATAW *pfd); - virtual HRESULT STDMETHODCALLTYPE GetFindData(WIN32_FIND_DATAW *pfd); + STDMETHOD(SetFindData)(const WIN32_FIND_DATAW *pfd) override; + STDMETHOD(GetFindData)(WIN32_FIND_DATAW *pfd) override; DECLARE_NOT_AGGREGATABLE(CFileSysBindData) DECLARE_PROTECT_FINAL_CONSTRUCT() diff --git a/dll/win32/shell32/CFolder.h b/dll/win32/shell32/CFolder.h index df0d482b432..49aa690fef4 100644 --- a/dll/win32/shell32/CFolder.h +++ b/dll/win32/shell32/CFolder.h @@ -27,23 +27,23 @@ class CFolder: HRESULT Initialize(LPITEMIDLIST idlist); // *** Folder methods *** - virtual HRESULT STDMETHODCALLTYPE get_Title(BSTR *pbs); - virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_ParentFolder(Folder **ppsf); - virtual HRESULT STDMETHODCALLTYPE Items(FolderItems **ppid); - virtual HRESULT STDMETHODCALLTYPE ParseName(BSTR bName, FolderItem **ppid); - virtual HRESULT STDMETHODCALLTYPE NewFolder(BSTR bName, VARIANT vOptions); - virtual HRESULT STDMETHODCALLTYPE MoveHere(VARIANT vItem, VARIANT vOptions); - virtual HRESULT STDMETHODCALLTYPE CopyHere(VARIANT vItem, VARIANT vOptions); - virtual HRESULT STDMETHODCALLTYPE GetDetailsOf(VARIANT vItem, int iColumn, BSTR *pbs); + STDMETHOD(get_Title)(BSTR *pbs) override; + STDMETHOD(get_Application)(IDispatch **ppid) override; + STDMETHOD(get_Parent)(IDispatch **ppid) override; + STDMETHOD(get_ParentFolder)(Folder **ppsf) override; + STDMETHOD(Items)(FolderItems **ppid) override; + STDMETHOD(ParseName)(BSTR bName, FolderItem **ppid) override; + STDMETHOD(NewFolder)(BSTR bName, VARIANT vOptions) override; + STDMETHOD(MoveHere)(VARIANT vItem, VARIANT vOptions) override; + STDMETHOD(CopyHere)(VARIANT vItem, VARIANT vOptions) override; + STDMETHOD(GetDetailsOf)(VARIANT vItem, int iColumn, BSTR *pbs) override; // *** Folder2 methods *** - virtual HRESULT STDMETHODCALLTYPE get_Self(FolderItem **ppfi); - virtual HRESULT STDMETHODCALLTYPE get_OfflineStatus(LONG *pul); - virtual HRESULT STDMETHODCALLTYPE Synchronize(); - virtual HRESULT STDMETHODCALLTYPE get_HaveToShowWebViewBarricade(VARIANT_BOOL *pbHaveToShowWebViewBarricade); - virtual HRESULT STDMETHODCALLTYPE DismissedWebViewBarricade(); + STDMETHOD(get_Self)(FolderItem **ppfi) override; + STDMETHOD(get_OfflineStatus)(LONG *pul) override; + STDMETHOD(Synchronize)() override; + STDMETHOD(get_HaveToShowWebViewBarricade)(VARIANT_BOOL *pbHaveToShowWebViewBarricade) override; + STDMETHOD(DismissedWebViewBarricade)() override; DECLARE_NOT_AGGREGATABLE(CFolder) DECLARE_PROTECT_FINAL_CONSTRUCT() diff --git a/dll/win32/shell32/CFolderItemVerbs.h b/dll/win32/shell32/CFolderItemVerbs.h index 58bb89ba5e1..f42e4c13880 100644 --- a/dll/win32/shell32/CFolderItemVerbs.h +++ b/dll/win32/shell32/CFolderItemVerbs.h @@ -37,10 +37,10 @@ class CFolderItemVerb: void Init(IContextMenu* menu, BSTR name); // *** FolderItemVerb methods *** - virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_Name(BSTR *pbs); - virtual HRESULT STDMETHODCALLTYPE DoIt(); + STDMETHOD(get_Application)(IDispatch **ppid) override; + STDMETHOD(get_Parent)(IDispatch **ppid) override; + STDMETHOD(get_Name)(BSTR *pbs) override; + STDMETHOD(DoIt)() override; DECLARE_NOT_AGGREGATABLE(CFolderItemVerb) @@ -70,11 +70,11 @@ class CFolderItemVerbs: HRESULT Init(LPITEMIDLIST idlist); // *** FolderItemVerbs methods *** - virtual HRESULT STDMETHODCALLTYPE get_Count(LONG *plCount); - virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE Item(VARIANT index, FolderItemVerb **ppid); - virtual HRESULT STDMETHODCALLTYPE _NewEnum(IUnknown **ppunk); + STDMETHOD(get_Count)(LONG *plCount) override; + STDMETHOD(get_Application)(IDispatch **ppid) override; + STDMETHOD(get_Parent)(IDispatch **ppid) override; + STDMETHOD(Item)(VARIANT index, FolderItemVerb **ppid) override; + STDMETHOD(_NewEnum)(IUnknown **ppunk) override; DECLARE_NOT_AGGREGATABLE(CFolderItemVerbs) DECLARE_PROTECT_FINAL_CONSTRUCT() diff --git a/dll/win32/shell32/CFolderItems.h b/dll/win32/shell32/CFolderItems.h index ce339646dbc..cf62bec2955 100644 --- a/dll/win32/shell32/CFolderItems.h +++ b/dll/win32/shell32/CFolderItems.h @@ -24,25 +24,24 @@ class CFolderItem: HRESULT Initialize(Folder* folder, LPITEMIDLIST idlist); - // *** FolderItem methods *** - virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_Name(BSTR *pbs); - virtual HRESULT STDMETHODCALLTYPE put_Name(BSTR bs); - virtual HRESULT STDMETHODCALLTYPE get_Path(BSTR *pbs); - virtual HRESULT STDMETHODCALLTYPE get_GetLink(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_GetFolder(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_IsLink(VARIANT_BOOL *pb); - virtual HRESULT STDMETHODCALLTYPE get_IsFolder(VARIANT_BOOL *pb); - virtual HRESULT STDMETHODCALLTYPE get_IsFileSystem(VARIANT_BOOL *pb); - virtual HRESULT STDMETHODCALLTYPE get_IsBrowsable(VARIANT_BOOL *pb); - virtual HRESULT STDMETHODCALLTYPE get_ModifyDate(DATE *pdt); - virtual HRESULT STDMETHODCALLTYPE put_ModifyDate(DATE dt); - virtual HRESULT STDMETHODCALLTYPE get_Size(LONG *pul); - virtual HRESULT STDMETHODCALLTYPE get_Type(BSTR *pbs); - virtual HRESULT STDMETHODCALLTYPE Verbs(FolderItemVerbs **ppfic); - virtual HRESULT STDMETHODCALLTYPE InvokeVerb(VARIANT vVerb); + STDMETHOD(get_Application)(IDispatch **ppid) override; + STDMETHOD(get_Parent)(IDispatch **ppid) override; + STDMETHOD(get_Name)(BSTR *pbs) override; + STDMETHOD(put_Name)(BSTR bs) override; + STDMETHOD(get_Path)(BSTR *pbs) override; + STDMETHOD(get_GetLink)(IDispatch **ppid) override; + STDMETHOD(get_GetFolder)(IDispatch **ppid) override; + STDMETHOD(get_IsLink)(VARIANT_BOOL *pb) override; + STDMETHOD(get_IsFolder)(VARIANT_BOOL *pb) override; + STDMETHOD(get_IsFileSystem)(VARIANT_BOOL *pb) override; + STDMETHOD(get_IsBrowsable)(VARIANT_BOOL *pb) override; + STDMETHOD(get_ModifyDate)(DATE *pdt) override; + STDMETHOD(put_ModifyDate)(DATE dt) override; + STDMETHOD(get_Size)(LONG *pul) override; + STDMETHOD(get_Type)(BSTR *pbs) override; + STDMETHOD(Verbs)(FolderItemVerbs **ppfic) override; + STDMETHOD(InvokeVerb)(VARIANT vVerb) override; DECLARE_NOT_AGGREGATABLE(CFolderItem) @@ -73,11 +72,11 @@ class CFolderItems: HRESULT Initialize(LPITEMIDLIST idlist, Folder* parent); // *** FolderItems methods *** - virtual HRESULT STDMETHODCALLTYPE get_Count(long *plCount); - virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE Item(VARIANT index, FolderItem **ppid); - virtual HRESULT STDMETHODCALLTYPE _NewEnum(IUnknown **ppunk); + STDMETHOD(get_Count)(long *plCount) override; + STDMETHOD(get_Application)(IDispatch **ppid) override; + STDMETHOD(get_Parent)(IDispatch **ppid) override; + STDMETHOD(Item)(VARIANT index, FolderItem **ppid) override; + STDMETHOD(_NewEnum)(IUnknown **ppunk) override; DECLARE_NOT_AGGREGATABLE(CFolderItems) DECLARE_PROTECT_FINAL_CONSTRUCT() diff --git a/dll/win32/shell32/CFolderOptions.h b/dll/win32/shell32/CFolderOptions.h index ac2d0b05d89..8f023768a75 100644 --- a/dll/win32/shell32/CFolderOptions.h +++ b/dll/win32/shell32/CFolderOptions.h @@ -43,15 +43,15 @@ class CFolderOptions : ~CFolderOptions(); // IShellPropSheetExt - virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam); + STDMETHOD(AddPages)(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override; + STDMETHOD(ReplacePage)(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam) override; // IShellExtInit - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override; // IObjectWithSite - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; DECLARE_REGISTRY_RESOURCEID(IDR_FOLDEROPTIONS) DECLARE_NOT_AGGREGATABLE(CFolderOptions) diff --git a/dll/win32/shell32/CIDLDataObj.cpp b/dll/win32/shell32/CIDLDataObj.cpp index bbbd959528e..1c2744d4c96 100644 --- a/dll/win32/shell32/CIDLDataObj.cpp +++ b/dll/win32/shell32/CIDLDataObj.cpp @@ -28,10 +28,10 @@ class IEnumFORMATETCImpl : HRESULT WINAPI Initialize(UINT cfmt, const FORMATETC afmt[]); // ***************** - virtual HRESULT WINAPI Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFethed); - virtual HRESULT WINAPI Skip(ULONG celt); - virtual HRESULT WINAPI Reset(); - virtual HRESULT WINAPI Clone(LPENUMFORMATETC* ppenum); + STDMETHOD(Next)(ULONG celt, FORMATETC *rgelt, ULONG *pceltFethed) override; + STDMETHOD(Skip)(ULONG celt) override; + STDMETHOD(Reset)() override; + STDMETHOD(Clone)(LPENUMFORMATETC* ppenum) override; BEGIN_COM_MAP(IEnumFORMATETCImpl) COM_INTERFACE_ENTRY_IID(IID_IEnumFORMATETC, IEnumFORMATETC) @@ -146,22 +146,22 @@ class CIDLDataObj : HRESULT WINAPI Initialize(HWND hwndOwner, PCIDLIST_ABSOLUTE pMyPidl, PCUIDLIST_RELATIVE_ARRAY apidlx, UINT cidlx, BOOL bAddAdditionalFormats); // *** IDataObject methods *** - virtual HRESULT WINAPI GetData(LPFORMATETC pformatetcIn, STGMEDIUM *pmedium); - virtual HRESULT WINAPI GetDataHere(LPFORMATETC pformatetc, STGMEDIUM *pmedium); - virtual HRESULT WINAPI QueryGetData(LPFORMATETC pformatetc); - virtual HRESULT WINAPI GetCanonicalFormatEtc(LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut); - virtual HRESULT WINAPI SetData(LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease); - virtual HRESULT WINAPI EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc); - virtual HRESULT WINAPI DAdvise(FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection); - virtual HRESULT WINAPI DUnadvise(DWORD dwConnection); - virtual HRESULT WINAPI EnumDAdvise(IEnumSTATDATA **ppenumAdvise); + STDMETHOD(GetData)(LPFORMATETC pformatetcIn, STGMEDIUM *pmedium) override; + STDMETHOD(GetDataHere)(LPFORMATETC pformatetc, STGMEDIUM *pmedium) override; + STDMETHOD(QueryGetData)(LPFORMATETC pformatetc) override; + STDMETHOD(GetCanonicalFormatEtc)(LPFORMATETC pformatectIn, LPFORMATETC pformatetcOut) override; + STDMETHOD(SetData)(LPFORMATETC pformatetc, STGMEDIUM *pmedium, BOOL fRelease) override; + STDMETHOD(EnumFormatEtc)(DWORD dwDirection, IEnumFORMATETC **ppenumFormatEtc) override; + STDMETHOD(DAdvise)(FORMATETC *pformatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection) override; + STDMETHOD(DUnadvise)(DWORD dwConnection) override; + STDMETHOD(EnumDAdvise)(IEnumSTATDATA **ppenumAdvise) override; // *** IAsyncOperation methods *** - virtual HRESULT WINAPI SetAsyncMode(BOOL fDoOpAsync); - virtual HRESULT WINAPI GetAsyncMode(BOOL *pfIsOpAsync); - virtual HRESULT WINAPI StartOperation(IBindCtx *pbcReserved); - virtual HRESULT WINAPI InOperation(BOOL *pfInAsyncOp); - virtual HRESULT WINAPI EndOperation(HRESULT hResult, IBindCtx *pbcReserved, DWORD dwEffects); + STDMETHOD(SetAsyncMode)(BOOL fDoOpAsync) override; + STDMETHOD(GetAsyncMode)(BOOL *pfIsOpAsync) override; + STDMETHOD(StartOperation)(IBindCtx *pbcReserved) override; + STDMETHOD(InOperation)(BOOL *pfInAsyncOp) override; + STDMETHOD(EndOperation)(HRESULT hResult, IBindCtx *pbcReserved, DWORD dwEffects) override; BEGIN_COM_MAP(CIDLDataObj) COM_INTERFACE_ENTRY_IID(IID_IDataObject, IDataObject) diff --git a/dll/win32/shell32/CNewMenu.cpp b/dll/win32/shell32/CNewMenu.cpp index 6c8e9354fc3..b86f6ecc0c8 100644 --- a/dll/win32/shell32/CNewMenu.cpp +++ b/dll/win32/shell32/CNewMenu.cpp @@ -33,6 +33,8 @@ CNewMenu::CNewMenu() : m_idCmdFirst(0), m_idCmdFolder(-1), m_idCmdLink(-1), + m_bCustomIconFolder(FALSE), + m_bCustomIconLink(FALSE), m_hIconFolder(NULL), m_hIconLink(NULL) { @@ -42,6 +44,10 @@ CNewMenu::~CNewMenu() { UnloadAllItems(); + if (m_bCustomIconFolder && m_hIconFolder) + DestroyIcon(m_hIconFolder); + if (m_bCustomIconLink && m_hIconLink) + DestroyIcon(m_hIconLink); if (m_pidlFolder) ILFree(m_pidlFolder); } @@ -768,10 +774,32 @@ HRESULT WINAPI CNewMenu::Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) { + const INT cx = GetSystemMetrics(SM_CXSMICON), cy = GetSystemMetrics(SM_CYSMICON); + WCHAR wszIconPath[MAX_PATH]; + int icon_idx; + m_pidlFolder = ILClone(pidlFolder); /* Load folder and shortcut icons */ - m_hIconFolder = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_FOLDER), IMAGE_ICON, 16, 16, LR_SHARED); - m_hIconLink = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_SHORTCUT), IMAGE_ICON, 16, 16, LR_SHARED); + if (HLM_GetIconW(IDI_SHELL_FOLDER - 1, wszIconPath, _countof(wszIconPath), &icon_idx)) + { + ::ExtractIconExW(wszIconPath, icon_idx, &m_hIconFolder, NULL, 1); + m_bCustomIconFolder = TRUE; + } + else + { + m_hIconFolder = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_FOLDER), IMAGE_ICON, cx, cy, LR_SHARED); + } + + if (HLM_GetIconW(IDI_SHELL_SHORTCUT - 1, wszIconPath, _countof(wszIconPath), &icon_idx)) + { + ::ExtractIconExW(wszIconPath, icon_idx, &m_hIconLink, NULL, 1); + m_bCustomIconLink = TRUE; + } + else + { + m_hIconLink = (HICON)LoadImage(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_SHORTCUT), IMAGE_ICON, cx, cy, LR_SHARED); + } + return S_OK; } diff --git a/dll/win32/shell32/CNewMenu.h b/dll/win32/shell32/CNewMenu.h index 6d0bbe6b927..3581484917e 100644 --- a/dll/win32/shell32/CNewMenu.h +++ b/dll/win32/shell32/CNewMenu.h @@ -59,6 +59,7 @@ class CNewMenu : CComPtr m_pSite; HMENU m_hSubMenu; UINT m_idCmdFirst, m_idCmdFolder, m_idCmdLink; + BOOL m_bCustomIconFolder, m_bCustomIconLink; HICON m_hIconFolder, m_hIconLink; SHELLNEW_ITEM *LoadItem(LPCWSTR pwszExt); @@ -81,22 +82,22 @@ class CNewMenu : ~CNewMenu(); // IObjectWithSite - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + STDMETHOD(QueryContextMenu)(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpcmi) override; + STDMETHOD(GetCommandString)(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override; // IContextMenu3 - virtual HRESULT WINAPI HandleMenuMsg2(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult); + STDMETHOD(HandleMenuMsg2)(UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *plResult) override; // IContextMenu2 - virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(HandleMenuMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; // IShellExtInit - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override; DECLARE_REGISTRY_RESOURCEID(IDR_NEWMENU) DECLARE_NOT_AGGREGATABLE(CNewMenu) diff --git a/dll/win32/shell32/COpenWithMenu.h b/dll/win32/shell32/COpenWithMenu.h index 77f59d50c91..0f94133e1ed 100644 --- a/dll/win32/shell32/COpenWithMenu.h +++ b/dll/win32/shell32/COpenWithMenu.h @@ -46,15 +46,15 @@ class COpenWithMenu : ~COpenWithMenu(); // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + STDMETHOD(QueryContextMenu)(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpcmi) override; + STDMETHOD(GetCommandString)(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override; // IContextMenu2 - virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(HandleMenuMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; // IShellExtInit - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override; DECLARE_REGISTRY_RESOURCEID(IDR_OPENWITHMENU) DECLARE_NOT_AGGREGATABLE(COpenWithMenu) diff --git a/dll/win32/shell32/CQueryAssociations.h b/dll/win32/shell32/CQueryAssociations.h index f877ca4ddca..a9a09a302eb 100644 --- a/dll/win32/shell32/CQueryAssociations.h +++ b/dll/win32/shell32/CQueryAssociations.h @@ -20,11 +20,11 @@ class CQueryAssociations : ~CQueryAssociations(); // *** IQueryAssociations methods *** - virtual HRESULT STDMETHODCALLTYPE Init(ASSOCF flags, LPCWSTR pwszAssoc, HKEY hkProgid, HWND hwnd); - virtual HRESULT STDMETHODCALLTYPE GetString(ASSOCF flags, ASSOCSTR str, LPCWSTR pwszExtra, LPWSTR pwszOut, DWORD *pcchOut); - virtual HRESULT STDMETHODCALLTYPE GetKey(ASSOCF flags, ASSOCKEY key, LPCWSTR pwszExtra, HKEY *phkeyOut); - virtual HRESULT STDMETHODCALLTYPE GetData(ASSOCF flags, ASSOCDATA data, LPCWSTR pwszExtra, void *pvOut, DWORD *pcbOut); - virtual HRESULT STDMETHODCALLTYPE GetEnum(ASSOCF cfFlags, ASSOCENUM assocenum, LPCWSTR pszExtra, REFIID riid, LPVOID *ppvOut); + STDMETHOD(Init)(ASSOCF flags, LPCWSTR pwszAssoc, HKEY hkProgid, HWND hwnd) override; + STDMETHOD(GetString)(ASSOCF flags, ASSOCSTR str, LPCWSTR pwszExtra, LPWSTR pwszOut, DWORD *pcchOut) override; + STDMETHOD(GetKey)(ASSOCF flags, ASSOCKEY key, LPCWSTR pwszExtra, HKEY *phkeyOut) override; + STDMETHOD(GetData)(ASSOCF flags, ASSOCDATA data, LPCWSTR pwszExtra, void *pvOut, DWORD *pcbOut) override; + STDMETHOD(GetEnum)(ASSOCF cfFlags, ASSOCENUM assocenum, LPCWSTR pszExtra, REFIID riid, LPVOID *ppvOut) override; DECLARE_REGISTRY_RESOURCEID(IDR_QUERYASSOCIATIONS) DECLARE_NOT_AGGREGATABLE(CQueryAssociations) diff --git a/dll/win32/shell32/CShellDispatch.h b/dll/win32/shell32/CShellDispatch.h index 6c32ecf6672..0635d5947c4 100644 --- a/dll/win32/shell32/CShellDispatch.h +++ b/dll/win32/shell32/CShellDispatch.h @@ -26,58 +26,57 @@ class CShellDispatch: HRESULT Initialize(); // *** IShellDispatch methods *** - virtual HRESULT STDMETHODCALLTYPE get_Application(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE get_Parent(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE NameSpace(VARIANT vDir, Folder **ppsdf); - virtual HRESULT STDMETHODCALLTYPE BrowseForFolder(LONG Hwnd, BSTR Title, LONG Options, VARIANT RootFolder, Folder **ppsdf); - virtual HRESULT STDMETHODCALLTYPE Windows(IDispatch **ppid); - virtual HRESULT STDMETHODCALLTYPE Open(VARIANT vDir); - virtual HRESULT STDMETHODCALLTYPE Explore(VARIANT vDir); - virtual HRESULT STDMETHODCALLTYPE MinimizeAll(); - virtual HRESULT STDMETHODCALLTYPE UndoMinimizeALL(); - virtual HRESULT STDMETHODCALLTYPE FileRun(); - virtual HRESULT STDMETHODCALLTYPE CascadeWindows(); - virtual HRESULT STDMETHODCALLTYPE TileVertically(); - virtual HRESULT STDMETHODCALLTYPE TileHorizontally(); - virtual HRESULT STDMETHODCALLTYPE ShutdownWindows(); - virtual HRESULT STDMETHODCALLTYPE Suspend(); - virtual HRESULT STDMETHODCALLTYPE EjectPC(); - virtual HRESULT STDMETHODCALLTYPE SetTime(); - virtual HRESULT STDMETHODCALLTYPE TrayProperties(); - virtual HRESULT STDMETHODCALLTYPE Help(); - virtual HRESULT STDMETHODCALLTYPE FindFiles(); - virtual HRESULT STDMETHODCALLTYPE FindComputer(); - virtual HRESULT STDMETHODCALLTYPE RefreshMenu(); - virtual HRESULT STDMETHODCALLTYPE ControlPanelItem(BSTR szDir); + STDMETHOD(get_Application)(IDispatch **ppid) override; + STDMETHOD(get_Parent)(IDispatch **ppid) override; + STDMETHOD(NameSpace)(VARIANT vDir, Folder **ppsdf) override; + STDMETHOD(BrowseForFolder)(LONG Hwnd, BSTR Title, LONG Options, VARIANT RootFolder, Folder **ppsdf) override; + STDMETHOD(Windows)(IDispatch **ppid) override; + STDMETHOD(Open)(VARIANT vDir) override; + STDMETHOD(Explore)(VARIANT vDir) override; + STDMETHOD(MinimizeAll)() override; + STDMETHOD(UndoMinimizeALL)() override; + STDMETHOD(FileRun)() override; + STDMETHOD(CascadeWindows)() override; + STDMETHOD(TileVertically)() override; + STDMETHOD(TileHorizontally)() override; + STDMETHOD(ShutdownWindows)() override; + STDMETHOD(Suspend)() override; + STDMETHOD(EjectPC)() override; + STDMETHOD(SetTime)() override; + STDMETHOD(TrayProperties)() override; + STDMETHOD(Help)() override; + STDMETHOD(FindFiles)() override; + STDMETHOD(FindComputer)() override; + STDMETHOD(RefreshMenu)() override; + STDMETHOD(ControlPanelItem)(BSTR szDir) override; // *** IShellDispatch2 methods *** - virtual HRESULT STDMETHODCALLTYPE IsRestricted(BSTR group, BSTR restriction, LONG *value); - virtual HRESULT STDMETHODCALLTYPE ShellExecute(BSTR file, VARIANT args, VARIANT dir, VARIANT op, VARIANT show); - virtual HRESULT STDMETHODCALLTYPE FindPrinter(BSTR name, BSTR location, BSTR model); - virtual HRESULT STDMETHODCALLTYPE GetSystemInformation(BSTR name, VARIANT *ret); - virtual HRESULT STDMETHODCALLTYPE ServiceStart(BSTR service, VARIANT persistent, VARIANT *ret); - virtual HRESULT STDMETHODCALLTYPE ServiceStop(BSTR service, VARIANT persistent, VARIANT *ret); - virtual HRESULT STDMETHODCALLTYPE IsServiceRunning(BSTR service, VARIANT *running); - virtual HRESULT STDMETHODCALLTYPE CanStartStopService(BSTR service, VARIANT *ret); - virtual HRESULT STDMETHODCALLTYPE ShowBrowserBar(BSTR clsid, VARIANT show, VARIANT *ret); + STDMETHOD(IsRestricted)(BSTR group, BSTR restriction, LONG *value) override; + STDMETHOD(ShellExecute)(BSTR file, VARIANT args, VARIANT dir, VARIANT op, VARIANT show) override; + STDMETHOD(FindPrinter)(BSTR name, BSTR location, BSTR model) override; + STDMETHOD(GetSystemInformation)(BSTR name, VARIANT *ret) override; + STDMETHOD(ServiceStart)(BSTR service, VARIANT persistent, VARIANT *ret) override; + STDMETHOD(ServiceStop)(BSTR service, VARIANT persistent, VARIANT *ret) override; + STDMETHOD(IsServiceRunning)(BSTR service, VARIANT *running) override; + STDMETHOD(CanStartStopService)(BSTR service, VARIANT *ret) override; + STDMETHOD(ShowBrowserBar)(BSTR clsid, VARIANT show, VARIANT *ret) override; // *** IShellDispatch3 methods *** - virtual HRESULT STDMETHODCALLTYPE AddToRecent(VARIANT file, BSTR category); + STDMETHOD(AddToRecent)(VARIANT file, BSTR category) override; // *** IShellDispatch4 methods *** - virtual HRESULT STDMETHODCALLTYPE WindowsSecurity(); - virtual HRESULT STDMETHODCALLTYPE ToggleDesktop(); - virtual HRESULT STDMETHODCALLTYPE ExplorerPolicy(BSTR policy, VARIANT *value); - virtual HRESULT STDMETHODCALLTYPE GetSetting(LONG setting, VARIANT_BOOL *result); + STDMETHOD(WindowsSecurity)() override; + STDMETHOD(ToggleDesktop)() override; + STDMETHOD(ExplorerPolicy)(BSTR policy, VARIANT *value) override; + STDMETHOD(GetSetting)(LONG setting, VARIANT_BOOL *result) override; // *** IObjectSafety methods *** - virtual HRESULT STDMETHODCALLTYPE GetInterfaceSafetyOptions(REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions); - virtual HRESULT STDMETHODCALLTYPE SetInterfaceSafetyOptions(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions); + STDMETHOD(GetInterfaceSafetyOptions)(REFIID riid, DWORD *pdwSupportedOptions, DWORD *pdwEnabledOptions) override; + STDMETHOD(SetInterfaceSafetyOptions)(REFIID riid, DWORD dwOptionSetMask, DWORD dwEnabledOptions) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, PVOID *ppvSite); - + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, PVOID *ppvSite) override; DECLARE_REGISTRY_RESOURCEID(IDR_SHELL) DECLARE_NOT_AGGREGATABLE(CShellDispatch) diff --git a/dll/win32/shell32/CShellItem.h b/dll/win32/shell32/CShellItem.h index 555501d8cda..a9616e7493b 100644 --- a/dll/win32/shell32/CShellItem.h +++ b/dll/win32/shell32/CShellItem.h @@ -39,16 +39,16 @@ class CShellItem : HRESULT get_shellfolder(IBindCtx *pbc, REFIID riid, void **ppvOut); // IShellItem - virtual HRESULT WINAPI BindToHandler(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut); - virtual HRESULT WINAPI GetParent(IShellItem **ppsi); - virtual HRESULT WINAPI GetDisplayName(SIGDN sigdnName, LPWSTR *ppszName); - virtual HRESULT WINAPI GetAttributes(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs); - virtual HRESULT WINAPI Compare(IShellItem *oth, SICHINTF hint, int *piOrder); + STDMETHOD(BindToHandler)(IBindCtx *pbc, REFGUID rbhid, REFIID riid, void **ppvOut) override; + STDMETHOD(GetParent)(IShellItem **ppsi) override; + STDMETHOD(GetDisplayName)(SIGDN sigdnName, LPWSTR *ppszName) override; + STDMETHOD(GetAttributes)(SFGAOF sfgaoMask, SFGAOF *psfgaoAttribs) override; + STDMETHOD(Compare)(IShellItem *oth, SICHINTF hint, int *piOrder) override; // IPersistIDList - virtual HRESULT WINAPI GetClassID(CLSID *pClassID); - virtual HRESULT WINAPI SetIDList(PCIDLIST_ABSOLUTE pidl); - virtual HRESULT WINAPI GetIDList(PIDLIST_ABSOLUTE *ppidl); + STDMETHOD(GetClassID)(CLSID *pClassID) override; + STDMETHOD(SetIDList)(PCIDLIST_ABSOLUTE pidl) override; + STDMETHOD(GetIDList)(PIDLIST_ABSOLUTE *ppidl) override; DECLARE_NO_REGISTRY() DECLARE_NOT_AGGREGATABLE(CShellItem) diff --git a/dll/win32/shell32/CShellLink.cpp b/dll/win32/shell32/CShellLink.cpp index 1944fb2f936..f83c6a9654e 100644 --- a/dll/win32/shell32/CShellLink.cpp +++ b/dll/win32/shell32/CShellLink.cpp @@ -3155,11 +3155,21 @@ HICON CShellLink::CreateShortcutIcon(LPCWSTR wszIconPath, INT IconIndex) { const INT cx = GetSystemMetrics(SM_CXICON), cy = GetSystemMetrics(SM_CYICON); const COLORREF crMask = GetSysColor(COLOR_3DFACE); + WCHAR wszLnkIcon[MAX_PATH]; + int lnk_idx; HDC hDC; HIMAGELIST himl = ImageList_Create(cx, cy, ILC_COLOR32 | ILC_MASK, 1, 1); - HICON hIcon = NULL, hNewIcon = NULL; - HICON hShortcut = (HICON)LoadImageW(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_SHORTCUT), - IMAGE_ICON, cx, cy, 0); + HICON hIcon = NULL, hNewIcon = NULL, hShortcut; + + if (HLM_GetIconW(IDI_SHELL_SHORTCUT - 1, wszLnkIcon, _countof(wszLnkIcon), &lnk_idx)) + { + ::ExtractIconExW(wszLnkIcon, lnk_idx, &hShortcut, NULL, 1); + } + else + { + hShortcut = (HICON)LoadImageW(shell32_hInstance, MAKEINTRESOURCE(IDI_SHELL_SHORTCUT), + IMAGE_ICON, cx, cy, 0); + } ::ExtractIconExW(wszIconPath, IconIndex, &hIcon, NULL, 1); if (!hIcon || !hShortcut || !himl) diff --git a/dll/win32/shell32/CShellLink.h b/dll/win32/shell32/CShellLink.h index 7ad131c0284..53fd75d49d9 100644 --- a/dll/win32/shell32/CShellLink.h +++ b/dll/win32/shell32/CShellLink.h @@ -120,96 +120,96 @@ class CShellLink : void OnDestroy(HWND hwndDlg); // IPersistFile - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pclsid); - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(LPCOLESTR pszFileName, DWORD dwMode); - virtual HRESULT STDMETHODCALLTYPE Save(LPCOLESTR pszFileName, BOOL fRemember); - virtual HRESULT STDMETHODCALLTYPE SaveCompleted(LPCOLESTR pszFileName); - virtual HRESULT STDMETHODCALLTYPE GetCurFile(LPOLESTR *ppszFileName); + STDMETHOD(GetClassID)(CLSID *pclsid) override; + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(LPCOLESTR pszFileName, DWORD dwMode) override; + STDMETHOD(Save)(LPCOLESTR pszFileName, BOOL fRemember) override; + STDMETHOD(SaveCompleted)(LPCOLESTR pszFileName) override; + STDMETHOD(GetCurFile)(LPOLESTR *ppszFileName) override; // IPersistStream - // virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pclsid); - // virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *stm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *stm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + // STDMETHOD(GetClassID)(CLSID *pclsid) override; + // STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *stm) override; + STDMETHOD(Save)(IStream *stm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // IShellLinkA - virtual HRESULT STDMETHODCALLTYPE GetPath(LPSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags); - virtual HRESULT STDMETHODCALLTYPE GetIDList(PIDLIST_ABSOLUTE *ppidl); - virtual HRESULT STDMETHODCALLTYPE SetIDList(PCIDLIST_ABSOLUTE pidl); - virtual HRESULT STDMETHODCALLTYPE GetDescription(LPSTR pszName, INT cchMaxName); - virtual HRESULT STDMETHODCALLTYPE SetDescription(LPCSTR pszName); - virtual HRESULT STDMETHODCALLTYPE GetWorkingDirectory(LPSTR pszDir, INT cchMaxPath); - virtual HRESULT STDMETHODCALLTYPE SetWorkingDirectory(LPCSTR pszDir); - virtual HRESULT STDMETHODCALLTYPE GetArguments(LPSTR pszArgs, INT cchMaxPath); - virtual HRESULT STDMETHODCALLTYPE SetArguments(LPCSTR pszArgs); - virtual HRESULT STDMETHODCALLTYPE GetHotkey(WORD *pwHotkey); - virtual HRESULT STDMETHODCALLTYPE SetHotkey(WORD wHotkey); - virtual HRESULT STDMETHODCALLTYPE GetShowCmd(INT *piShowCmd); - virtual HRESULT STDMETHODCALLTYPE SetShowCmd(INT iShowCmd); - virtual HRESULT STDMETHODCALLTYPE GetIconLocation(LPSTR pszIconPath, INT cchIconPath, INT *piIcon); - virtual HRESULT STDMETHODCALLTYPE SetIconLocation(LPCSTR pszIconPath, INT iIcon); - virtual HRESULT STDMETHODCALLTYPE SetRelativePath(LPCSTR pszPathRel, DWORD dwReserved); - virtual HRESULT STDMETHODCALLTYPE Resolve(HWND hwnd, DWORD fFlags); - virtual HRESULT STDMETHODCALLTYPE SetPath(LPCSTR pszFile); + STDMETHOD(GetPath)(LPSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAA *pfd, DWORD fFlags) override; + STDMETHOD(GetIDList)(PIDLIST_ABSOLUTE *ppidl) override; + STDMETHOD(SetIDList)(PCIDLIST_ABSOLUTE pidl) override; + STDMETHOD(GetDescription)(LPSTR pszName, INT cchMaxName) override; + STDMETHOD(SetDescription)(LPCSTR pszName) override; + STDMETHOD(GetWorkingDirectory)(LPSTR pszDir, INT cchMaxPath) override; + STDMETHOD(SetWorkingDirectory)(LPCSTR pszDir) override; + STDMETHOD(GetArguments)(LPSTR pszArgs, INT cchMaxPath) override; + STDMETHOD(SetArguments)(LPCSTR pszArgs) override; + STDMETHOD(GetHotkey)(WORD *pwHotkey) override; + STDMETHOD(SetHotkey)(WORD wHotkey) override; + STDMETHOD(GetShowCmd)(INT *piShowCmd) override; + STDMETHOD(SetShowCmd)(INT iShowCmd) override; + STDMETHOD(GetIconLocation)(LPSTR pszIconPath, INT cchIconPath, INT *piIcon) override; + STDMETHOD(SetIconLocation)(LPCSTR pszIconPath, INT iIcon) override; + STDMETHOD(SetRelativePath)(LPCSTR pszPathRel, DWORD dwReserved) override; + STDMETHOD(Resolve)(HWND hwnd, DWORD fFlags) override; + STDMETHOD(SetPath)(LPCSTR pszFile) override; // IShellLinkW - virtual HRESULT STDMETHODCALLTYPE GetPath(LPWSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAW *pfd, DWORD fFlags); - // virtual HRESULT STDMETHODCALLTYPE GetIDList(PIDLIST_ABSOLUTE *ppidl); - // virtual HRESULT STDMETHODCALLTYPE SetIDList(PCIDLIST_ABSOLUTE pidl); - virtual HRESULT STDMETHODCALLTYPE GetDescription(LPWSTR pszName, INT cchMaxName); - virtual HRESULT STDMETHODCALLTYPE SetDescription(LPCWSTR pszName); - virtual HRESULT STDMETHODCALLTYPE GetWorkingDirectory(LPWSTR pszDir, INT cchMaxPath); - virtual HRESULT STDMETHODCALLTYPE SetWorkingDirectory(LPCWSTR pszDir); - virtual HRESULT STDMETHODCALLTYPE GetArguments(LPWSTR pszArgs, INT cchMaxPath); - virtual HRESULT STDMETHODCALLTYPE SetArguments(LPCWSTR pszArgs); - // virtual HRESULT STDMETHODCALLTYPE GetHotkey(WORD *pwHotkey); - // virtual HRESULT STDMETHODCALLTYPE SetHotkey(WORD wHotkey); - // virtual HRESULT STDMETHODCALLTYPE GetShowCmd(INT *piShowCmd); - // virtual HRESULT STDMETHODCALLTYPE SetShowCmd(INT iShowCmd); - virtual HRESULT STDMETHODCALLTYPE GetIconLocation(LPWSTR pszIconPath, INT cchIconPath, INT *piIcon); - virtual HRESULT STDMETHODCALLTYPE SetIconLocation(LPCWSTR pszIconPath, INT iIcon); - virtual HRESULT STDMETHODCALLTYPE SetRelativePath(LPCWSTR pszPathRel, DWORD dwReserved); - // virtual HRESULT STDMETHODCALLTYPE Resolve(HWND hwnd, DWORD fFlags); - virtual HRESULT STDMETHODCALLTYPE SetPath(LPCWSTR pszFile); + STDMETHOD(GetPath)(LPWSTR pszFile, INT cchMaxPath, WIN32_FIND_DATAW *pfd, DWORD fFlags) override; + // STDMETHOD(GetIDList)(PIDLIST_ABSOLUTE *ppidl) override; + // STDMETHOD(SetIDList)(PCIDLIST_ABSOLUTE pidl) override; + STDMETHOD(GetDescription)(LPWSTR pszName, INT cchMaxName) override; + STDMETHOD(SetDescription)(LPCWSTR pszName) override; + STDMETHOD(GetWorkingDirectory)(LPWSTR pszDir, INT cchMaxPath) override; + STDMETHOD(SetWorkingDirectory)(LPCWSTR pszDir) override; + STDMETHOD(GetArguments)(LPWSTR pszArgs, INT cchMaxPath) override; + STDMETHOD(SetArguments)(LPCWSTR pszArgs) override; + // STDMETHOD(GetHotkey)(WORD *pwHotkey) override; + // STDMETHOD(SetHotkey)(WORD wHotkey) override; + // STDMETHOD(GetShowCmd)(INT *piShowCmd) override; + // STDMETHOD(SetShowCmd)(INT iShowCmd) override; + STDMETHOD(GetIconLocation)(LPWSTR pszIconPath, INT cchIconPath, INT *piIcon) override; + STDMETHOD(SetIconLocation)(LPCWSTR pszIconPath, INT iIcon) override; + STDMETHOD(SetRelativePath)(LPCWSTR pszPathRel, DWORD dwReserved) override; + // STDMETHOD(Resolve)(HWND hwnd, DWORD fFlags) override; + STDMETHOD(SetPath)(LPCWSTR pszFile) override; // IShellLinkDataList - virtual HRESULT STDMETHODCALLTYPE AddDataBlock(void *pDataBlock); - virtual HRESULT STDMETHODCALLTYPE CopyDataBlock(DWORD dwSig, void **ppDataBlock); - virtual HRESULT STDMETHODCALLTYPE RemoveDataBlock(DWORD dwSig); - virtual HRESULT STDMETHODCALLTYPE GetFlags(DWORD *pdwFlags); - virtual HRESULT STDMETHODCALLTYPE SetFlags(DWORD dwFlags); + STDMETHOD(AddDataBlock)(void *pDataBlock) override; + STDMETHOD(CopyDataBlock)(DWORD dwSig, void **ppDataBlock) override; + STDMETHOD(RemoveDataBlock)(DWORD dwSig) override; + STDMETHOD(GetFlags)(DWORD *pdwFlags) override; + STDMETHOD(SetFlags)(DWORD dwFlags) override; // IExtractIconA - virtual HRESULT STDMETHODCALLTYPE Extract(PCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); - virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, PSTR pszIconFile, UINT cchMax, int *piIndex, UINT *pwFlags); + STDMETHOD(Extract)(PCSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) override; + STDMETHOD(GetIconLocation)(UINT uFlags, PSTR pszIconFile, UINT cchMax, int *piIndex, UINT *pwFlags) override; // IExtractIconW - virtual HRESULT STDMETHODCALLTYPE Extract(PCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize); - virtual HRESULT STDMETHODCALLTYPE GetIconLocation(UINT uFlags, PWSTR pszIconFile, UINT cchMax, int *piIndex, UINT *pwFlags); + STDMETHOD(Extract)(PCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) override; + STDMETHOD(GetIconLocation)(UINT uFlags, PWSTR pszIconFile, UINT cchMax, int *piIndex, UINT *pwFlags) override; // IShellExtInit - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override; // IContextMenu - virtual HRESULT STDMETHODCALLTYPE QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT STDMETHODCALLTYPE InvokeCommand(LPCMINVOKECOMMANDINFO lpici); - virtual HRESULT STDMETHODCALLTYPE GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax); + STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici) override; + STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override; // IShellPropSheetExt - virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam); - virtual HRESULT STDMETHODCALLTYPE ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam); + STDMETHOD(AddPages)(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override; + STDMETHOD(ReplacePage)(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam) override; // IObjectWithSite - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *punk); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID iid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *punk) override; + STDMETHOD(GetSite)(REFIID iid, void **ppvSite) override; // IDropTarget - virtual HRESULT STDMETHODCALLTYPE DragEnter(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragLeave(); - virtual HRESULT STDMETHODCALLTYPE Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); + STDMETHOD(DragEnter)(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragOver)(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragLeave)() override; + STDMETHOD(Drop)(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override; DECLARE_REGISTRY_RESOURCEID(IDR_SHELLLINK) DECLARE_NOT_AGGREGATABLE(CShellLink) diff --git a/dll/win32/shell32/CUserNotification.h b/dll/win32/shell32/CUserNotification.h index 4f01e0c9be8..27e91bbdb96 100644 --- a/dll/win32/shell32/CUserNotification.h +++ b/dll/win32/shell32/CUserNotification.h @@ -66,35 +66,35 @@ class CUserNotification : ~CUserNotification(); // IUserNotification - virtual HRESULT STDMETHODCALLTYPE SetBalloonInfo( + STDMETHOD(SetBalloonInfo)( IN LPCWSTR pszTitle, IN LPCWSTR pszText, - IN DWORD dwInfoFlags); + IN DWORD dwInfoFlags) override; - virtual HRESULT STDMETHODCALLTYPE SetBalloonRetry( + STDMETHOD(SetBalloonRetry)( IN DWORD dwShowTime, // Time intervals in milliseconds IN DWORD dwInterval, - IN UINT cRetryCount); + IN UINT cRetryCount) override; - virtual HRESULT STDMETHODCALLTYPE SetIconInfo( + STDMETHOD(SetIconInfo)( IN HICON hIcon, - IN LPCWSTR pszToolTip); + IN LPCWSTR pszToolTip) override; // Blocks until the notification times out. - virtual HRESULT STDMETHODCALLTYPE Show( + STDMETHOD(Show)( IN IQueryContinue* pqc, - IN DWORD dwContinuePollInterval); + IN DWORD dwContinuePollInterval) override; - virtual HRESULT STDMETHODCALLTYPE PlaySound( - IN LPCWSTR pszSoundName); + STDMETHOD(PlaySound)( + IN LPCWSTR pszSoundName) override; #if 0 // IUserNotification2 // Blocks until the notification times out. - virtual HRESULT STDMETHODCALLTYPE Show( + STDMETHOD(Show)( IN IQueryContinue* pqc, IN DWORD dwContinuePollInterval, - IN IUserNotificationCallback* pSink); + IN IUserNotificationCallback* pSink) override; #endif DECLARE_REGISTRY_RESOURCEID(IDR_USERNOTIFICATION) diff --git a/dll/win32/shell32/dialogs/drvdefext.h b/dll/win32/shell32/dialogs/drvdefext.h index a054b83b1da..90cc6c7e109 100644 --- a/dll/win32/shell32/dialogs/drvdefext.h +++ b/dll/win32/shell32/dialogs/drvdefext.h @@ -44,20 +44,20 @@ class CDrvDefExt : ~CDrvDefExt(); // IShellExtInit - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pDataObj, HKEY hkeyProgID); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pDataObj, HKEY hkeyProgID) override; // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpici); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax); + STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici) override; + STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override; // IShellPropSheetExt - virtual HRESULT WINAPI AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam); - virtual HRESULT WINAPI ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam); + STDMETHOD(AddPages)(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override; + STDMETHOD(ReplacePage)(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam) override; // IObjectWithSite - virtual HRESULT WINAPI SetSite(IUnknown *punk); - virtual HRESULT WINAPI GetSite(REFIID iid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *punk) override; + STDMETHOD(GetSite)(REFIID iid, void **ppvSite) override; DECLARE_REGISTRY_RESOURCEID(IDR_DRVDEFEXT) DECLARE_NOT_AGGREGATABLE(CDrvDefExt) diff --git a/dll/win32/shell32/dialogs/filedefext.cpp b/dll/win32/shell32/dialogs/filedefext.cpp index 03890b20a83..959b708ad1d 100644 --- a/dll/win32/shell32/dialogs/filedefext.cpp +++ b/dll/win32/shell32/dialogs/filedefext.cpp @@ -1085,6 +1085,7 @@ void CFileDefExt::UpdateFolderIcon(HWND hwndDlg) // create the icon if (m_szFolderIconPath[0] == 0 && m_nFolderIconIndex == 0) { + // Windows ignores shell customization here and uses the default icon m_hFolderIcon = LoadIconW(shell32_hInstance, MAKEINTRESOURCEW(IDI_SHELL_FOLDER)); } else diff --git a/dll/win32/shell32/dialogs/filedefext.h b/dll/win32/shell32/dialogs/filedefext.h index 58585d45423..73bf81b466a 100644 --- a/dll/win32/shell32/dialogs/filedefext.h +++ b/dll/win32/shell32/dialogs/filedefext.h @@ -105,20 +105,20 @@ class CFileDefExt : void UpdateFolderIcon(HWND hwndDlg); // IShellExtInit - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override; // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpici); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax); + STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici) override; + STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) override; // IShellPropSheetExt - virtual HRESULT WINAPI AddPages(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam); - virtual HRESULT WINAPI ReplacePage(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam); + STDMETHOD(AddPages)(LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override; + STDMETHOD(ReplacePage)(UINT uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam) override; // IObjectWithSite - virtual HRESULT WINAPI SetSite(IUnknown *punk); - virtual HRESULT WINAPI GetSite(REFIID iid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *punk) override; + STDMETHOD(GetSite)(REFIID iid, void **ppvSite) override; DECLARE_REGISTRY_RESOURCEID(IDR_FILEDEFEXT) DECLARE_NOT_AGGREGATABLE(CFileDefExt) diff --git a/dll/win32/shell32/dialogs/general.cpp b/dll/win32/shell32/dialogs/general.cpp index 9102c96f43b..33e3e94f73a 100644 --- a/dll/win32/shell32/dialogs/general.cpp +++ b/dll/win32/shell32/dialogs/general.cpp @@ -34,9 +34,6 @@ typedef struct REGSHELLSTATE static const LPCWSTR s_pszExplorerKey = L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer"; -extern "C" -BOOL WINAPI SHSettingsChanged(LPCVOID unused, LPCVOID inpRegKey); - ///////////////////////////////////////////////////////////////////////////// // Shell settings diff --git a/dll/win32/shell32/droptargets/CFSDropTarget.h b/dll/win32/shell32/droptargets/CFSDropTarget.h index 6d0cd9691cd..706164d8f6d 100644 --- a/dll/win32/shell32/droptargets/CFSDropTarget.h +++ b/dll/win32/shell32/droptargets/CFSDropTarget.h @@ -51,14 +51,14 @@ class CFSDropTarget : HRESULT Initialize(LPWSTR PathTarget); // IDropTarget - virtual HRESULT WINAPI DragEnter(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT WINAPI DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT WINAPI DragLeave(); - virtual HRESULT WINAPI Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); + STDMETHOD(DragEnter)(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragOver)(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragLeave)() override; + STDMETHOD(Drop)(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override; // IObjectWithSite - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, void **ppvSite) override; DECLARE_NOT_AGGREGATABLE(CFSDropTarget) diff --git a/dll/win32/shell32/droptargets/CRecyclerDropTarget.cpp b/dll/win32/shell32/droptargets/CRecyclerDropTarget.cpp index 32f1f5f617a..46bde7d4c3f 100644 --- a/dll/win32/shell32/droptargets/CRecyclerDropTarget.cpp +++ b/dll/win32/shell32/droptargets/CRecyclerDropTarget.cpp @@ -102,15 +102,14 @@ class CRecyclerDropTarget : } public: - CRecyclerDropTarget() { fAcceptFmt = FALSE; cfShellIDList = RegisterClipboardFormatW(CFSTR_SHELLIDLIST); } - HRESULT WINAPI DragEnter(IDataObject *pDataObject, - DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) + STDMETHODIMP + DragEnter(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override { TRACE("Recycle bin drag over (%p)\n", this); /* The recycle bin accepts pretty much everything, and sets a CSIDL flag. */ @@ -120,7 +119,8 @@ class CRecyclerDropTarget : return S_OK; } - HRESULT WINAPI DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) + STDMETHODIMP + DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override { TRACE("(%p)\n", this); @@ -132,7 +132,8 @@ class CRecyclerDropTarget : return S_OK; } - HRESULT WINAPI DragLeave() + STDMETHODIMP + DragLeave() override { TRACE("(%p)\n", this); @@ -141,8 +142,8 @@ class CRecyclerDropTarget : return S_OK; } - HRESULT WINAPI Drop(IDataObject *pDataObject, - DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) + STDMETHODIMP + Drop(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect) override { TRACE("(%p) object dropped on recycle bin, effect %u\n", this, *pdwEffect); diff --git a/dll/win32/shell32/droptargets/CexeDropHandler.h b/dll/win32/shell32/droptargets/CexeDropHandler.h index 7a79f94aca3..204ef17152f 100644 --- a/dll/win32/shell32/droptargets/CexeDropHandler.h +++ b/dll/win32/shell32/droptargets/CexeDropHandler.h @@ -35,21 +35,20 @@ class CExeDropHandler : ~CExeDropHandler(); // IDropTarget - virtual HRESULT WINAPI DragEnter(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT WINAPI DragOver(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); - virtual HRESULT WINAPI DragLeave(); - virtual HRESULT WINAPI Drop(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect); + STDMETHOD(DragEnter)(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragOver)(DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override; + STDMETHOD(DragLeave)() override; + STDMETHOD(Drop)(IDataObject *pDataObject, DWORD dwKeyState, POINTL pt, DWORD *pdwEffect) override; // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; //////// IPersistFile - virtual HRESULT WINAPI GetCurFile(LPOLESTR *ppszFileName); - virtual HRESULT WINAPI IsDirty(); - virtual HRESULT WINAPI Load(LPCOLESTR pszFileName, DWORD dwMode); - virtual HRESULT WINAPI Save(LPCOLESTR pszFileName, BOOL fRemember); - virtual HRESULT WINAPI SaveCompleted(LPCOLESTR pszFileName); - + STDMETHOD(GetCurFile)(LPOLESTR *ppszFileName) override; + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(LPCOLESTR pszFileName, DWORD dwMode) override; + STDMETHOD(Save)(LPCOLESTR pszFileName, BOOL fRemember) override; + STDMETHOD(SaveCompleted)(LPCOLESTR pszFileName) override; DECLARE_REGISTRY_RESOURCEID(IDR_EXEDROPHANDLER) DECLARE_NOT_AGGREGATABLE(CExeDropHandler) diff --git a/dll/win32/shell32/folders/CAdminToolsFolder.h b/dll/win32/shell32/folders/CAdminToolsFolder.h index e87a87f96d0..87486983c95 100644 --- a/dll/win32/shell32/folders/CAdminToolsFolder.h +++ b/dll/win32/shell32/folders/CAdminToolsFolder.h @@ -36,34 +36,34 @@ class CAdminToolsFolder : ~CAdminToolsFolder(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten, PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten, PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; /* ShellFolder2 */ - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // IPersistFolder - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; DECLARE_REGISTRY_RESOURCEID(IDR_ADMINFOLDERSHORTCUT) DECLARE_NOT_AGGREGATABLE(CAdminToolsFolder) diff --git a/dll/win32/shell32/folders/CControlPanelFolder.h b/dll/win32/shell32/folders/CControlPanelFolder.h index deb29a5f2e1..282ca461315 100644 --- a/dll/win32/shell32/folders/CControlPanelFolder.h +++ b/dll/win32/shell32/folders/CControlPanelFolder.h @@ -41,34 +41,34 @@ class CControlPanelFolder : ~CControlPanelFolder(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; /* ShellFolder2 */ - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // IPersistFolder - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; DECLARE_REGISTRY_RESOURCEID(IDR_CONTROLPANEL) DECLARE_NOT_AGGREGATABLE(CControlPanelFolder) @@ -98,12 +98,12 @@ class CCPLItemMenu: HRESULT WINAPI Initialize(UINT cidl, PCUITEMID_CHILD_ARRAY apidl); // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + STDMETHOD(QueryContextMenu)(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpcmi) override; + STDMETHOD(GetCommandString)(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override; // IContextMenu2 - virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(HandleMenuMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; BEGIN_COM_MAP(CCPLItemMenu) COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) @@ -118,9 +118,9 @@ class COpenControlPanel : { public: // IOpenControlPanel - virtual HRESULT WINAPI Open(LPCWSTR pszName, LPCWSTR pszPage, IUnknown *punkSite); - virtual HRESULT WINAPI GetPath(LPCWSTR pszName, LPWSTR pszPath, UINT cchPath); - virtual HRESULT WINAPI GetCurrentView(CPVIEW *pView); + STDMETHOD(Open)(LPCWSTR pszName, LPCWSTR pszPage, IUnknown *punkSite) override; + STDMETHOD(GetPath)(LPCWSTR pszName, LPWSTR pszPath, UINT cchPath) override; + STDMETHOD(GetCurrentView)(CPVIEW *pView) override; static HRESULT WINAPI UpdateRegistry(BOOL bRegister) { return S_OK; } // CControlPanelFolder does it for us DECLARE_NOT_AGGREGATABLE(COpenControlPanel) diff --git a/dll/win32/shell32/folders/CDesktopFolder.h b/dll/win32/shell32/folders/CDesktopFolder.h index eddeb8043bd..4d77cb672f8 100644 --- a/dll/win32/shell32/folders/CDesktopFolder.h +++ b/dll/win32/shell32/folders/CDesktopFolder.h @@ -48,48 +48,48 @@ class CDesktopFolder : HRESULT WINAPI FinalConstruct(); // *** IShellFolder methods *** - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; // *** IShellFolder2 methods *** - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // *** IPersist methods *** - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // *** IPersistFolder methods *** - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // *** IPersistFolder2 methods *** - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; // IContextMenuCB - virtual HRESULT WINAPI CallBack(IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(CallBack)(IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam) override; /*** IItemNameLimits methods ***/ STDMETHODIMP - GetMaxLength(LPCWSTR pszName, int *piMaxNameLen) + GetMaxLength(LPCWSTR pszName, int *piMaxNameLen) override { return E_NOTIMPL; } STDMETHODIMP - GetValidCharacters(LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars) + GetValidCharacters(LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars) override { if (ppwszValidChars) { diff --git a/dll/win32/shell32/folders/CDrivesFolder.h b/dll/win32/shell32/folders/CDrivesFolder.h index 21a04ea05af..7958027b545 100644 --- a/dll/win32/shell32/folders/CDrivesFolder.h +++ b/dll/win32/shell32/folders/CDrivesFolder.h @@ -41,37 +41,37 @@ class CDrivesFolder : HRESULT WINAPI FinalConstruct(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; /* ShellFolder2 */ - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // IPersistFolder - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; // IContextMenuCB - virtual HRESULT WINAPI CallBack(IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(CallBack)(IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam) override; DECLARE_REGISTRY_RESOURCEID(IDR_MYCOMPUTER) DECLARE_CENTRAL_INSTANCE_NOT_AGGREGATABLE(CDrivesFolder) diff --git a/dll/win32/shell32/folders/CFSFolder.h b/dll/win32/shell32/folders/CFSFolder.h index 7af22592bdf..924dd9bd893 100644 --- a/dll/win32/shell32/folders/CFSFolder.h +++ b/dll/win32/shell32/folders/CFSFolder.h @@ -38,55 +38,55 @@ class CFSFolder : ~CFSFolder(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; /* ShellFolder2 */ - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // IPersistFolder - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; // IPersistFolder3 - virtual HRESULT WINAPI InitializeEx(IBindCtx *pbc, LPCITEMIDLIST pidlRoot, const PERSIST_FOLDER_TARGET_INFO *ppfti); - virtual HRESULT WINAPI GetFolderTargetInfo(PERSIST_FOLDER_TARGET_INFO *ppfti); + STDMETHOD(InitializeEx)(IBindCtx *pbc, LPCITEMIDLIST pidlRoot, const PERSIST_FOLDER_TARGET_INFO *ppfti) override; + STDMETHOD(GetFolderTargetInfo)(PERSIST_FOLDER_TARGET_INFO *ppfti) override; // IContextMenuCB - virtual HRESULT WINAPI CallBack(IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(CallBack)(IShellFolder *psf, HWND hwndOwner, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam) override; // IShellFolderViewCB - virtual HRESULT WINAPI MessageSFVCB(UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(MessageSFVCB)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; /*** IItemNameLimits methods ***/ STDMETHODIMP - GetMaxLength(LPCWSTR pszName, int *piMaxNameLen) + GetMaxLength(LPCWSTR pszName, int *piMaxNameLen) override { return E_NOTIMPL; } STDMETHODIMP - GetValidCharacters(LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars) + GetValidCharacters(LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars) override { if (ppwszValidChars) { diff --git a/dll/win32/shell32/folders/CFontsFolder.h b/dll/win32/shell32/folders/CFontsFolder.h index 02345a3cf1d..e670cb64c42 100644 --- a/dll/win32/shell32/folders/CFontsFolder.h +++ b/dll/win32/shell32/folders/CFontsFolder.h @@ -36,34 +36,34 @@ class CFontsFolder : ~CFontsFolder(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; /* ShellFolder2 */ - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // IPersistFolder - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE *pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE *pidl) override; DECLARE_REGISTRY_RESOURCEID(IDR_FONTSFOLDERSHORTCUT) DECLARE_NOT_AGGREGATABLE(CFontsFolder) diff --git a/dll/win32/shell32/folders/CMyDocsFolder.h b/dll/win32/shell32/folders/CMyDocsFolder.h index c462ab9c200..246702a4f73 100644 --- a/dll/win32/shell32/folders/CMyDocsFolder.h +++ b/dll/win32/shell32/folders/CMyDocsFolder.h @@ -42,45 +42,45 @@ class CMyDocsFolder : HRESULT WINAPI FinalConstruct(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; /* ShellFolder2 */ - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // IPersistFolder - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; /*** IItemNameLimits methods ***/ STDMETHODIMP - GetMaxLength(LPCWSTR pszName, int *piMaxNameLen) + GetMaxLength(LPCWSTR pszName, int *piMaxNameLen) override { return E_NOTIMPL; } STDMETHODIMP - GetValidCharacters(LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars) + GetValidCharacters(LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars) override { if (ppwszValidChars) { diff --git a/dll/win32/shell32/folders/CNetFolder.h b/dll/win32/shell32/folders/CNetFolder.h index 33d807d8fe5..f445da87a85 100644 --- a/dll/win32/shell32/folders/CNetFolder.h +++ b/dll/win32/shell32/folders/CNetFolder.h @@ -38,34 +38,34 @@ class CNetFolder : ~CNetFolder(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; /* ShellFolder2 */ - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // IPersistFolder - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; DECLARE_REGISTRY_RESOURCEID(IDR_NETWORKPLACES) DECLARE_NOT_AGGREGATABLE(CNetFolder) diff --git a/dll/win32/shell32/folders/CPrinterFolder.h b/dll/win32/shell32/folders/CPrinterFolder.h index 18daf653f53..57a2fda40cb 100644 --- a/dll/win32/shell32/folders/CPrinterFolder.h +++ b/dll/win32/shell32/folders/CPrinterFolder.h @@ -41,34 +41,34 @@ class CPrinterFolder : ~CPrinterFolder(); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; /* ShellFolder2 */ - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // IPersist - virtual HRESULT WINAPI GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // IPersistFolder - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; DECLARE_REGISTRY_RESOURCEID(IDR_PRINTERS) DECLARE_NOT_AGGREGATABLE(CPrinterFolder) diff --git a/dll/win32/shell32/folders/CRecycleBin.cpp b/dll/win32/shell32/folders/CRecycleBin.cpp index 6dba39d8c69..c8bceb589f4 100644 --- a/dll/win32/shell32/folders/CRecycleBin.cpp +++ b/dll/win32/shell32/folders/CRecycleBin.cpp @@ -142,12 +142,12 @@ class CRecycleBinItemContextMenu : HRESULT WINAPI Initialize(LPCITEMIDLIST pidl); // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + STDMETHOD(QueryContextMenu)(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpcmi) override; + STDMETHOD(GetCommandString)(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override; // IContextMenu2 - virtual HRESULT WINAPI HandleMenuMsg(UINT uMsg, WPARAM wParam, LPARAM lParam); + STDMETHOD(HandleMenuMsg)(UINT uMsg, WPARAM wParam, LPARAM lParam) override; BEGIN_COM_MAP(CRecycleBinItemContextMenu) COM_INTERFACE_ENTRY_IID(IID_IContextMenu, IContextMenu) diff --git a/dll/win32/shell32/folders/CRecycleBin.h b/dll/win32/shell32/folders/CRecycleBin.h index c01e9b7a746..ecf56699447 100644 --- a/dll/win32/shell32/folders/CRecycleBin.h +++ b/dll/win32/shell32/folders/CRecycleBin.h @@ -45,44 +45,44 @@ class CRecycleBin : ~CRecycleBin(); // IPersistFolder - virtual HRESULT WINAPI GetClassID(CLSID *pClassID); - virtual HRESULT WINAPI Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(GetClassID)(CLSID *pClassID) override; + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT WINAPI GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; // IShellFolder2 - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; // IContextMenu - virtual HRESULT WINAPI QueryContextMenu(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - virtual HRESULT WINAPI InvokeCommand(LPCMINVOKECOMMANDINFO lpcmi); - virtual HRESULT WINAPI GetCommandString(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen); + STDMETHOD(QueryContextMenu)(HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) override; + STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpcmi) override; + STDMETHOD(GetCommandString)(UINT_PTR idCommand, UINT uFlags, UINT *lpReserved, LPSTR lpszName, UINT uMaxNameLen) override; // IShellPropSheetExt - virtual HRESULT WINAPI AddPages(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam); - virtual HRESULT WINAPI ReplacePage(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam); + STDMETHOD(AddPages)(LPFNSVADDPROPSHEETPAGE pfnAddPage, LPARAM lParam) override; + STDMETHOD(ReplacePage)(EXPPS uPageID, LPFNSVADDPROPSHEETPAGE pfnReplaceWith, LPARAM lParam) override; // IShellExtInit - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID) override; DECLARE_REGISTRY_RESOURCEID(IDR_RECYCLEBIN) DECLARE_NOT_AGGREGATABLE(CRecycleBin) diff --git a/dll/win32/shell32/folders/CRegFolder.cpp b/dll/win32/shell32/folders/CRegFolder.cpp index 489731638fd..5965039c147 100644 --- a/dll/win32/shell32/folders/CRegFolder.cpp +++ b/dll/win32/shell32/folders/CRegFolder.cpp @@ -116,6 +116,7 @@ HRESULT CGuidItemContextMenu_CreateInstance(PCIDLIST_ABSOLUTE pidlFolder, { wcscpy(&key[6], pwszCLSID); AddClassKeyToArray(key, hKeys, &cKeys); + CoTaskMemFree(pwszCLSID); } } AddClassKeyToArray(L"Folder", hKeys, &cKeys); @@ -318,25 +319,25 @@ class CRegFolder : HRESULT WINAPI Initialize(const GUID *pGuid, LPCITEMIDLIST pidlRoot, LPCWSTR lpszPath, LPCWSTR lpszEnumKeyName); // IShellFolder - virtual HRESULT WINAPI ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten, PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes); - virtual HRESULT WINAPI EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList); - virtual HRESULT WINAPI BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2); - virtual HRESULT WINAPI CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut); - virtual HRESULT WINAPI GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut); - virtual HRESULT WINAPI GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut); - virtual HRESULT WINAPI GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet); - virtual HRESULT WINAPI SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut); + STDMETHOD(ParseDisplayName)(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten, PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes) override; + STDMETHOD(EnumObjects)(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override; + STDMETHOD(BindToObject)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(BindToStorage)(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(CompareIDs)(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override; + STDMETHOD(CreateViewObject)(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override; + STDMETHOD(GetAttributesOf)(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override; + STDMETHOD(GetUIObjectOf)(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT * prgfInOut, LPVOID * ppvOut) override; + STDMETHOD(GetDisplayNameOf)(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override; + STDMETHOD(SetNameOf)(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override; /* ShellFolder2 */ - virtual HRESULT WINAPI GetDefaultSearchGUID(GUID *pguid); - virtual HRESULT WINAPI EnumSearches(IEnumExtraSearch **ppenum); - virtual HRESULT WINAPI GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay); - virtual HRESULT WINAPI GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags); - virtual HRESULT WINAPI GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv); - virtual HRESULT WINAPI GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd); - virtual HRESULT WINAPI MapColumnToSCID(UINT column, SHCOLUMNID *pscid); + STDMETHOD(GetDefaultSearchGUID)(GUID *pguid) override; + STDMETHOD(EnumSearches)(IEnumExtraSearch **ppenum) override; + STDMETHOD(GetDefaultColumn)(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override; + STDMETHOD(GetDefaultColumnState)(UINT iColumn, DWORD *pcsFlags) override; + STDMETHOD(GetDetailsEx)(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override; + STDMETHOD(GetDetailsOf)(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override; + STDMETHOD(MapColumnToSCID)(UINT column, SHCOLUMNID *pscid) override; DECLARE_NOT_AGGREGATABLE(CRegFolder) diff --git a/dll/win32/shell32/icon_res.rc b/dll/win32/shell32/icon_res.rc index 31326738158..d0d18f94d46 100644 --- a/dll/win32/shell32/icon_res.rc +++ b/dll/win32/shell32/icon_res.rc @@ -47,6 +47,10 @@ IDI_SHELL_EXPLORER ICON "res/icons/46.ico" IDI_SHELL_UPDATE ICON "res/icons/47.ico" IDI_SHELL_LOCKED ICON "res/icons/48.ico" IDI_SHELL_DISCONN ICON "res/icons/49.ico" +IDI_SHELL_NONE_50 ICON "res/icons/50.ico" +IDI_SHELL_NONE_51 ICON "res/icons/50.ico" +IDI_SHELL_NONE_52 ICON "res/icons/50.ico" +IDI_SHELL_NONE_53 ICON "res/icons/50.ico" IDI_SHELL_NOT_CONNECTED_HDD ICON "res/icons/54.ico" IDI_SHELL_MULTIPLE_FILES ICON "res/icons/133.ico" IDI_SHELL_OPEN_WITH ICON "res/icons/134.ico" diff --git a/dll/win32/shell32/iconcache.cpp b/dll/win32/shell32/iconcache.cpp index 4af8d2a5c0d..99af8f91eab 100644 --- a/dll/win32/shell32/iconcache.cpp +++ b/dll/win32/shell32/iconcache.cpp @@ -122,10 +122,7 @@ static HICON SIC_OverlayShortcutImage(HICON SourceIcon, BOOL large) /* search for the shortcut icon only once */ if (s_imgListIdx == -1) - s_imgListIdx = SIC_LoadOverlayIcon(- IDI_SHELL_SHORTCUT); - /* FIXME should use icon index 29 instead of the - resource id, but not all icons are present yet - so we can't use icon indices */ + s_imgListIdx = SIC_LoadOverlayIcon(IDI_SHELL_SHORTCUT - 1); if (s_imgListIdx != -1) { diff --git a/dll/win32/shell32/lang/bg-BG.rc b/dll/win32/shell32/lang/bg-BG.rc index 559e6c5f1e6..ac4b5ff78a2 100644 --- a/dll/win32/shell32/lang/bg-BG.rc +++ b/dll/win32/shell32/lang/bg-BG.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/ca-ES.rc b/dll/win32/shell32/lang/ca-ES.rc index 75b80da3662..952c31808a1 100644 --- a/dll/win32/shell32/lang/ca-ES.rc +++ b/dll/win32/shell32/lang/ca-ES.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/cs-CZ.rc b/dll/win32/shell32/lang/cs-CZ.rc index 23ad7339ad9..e08600f7f68 100644 --- a/dll/win32/shell32/lang/cs-CZ.rc +++ b/dll/win32/shell32/lang/cs-CZ.rc @@ -1026,6 +1026,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/da-DK.rc b/dll/win32/shell32/lang/da-DK.rc index ed19efa3a72..c00b7210fe5 100644 --- a/dll/win32/shell32/lang/da-DK.rc +++ b/dll/win32/shell32/lang/da-DK.rc @@ -1025,6 +1025,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/de-DE.rc b/dll/win32/shell32/lang/de-DE.rc index 62f4153f141..c37957a1f35 100644 --- a/dll/win32/shell32/lang/de-DE.rc +++ b/dll/win32/shell32/lang/de-DE.rc @@ -1019,6 +1019,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Popupinformationen für Ordner- und Desktop-Elemente anzeigen" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/el-GR.rc b/dll/win32/shell32/lang/el-GR.rc index 53c6c39d970..57695f5dcde 100644 --- a/dll/win32/shell32/lang/el-GR.rc +++ b/dll/win32/shell32/lang/el-GR.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/en-GB.rc b/dll/win32/shell32/lang/en-GB.rc index 609db421268..4f33b9f74a9 100644 --- a/dll/win32/shell32/lang/en-GB.rc +++ b/dll/win32/shell32/lang/en-GB.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/en-US.rc b/dll/win32/shell32/lang/en-US.rc index 7ccbe44e4c0..37750037ace 100644 --- a/dll/win32/shell32/lang/en-US.rc +++ b/dll/win32/shell32/lang/en-US.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/es-ES.rc b/dll/win32/shell32/lang/es-ES.rc index 246aaa9cdc3..3857b042da9 100644 --- a/dll/win32/shell32/lang/es-ES.rc +++ b/dll/win32/shell32/lang/es-ES.rc @@ -1027,6 +1027,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Mostrar descripción de íconos y carpetas en el escritorio" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/et-EE.rc b/dll/win32/shell32/lang/et-EE.rc index eadffc70341..e70df033822 100644 --- a/dll/win32/shell32/lang/et-EE.rc +++ b/dll/win32/shell32/lang/et-EE.rc @@ -1025,6 +1025,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Näita kausta- ja töölauaüksuste hüpikkirjeldusi" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/eu-ES.rc b/dll/win32/shell32/lang/eu-ES.rc index 071ce447178..47c44a9e745 100644 --- a/dll/win32/shell32/lang/eu-ES.rc +++ b/dll/win32/shell32/lang/eu-ES.rc @@ -1023,6 +1023,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Erakutsi ikonoen eta karpeten deskribapena mahaigainean" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/fi-FI.rc b/dll/win32/shell32/lang/fi-FI.rc index e7ae6609b60..24e874b3d24 100644 --- a/dll/win32/shell32/lang/fi-FI.rc +++ b/dll/win32/shell32/lang/fi-FI.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/fr-FR.rc b/dll/win32/shell32/lang/fr-FR.rc index cc2d1806554..0f7704c4cac 100644 --- a/dll/win32/shell32/lang/fr-FR.rc +++ b/dll/win32/shell32/lang/fr-FR.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Afficher les info-bulles pour les fichiers et les dossiers" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/he-IL.rc b/dll/win32/shell32/lang/he-IL.rc index 650c2908f22..d77f28f9573 100644 --- a/dll/win32/shell32/lang/he-IL.rc +++ b/dll/win32/shell32/lang/he-IL.rc @@ -1025,6 +1025,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/hi-IN.rc b/dll/win32/shell32/lang/hi-IN.rc index f57719dc761..8d616ab27eb 100644 --- a/dll/win32/shell32/lang/hi-IN.rc +++ b/dll/win32/shell32/lang/hi-IN.rc @@ -1020,6 +1020,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "फ़ोल्डर और डेस्कटॉप आइटम के लिए पॉप-अप विवरण दिखाएं" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/hu-HU.rc b/dll/win32/shell32/lang/hu-HU.rc index e62d25e0fc9..218e13db270 100644 --- a/dll/win32/shell32/lang/hu-HU.rc +++ b/dll/win32/shell32/lang/hu-HU.rc @@ -1017,6 +1017,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Felugró leírások megjelenítése a mappákhoz és az asztalon lévő elemekhez" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/id-ID.rc b/dll/win32/shell32/lang/id-ID.rc index 39c827ee0a1..693442743c7 100644 --- a/dll/win32/shell32/lang/id-ID.rc +++ b/dll/win32/shell32/lang/id-ID.rc @@ -1015,6 +1015,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Tampilkan deskrisi popup untuk butir folder dan desktop" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/it-IT.rc b/dll/win32/shell32/lang/it-IT.rc index 6766e90fd89..033829c1a7d 100644 --- a/dll/win32/shell32/lang/it-IT.rc +++ b/dll/win32/shell32/lang/it-IT.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/ja-JP.rc b/dll/win32/shell32/lang/ja-JP.rc index 6f9ba06a541..b163c5297d2 100644 --- a/dll/win32/shell32/lang/ja-JP.rc +++ b/dll/win32/shell32/lang/ja-JP.rc @@ -1015,6 +1015,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "フォルダとデスクトップの項目にポップアップ式の説明を表示する" IDS_ADVANCED_DISPLAY_FAVORITES "「お気に入り」を表示" IDS_ADVANCED_DISPLAY_LOG_OFF "「ログオフ」を表示" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "「コントロール パネル」を展開" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "「マイ ドキュメント」を展開" + IDS_ADVANCED_EXPAND_PRINTERS "「プリンタ」を展開" + IDS_ADVANCED_EXPAND_MY_PICTURES "「マイ ピクチャ」を展開" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "「マイ ネットワーク」を展開" IDS_ADVANCED_DISPLAY_RUN "「ファイル名を指定して実行」を表示" IDS_ADVANCED_DISPLAY_ADMINTOOLS "「管理者ツール」を表示" diff --git a/dll/win32/shell32/lang/ko-KR.rc b/dll/win32/shell32/lang/ko-KR.rc index 9d864d132c5..01610d11ed4 100644 --- a/dll/win32/shell32/lang/ko-KR.rc +++ b/dll/win32/shell32/lang/ko-KR.rc @@ -1025,6 +1025,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/nl-NL.rc b/dll/win32/shell32/lang/nl-NL.rc index 61104e05a80..512f192b43c 100644 --- a/dll/win32/shell32/lang/nl-NL.rc +++ b/dll/win32/shell32/lang/nl-NL.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/no-NO.rc b/dll/win32/shell32/lang/no-NO.rc index 5afd5e2d4f0..77781157561 100644 --- a/dll/win32/shell32/lang/no-NO.rc +++ b/dll/win32/shell32/lang/no-NO.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/pl-PL.rc b/dll/win32/shell32/lang/pl-PL.rc index a326bda17ce..2dfe118b7e9 100644 --- a/dll/win32/shell32/lang/pl-PL.rc +++ b/dll/win32/shell32/lang/pl-PL.rc @@ -1027,6 +1027,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Pokaż podręczny opis elementów folderów i pulpitu" IDS_ADVANCED_DISPLAY_FAVORITES "Wyświetl polecenie Ulubione" IDS_ADVANCED_DISPLAY_LOG_OFF "Wyświetl polecenie Wyloguj" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Rozwiń polecenie Panel sterowania" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Rozwiń polecenie Moje dokumenty" + IDS_ADVANCED_EXPAND_PRINTERS "Rozwiń polecenie Drukarki" + IDS_ADVANCED_EXPAND_MY_PICTURES "Rozwiń polecenie Moje obrazy" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Rozwiń polecenie Połączenia sieciowe" IDS_ADVANCED_DISPLAY_RUN "Wyświetl polecenie Uruchom" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Wyświetl polecenie Narzędzia administracyjne" diff --git a/dll/win32/shell32/lang/pt-BR.rc b/dll/win32/shell32/lang/pt-BR.rc index fb161621bca..06fbd53c875 100644 --- a/dll/win32/shell32/lang/pt-BR.rc +++ b/dll/win32/shell32/lang/pt-BR.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/pt-PT.rc b/dll/win32/shell32/lang/pt-PT.rc index 7a57a7f1863..84121e96143 100644 --- a/dll/win32/shell32/lang/pt-PT.rc +++ b/dll/win32/shell32/lang/pt-PT.rc @@ -1013,6 +1013,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Mostrar descrição pop-up para itens de pastas e área de trabalho" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/ro-RO.rc b/dll/win32/shell32/lang/ro-RO.rc index 416110b4c0e..3e1f529ecfa 100644 --- a/dll/win32/shell32/lang/ro-RO.rc +++ b/dll/win32/shell32/lang/ro-RO.rc @@ -1022,6 +1022,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Permite descriere prin indicii pentru foldere și elemente de desktop" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/ru-RU.rc b/dll/win32/shell32/lang/ru-RU.rc index c3d6b1dd007..19916c2b4ac 100644 --- a/dll/win32/shell32/lang/ru-RU.rc +++ b/dll/win32/shell32/lang/ru-RU.rc @@ -1027,6 +1027,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Отображать описание для папок и элементов рабочего стола" IDS_ADVANCED_DISPLAY_FAVORITES "Отображать папку ""Избранное""" IDS_ADVANCED_DISPLAY_LOG_OFF "Отображать команду ""Завершение сеанса""" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Раскрывать ""Панель управления""" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Раскрывать папку ""Мои документы""" + IDS_ADVANCED_EXPAND_PRINTERS "Раскрывать папку ""Принтеры""" + IDS_ADVANCED_EXPAND_MY_PICTURES "Раскрывать папку ""Мои рисунки""" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Раскрывать ""Сетевые подключения""" IDS_ADVANCED_DISPLAY_RUN "Отображать команду ""Выполнить""" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Отображать меню ""Администрирование""" diff --git a/dll/win32/shell32/lang/sk-SK.rc b/dll/win32/shell32/lang/sk-SK.rc index af5f6fbd821..f50d9ef55eb 100644 --- a/dll/win32/shell32/lang/sk-SK.rc +++ b/dll/win32/shell32/lang/sk-SK.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/sl-SI.rc b/dll/win32/shell32/lang/sl-SI.rc index 50efe508022..8ff8f264fe1 100644 --- a/dll/win32/shell32/lang/sl-SI.rc +++ b/dll/win32/shell32/lang/sl-SI.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/sq-AL.rc b/dll/win32/shell32/lang/sq-AL.rc index 884be89627d..b69d3dc1ccb 100644 --- a/dll/win32/shell32/lang/sq-AL.rc +++ b/dll/win32/shell32/lang/sq-AL.rc @@ -1025,6 +1025,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/sv-SE.rc b/dll/win32/shell32/lang/sv-SE.rc index e2afdcf87e6..841073e60ac 100644 --- a/dll/win32/shell32/lang/sv-SE.rc +++ b/dll/win32/shell32/lang/sv-SE.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Show pop-up description for folder and desktop items" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/tr-TR.rc b/dll/win32/shell32/lang/tr-TR.rc index c69b7fd0c63..817a264eb84 100644 --- a/dll/win32/shell32/lang/tr-TR.rc +++ b/dll/win32/shell32/lang/tr-TR.rc @@ -1027,6 +1027,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Dizin ve masaüstü ögeleri için açılan tanım göster" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/uk-UA.rc b/dll/win32/shell32/lang/uk-UA.rc index 13f78edaed4..781ec680440 100644 --- a/dll/win32/shell32/lang/uk-UA.rc +++ b/dll/win32/shell32/lang/uk-UA.rc @@ -1018,6 +1018,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "Показувати спливаючий опис для елементів папки та робочого столу" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/zh-CN.rc b/dll/win32/shell32/lang/zh-CN.rc index 1071fae4d81..6d1067b0bb4 100644 --- a/dll/win32/shell32/lang/zh-CN.rc +++ b/dll/win32/shell32/lang/zh-CN.rc @@ -1028,6 +1028,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "显示文件夹和桌面项目的弹出描述" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/zh-HK.rc b/dll/win32/shell32/lang/zh-HK.rc index 9683369bea4..349e08d9fa7 100644 --- a/dll/win32/shell32/lang/zh-HK.rc +++ b/dll/win32/shell32/lang/zh-HK.rc @@ -1026,6 +1026,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "顯示資料夾和桌面項目的快顯描述" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/lang/zh-TW.rc b/dll/win32/shell32/lang/zh-TW.rc index 4febbdb8532..aa8c7f4c85e 100644 --- a/dll/win32/shell32/lang/zh-TW.rc +++ b/dll/win32/shell32/lang/zh-TW.rc @@ -1027,6 +1027,11 @@ BEGIN IDS_ADVANCED_SHOW_INFO_TIP "顯示資料夾和桌面項目的快顯描述" IDS_ADVANCED_DISPLAY_FAVORITES "Display Favorites" IDS_ADVANCED_DISPLAY_LOG_OFF "Display Log Off" + IDS_ADVANCED_EXPAND_CONTROL_PANEL "Expand Control Panel" + IDS_ADVANCED_EXPAND_MY_DOCUMENTS "Expand My Documents" + IDS_ADVANCED_EXPAND_PRINTERS "Expand Printers" + IDS_ADVANCED_EXPAND_MY_PICTURES "Expand My Pictures" + IDS_ADVANCED_EXPAND_NET_CONNECTIONS "Expand Network Connections" IDS_ADVANCED_DISPLAY_RUN "Display Run" IDS_ADVANCED_DISPLAY_ADMINTOOLS "Display Administrative Tools" diff --git a/dll/win32/shell32/res/icons/50.ico b/dll/win32/shell32/res/icons/50.ico new file mode 100644 index 00000000000..09d9c20589d Binary files /dev/null and b/dll/win32/shell32/res/icons/50.ico differ diff --git a/dll/win32/shell32/shell32.cpp b/dll/win32/shell32/shell32.cpp index 91e5ed22c84..2847bd7a5c6 100644 --- a/dll/win32/shell32/shell32.cpp +++ b/dll/win32/shell32/shell32.cpp @@ -137,8 +137,8 @@ class IDefClFImpl : HRESULT Initialize(LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, const IID *riidInstx); // IClassFactory - virtual HRESULT WINAPI CreateInstance(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppvObject); - virtual HRESULT WINAPI LockServer(BOOL fLock); + STDMETHOD(CreateInstance)(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppvObject) override; + STDMETHOD(LockServer)(BOOL fLock) override; BEGIN_COM_MAP(IDefClFImpl) COM_INTERFACE_ENTRY_IID(IID_IClassFactory, IClassFactory) diff --git a/dll/win32/shell32/shelldesktop/CChangeNotifyServer.cpp b/dll/win32/shell32/shelldesktop/CChangeNotifyServer.cpp index bb6d531ec9f..24af7f617f7 100644 --- a/dll/win32/shell32/shelldesktop/CChangeNotifyServer.cpp +++ b/dll/win32/shell32/shelldesktop/CChangeNotifyServer.cpp @@ -42,8 +42,8 @@ class CChangeNotifyServer : HRESULT Initialize(); // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // Message handlers LRESULT OnRegister(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); diff --git a/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp b/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp index 95327468757..6e1d63b7ef4 100644 --- a/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp +++ b/dll/win32/shell32/shelldesktop/CDesktopBrowser.cpp @@ -55,26 +55,26 @@ class CDesktopBrowser : HRESULT Initialize(IShellDesktopTray *ShellDeskx); // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *lphwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IShellBrowser methods *** - virtual HRESULT STDMETHODCALLTYPE InsertMenusSB(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths); - virtual HRESULT STDMETHODCALLTYPE SetMenuSB(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject); - virtual HRESULT STDMETHODCALLTYPE RemoveMenusSB(HMENU hmenuShared); - virtual HRESULT STDMETHODCALLTYPE SetStatusTextSB(LPCOLESTR pszStatusText); - virtual HRESULT STDMETHODCALLTYPE EnableModelessSB(BOOL fEnable); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorSB(MSG *pmsg, WORD wID); - virtual HRESULT STDMETHODCALLTYPE BrowseObject(LPCITEMIDLIST pidl, UINT wFlags); - virtual HRESULT STDMETHODCALLTYPE GetViewStateStream(DWORD grfMode, IStream **ppStrm); - virtual HRESULT STDMETHODCALLTYPE GetControlWindow(UINT id, HWND *lphwnd); - virtual HRESULT STDMETHODCALLTYPE SendControlMsg(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret); - virtual HRESULT STDMETHODCALLTYPE QueryActiveShellView(struct IShellView **ppshv); - virtual HRESULT STDMETHODCALLTYPE OnViewWindowActive(struct IShellView *ppshv); - virtual HRESULT STDMETHODCALLTYPE SetToolbarItems(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags); + STDMETHOD(InsertMenusSB)(HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths) override; + STDMETHOD(SetMenuSB)(HMENU hmenuShared, HOLEMENU holemenuRes, HWND hwndActiveObject) override; + STDMETHOD(RemoveMenusSB)(HMENU hmenuShared) override; + STDMETHOD(SetStatusTextSB)(LPCOLESTR pszStatusText) override; + STDMETHOD(EnableModelessSB)(BOOL fEnable) override; + STDMETHOD(TranslateAcceleratorSB)(MSG *pmsg, WORD wID) override; + STDMETHOD(BrowseObject)(LPCITEMIDLIST pidl, UINT wFlags) override; + STDMETHOD(GetViewStateStream)(DWORD grfMode, IStream **ppStrm) override; + STDMETHOD(GetControlWindow)(UINT id, HWND *lphwnd) override; + STDMETHOD(SendControlMsg)(UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret) override; + STDMETHOD(QueryActiveShellView)(struct IShellView **ppshv) override; + STDMETHOD(OnViewWindowActive)(struct IShellView *ppshv) override; + STDMETHOD(SetToolbarItems)(LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // message handlers LRESULT OnEraseBkgnd(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled); diff --git a/dll/win32/shell32/shellmenu/CMenuBand.h b/dll/win32/shell32/shellmenu/CMenuBand.h index ac064f567be..a99de4c9f66 100644 --- a/dll/win32/shell32/shellmenu/CMenuBand.h +++ b/dll/win32/shell32/shellmenu/CMenuBand.h @@ -100,86 +100,86 @@ class CMenuBand : END_COM_MAP() // *** IDeskBand methods *** - virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi); + STDMETHOD(GetBandInfo)(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override; // *** IDockingWindow methods *** - virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow); - virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved); - virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved); + STDMETHOD(ShowDW)(BOOL fShow) override; + STDMETHOD(CloseDW)(DWORD dwReserved) override; + STDMETHOD(ResizeBorderDW)(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override; // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *phwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, PVOID *ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, PVOID *ppvSite) override; // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // *** IPersistStream methods *** - virtual HRESULT STDMETHODCALLTYPE IsDirty(); - virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm); - virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty); - virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize); + STDMETHOD(IsDirty)() override; + STDMETHOD(Load)(IStream *pStm) override; + STDMETHOD(Save)(IStream *pStm, BOOL fClearDirty) override; + STDMETHOD(GetSizeMax)(ULARGE_INTEGER *pcbSize) override; // *** IPersist methods *** - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID); + STDMETHOD(GetClassID)(CLSID *pClassID) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IMenuPopup methods *** - virtual HRESULT STDMETHODCALLTYPE Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags); - virtual HRESULT STDMETHODCALLTYPE OnSelect(DWORD dwSelectType); - virtual HRESULT STDMETHODCALLTYPE SetSubMenu(IMenuPopup *pmp, BOOL fSet); + STDMETHOD(Popup)(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags) override; + STDMETHOD(OnSelect)(DWORD dwSelectType) override; + STDMETHOD(SetSubMenu)(IMenuPopup *pmp, BOOL fSet) override; // *** IDeskBar methods *** - virtual HRESULT STDMETHODCALLTYPE SetClient(IUnknown *punkClient); - virtual HRESULT STDMETHODCALLTYPE GetClient(IUnknown **ppunkClient); - virtual HRESULT STDMETHODCALLTYPE OnPosRectChangeDB(RECT *prc); + STDMETHOD(SetClient)(IUnknown *punkClient) override; + STDMETHOD(GetClient)(IUnknown **ppunkClient) override; + STDMETHOD(OnPosRectChangeDB)(RECT *prc) override; // *** IMenuBand methods *** - virtual HRESULT STDMETHODCALLTYPE IsMenuMessage(MSG *pmsg); - virtual HRESULT STDMETHODCALLTYPE TranslateMenuMessage(MSG *pmsg, LRESULT *plRet); + STDMETHOD(IsMenuMessage)(MSG *pmsg) override; + STDMETHOD(TranslateMenuMessage)(MSG *pmsg, LRESULT *plRet) override; // *** IShellMenu methods *** - virtual HRESULT STDMETHODCALLTYPE Initialize(IShellMenuCallback *psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags); - virtual HRESULT STDMETHODCALLTYPE GetMenuInfo(IShellMenuCallback **ppsmc, UINT *puId, UINT *puIdAncestor, DWORD *pdwFlags); - virtual HRESULT STDMETHODCALLTYPE SetShellFolder(IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags); - virtual HRESULT STDMETHODCALLTYPE GetShellFolder(DWORD *pdwFlags, LPITEMIDLIST *ppidl, REFIID riid, void **ppv); - virtual HRESULT STDMETHODCALLTYPE SetMenu(HMENU hmenu, HWND hwnd, DWORD dwFlags); - virtual HRESULT STDMETHODCALLTYPE GetMenu(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags); - virtual HRESULT STDMETHODCALLTYPE InvalidateItem(LPSMDATA psmd, DWORD dwFlags); - virtual HRESULT STDMETHODCALLTYPE GetState(LPSMDATA psmd); - virtual HRESULT STDMETHODCALLTYPE SetMenuToolbar(IUnknown *punk, DWORD dwFlags); + STDMETHOD(Initialize)(IShellMenuCallback *psmc, UINT uId, UINT uIdAncestor, DWORD dwFlags) override; + STDMETHOD(GetMenuInfo)(IShellMenuCallback **ppsmc, UINT *puId, UINT *puIdAncestor, DWORD *pdwFlags) override; + STDMETHOD(SetShellFolder)(IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags) override; + STDMETHOD(GetShellFolder)(DWORD *pdwFlags, LPITEMIDLIST *ppidl, REFIID riid, void **ppv) override; + STDMETHOD(SetMenu)(HMENU hmenu, HWND hwnd, DWORD dwFlags) override; + STDMETHOD(GetMenu)(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags) override; + STDMETHOD(InvalidateItem)(LPSMDATA psmd, DWORD dwFlags) override; + STDMETHOD(GetState)(LPSMDATA psmd) override; + STDMETHOD(SetMenuToolbar)(IUnknown *punk, DWORD dwFlags) override; // *** IWinEventHandler methods *** - virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); + STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override; + STDMETHOD(IsWindowOwner)(HWND hWnd) override; // *** IShellMenu2 methods *** - virtual HRESULT STDMETHODCALLTYPE GetSubMenu(THIS); - virtual HRESULT STDMETHODCALLTYPE SetToolbar(THIS); - virtual HRESULT STDMETHODCALLTYPE SetMinWidth(THIS); - virtual HRESULT STDMETHODCALLTYPE SetNoBorder(THIS); - virtual HRESULT STDMETHODCALLTYPE SetTheme(THIS); + STDMETHOD(GetSubMenu)(THIS) override; + STDMETHOD(SetToolbar)(THIS) override; + STDMETHOD(SetMinWidth)(THIS) override; + STDMETHOD(SetNoBorder)(THIS) override; + STDMETHOD(SetTheme)(THIS) override; // *** IShellMenuAcc methods *** - virtual HRESULT STDMETHODCALLTYPE GetTop(THIS); - virtual HRESULT STDMETHODCALLTYPE GetBottom(THIS); - virtual HRESULT STDMETHODCALLTYPE GetTracked(THIS); - virtual HRESULT STDMETHODCALLTYPE GetParentSite(THIS); - virtual HRESULT STDMETHODCALLTYPE GetState(THIS); - virtual HRESULT STDMETHODCALLTYPE DoDefaultAction(THIS); - virtual HRESULT STDMETHODCALLTYPE IsEmpty(THIS); + STDMETHOD(GetTop)(THIS) override; + STDMETHOD(GetBottom)(THIS) override; + STDMETHOD(GetTracked)(THIS) override; + STDMETHOD(GetParentSite)(THIS) override; + STDMETHOD(GetState)(THIS) override; + STDMETHOD(DoDefaultAction)(THIS) override; + STDMETHOD(IsEmpty)(THIS) override; HRESULT _CallCBWithItemId(UINT Id, UINT uMsg, WPARAM wParam, LPARAM lParam); HRESULT _CallCBWithItemPidl(LPITEMIDLIST pidl, UINT uMsg, WPARAM wParam, LPARAM lParam); diff --git a/dll/win32/shell32/shellmenu/CMenuDeskBar.h b/dll/win32/shell32/shellmenu/CMenuDeskBar.h index 0e3e07859a5..2a48fec38f7 100644 --- a/dll/win32/shell32/shellmenu/CMenuDeskBar.h +++ b/dll/win32/shell32/shellmenu/CMenuDeskBar.h @@ -91,46 +91,46 @@ class CMenuDeskBar : END_COM_MAP() // *** IMenuPopup methods *** - virtual HRESULT STDMETHODCALLTYPE Popup(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags); - virtual HRESULT STDMETHODCALLTYPE OnSelect(DWORD dwSelectType); - virtual HRESULT STDMETHODCALLTYPE SetSubMenu(IMenuPopup *pmp, BOOL fSet); + STDMETHOD(Popup)(POINTL *ppt, RECTL *prcExclude, MP_POPUPFLAGS dwFlags) override; + STDMETHOD(OnSelect)(DWORD dwSelectType) override; + STDMETHOD(SetSubMenu)(IMenuPopup *pmp, BOOL fSet) override; // *** IOleWindow methods *** - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); + STDMETHOD(GetWindow)(HWND *phwnd) override; + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; // *** IObjectWithSite methods *** - virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite); - virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, PVOID *ppvSite); + STDMETHOD(SetSite)(IUnknown *pUnkSite) override; + STDMETHOD(GetSite)(REFIID riid, PVOID *ppvSite) override; // *** IBanneredBar methods *** - virtual HRESULT STDMETHODCALLTYPE SetIconSize(DWORD iIcon); - virtual HRESULT STDMETHODCALLTYPE GetIconSize(DWORD* piIcon); - virtual HRESULT STDMETHODCALLTYPE SetBitmap(HBITMAP hBitmap); - virtual HRESULT STDMETHODCALLTYPE GetBitmap(HBITMAP* phBitmap); + STDMETHOD(SetIconSize)(DWORD iIcon) override; + STDMETHOD(GetIconSize)(DWORD* piIcon) override; + STDMETHOD(SetBitmap)(HBITMAP hBitmap) override; + STDMETHOD(GetBitmap)(HBITMAP* phBitmap) override; // *** IInitializeObject methods *** - virtual HRESULT STDMETHODCALLTYPE Initialize(THIS); + STDMETHOD(Initialize)(THIS) override; // *** IOleCommandTarget methods *** - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // *** IServiceProvider methods *** - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // *** IInputObjectSite methods *** - virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(LPUNKNOWN lpUnknown, BOOL bFocus); + STDMETHOD(OnFocusChangeIS)(LPUNKNOWN lpUnknown, BOOL bFocus) override; // *** IInputObject methods *** - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL bActivating, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(THIS); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL bActivating, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)(THIS) override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // *** IDeskBar methods *** - virtual HRESULT STDMETHODCALLTYPE SetClient(IUnknown *punkClient); - virtual HRESULT STDMETHODCALLTYPE GetClient(IUnknown **ppunkClient); - virtual HRESULT STDMETHODCALLTYPE OnPosRectChangeDB(LPRECT prc); + STDMETHOD(SetClient)(IUnknown *punkClient) override; + STDMETHOD(GetClient)(IUnknown **ppunkClient) override; + STDMETHOD(OnPosRectChangeDB)(LPRECT prc) override; private: // message handlers diff --git a/dll/win32/shell32/shellmenu/CMenuSite.h b/dll/win32/shell32/shellmenu/CMenuSite.h index f2336729729..3421e1be307 100644 --- a/dll/win32/shell32/shellmenu/CMenuSite.h +++ b/dll/win32/shell32/shellmenu/CMenuSite.h @@ -59,49 +59,48 @@ class CMenuSite : END_COM_MAP() // IBandSite - virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown * punk); - virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD* pdwBandID); - virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName); - virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, VOID **ppv); + STDMETHOD(AddBand)(IUnknown * punk) override; + STDMETHOD(EnumBands)(UINT uBand, DWORD* pdwBandID) override; + STDMETHOD(QueryBand)(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName) override; + STDMETHOD(GetBandObject)(DWORD dwBandID, REFIID riid, VOID **ppv) override; // IDeskBarClient - virtual HRESULT STDMETHODCALLTYPE SetDeskBarSite(IUnknown *punkSite); - virtual HRESULT STDMETHODCALLTYPE GetSize(DWORD dwWhich, LPRECT prc); - virtual HRESULT STDMETHODCALLTYPE UIActivateDBC(DWORD dwState); + STDMETHOD(SetDeskBarSite)(IUnknown *punkSite) override; + STDMETHOD(GetSize)(DWORD dwWhich, LPRECT prc) override; + STDMETHOD(UIActivateDBC)(DWORD dwState) override; // IOleWindow - virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *phwnd); + STDMETHOD(GetWindow)(HWND *phwnd) override; // IOleCommandTarget - virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID * pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText); - virtual HRESULT STDMETHODCALLTYPE Exec(const GUID * pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut); + STDMETHOD(QueryStatus)(const GUID * pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText) override; + STDMETHOD(Exec)(const GUID * pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override; // IInputObject - virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg); - virtual HRESULT STDMETHODCALLTYPE HasFocusIO(); - virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg); + STDMETHOD(UIActivateIO)(BOOL fActivate, LPMSG lpMsg) override; + STDMETHOD(HasFocusIO)() override; + STDMETHOD(TranslateAcceleratorIO)(LPMSG lpMsg) override; // IInputObjectSite - virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus); + STDMETHOD(OnFocusChangeIS)(IUnknown *punkObj, BOOL fSetFocus) override; // IWinEventHandler - virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd); - virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult); + STDMETHOD(IsWindowOwner)(HWND hWnd) override; + STDMETHOD(OnWinEvent)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override; // IServiceProvider - virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject); - + STDMETHOD(QueryService)(REFGUID guidService, REFIID riid, void **ppvObject) override; // Using custom message map instead virtual BOOL ProcessWindowMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD mapId = 0); - // UNIMPLEMENTED - virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode); - virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo); - virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID); - virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo); - virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState); - virtual HRESULT STDMETHODCALLTYPE SetModeDBC(DWORD dwMode); + // IDeskBarClient + STDMETHOD(ContextSensitiveHelp)(BOOL fEnterMode) override; + STDMETHOD(GetBandSiteInfo)(BANDSITEINFO *pbsinfo) override; + STDMETHOD(RemoveBand)(DWORD dwBandID) override; + STDMETHOD(SetBandSiteInfo)(const BANDSITEINFO *pbsinfo) override; + STDMETHOD(SetBandState)(DWORD dwBandID, DWORD dwMask, DWORD dwState) override; + STDMETHOD(SetModeDBC)(DWORD dwMode) override; private: IUnknown * ToIUnknown() { return static_cast(this); } diff --git a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp index 0d5cd9ce514..d3a0b959754 100644 --- a/dll/win32/shell32/shellmenu/CMenuToolbars.cpp +++ b/dll/win32/shell32/shellmenu/CMenuToolbars.cpp @@ -1323,6 +1323,18 @@ int CALLBACK PidlListSort(void* item1, void* item2, LPARAM lParam) return (int)(short)LOWORD(hr); } +static BOOL IsPidlPrograms(LPCITEMIDLIST pidlTarget) +{ + WCHAR szTarget[MAX_PATH], szPath[MAX_PATH]; + if (!SHGetPathFromIDListW(pidlTarget, szTarget)) + return FALSE; + SHGetSpecialFolderPathW(NULL, szPath, CSIDL_COMMON_PROGRAMS, FALSE); + if (lstrcmpiW(szTarget, szPath) == 0) + return TRUE; + SHGetSpecialFolderPathW(NULL, szPath, CSIDL_PROGRAMS, FALSE); + return (lstrcmpiW(szTarget, szPath) == 0); +} + HRESULT CMenuSFToolbar::FillToolbar(BOOL clearFirst) { HRESULT hr; @@ -1361,17 +1373,26 @@ HRESULT CMenuSFToolbar::FillToolbar(BOOL clearFirst) DPA_Sort(dpaSort, PidlListSort, (LPARAM) m_shellFolder.p); - for (int i = 0; iGetDisplayNameOf(item, SIGDN_NORMALDISPLAY, &sr); if (FAILED_UNEXPECTEDLY(hr)) { @@ -1379,9 +1400,18 @@ HRESULT CMenuSFToolbar::FillToolbar(BOOL clearFirst) return hr; } + PWSTR MenuString; StrRetToStr(&sr, NULL, &MenuString); - index = SHMapPIDLToSystemImageListIndex(m_shellFolder, item, &indexOpen); + if (bMustHideAdminTools && lstrcmpiW(MenuString, szAdminTools) == 0) + { + ++i; + CoTaskMemFree(MenuString); + continue; + } + + INT indexOpen = 0; + INT index = SHMapPIDLToSystemImageListIndex(m_shellFolder, item, &indexOpen); LPCITEMIDLIST itemc = item; diff --git a/dll/win32/shell32/shellmenu/CMenuToolbars.h b/dll/win32/shell32/shellmenu/CMenuToolbars.h index a04c56935f1..e6c6b19dabf 100644 --- a/dll/win32/shell32/shellmenu/CMenuToolbars.h +++ b/dll/win32/shell32/shellmenu/CMenuToolbars.h @@ -102,13 +102,13 @@ class CMenuToolbarBase : HRESULT BeforeCancelPopup(); protected: - virtual HRESULT OnDeletingButton(const NMTOOLBAR * tb) = 0; + virtual HRESULT OnDeletingButton(const NMTOOLBAR * tb) PURE; - virtual HRESULT InternalGetTooltip(INT iItem, INT index, DWORD_PTR dwData, LPWSTR pszText, INT cchTextMax) = 0; - virtual HRESULT InternalExecuteItem(INT iItem, INT index, DWORD_PTR dwData) = 0; - virtual HRESULT InternalPopupItem(INT iItem, INT index, DWORD_PTR dwData, BOOL keyInitiated) = 0; - virtual HRESULT InternalHasSubMenu(INT iItem, INT index, DWORD_PTR dwData) = 0; - virtual HRESULT InternalContextMenu(INT iItem, INT index, DWORD_PTR dwData, POINT pt) = 0; + virtual HRESULT InternalGetTooltip(INT iItem, INT index, DWORD_PTR dwData, LPWSTR pszText, INT cchTextMax) PURE; + virtual HRESULT InternalExecuteItem(INT iItem, INT index, DWORD_PTR dwData) PURE; + virtual HRESULT InternalPopupItem(INT iItem, INT index, DWORD_PTR dwData, BOOL keyInitiated) PURE; + virtual HRESULT InternalHasSubMenu(INT iItem, INT index, DWORD_PTR dwData) PURE; + virtual HRESULT InternalContextMenu(INT iItem, INT index, DWORD_PTR dwData, POINT pt) PURE; HRESULT AddButton(DWORD commandId, LPCWSTR caption, BOOL hasSubMenu, INT iconId, DWORD_PTR buttonData, BOOL last); HRESULT AddSeparator(BOOL last); @@ -152,16 +152,16 @@ class CMenuStaticToolbar : HRESULT SetMenu(HMENU hmenu, HWND hwnd, DWORD dwFlags); HRESULT GetMenu(HMENU *phmenu, HWND *phwnd, DWORD *pdwFlags); - virtual HRESULT FillToolbar(BOOL clearFirst=FALSE); + virtual HRESULT FillToolbar(BOOL clearFirst=FALSE) override; protected: - virtual HRESULT OnDeletingButton(const NMTOOLBAR * tb); + virtual HRESULT OnDeletingButton(const NMTOOLBAR * tb) override; - virtual HRESULT InternalGetTooltip(INT iItem, INT index, DWORD_PTR dwData, LPWSTR pszText, INT cchTextMax); - virtual HRESULT InternalExecuteItem(INT iItem, INT index, DWORD_PTR dwData); - virtual HRESULT InternalPopupItem(INT iItem, INT index, DWORD_PTR dwData, BOOL keyInitiated); - virtual HRESULT InternalHasSubMenu(INT iItem, INT index, DWORD_PTR dwData); - virtual HRESULT InternalContextMenu(INT iItem, INT index, DWORD_PTR dwData, POINT pt); + virtual HRESULT InternalGetTooltip(INT iItem, INT index, DWORD_PTR dwData, LPWSTR pszText, INT cchTextMax) override; + virtual HRESULT InternalExecuteItem(INT iItem, INT index, DWORD_PTR dwData) override; + virtual HRESULT InternalPopupItem(INT iItem, INT index, DWORD_PTR dwData, BOOL keyInitiated) override; + virtual HRESULT InternalHasSubMenu(INT iItem, INT index, DWORD_PTR dwData) override; + virtual HRESULT InternalContextMenu(INT iItem, INT index, DWORD_PTR dwData, POINT pt) override; }; class CMenuSFToolbar : @@ -179,14 +179,14 @@ class CMenuSFToolbar : HRESULT SetShellFolder(IShellFolder *psf, LPCITEMIDLIST pidlFolder, HKEY hKey, DWORD dwFlags); HRESULT GetShellFolder(DWORD *pdwFlags, LPITEMIDLIST *ppidl, REFIID riid, void **ppv); - virtual HRESULT FillToolbar(BOOL clearFirst=FALSE); + virtual HRESULT FillToolbar(BOOL clearFirst=FALSE) override; protected: - virtual HRESULT OnDeletingButton(const NMTOOLBAR * tb); + virtual HRESULT OnDeletingButton(const NMTOOLBAR * tb) override; - virtual HRESULT InternalGetTooltip(INT iItem, INT index, DWORD_PTR dwData, LPWSTR pszText, INT cchTextMax); - virtual HRESULT InternalExecuteItem(INT iItem, INT index, DWORD_PTR dwData); - virtual HRESULT InternalPopupItem(INT iItem, INT index, DWORD_PTR dwData, BOOL keyInitiated); - virtual HRESULT InternalHasSubMenu(INT iItem, INT index, DWORD_PTR dwData); - virtual HRESULT InternalContextMenu(INT iItem, INT index, DWORD_PTR dwData, POINT pt); + virtual HRESULT InternalGetTooltip(INT iItem, INT index, DWORD_PTR dwData, LPWSTR pszText, INT cchTextMax) override; + virtual HRESULT InternalExecuteItem(INT iItem, INT index, DWORD_PTR dwData) override; + virtual HRESULT InternalPopupItem(INT iItem, INT index, DWORD_PTR dwData, BOOL keyInitiated) override; + virtual HRESULT InternalHasSubMenu(INT iItem, INT index, DWORD_PTR dwData) override; + virtual HRESULT InternalContextMenu(INT iItem, INT index, DWORD_PTR dwData, POINT pt) override; }; diff --git a/dll/win32/shell32/shellmenu/CMergedFolder.cpp b/dll/win32/shell32/shellmenu/CMergedFolder.cpp index 0da67258af9..13306c487aa 100644 --- a/dll/win32/shell32/shellmenu/CMergedFolder.cpp +++ b/dll/win32/shell32/shellmenu/CMergedFolder.cpp @@ -70,14 +70,14 @@ class CEnumMergedFolder : HRESULT FindPidlInList(HWND hwndOwner, LPCITEMIDLIST pcidl, LocalPidlInfo * pinfo); HRESULT FindByName(HWND hwndOwner, LPCWSTR strParsingName, LocalPidlInfo * pinfo); - virtual HRESULT STDMETHODCALLTYPE Next( + STDMETHOD(Next)( ULONG celt, LPITEMIDLIST *rgelt, - ULONG *pceltFetched); + ULONG *pceltFetched) override; - virtual HRESULT STDMETHODCALLTYPE Skip(ULONG celt); - virtual HRESULT STDMETHODCALLTYPE Reset(); - virtual HRESULT STDMETHODCALLTYPE Clone(IEnumIDList **ppenum); + STDMETHOD(Skip)(ULONG celt) override; + STDMETHOD(Reset)() override; + STDMETHOD(Clone)(IEnumIDList **ppenum) override; }; CEnumMergedFolder::CEnumMergedFolder() : diff --git a/dll/win32/shell32/shellmenu/CMergedFolder.h b/dll/win32/shell32/shellmenu/CMergedFolder.h index e76fc98c098..a30a8cd0c47 100644 --- a/dll/win32/shell32/shellmenu/CMergedFolder.h +++ b/dll/win32/shell32/shellmenu/CMergedFolder.h @@ -21,15 +21,15 @@ interface IAugmentedShellFolder : public IShellFolder { - virtual HRESULT STDMETHODCALLTYPE AddNameSpace(LPGUID, IShellFolder *, LPCITEMIDLIST, ULONG) = 0; - virtual HRESULT STDMETHODCALLTYPE GetNameSpaceID(LPCITEMIDLIST, LPGUID) = 0; - virtual HRESULT STDMETHODCALLTYPE QueryNameSpace(ULONG, LPGUID, IShellFolder **) = 0; - virtual HRESULT STDMETHODCALLTYPE EnumNameSpace(ULONG, PULONG) = 0; + STDMETHOD(AddNameSpace)(LPGUID, IShellFolder *, LPCITEMIDLIST, ULONG) PURE; + STDMETHOD(GetNameSpaceID)(LPCITEMIDLIST, LPGUID) PURE; + STDMETHOD(QueryNameSpace)(ULONG, LPGUID, IShellFolder **) PURE; + STDMETHOD(EnumNameSpace)(ULONG, PULONG) PURE; }; interface IAugmentedShellFolder2 : public IAugmentedShellFolder { - virtual HRESULT STDMETHODCALLTYPE UnWrapIDList(LPCITEMIDLIST, LONG, IShellFolder **, LPITEMIDLIST *, LPITEMIDLIST *, LONG *) = 0; + STDMETHOD(UnWrapIDList)(LPCITEMIDLIST, LONG, IShellFolder **, LPITEMIDLIST *, LPITEMIDLIST *, LONG *) PURE; }; /* No idea what QUERYNAMESPACEINFO struct contains, yet */ @@ -40,7 +40,7 @@ struct QUERYNAMESPACEINFO interface IAugmentedShellFolder3 : public IAugmentedShellFolder2 { - virtual HRESULT STDMETHODCALLTYPE QueryNameSpace2(ULONG, QUERYNAMESPACEINFO *) = 0; + STDMETHOD(QueryNameSpace2)(ULONG, QUERYNAMESPACEINFO *) PURE; }; class CEnumMergedFolder; @@ -99,115 +99,114 @@ class CMergedFolder : END_COM_MAP() // IShellFolder - virtual HRESULT STDMETHODCALLTYPE ParseDisplayName( + STDMETHOD(ParseDisplayName)( HWND hwndOwner, LPBC pbcReserved, LPOLESTR lpszDisplayName, ULONG *pchEaten, LPITEMIDLIST *ppidl, - ULONG *pdwAttributes); + ULONG *pdwAttributes) override; - virtual HRESULT STDMETHODCALLTYPE EnumObjects( + STDMETHOD(EnumObjects)( HWND hwndOwner, SHCONTF grfFlags, - IEnumIDList **ppenumIDList); + IEnumIDList **ppenumIDList) override; - virtual HRESULT STDMETHODCALLTYPE BindToObject( + STDMETHOD(BindToObject)( LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, - void **ppvOut); + void **ppvOut) override; - virtual HRESULT STDMETHODCALLTYPE BindToStorage( + STDMETHOD(BindToStorage)( LPCITEMIDLIST pidl, LPBC pbcReserved, REFIID riid, - void **ppvObj); + void **ppvObj) override; - virtual HRESULT STDMETHODCALLTYPE CompareIDs( + STDMETHOD(CompareIDs)( LPARAM lParam, LPCITEMIDLIST pidl1, - LPCITEMIDLIST pidl2); + LPCITEMIDLIST pidl2) override; - virtual HRESULT STDMETHODCALLTYPE CreateViewObject( + STDMETHOD(CreateViewObject)( HWND hwndOwner, REFIID riid, - void **ppvOut); + void **ppvOut) override; - virtual HRESULT STDMETHODCALLTYPE GetAttributesOf( + STDMETHOD(GetAttributesOf)( UINT cidl, PCUITEMID_CHILD_ARRAY apidl, - SFGAOF *rgfInOut); + SFGAOF *rgfInOut) override; - virtual HRESULT STDMETHODCALLTYPE GetUIObjectOf( + STDMETHOD(GetUIObjectOf)( HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, - void **ppvOut); + void **ppvOut) override; - virtual HRESULT STDMETHODCALLTYPE GetDisplayNameOf( + STDMETHOD(GetDisplayNameOf)( LPCITEMIDLIST pidl, SHGDNF uFlags, - STRRET *lpName); + STRRET *lpName) override; - virtual HRESULT STDMETHODCALLTYPE SetNameOf( + STDMETHOD(SetNameOf)( HWND hwnd, LPCITEMIDLIST pidl, LPCOLESTR lpszName, SHGDNF uFlags, - LPITEMIDLIST *ppidlOut); + LPITEMIDLIST *ppidlOut) override; // IShellFolder2 - virtual HRESULT STDMETHODCALLTYPE GetDefaultSearchGUID( - GUID *lpguid); + STDMETHOD(GetDefaultSearchGUID)( + GUID *lpguid) override; - virtual HRESULT STDMETHODCALLTYPE EnumSearches( - IEnumExtraSearch **ppenum); + STDMETHOD(EnumSearches)( + IEnumExtraSearch **ppenum) override; - virtual HRESULT STDMETHODCALLTYPE GetDefaultColumn( + STDMETHOD(GetDefaultColumn)( DWORD dwReserved, ULONG *pSort, - ULONG *pDisplay); + ULONG *pDisplay) override; - virtual HRESULT STDMETHODCALLTYPE GetDefaultColumnState( + STDMETHOD(GetDefaultColumnState)( UINT iColumn, - SHCOLSTATEF *pcsFlags); + SHCOLSTATEF *pcsFlags) override; - virtual HRESULT STDMETHODCALLTYPE GetDetailsEx( + STDMETHOD(GetDetailsEx)( LPCITEMIDLIST pidl, const SHCOLUMNID *pscid, - VARIANT *pv); + VARIANT *pv) override; - virtual HRESULT STDMETHODCALLTYPE GetDetailsOf( + STDMETHOD(GetDetailsOf)( LPCITEMIDLIST pidl, UINT iColumn, - SHELLDETAILS *psd); + SHELLDETAILS *psd) override; - virtual HRESULT STDMETHODCALLTYPE MapColumnToSCID( + STDMETHOD(MapColumnToSCID)( UINT iColumn, - SHCOLUMNID *pscid); + SHCOLUMNID *pscid) override; // IPersist - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *lpClassId); + STDMETHOD(GetClassID)(CLSID *lpClassId) override; // IPersistFolder - virtual HRESULT STDMETHODCALLTYPE Initialize(PCIDLIST_ABSOLUTE pidl); + STDMETHOD(Initialize)(PCIDLIST_ABSOLUTE pidl) override; // IPersistFolder2 - virtual HRESULT STDMETHODCALLTYPE GetCurFolder(PIDLIST_ABSOLUTE * pidl); + STDMETHOD(GetCurFolder)(PIDLIST_ABSOLUTE * pidl) override; /*** IItemNameLimits methods ***/ - STDMETHODIMP - GetMaxLength(LPCWSTR pszName, int *piMaxNameLen) + STDMETHODIMP GetMaxLength(LPCWSTR pszName, int *piMaxNameLen) override { return E_NOTIMPL; } STDMETHODIMP - GetValidCharacters(LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars) + GetValidCharacters(LPWSTR *ppwszValidChars, LPWSTR *ppwszInvalidChars) override { if (ppwszValidChars) { @@ -221,12 +220,12 @@ class CMergedFolder : } // IAugmentedShellFolder2 - virtual HRESULT STDMETHODCALLTYPE AddNameSpace(LPGUID lpGuid, IShellFolder * psf, LPCITEMIDLIST pcidl, ULONG dwUnknown); - virtual HRESULT STDMETHODCALLTYPE GetNameSpaceID(LPCITEMIDLIST pcidl, LPGUID lpGuid); - virtual HRESULT STDMETHODCALLTYPE QueryNameSpace(ULONG dwUnknown, LPGUID lpGuid, IShellFolder ** ppsf); - virtual HRESULT STDMETHODCALLTYPE EnumNameSpace(ULONG dwUnknown, PULONG lpUnknown); - virtual HRESULT STDMETHODCALLTYPE UnWrapIDList(LPCITEMIDLIST pcidl, LONG lUnknown, IShellFolder ** ppsf, LPITEMIDLIST * ppidl1, LPITEMIDLIST *ppidl2, LONG * lpUnknown); + STDMETHOD(AddNameSpace)(LPGUID lpGuid, IShellFolder * psf, LPCITEMIDLIST pcidl, ULONG dwUnknown) override; + STDMETHOD(GetNameSpaceID)(LPCITEMIDLIST pcidl, LPGUID lpGuid) override; + STDMETHOD(QueryNameSpace)(ULONG dwUnknown, LPGUID lpGuid, IShellFolder ** ppsf) override; + STDMETHOD(EnumNameSpace)(ULONG dwUnknown, PULONG lpUnknown) override; + STDMETHOD(UnWrapIDList)(LPCITEMIDLIST pcidl, LONG lUnknown, IShellFolder ** ppsf, LPITEMIDLIST * ppidl1, LPITEMIDLIST *ppidl2, LONG * lpUnknown) override; // IAugmentedShellFolder3 - virtual HRESULT STDMETHODCALLTYPE QueryNameSpace2(ULONG, QUERYNAMESPACEINFO *); + STDMETHOD(QueryNameSpace2)(ULONG, QUERYNAMESPACEINFO *) override; }; diff --git a/dll/win32/shell32/shellmenu/CStartMenu.cpp b/dll/win32/shell32/shellmenu/CStartMenu.cpp index 311b6516124..218f18919a2 100644 --- a/dll/win32/shell32/shellmenu/CStartMenu.cpp +++ b/dll/win32/shell32/shellmenu/CStartMenu.cpp @@ -153,46 +153,127 @@ class CShellMenuCallback : return S_OK; } - void InsertRecentItem(HMENU hMenu, UINT nID, INT csidl, BOOL bExpand) const + void AddOrSetMenuItem(HMENU hMenu, UINT nID, INT csidl, BOOL bExpand, + BOOL bAdd = TRUE, BOOL bSetText = TRUE) const { - WCHAR szPath[MAX_PATH]; - if (!SHGetSpecialFolderPathW(NULL, szPath, csidl, FALSE)) + MENUITEMINFOW mii = { sizeof(mii), MIIM_ID | MIIM_SUBMENU }; + mii.wID = nID; + + SHFILEINFOW fileInfo = { 0 }; + if (bAdd || bSetText) { - ERR("SHGetSpecialFolderPathW failed\n"); - return; + LPITEMIDLIST pidl; + if (SHGetSpecialFolderLocation(NULL, csidl, &pidl) != S_OK) + { + ERR("SHGetSpecialFolderLocation failed\n"); + return; + } + + SHGetFileInfoW((LPWSTR)pidl, 0, &fileInfo, sizeof(fileInfo), + SHGFI_PIDL | SHGFI_DISPLAYNAME); + CoTaskMemFree(pidl); + + mii.fMask |= MIIM_TYPE; + mii.fType = MFT_STRING; + mii.dwTypeData = fileInfo.szDisplayName; } - LPWSTR pszText = PathFindFileNameW(szPath); if (bExpand) - { - MENUITEMINFOW mii = { sizeof(mii), MIIM_TYPE | MIIM_ID | MIIM_SUBMENU }; - mii.fType = MFT_STRING; - mii.wID = nID; mii.hSubMenu = ::CreatePopupMenu(); - mii.dwTypeData = pszText; - mii.cch = lstrlenW(pszText); + + if (bAdd) InsertMenuItemW(hMenu, GetMenuItemCount(hMenu), TRUE, &mii); - } else - { - AppendMenuW(hMenu, MF_STRING | MF_ENABLED, nID, pszText); - } + SetMenuItemInfoW(hMenu, nID, FALSE, &mii); } - HMENU CreateRecentMenu(BOOL bExpandMyDocuments, BOOL bExpandMyPictures) const + BOOL GetAdvancedValue(LPCWSTR pszName, BOOL bDefault = FALSE) const + { + return SHRegGetBoolUSValueW( + L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", + pszName, FALSE, bDefault); + } + + HMENU CreateRecentMenu() const { HMENU hMenu = ::CreateMenu(); - InsertRecentItem(hMenu, IDM_MYDOCUMENTS, CSIDL_MYDOCUMENTS, bExpandMyDocuments); - InsertRecentItem(hMenu, IDM_MYPICTURES, CSIDL_MYPICTURES, bExpandMyPictures); - AppendMenuW(hMenu, MF_SEPARATOR, 0, NULL); + BOOL bAdded = FALSE; + + // My Documents + if (!SHRestricted(REST_NOSMMYDOCS) && + GetAdvancedValue(L"Start_ShowMyDocs", TRUE)) + { + BOOL bExpand = GetAdvancedValue(L"CascadeMyDocuments", FALSE); + AddOrSetMenuItem(hMenu, IDM_MYDOCUMENTS, CSIDL_MYDOCUMENTS, bExpand); + bAdded = TRUE; + } + + // My Pictures + if (!SHRestricted(REST_NOSMMYPICS) && + GetAdvancedValue(L"Start_ShowMyPics", TRUE)) + { + BOOL bExpand = GetAdvancedValue(L"CascadeMyPictures", FALSE); + AddOrSetMenuItem(hMenu, IDM_MYPICTURES, CSIDL_MYPICTURES, bExpand); + bAdded = TRUE; + } + + if (bAdded) + AppendMenuW(hMenu, MF_SEPARATOR, 0, NULL); + return hMenu; } + void UpdateSettingsMenu(HMENU hMenu) + { + BOOL bExpand; + + bExpand = GetAdvancedValue(L"CascadeControlPanel"); + AddOrSetMenuItem(hMenu, IDM_CONTROLPANEL, CSIDL_CONTROLS, bExpand, FALSE, FALSE); + + bExpand = GetAdvancedValue(L"CascadeNetworkConnections"); + AddOrSetMenuItem(hMenu, IDM_NETWORKCONNECTIONS, CSIDL_NETWORK, bExpand, FALSE, FALSE); + + bExpand = GetAdvancedValue(L"CascadePrinters"); + AddOrSetMenuItem(hMenu, IDM_PRINTERSANDFAXES, CSIDL_PRINTERS, bExpand, FALSE, FALSE); + } + + HRESULT AddStartMenuItems(IShellMenu *pShellMenu, INT csidl, DWORD dwFlags, IShellFolder *psf = NULL) + { + CComHeapPtr pidlFolder; + CComPtr psfDesktop; + CComPtr pShellFolder; + HRESULT hr; + + hr = SHGetFolderLocation(NULL, csidl, 0, 0, &pidlFolder); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + if (psf) + { + pShellFolder = psf; + } + else + { + hr = SHGetDesktopFolder(&psfDesktop); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + hr = psfDesktop->BindToObject(pidlFolder, NULL, IID_PPV_ARG(IShellFolder, &pShellFolder)); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + } + + hr = pShellMenu->SetShellFolder(pShellFolder, pidlFolder, NULL, dwFlags); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + + return hr; + } + HRESULT OnGetSubMenu(LPSMDATA psmd, REFIID iid, void ** pv) { HRESULT hr; - int csidl = 0; - IShellMenu *pShellMenu; + CComPtr pShellMenu; hr = CMenuBand_CreateInstance(IID_PPV_ARG(IShellMenu, &pShellMenu)); if (FAILED_UNEXPECTEDLY(hr)) @@ -202,86 +283,107 @@ class CShellMenuCallback : if (FAILED_UNEXPECTEDLY(hr)) return hr; + hr = E_FAIL; switch (psmd->uId) { - case IDM_PROGRAMS: csidl = CSIDL_PROGRAMS; break; - case IDM_FAVORITES: csidl = CSIDL_FAVORITES; break; - case IDM_DOCUMENTS: csidl = CSIDL_RECENT; break; - case IDM_MYDOCUMENTS: csidl = CSIDL_MYDOCUMENTS; break; - case IDM_MYPICTURES: csidl = CSIDL_MYPICTURES; break; - } + case IDM_PROGRAMS: + { + hr = AddStartMenuItems(pShellMenu, CSIDL_PROGRAMS, SMSET_TOP, m_psfPrograms); + break; + } + case IDM_FAVORITES: + case IDM_MYDOCUMENTS: + case IDM_MYPICTURES: + case IDM_CONTROLPANEL: + case IDM_NETWORKCONNECTIONS: + case IDM_PRINTERSANDFAXES: + { + hr = AddStartMenuItems(pShellMenu, CSIDLFromID(psmd->uId), SMSET_TOP); + break; + } + case IDM_DOCUMENTS: + { + HMENU hMenu = CreateRecentMenu(); + if (hMenu == NULL) + ERR("CreateRecentMenu failed\n"); - if (csidl) - { - IShellFolder *psfStartMenu; - DWORD dwFlags = SMSET_TOP; + hr = pShellMenu->SetMenu(hMenu, NULL, SMSET_BOTTOM); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; - if (csidl == CSIDL_PROGRAMS && m_psfPrograms) - { - psfStartMenu = m_psfPrograms; + hr = AddStartMenuItems(pShellMenu, CSIDL_RECENT, SMSET_BOTTOM); + break; } - else + case IDM_SETTINGS: { - if (csidl == CSIDL_RECENT) + MENUITEMINFOW mii = { sizeof(mii), MIIM_SUBMENU }; + if (GetMenuItemInfoW(psmd->hmenu, psmd->uId, FALSE, &mii)) { - BOOL bExpandMyDocuments = FALSE; /* FIXME: Get value from registry */ - BOOL bExpandMyPictures = FALSE; /* FIXME: Get value from registry */ - HMENU hMenu = CreateRecentMenu(bExpandMyDocuments, bExpandMyPictures); - if (hMenu == NULL) - ERR("CreateRecentMenu failed\n"); + UpdateSettingsMenu(mii.hSubMenu); - hr = pShellMenu->SetMenu(hMenu, NULL, SMSET_BOTTOM); + hr = pShellMenu->SetMenu(mii.hSubMenu, NULL, SMSET_BOTTOM); if (FAILED_UNEXPECTEDLY(hr)) return hr; - - dwFlags = SMSET_BOTTOM; } - - LPITEMIDLIST pidlStartMenu; - IShellFolder *psfDestop; - hr = SHGetFolderLocation(NULL, csidl, 0, 0, &pidlStartMenu); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; - - hr = SHGetDesktopFolder(&psfDestop); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; - - hr = psfDestop->BindToObject(pidlStartMenu, NULL, IID_PPV_ARG(IShellFolder, &psfStartMenu)); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; + break; } - - hr = pShellMenu->SetShellFolder(psfStartMenu, NULL, NULL, dwFlags); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; - } - else - { - MENUITEMINFO mii; - mii.cbSize = sizeof(mii); - mii.fMask = MIIM_SUBMENU; - if (GetMenuItemInfoW(psmd->hmenu, psmd->uId, FALSE, &mii)) + default: { - hr = pShellMenu->SetMenu(mii.hSubMenu, NULL, SMSET_BOTTOM); - if (FAILED_UNEXPECTEDLY(hr)) - return hr; + MENUITEMINFOW mii = { sizeof(mii), MIIM_SUBMENU }; + if (GetMenuItemInfoW(psmd->hmenu, psmd->uId, FALSE, &mii)) + { + hr = pShellMenu->SetMenu(mii.hSubMenu, NULL, SMSET_BOTTOM); + if (FAILED_UNEXPECTEDLY(hr)) + return hr; + } } } - return pShellMenu->QueryInterface(iid, pv); + + if (FAILED(hr)) + return hr; + + hr = pShellMenu->QueryInterface(iid, pv); + pShellMenu.Detach(); + return hr; } - HRESULT OnGetContextMenu(LPSMDATA psmd, REFIID iid, void ** pv) + INT CSIDLFromID(UINT uId) const { - if (psmd->uId == IDM_PROGRAMS || - psmd->uId == IDM_CONTROLPANEL || - psmd->uId == IDM_NETWORKCONNECTIONS || - psmd->uId == IDM_PRINTERSANDFAXES) + switch (uId) { - //UNIMPLEMENTED + case IDM_PROGRAMS: return CSIDL_PROGRAMS; + case IDM_FAVORITES: return CSIDL_FAVORITES; + case IDM_DOCUMENTS: return CSIDL_RECENT; + case IDM_MYDOCUMENTS: return CSIDL_MYDOCUMENTS; + case IDM_MYPICTURES: return CSIDL_MYPICTURES; + case IDM_CONTROLPANEL: return CSIDL_CONTROLS; + case IDM_NETWORKCONNECTIONS: return CSIDL_NETWORK; + case IDM_PRINTERSANDFAXES: return CSIDL_PRINTERS; + default: return 0; } + } - return S_FALSE; + HRESULT OnGetContextMenu(LPSMDATA psmd, REFIID iid, void ** pv) + { + INT csidl = CSIDLFromID(psmd->uId); + if (!csidl) + return S_FALSE; + + TRACE("csidl: 0x%X\n", csidl); + + if (csidl == CSIDL_CONTROLS || csidl == CSIDL_NETWORK || csidl == CSIDL_PRINTERS) + FIXME("This CSIDL %d wrongly opens My Computer. CORE-19477\n", csidl); + + CComHeapPtr pidl; + SHGetSpecialFolderLocation(NULL, csidl, &pidl); + + CComPtr pSF; + LPCITEMIDLIST pidlChild = NULL; + HRESULT hr = SHBindToParent(pidl, IID_IShellFolder, (void**)&pSF, &pidlChild); + if (FAILED(hr)) + return hr; + + return pSF->GetUIObjectOf(NULL, 1, &pidlChild, IID_IContextMenu, NULL, pv); } HRESULT OnGetObject(LPSMDATA psmd, REFIID iid, void ** pv) diff --git a/dll/win32/shell32/shresdef.h b/dll/win32/shell32/shresdef.h index 7368ac52a29..8820df5c384 100644 --- a/dll/win32/shell32/shresdef.h +++ b/dll/win32/shell32/shresdef.h @@ -314,6 +314,11 @@ /* These values must be synchronized with explorer */ #define IDS_ADVANCED_DISPLAY_FAVORITES 30466 #define IDS_ADVANCED_DISPLAY_LOG_OFF 30467 +#define IDS_ADVANCED_EXPAND_CONTROL_PANEL 30468 +#define IDS_ADVANCED_EXPAND_MY_DOCUMENTS 30469 +#define IDS_ADVANCED_EXPAND_PRINTERS 30470 +#define IDS_ADVANCED_EXPAND_MY_PICTURES 30472 +#define IDS_ADVANCED_EXPAND_NET_CONNECTIONS 30473 #define IDS_ADVANCED_DISPLAY_RUN 30474 #define IDS_ADVANCED_DISPLAY_ADMINTOOLS 30476 @@ -595,6 +600,10 @@ #define IDI_SHELL_UPDATE 47 #define IDI_SHELL_LOCKED 48 #define IDI_SHELL_DISCONN 49 +#define IDI_SHELL_NONE_50 50 +#define IDI_SHELL_NONE_51 51 +#define IDI_SHELL_NONE_52 52 +#define IDI_SHELL_NONE_53 53 #define IDI_SHELL_NOT_CONNECTED_HDD 54 #define IDI_SHELL_MULTIPLE_FILES 133 #define IDI_SHELL_OPEN_WITH 134 diff --git a/dll/win32/shell32/wine/PolicyData.h b/dll/win32/shell32/wine/PolicyData.h new file mode 100644 index 00000000000..f106d28fcfd --- /dev/null +++ b/dll/win32/shell32/wine/PolicyData.h @@ -0,0 +1,307 @@ +/* + * PROJECT: ReactOS Shell32 + * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later) + * PURPOSE: Defining shell policy data + * COPYRIGHT: Copyright 2022 Hermès Bélusca-Maïto + * Copyright 2024 Katayama Hirofumi MZ + */ + +/* + * NOTE: Up to date as of SHELL32 v6.00 (Win2k3). + * References: + * https://www.geoffchappell.com/studies/windows/shell/shell32/api/util/restrictions.htm + * https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/ne-shlobj_core-restrictions + * https://abi-laboratory.pro/compatibility/Windows_5.0_to_Windows_6.0/x86_64/headers_diff/shell32.dll/diff.html + */ + +DEFINE_POLICY( REST_NORUN, "Explorer", "NoRun" ), +DEFINE_POLICY( REST_NOCLOSE, "Explorer", "NoClose" ), +DEFINE_POLICY( REST_NOSAVESET, "Explorer", "NoSaveSettings" ), +DEFINE_POLICY( REST_NOFILEMENU, "Explorer", "NoFileMenu" ), +DEFINE_POLICY( REST_NOSETFOLDERS, "Explorer", "NoSetFolders" ), +DEFINE_POLICY( REST_NOSETTASKBAR, "Explorer", "NoSetTaskbar" ), +DEFINE_POLICY( REST_NODESKTOP, "Explorer", "NoDesktop" ), +DEFINE_POLICY( REST_NOFIND, "Explorer", "NoFind" ), +DEFINE_POLICY( REST_NODRIVES, "Explorer", "NoDrives" ), +DEFINE_POLICY( REST_NODRIVEAUTORUN, "Explorer", "NoDriveAutoRun" ), +DEFINE_POLICY( REST_NODRIVETYPEAUTORUN, "Explorer", "NoDriveTypeAutoRun" ), +DEFINE_POLICY( REST_NONETHOOD, "Explorer", "NoNetHood" ), +DEFINE_POLICY( REST_STARTBANNER, "Explorer", "NoStartBanner" ), +DEFINE_POLICY( REST_RESTRICTRUN, "Explorer", "RestrictRun" ), // REGSTR_VAL_RESTRICTRUN +DEFINE_POLICY( REST_NOPRINTERTABS, "Explorer", "NoPrinterTabs" ), // REGSTR_VAL_PRINTERS_HIDETABS +DEFINE_POLICY( REST_NOPRINTERDELETE, "Explorer", "NoDeletePrinter" ), // REGSTR_VAL_PRINTERS_NODELETE +DEFINE_POLICY( REST_NOPRINTERADD, "Explorer", "NoAddPrinter" ), // REGSTR_VAL_PRINTERS_NOADD +DEFINE_POLICY( REST_NOSTARTMENUSUBFOLDERS, "Explorer", "NoStartMenuSubFolders" ), +DEFINE_POLICY( REST_MYDOCSONNET, "Explorer", "MyDocsOnNet" ), +DEFINE_POLICY( REST_NOEXITTODOS, "WinOldApp", "NoRealMode" ), // REGSTR_VAL_WINOLDAPP_NOREALMODE +DEFINE_POLICY( REST_ENFORCESHELLEXTSECURITY, "Explorer", "EnforceShellExtensionSecurity" ), +DEFINE_POLICY( REST_LINKRESOLVEIGNORELINKINFO, "Explorer", "LinkResolveIgnoreLinkInfo" ), +DEFINE_POLICY( REST_NOCOMMONGROUPS, "Explorer", "NoCommonGroups" ), +DEFINE_POLICY( REST_SEPARATEDESKTOPPROCESS, "Explorer", "SeparateProcess" ), +DEFINE_POLICY( REST_NOWEB, "Explorer", "NoWebMenu" ), +DEFINE_POLICY( REST_NOTRAYCONTEXTMENU, "Explorer", "NoTrayContextMenu" ), +DEFINE_POLICY( REST_NOVIEWCONTEXTMENU, "Explorer", "NoViewContextMenu" ), +DEFINE_POLICY( REST_NONETCONNECTDISCONNECT, "Explorer", "NoNetConnectDisconnect" ), + +#if (WINE_FILEVERSION_MAJOR < 5) +// NOTE: This policy only controls the LogOff capability in the TaskMgr. +DEFINE_POLICY( REST_STARTMENULOGOFF, "Explorer", "NoLogoff" ), +#else +// NOTE: This policy now controls the presence/absence of the LogOff item in the Start Menu. +DEFINE_POLICY( REST_STARTMENULOGOFF, "Explorer", "StartMenuLogoff" ), +#endif + +DEFINE_POLICY( REST_NOSETTINGSASSIST, "Explorer", "NoSettingsWizards" ), +DEFINE_POLICY( REST_NOINTERNETICON, "Explorer", "NoInternetIcon" ), +DEFINE_POLICY( REST_NORECENTDOCSHISTORY, "Explorer", "NoRecentDocsHistory" ), +DEFINE_POLICY( REST_NORECENTDOCSMENU, "Explorer", "NoRecentDocsMenu" ), +DEFINE_POLICY( REST_NOACTIVEDESKTOP, "Explorer", "NoActiveDesktop" ), +DEFINE_POLICY( REST_NOACTIVEDESKTOPCHANGES, "Explorer", "NoActiveDesktopChanges" ), +DEFINE_POLICY( REST_NOFAVORITESMENU, "Explorer", "NoFavoritesMenu" ), +DEFINE_POLICY( REST_CLEARRECENTDOCSONEXIT, "Explorer", "ClearRecentDocsOnExit" ), +DEFINE_POLICY( REST_CLASSICSHELL, "Explorer", "ClassicShell" ), +DEFINE_POLICY( REST_NOCUSTOMIZEWEBVIEW, "Explorer", "NoCustomizeWebView" ), +DEFINE_POLICY( REST_NOHTMLWALLPAPER, "ActiveDesktop", "NoHTMLWallpaper" ), +DEFINE_POLICY( REST_NOCHANGINGWALLPAPER, "ActiveDesktop", "NoChangingWallpaper" ), +DEFINE_POLICY( REST_NODESKCOMP, "ActiveDesktop", "NoComponents" ), +DEFINE_POLICY( REST_NOADDDESKCOMP, "ActiveDesktop", "NoAddingComponents" ), +DEFINE_POLICY( REST_NODELDESKCOMP, "ActiveDesktop", "NoDeletingComponents" ), +DEFINE_POLICY( REST_NOCLOSEDESKCOMP, "ActiveDesktop", "NoClosingComponents" ), + +#if (WINE_FILEVERSION_MAJOR < 5) +DEFINE_POLICY( REST_NOCLOSE_DRAGDROPBAND, "ActiveDesktop", "NoCloseDragDropBands" ), +DEFINE_POLICY( REST_NOMOVINGBAND, "ActiveDesktop", "NoMovingBands" ), +#else +DEFINE_POLICY( REST_NOCLOSE_DRAGDROPBAND, "Explorer", "NoCloseDragDropBands" ), +DEFINE_POLICY( REST_NOMOVINGBAND, "Explorer", "NoMovingBands" ), +#endif + +DEFINE_POLICY( REST_NOEDITDESKCOMP, "ActiveDesktop", "NoEditingComponents" ), +DEFINE_POLICY( REST_NORESOLVESEARCH, "Explorer", "NoResolveSearch" ), +DEFINE_POLICY( REST_NORESOLVETRACK, "Explorer", "NoResolveTrack" ), +DEFINE_POLICY( REST_FORCECOPYACLWITHFILE, "Explorer", "ForceCopyACLWithFile" ), + +#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_NOLOGO3CHANNELNOTIFY, "Explorer", "NoMSAppLogo5ChannelNotify" ), +#endif + +DEFINE_POLICY( REST_NOFORGETSOFTWAREUPDATE, "Explorer", "NoForgetSoftwareUpdate" ), +DEFINE_POLICY( REST_NOSETACTIVEDESKTOP, "Explorer", "NoSetActiveDesktop" ), +DEFINE_POLICY( REST_NOUPDATEWINDOWS, "Explorer", "NoWindowsUpdate" ), +DEFINE_POLICY( REST_NOCHANGESTARMENU, "Explorer", "NoChangeStartMenu" ), +DEFINE_POLICY( REST_NOFOLDEROPTIONS, "Explorer", "NoFolderOptions" ), +DEFINE_POLICY( REST_HASFINDCOMPUTERS, "Explorer", "FindComputers" ), +DEFINE_POLICY( REST_INTELLIMENUS, "Explorer", "IntelliMenus" ), +DEFINE_POLICY( REST_RUNDLGMEMCHECKBOX, "Explorer", "MemCheckBoxInRunDlg" ), +DEFINE_POLICY( REST_ARP_ShowPostSetup, "Uninstall", "ShowPostSetup" ), +DEFINE_POLICY( REST_NOCSC, "Explorer", "NoSyncAll" ), +DEFINE_POLICY( REST_NOCONTROLPANEL, "Explorer", "NoControlPanel" ), +DEFINE_POLICY( REST_ENUMWORKGROUP, "Explorer", "EnumWorkgroup" ), +DEFINE_POLICY( REST_ARP_NOARP, "Uninstall", "NoAddRemovePrograms" ), +DEFINE_POLICY( REST_ARP_NOREMOVEPAGE, "Uninstall", "NoRemovePage" ), +DEFINE_POLICY( REST_ARP_NOADDPAGE, "Uninstall", "NoAddPage" ), +DEFINE_POLICY( REST_ARP_NOWINSETUPPAGE, "Uninstall", "NoWindowsSetupPage" ), +DEFINE_POLICY( REST_GREYMSIADS, "Explorer", "GreyMSIAds" ), +DEFINE_POLICY( REST_NOCHANGEMAPPEDDRIVELABEL, "Explorer", "NoChangeMappedDriveLabel" ), +DEFINE_POLICY( REST_NOCHANGEMAPPEDDRIVECOMMENT, "Explorer", "NoChangeMappedDriveComment" ), +DEFINE_POLICY( REST_MaxRecentDocs, "Explorer", "MaxRecentDocs" ), +DEFINE_POLICY( REST_NONETWORKCONNECTIONS, "Explorer", "NoNetworkConnections" ), +DEFINE_POLICY( REST_FORCESTARTMENULOGOFF, "Explorer", "ForceStartMenuLogoff" ), +DEFINE_POLICY( REST_NOWEBVIEW, "Explorer", "NoWebView" ), +DEFINE_POLICY( REST_NOCUSTOMIZETHISFOLDER, "Explorer", "NoCustomizeThisFolder" ), +DEFINE_POLICY( REST_NOENCRYPTION, "Explorer", "NoEncryption" ), + +#if (WINE_FILEVERSION_MAJOR == 5) && (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_ALLOWFRENCHENCRYPTION, "Explorer", "AllowFrenchEncryption" ), +#endif + +DEFINE_POLICY( REST_DONTSHOWSUPERHIDDEN, "Explorer", "DontShowSuperHidden" ), +DEFINE_POLICY( REST_NOSHELLSEARCHBUTTON, "Explorer", "NoShellSearchButton" ), +DEFINE_POLICY( REST_NOHARDWARETAB, "Explorer", "NoHardwareTab" ), + +#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_NORUNASINSTALLPROMPT, "Explorer", "NoRunasInstallPrompt" ), +DEFINE_POLICY( REST_PROMPTRUNASINSTALLNETPATH, "Explorer", "PromptRunasInstallNetPath" ), +#endif + +DEFINE_POLICY( REST_NOMANAGEMYCOMPUTERVERB, "Explorer", "NoManageMyComputerVerb" ), + +#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_NORECENTDOCSNETHOOD, "Explorer", "NoRecentDocsNetHood" ), +#endif + +DEFINE_POLICY( REST_DISALLOWRUN, "Explorer", "DisallowRun" ), +DEFINE_POLICY( REST_NOWELCOMESCREEN, "Explorer", "NoWelcomeScreen" ), +DEFINE_POLICY( REST_RESTRICTCPL, "Explorer", "RestrictCpl" ), +DEFINE_POLICY( REST_DISALLOWCPL, "Explorer", "DisallowCpl" ), +DEFINE_POLICY( REST_NOSMBALLOONTIP, "Explorer", "NoSMBalloonTip" ), +DEFINE_POLICY( REST_NOSMHELP, "Explorer", "NoSMHelp" ), +DEFINE_POLICY( REST_NOWINKEYS, "Explorer", "NoWinKeys" ), +DEFINE_POLICY( REST_NOENCRYPTONMOVE, "Explorer", "NoEncryptOnMove" ), +DEFINE_POLICY( REST_NOLOCALMACHINERUN, "Explorer", "DisableLocalMachineRun" ), +DEFINE_POLICY( REST_NOCURRENTUSERRUN, "Explorer", "DisableCurrentUserRun" ), +DEFINE_POLICY( REST_NOLOCALMACHINERUNONCE, "Explorer", "DisableLocalMachineRunOnce" ), +DEFINE_POLICY( REST_NOCURRENTUSERRUNONCE, "Explorer", "DisableCurrentUserRunOnce" ), +DEFINE_POLICY( REST_FORCEACTIVEDESKTOPON, "Explorer", "ForceActiveDesktopOn" ), + +#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_NOCOMPUTERSNEARME, "Explorer", "NoComputersNearMe" ), +#endif + +DEFINE_POLICY( REST_NOVIEWONDRIVE, "Explorer", "NoViewOnDrive" ), +DEFINE_POLICY( REST_NONETCRAWL, "Explorer", "NoNetCrawling" ), +DEFINE_POLICY( REST_NOSHAREDDOCUMENTS, "Explorer", "NoSharedDocuments" ), +DEFINE_POLICY( REST_NOSMMYDOCS, "Explorer", "NoSMMyDocs" ), +DEFINE_POLICY( REST_NOSMMYPICS, "Explorer", "NoSMMyPictures" ), +DEFINE_POLICY( REST_ALLOWBITBUCKDRIVES, "Explorer", "RecycleBinDrives" ), + +/* 0x4000050 - 0x4000060 */ +#if (WINE_FILEVERSION_MAJOR >= 6) +DEFINE_POLICY( REST_NONLEGACYSHELLMODE, "Explorer", "NoneLegacyShellMode" ), +#endif + +DEFINE_POLICY( REST_NOCONTROLPANELBARRICADE, "Explorer", "NoControlPanelBarricade" ), + +// NOTE: REST_NOSTARTPAGE never really existed. + +#if (WINE_FILEVERSION_MAJOR >= 6) +DEFINE_POLICY( REST_NOAUTOTRAYNOTIFY, "Explorer", "NoAutoTrayNotify" ), +DEFINE_POLICY( REST_NOTASKGROUPING, "Explorer", "NoTaskGrouping" ), +DEFINE_POLICY( REST_NOCDBURNING, "Explorer", "NoCDBurning" ), +#endif // WINE_FILEVERSION_MAJOR + +DEFINE_POLICY( REST_MYCOMPNOPROP, "Explorer", "NoPropertiesMyComputer" ), +DEFINE_POLICY( REST_MYDOCSNOPROP, "Explorer", "NoPropertiesMyDocuments" ), + +#if (WINE_FILEVERSION_MAJOR >= 6) +DEFINE_POLICY( REST_NOSTARTPANEL, "Explorer", "NoSimpleStartMenu" ), +DEFINE_POLICY( REST_NODISPLAYAPPEARANCEPAGE, "System", "NoDispAppearancePage" ), // REGSTR_VAL_DISPCPL_NOAPPEARANCEPAGE +DEFINE_POLICY( REST_NOTHEMESTAB, "Explorer", "NoThemesTab" ), +DEFINE_POLICY( REST_NOVISUALSTYLECHOICE, "System", "NoVisualStyleChoice" ), +DEFINE_POLICY( REST_NOSIZECHOICE, "System", "NoSizeChoice" ), +DEFINE_POLICY( REST_NOCOLORCHOICE, "System", "NoColorChoice" ), +DEFINE_POLICY( REST_SETVISUALSTYLE, "System", "SetVisualStyle" ), +#endif // WINE_FILEVERSION_MAJOR + +DEFINE_POLICY( REST_STARTRUNNOHOMEPATH, "Explorer", "StartRunNoHOMEPATH" ), + +#if (WINE_FILEVERSION_MAJOR >= 6) +DEFINE_POLICY( REST_NOUSERNAMEINSTARTPANEL, "Explorer", "NoUserNameInStartMenu" ), +DEFINE_POLICY( REST_NOMYCOMPUTERICON, "NonEnum", "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" ), +DEFINE_POLICY( REST_NOSMNETWORKPLACES, "Explorer", "NoStartMenuNetworkPlaces" ), +DEFINE_POLICY( REST_NOSMPINNEDLIST, "Explorer", "NoStartMenuPinnedList" ), +DEFINE_POLICY( REST_NOSMMYMUSIC, "Explorer", "NoStartMenuMyMusic" ), +DEFINE_POLICY( REST_NOSMEJECTPC, "Explorer", "NoStartMenuEjectPC" ), +DEFINE_POLICY( REST_NOSMMOREPROGRAMS, "Explorer", "NoStartMenuMorePrograms" ), +DEFINE_POLICY( REST_NOSMMFUPROGRAMS, "Explorer", "NoStartMenuMFUprogramsList" ), +DEFINE_POLICY( REST_NOTRAYITEMSDISPLAY, "Explorer", "NoTrayItemsDisplay" ), +DEFINE_POLICY( REST_NOTOOLBARSONTASKBAR, "Explorer", "NoToolbarsOnTaskbar" ), +#endif // WINE_FILEVERSION_MAJOR + +DEFINE_POLICY( REST_NOSMCONFIGUREPROGRAMS, "Explorer", "NoSMConfigurePrograms" ), + +#if (WINE_FILEVERSION_MAJOR >= 6) +DEFINE_POLICY( REST_HIDECLOCK, "Explorer", "HideClock" ), +DEFINE_POLICY( REST_NOLOWDISKSPACECHECKS, "Explorer", "NoLowDiskSpaceChecks" ), +#endif + +#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_NOENTIRENETWORK, "Network", "NoEntireNetwork" ), // REGSTR_VAL_NOENTIRENETWORK +DEFINE_POLICY( REST_NODESKTOPCLEANUP, "Explorer", "NoDesktopCleanupWizard" ), +#endif + +#if (WINE_FILEVERSION_MAJOR >= 6) +DEFINE_POLICY( REST_BITBUCKNUKEONDELETE, "Explorer", "NoRecycleFiles" ), +DEFINE_POLICY( REST_BITBUCKCONFIRMDELETE, "Explorer", "ConfirmFileDelete" ), +DEFINE_POLICY( REST_BITBUCKNOPROP, "Explorer", "NoPropertiesRecycleBin" ), +DEFINE_POLICY( REST_NODISPBACKGROUND, "System", "NoDispBackgroundPage" ), // REGSTR_VAL_DISPCPL_NOBACKGROUNDPAGE +DEFINE_POLICY( REST_NODISPSCREENSAVEPG, "System", "NoDispScrSavPage" ), // REGSTR_VAL_DISPCPL_NOSCRSAVPAGE +DEFINE_POLICY( REST_NODISPSETTINGSPG, "System", "NoDispSettingsPage" ), // REGSTR_VAL_DISPCPL_NOSETTINGSPAGE +DEFINE_POLICY( REST_NODISPSCREENSAVEPREVIEW, "System", "NoScreenSavePreview" ), +DEFINE_POLICY( REST_NODISPLAYCPL, "System", "NoDispCPL" ), // REGSTR_VAL_DISPCPL_NODISPCPL +DEFINE_POLICY( REST_HIDERUNASVERB, "Explorer", "HideRunAsVerb" ), +DEFINE_POLICY( REST_NOTHUMBNAILCACHE, "Explorer", "NoThumbnailCache" ), +DEFINE_POLICY( REST_NOSTRCMPLOGICAL, "Explorer", "NoStrCmpLogical" ), +DEFINE_POLICY( REST_NOPUBLISHWIZARD, "Explorer", "NoPublishingWizard" ), +DEFINE_POLICY( REST_NOONLINEPRINTSWIZARD, "Explorer", "NoOnlinePrintsWizard" ), +DEFINE_POLICY( REST_NOWEBSERVICES, "Explorer", "NoWebServices" ), +#endif // WINE_FILEVERSION_MAJOR + +DEFINE_POLICY( REST_ALLOWUNHASHEDWEBVIEW, "Explorer", "AllowUnhashedWebView" ), + +#if (WINE_FILEVERSION_MAJOR >= 6) +DEFINE_POLICY( REST_ALLOWLEGACYWEBVIEW, "Explorer", "AllowLegacyWebView" ), +#endif + +DEFINE_POLICY( REST_REVERTWEBVIEWSECURITY, "Explorer", "RevertWebViewSecurity" ), +DEFINE_POLICY( REST_INHERITCONSOLEHANDLES, "Explorer", "InheritConsoleHandles" ), + +#if (WINE_FILEVERSION_MAJOR >= 6) + +#if (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_SORTMAXITEMCOUNT, "Explorer", "SortMaxItemCount" ), +#endif +DEFINE_POLICY( REST_NOREMOTERECURSIVEEVENTS, "Explorer", "NoRemoteRecursiveEvents" ), + +#endif // WINE_FILEVERSION_MAJOR + +DEFINE_POLICY( REST_NOREMOTECHANGENOTIFY, "Explorer", "NoRemoteChangeNotify" ), + +#if (WINE_FILEVERSION_MAJOR >= 6) + +#if (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_NOSIMPLENETIDLIST, "Explorer", "NoSimpleNetIDList" ), +#endif + +// #if (NTDDI_VERSION < NTDDI_LONGHORN) +// NOTE: Geoff Chappell is inacurrate here. + DEFINE_POLICY( REST_NOENUMENTIRENETWORK, "Explorer", "NoEnumEntireNetwork" ), +// #endif + +#if (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_NODETAILSTHUMBNAILONNETWORK, "Explorer", "NoDetailsThumbnailOnNetwork" ), +#endif + +DEFINE_POLICY( REST_NOINTERNETOPENWITH, "Explorer", "NoInternetOpenWith" ), + +#if (NTDDI_VERSION >= NTDDI_WINXPSP2) && (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_ALLOWLEGACYLMZBEHAVIOR, "Explorer", "AllowLegacyLMZBehavior" ), +#endif + +DEFINE_POLICY( REST_DONTRETRYBADNETNAME, "Explorer", "DontRetryBadNetName" ), +DEFINE_POLICY( REST_ALLOWFILECLSIDJUNCTIONS, "Explorer", "AllowFileCLSIDJunctions" ), +DEFINE_POLICY( REST_NOUPNPINSTALL, "Explorer", "NoUPnPInstallTask" ), + +// "NormalizeLinkNetPidls" only in version 6.0 from Windows XP SP3. + +#if (NTDDI_VERSION >= NTDDI_LONGHORN) +DEFINE_POLICY( REST_ARP_DONTGROUPPATCHES, "Uninstall", "DontGroupPatches" ), +DEFINE_POLICY( REST_ARP_NOCHOOSEPROGRAMSPAGE, "Uninstall", "NoChooseProgramsPage" ), +#endif + +// "AllowCLSIDPROGIDMapping" in Windows XP SP3 and Windows Server 2003 SP2 only. +// Maybe in Vista+ too? + +#endif // WINE_FILEVERSION_MAJOR + +/* 0x4000061 - 0x4000086 */ +DEFINE_POLICY( REST_NODISCONNECT, "Explorer", "NoDisconnect" ), +DEFINE_POLICY( REST_NOSECURITY, "Explorer", "NoNTSecurity" ), +DEFINE_POLICY( REST_NOFILEASSOCIATE, "Explorer", "NoFileAssociate" ), + +#if (WINE_FILEVERSION_MAJOR >= 6) + +// #if (NTDDI_VERSION < NTDDI_LONGHORN) +// NOTE: Either Geoff Chappell or MSDN is inaccurate here. +DEFINE_POLICY( REST_ALLOWCOMMENTTOGGLE, "Explorer", "ToggleCommentPosition" ), +// #endif +#if (NTDDI_VERSION < NTDDI_LONGHORN) +DEFINE_POLICY( REST_USEDESKTOPINICACHE, "Explorer", "UseDesktopIniCache" ), +#endif + +// "NoNetFolderInfoTip" only in version 6.0 from Windows XP SP3. + +#endif // WINE_FILEVERSION_MAJOR + +// NOTE: This is a SHDOCVW-only policy. +// DEFINE_POLICY( 0x50000024, "Explorer", "NoFileUrl" ), diff --git a/dll/win32/shell32/wine/classes.c b/dll/win32/shell32/wine/classes.c index 0247add2710..c7919ca7478 100644 --- a/dll/win32/shell32/wine/classes.c +++ b/dll/win32/shell32/wine/classes.c @@ -352,7 +352,7 @@ BOOL HCU_GetIconW(LPCWSTR szClass, LPWSTR szDest, LPCWSTR szName, DWORD len, int { ret = HCR_RegGetIconW(hkey, szDest, szName, len, picon_idx); RegCloseKey(hkey); - } + } if (ret) TRACE("-- %s %i\n", debugstr_w(szDest), *picon_idx); diff --git a/dll/win32/shell32/wine/shpolicy.c b/dll/win32/shell32/wine/shpolicy.c index 1300a2e7aa9..7a24ef49b40 100644 --- a/dll/win32/shell32/wine/shpolicy.c +++ b/dll/win32/shell32/wine/shpolicy.c @@ -2,7 +2,7 @@ * shpolicy.c - Data for shell/system policies. * * Copyright 1999 Ian Schmidt - * Copyright 2022 Hermes Belusca-Maito + * Copyright 2024 Katayama Hirofumi MZ * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -26,11 +26,6 @@ * would handle the many new policies introduced since then. * You could easily write one with the information in * this file... - * - * Up to date as of SHELL32 v6.00 (Win2k3) - * References: - * https://www.geoffchappell.com/studies/windows/shell/shell32/api/util/restrictions.htm - * https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/ne-shlobj_core-restrictions */ #include @@ -43,1276 +38,89 @@ #include #include #include +#include +#include #include #include "shell32_main.h" WINE_DEFAULT_DEBUG_CHANNEL(shell); -#define SHELL_NO_POLICY 0xffffffff - -typedef struct tagPOLICYDAT -{ - DWORD policy; /* policy value passed to SHRestricted */ - LPCSTR appstr; /* application str such as "Explorer" */ - LPCSTR keystr; /* name of the actual registry key / policy */ - DWORD cache; /* cached value or 0xffffffff for invalid */ -} POLICYDATA, *LPPOLICYDATA; - -/* application strings */ +DEFINE_GUID(GUID_Restrictions, 0xA48F1A32, 0xA340, 0x11D1, 0xBC, 0x6B, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1); -static const char strExplorer[] = {"Explorer"}; -static const char strActiveDesk[] = {"ActiveDesktop"}; -static const char strWinOldApp[] = {"WinOldApp"}; -#if (WINE_FILEVERSION_MAJOR < 6) -/* Windows 2000/Me SHELL32 uses "AddRemoveProgs" */ -static const char strAddRemoveProgs[] = {"AddRemoveProgs"}; -#else -static const char strAddRemoveProgs[] = {"Uninstall"}; -#endif -#ifdef __REACTOS__ -static const char strSystem[] = {"System"}; -#endif +#define DEFINE_POLICY(policy, appstr, keystr) \ + { policy, L##appstr, L##keystr } -/* key strings */ - -#ifndef __REACTOS__ -static const char strNoFileURL[] = {"NoFileUrl"}; -#endif -static const char strNoFolderOptions[] = {"NoFolderOptions"}; -static const char strNoChangeStartMenu[] = {"NoChangeStartMenu"}; -static const char strNoWindowsUpdate[] = {"NoWindowsUpdate"}; -static const char strNoSetActiveDesktop[] = {"NoSetActiveDesktop"}; -static const char strNoForgetSoftwareUpdate[] = {"NoForgetSoftwareUpdate"}; -#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) -static const char strNoMSAppLogo[] = {"NoMSAppLogo5ChannelNotify"}; -#endif -static const char strForceCopyACLW[] = {"ForceCopyACLWithFile"}; -static const char strNoResolveTrk[] = {"NoResolveTrack"}; -static const char strNoResolveSearch[] = {"NoResolveSearch"}; -static const char strNoEditComponent[] = {"NoEditingComponents"}; -static const char strNoMovingBand[] = {"NoMovingBands"}; -static const char strNoCloseDragDrop[] = {"NoCloseDragDropBands"}; -static const char strNoCloseComponent[] = {"NoClosingComponents"}; -static const char strNoDelComponent[] = {"NoDeletingComponents"}; -static const char strNoAddComponent[] = {"NoAddingComponents"}; -static const char strNoComponent[] = {"NoComponents"}; -static const char strNoChangeWallpaper[] = {"NoChangingWallpaper"}; -static const char strNoHTMLWallpaper[] = {"NoHTMLWallpaper"}; -static const char strNoCustomWebView[] = {"NoCustomizeWebView"}; -static const char strClassicShell[] = {"ClassicShell"}; -static const char strClearRecentDocs[] = {"ClearRecentDocsOnExit"}; -static const char strNoFavoritesMenu[] = {"NoFavoritesMenu"}; -static const char strNoActiveDesktopChanges[] = {"NoActiveDesktopChanges"}; -static const char strNoActiveDesktop[] = {"NoActiveDesktop"}; -static const char strNoRecentDocMenu[] = {"NoRecentDocsMenu"}; -static const char strNoRecentDocHistory[] = {"NoRecentDocsHistory"}; -static const char strNoInetIcon[] = {"NoInternetIcon"}; -static const char strNoSettingsWizard[] = {"NoSettingsWizards"}; -#if (WINE_FILEVERSION_MAJOR < 5) -// NOTE: This value now only controls the LogOff capability in the TaskMgr. -static const char strNoLogoff[] = {"NoLogoff"}; -#else -// NOTE: This is the new value that controls the presence/absence -// of the LogOff item in the Start Menu. -static const char strNoLogoff[] = {"StartMenuLogoff"}; -#endif -static const char strNoNetConDis[] = {"NoNetConnectDisconnect"}; -static const char strNoViewContextMenu[] = {"NoViewContextMenu"}; -static const char strNoTrayContextMenu[] = {"NoTrayContextMenu"}; -static const char strNoWebMenu[] = {"NoWebMenu"}; -static const char strLnkResolveIgnoreLnkInfo[] = {"LinkResolveIgnoreLinkInfo"}; -static const char strNoCommonGroups[] = {"NoCommonGroups"}; -static const char strEnforceShlExtSecurity[] = {"EnforceShellExtensionSecurity"}; -static const char strNoRealMode[] = {"NoRealMode"}; // REGSTR_VAL_WINOLDAPP_NOREALMODE -static const char strMyDocsOnNet[] = {"MyDocsOnNet"}; -static const char strNoStartMenuSubfolder[] = {"NoStartMenuSubFolders"}; -static const char strNoAddPrinters[] = {"NoAddPrinter"}; // REGSTR_VAL_PRINTERS_NOADD -static const char strNoDeletePrinters[] = {"NoDeletePrinter"}; // REGSTR_VAL_PRINTERS_NODELETE -static const char strNoPrintTab[] = {"NoPrinterTabs"}; // REGSTR_VAL_PRINTERS_HIDETABS -static const char strRestrictRun[] = {"RestrictRun"}; // REGSTR_VAL_RESTRICTRUN -static const char strNoStartBanner[] = {"NoStartBanner"}; -static const char strNoNetworkNeighborhood[] = {"NoNetHood"}; -static const char strNoDriveTypeAtRun[] = {"NoDriveTypeAutoRun"}; -static const char strNoDrivesAutoRun[] = {"NoDriveAutoRun"}; -static const char strSeparateProcess[] = {"SeparateProcess"}; -static const char strNoDrives[] = {"NoDrives"}; -static const char strNoFind[] = {"NoFind"}; -static const char strNoDesktop[] = {"NoDesktop"}; -static const char strNoSetTaskBar[] = {"NoSetTaskbar"}; -static const char strNoSetFld[] = {"NoSetFolders"}; -static const char strNoFileMenu[] = {"NoFileMenu"}; -static const char strNoSaveSetting[] = {"NoSaveSettings"}; -static const char strNoClose[] = {"NoClose"}; -static const char strNoRun[] = {"NoRun"}; - -/* policy data array */ -static POLICYDATA sh32_policy_table[] = +static const POLICYDATA s_PolicyTable[] = { - { - REST_NORUN, - strExplorer, - strNoRun, - SHELL_NO_POLICY - }, - { - REST_NOCLOSE, - strExplorer, - strNoClose, - SHELL_NO_POLICY - }, - { - REST_NOSAVESET, - strExplorer, - strNoSaveSetting, - SHELL_NO_POLICY - }, - { - REST_NOFILEMENU, - strExplorer, - strNoFileMenu, - SHELL_NO_POLICY - }, - { - REST_NOSETFOLDERS, - strExplorer, - strNoSetFld, - SHELL_NO_POLICY - }, - { - REST_NOSETTASKBAR, - strExplorer, - strNoSetTaskBar, - SHELL_NO_POLICY - }, - { - REST_NODESKTOP, - strExplorer, - strNoDesktop, - SHELL_NO_POLICY - }, - { - REST_NOFIND, - strExplorer, - strNoFind, - SHELL_NO_POLICY - }, - { - REST_NODRIVES, - strExplorer, - strNoDrives, - SHELL_NO_POLICY - }, - { - REST_NODRIVEAUTORUN, - strExplorer, - strNoDrivesAutoRun, - SHELL_NO_POLICY - }, - { - REST_NODRIVETYPEAUTORUN, - strExplorer, - strNoDriveTypeAtRun, - SHELL_NO_POLICY - }, - { - REST_NONETHOOD, - strExplorer, - strNoNetworkNeighborhood, - SHELL_NO_POLICY - }, - { - REST_STARTBANNER, - strExplorer, - strNoStartBanner, - SHELL_NO_POLICY - }, - { - REST_RESTRICTRUN, - strExplorer, - strRestrictRun, - SHELL_NO_POLICY - }, - { - REST_NOPRINTERTABS, - strExplorer, - strNoPrintTab, - SHELL_NO_POLICY - }, - { - REST_NOPRINTERDELETE, - strExplorer, - strNoDeletePrinters, - SHELL_NO_POLICY - }, - { - REST_NOPRINTERADD, - strExplorer, - strNoAddPrinters, - SHELL_NO_POLICY - }, - { - REST_NOSTARTMENUSUBFOLDERS, - strExplorer, - strNoStartMenuSubfolder, - SHELL_NO_POLICY - }, - { - REST_MYDOCSONNET, - strExplorer, - strMyDocsOnNet, - SHELL_NO_POLICY - }, - { - REST_NOEXITTODOS, - strWinOldApp, - strNoRealMode, - SHELL_NO_POLICY - }, - { - REST_ENFORCESHELLEXTSECURITY, - strExplorer, - strEnforceShlExtSecurity, - SHELL_NO_POLICY - }, - { - REST_LINKRESOLVEIGNORELINKINFO, - strExplorer, - strLnkResolveIgnoreLnkInfo, - SHELL_NO_POLICY - }, - { - REST_NOCOMMONGROUPS, - strExplorer, - strNoCommonGroups, - SHELL_NO_POLICY - }, - { - REST_SEPARATEDESKTOPPROCESS, - strExplorer, - strSeparateProcess, - SHELL_NO_POLICY - }, - { - REST_NOWEB, - strExplorer, - strNoWebMenu, - SHELL_NO_POLICY - }, - { - REST_NOTRAYCONTEXTMENU, - strExplorer, - strNoTrayContextMenu, - SHELL_NO_POLICY - }, - { - REST_NOVIEWCONTEXTMENU, - strExplorer, - strNoViewContextMenu, - SHELL_NO_POLICY - }, - { - REST_NONETCONNECTDISCONNECT, - strExplorer, - strNoNetConDis, - SHELL_NO_POLICY - }, - { - REST_STARTMENULOGOFF, - strExplorer, - strNoLogoff, - SHELL_NO_POLICY - }, - { - REST_NOSETTINGSASSIST, - strExplorer, - strNoSettingsWizard, - SHELL_NO_POLICY - }, - { - REST_NOINTERNETICON, - strExplorer, - strNoInetIcon, - SHELL_NO_POLICY - }, - { - REST_NORECENTDOCSHISTORY, - strExplorer, - strNoRecentDocHistory, - SHELL_NO_POLICY - }, - { - REST_NORECENTDOCSMENU, - strExplorer, - strNoRecentDocMenu, - SHELL_NO_POLICY - }, - { - REST_NOACTIVEDESKTOP, - strExplorer, - strNoActiveDesktop, - SHELL_NO_POLICY - }, - { - REST_NOACTIVEDESKTOPCHANGES, - strExplorer, - strNoActiveDesktopChanges, - SHELL_NO_POLICY - }, - { - REST_NOFAVORITESMENU, - strExplorer, - strNoFavoritesMenu, - SHELL_NO_POLICY - }, - { - REST_CLEARRECENTDOCSONEXIT, - strExplorer, - strClearRecentDocs, - SHELL_NO_POLICY - }, - { - REST_CLASSICSHELL, - strExplorer, - strClassicShell, - SHELL_NO_POLICY - }, - { - REST_NOCUSTOMIZEWEBVIEW, - strExplorer, - strNoCustomWebView, - SHELL_NO_POLICY - }, - { - REST_NOHTMLWALLPAPER, - strActiveDesk, - strNoHTMLWallpaper, - SHELL_NO_POLICY - }, - { - REST_NOCHANGINGWALLPAPER, - strActiveDesk, - strNoChangeWallpaper, - SHELL_NO_POLICY - }, - { - REST_NODESKCOMP, - strActiveDesk, - strNoComponent, - SHELL_NO_POLICY - }, - { - REST_NOADDDESKCOMP, - strActiveDesk, - strNoAddComponent, - SHELL_NO_POLICY - }, - { - REST_NODELDESKCOMP, - strActiveDesk, - strNoDelComponent, - SHELL_NO_POLICY - }, - { - REST_NOCLOSEDESKCOMP, - strActiveDesk, - strNoCloseComponent, - SHELL_NO_POLICY - }, - { - REST_NOCLOSE_DRAGDROPBAND, -#if (WINE_FILEVERSION_MAJOR < 5) - strActiveDesk, -#else - strExplorer, -#endif - strNoCloseDragDrop, - SHELL_NO_POLICY - }, - { - REST_NOMOVINGBAND, -#if (WINE_FILEVERSION_MAJOR < 5) - strActiveDesk, -#else - strExplorer, -#endif - strNoMovingBand, - SHELL_NO_POLICY - }, - { - REST_NOEDITDESKCOMP, - strActiveDesk, - strNoEditComponent, - SHELL_NO_POLICY - }, - { - REST_NORESOLVESEARCH, - strExplorer, - strNoResolveSearch, - SHELL_NO_POLICY - }, - { - REST_NORESOLVETRACK, - strExplorer, - strNoResolveTrk, - SHELL_NO_POLICY - }, - { - REST_FORCECOPYACLWITHFILE, - strExplorer, - strForceCopyACLW, - SHELL_NO_POLICY - }, -#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_NOLOGO3CHANNELNOTIFY, - strExplorer, - strNoMSAppLogo, - SHELL_NO_POLICY - }, -#endif - { - REST_NOFORGETSOFTWAREUPDATE, - strExplorer, - strNoForgetSoftwareUpdate, - SHELL_NO_POLICY - }, - { - REST_NOSETACTIVEDESKTOP, - strExplorer, - strNoSetActiveDesktop, - SHELL_NO_POLICY - }, - { - REST_NOUPDATEWINDOWS, - strExplorer, - strNoWindowsUpdate, - SHELL_NO_POLICY - }, - { - REST_NOCHANGESTARMENU, - strExplorer, - strNoChangeStartMenu, - SHELL_NO_POLICY - }, - { - REST_NOFOLDEROPTIONS, - strExplorer, - strNoFolderOptions, - SHELL_NO_POLICY - }, - { - REST_HASFINDCOMPUTERS, - strExplorer, - "FindComputers", - SHELL_NO_POLICY - }, - { - REST_INTELLIMENUS, - strExplorer, - "IntelliMenus", - SHELL_NO_POLICY - }, - { - REST_RUNDLGMEMCHECKBOX, - strExplorer, - "MemCheckBoxInRunDlg", - SHELL_NO_POLICY - }, - { - REST_ARP_ShowPostSetup, - strAddRemoveProgs, - "ShowPostSetup", - SHELL_NO_POLICY - }, - { - REST_NOCSC, - strExplorer, - "NoSyncAll", - SHELL_NO_POLICY - }, - { - REST_NOCONTROLPANEL, - strExplorer, - "NoControlPanel", - SHELL_NO_POLICY - }, - { - REST_ENUMWORKGROUP, - strExplorer, - "EnumWorkgroup", - SHELL_NO_POLICY - }, - { - REST_ARP_NOARP, - strAddRemoveProgs, - "NoAddRemovePrograms", - SHELL_NO_POLICY - }, - { - REST_ARP_NOREMOVEPAGE, - strAddRemoveProgs, - "NoRemovePage", - SHELL_NO_POLICY - }, - { - REST_ARP_NOADDPAGE, - strAddRemoveProgs, - "NoAddPage", - SHELL_NO_POLICY - }, - { - REST_ARP_NOWINSETUPPAGE, - strAddRemoveProgs, - "NoWindowsSetupPage", - SHELL_NO_POLICY - }, - { - REST_GREYMSIADS, - strExplorer, -#ifndef __REACTOS__ -// NOTE: Wine buggy - "", -#else - "GreyMSIAds", -#endif - SHELL_NO_POLICY - }, - { - REST_NOCHANGEMAPPEDDRIVELABEL, - strExplorer, - "NoChangeMappedDriveLabel", - SHELL_NO_POLICY - }, - { - REST_NOCHANGEMAPPEDDRIVECOMMENT, - strExplorer, - "NoChangeMappedDriveComment", - SHELL_NO_POLICY - }, - { - REST_MaxRecentDocs, - strExplorer, - "MaxRecentDocs", - SHELL_NO_POLICY - }, - { - REST_NONETWORKCONNECTIONS, - strExplorer, - "NoNetworkConnections", - SHELL_NO_POLICY - }, - { - REST_FORCESTARTMENULOGOFF, - strExplorer, - "ForceStartMenuLogoff", - SHELL_NO_POLICY - }, - { - REST_NOWEBVIEW, - strExplorer, - "NoWebView", - SHELL_NO_POLICY - }, - { - REST_NOCUSTOMIZETHISFOLDER, - strExplorer, - "NoCustomizeThisFolder", - SHELL_NO_POLICY - }, - { - REST_NOENCRYPTION, - strExplorer, - "NoEncryption", - SHELL_NO_POLICY - }, -#if (WINE_FILEVERSION_MAJOR == 5) && (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_ALLOWFRENCHENCRYPTION, - strExplorer, - "AllowFrenchEncryption", - SHELL_NO_POLICY - }, -#endif - { - REST_DONTSHOWSUPERHIDDEN, - strExplorer, - "DontShowSuperHidden", - SHELL_NO_POLICY - }, - { - REST_NOSHELLSEARCHBUTTON, - strExplorer, - "NoShellSearchButton", - SHELL_NO_POLICY - }, - { - REST_NOHARDWARETAB, - strExplorer, - "NoHardwareTab", - SHELL_NO_POLICY - }, -#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_NORUNASINSTALLPROMPT, - strExplorer, - "NoRunasInstallPrompt", - SHELL_NO_POLICY - }, - { - REST_PROMPTRUNASINSTALLNETPATH, - strExplorer, - "PromptRunasInstallNetPath", - SHELL_NO_POLICY - }, -#endif - { - REST_NOMANAGEMYCOMPUTERVERB, - strExplorer, - "NoManageMyComputerVerb", - SHELL_NO_POLICY - }, -#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_NORECENTDOCSNETHOOD, - strExplorer, - "NoRecentDocsNetHood", - SHELL_NO_POLICY - }, -#endif - { - REST_DISALLOWRUN, - strExplorer, - "DisallowRun", - SHELL_NO_POLICY - }, - { - REST_NOWELCOMESCREEN, - strExplorer, - "NoWelcomeScreen", - SHELL_NO_POLICY - }, - { - REST_RESTRICTCPL, - strExplorer, - "RestrictCpl", - SHELL_NO_POLICY - }, - { - REST_DISALLOWCPL, - strExplorer, - "DisallowCpl", - SHELL_NO_POLICY - }, - { - REST_NOSMBALLOONTIP, - strExplorer, - "NoSMBalloonTip", - SHELL_NO_POLICY - }, - { - REST_NOSMHELP, - strExplorer, - "NoSMHelp", - SHELL_NO_POLICY - }, - { - REST_NOWINKEYS, - strExplorer, - "NoWinKeys", - SHELL_NO_POLICY - }, - { - REST_NOENCRYPTONMOVE, - strExplorer, - "NoEncryptOnMove", - SHELL_NO_POLICY - }, - { - REST_NOLOCALMACHINERUN, - strExplorer, - "DisableLocalMachineRun", - SHELL_NO_POLICY - }, - { - REST_NOCURRENTUSERRUN, - strExplorer, - "DisableCurrentUserRun", - SHELL_NO_POLICY - }, - { - REST_NOLOCALMACHINERUNONCE, - strExplorer, - "DisableLocalMachineRunOnce", - SHELL_NO_POLICY - }, - { - REST_NOCURRENTUSERRUNONCE, - strExplorer, - "DisableCurrentUserRunOnce", - SHELL_NO_POLICY - }, - { - REST_FORCEACTIVEDESKTOPON, - strExplorer, - "ForceActiveDesktopOn", - SHELL_NO_POLICY - }, -#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_NOCOMPUTERSNEARME, - strExplorer, - "NoComputersNearMe", - SHELL_NO_POLICY - }, -#endif - { - REST_NOVIEWONDRIVE, - strExplorer, - "NoViewOnDrive", - SHELL_NO_POLICY - }, - { - REST_NONETCRAWL, - strExplorer, -#ifndef __REACTOS__ -// NOTE: Wine buggy - "NoNetCrawl", -#else - "NoNetCrawling", -#endif - SHELL_NO_POLICY - }, - { - REST_NOSHAREDDOCUMENTS, - strExplorer, -#ifndef __REACTOS__ -// NOTE: Wine buggy - "NoSharedDocs", -#else - "NoSharedDocuments", -#endif - SHELL_NO_POLICY - }, - { - REST_NOSMMYDOCS, - strExplorer, - "NoSMMyDocs", - SHELL_NO_POLICY - }, - -#ifdef __REACTOS__ - { - REST_NOSMMYPICS, - strExplorer, - "NoSMMyPictures", - SHELL_NO_POLICY - }, - { - REST_ALLOWBITBUCKDRIVES, - strExplorer, - "RecycleBinDrives", - SHELL_NO_POLICY - }, -#endif - -/* 0x4000050 - 0x4000060 */ -#if (WINE_FILEVERSION_MAJOR >= 6) - { - REST_NONLEGACYSHELLMODE, - strExplorer, - "NoneLegacyShellMode", - SHELL_NO_POLICY - }, -#endif - -#ifdef __REACTOS__ - - { - REST_NOCONTROLPANELBARRICADE, - strExplorer, - "NoControlPanelBarricade", - SHELL_NO_POLICY - }, - -// NOTE: REST_NOSTARTPAGE never really existed. - -#if (WINE_FILEVERSION_MAJOR >= 6) - { - REST_NOAUTOTRAYNOTIFY, - strExplorer, - "NoAutoTrayNotify", - SHELL_NO_POLICY - }, - { - REST_NOTASKGROUPING, - strExplorer, - "NoTaskGrouping", - SHELL_NO_POLICY - }, - { - REST_NOCDBURNING, - strExplorer, - "NoCDBurning", - SHELL_NO_POLICY - }, -#endif // WINE_FILEVERSION_MAJOR - { - REST_MYCOMPNOPROP, - strExplorer, - "NoPropertiesMyComputer", - SHELL_NO_POLICY - }, - { - REST_MYDOCSNOPROP, - strExplorer, - "NoPropertiesMyDocuments", - SHELL_NO_POLICY - }, -#if (WINE_FILEVERSION_MAJOR >= 6) - { - REST_NOSTARTPANEL, - strExplorer, - "NoSimpleStartMenu", - SHELL_NO_POLICY - }, - { - REST_NODISPLAYAPPEARANCEPAGE, - strSystem, - "NoDispAppearancePage", // REGSTR_VAL_DISPCPL_NOAPPEARANCEPAGE - SHELL_NO_POLICY - }, - { - REST_NOTHEMESTAB, - strExplorer, - "NoThemesTab", - SHELL_NO_POLICY - }, - { - REST_NOVISUALSTYLECHOICE, - strSystem, - "NoVisualStyleChoice", - SHELL_NO_POLICY - }, - { - REST_NOSIZECHOICE, - strSystem, - "NoSizeChoice", - SHELL_NO_POLICY - }, - { - REST_NOCOLORCHOICE, - strSystem, - "NoColorChoice", - SHELL_NO_POLICY - }, - { - REST_SETVISUALSTYLE, - strSystem, - "SetVisualStyle", - SHELL_NO_POLICY - }, -#endif // WINE_FILEVERSION_MAJOR - -#endif // __REACTOS__ - - { - REST_STARTRUNNOHOMEPATH, - strExplorer, - "StartRunNoHOMEPATH", - SHELL_NO_POLICY - }, - -#ifdef __REACTOS__ - -#if (WINE_FILEVERSION_MAJOR >= 6) - { - REST_NOUSERNAMEINSTARTPANEL, - strExplorer, - "NoUserNameInStartMenu", - SHELL_NO_POLICY - }, - { - REST_NOMYCOMPUTERICON, - "NonEnum", - "{20D04FE0-3AEA-1069-A2D8-08002B30309D}", - SHELL_NO_POLICY - }, - { - REST_NOSMNETWORKPLACES, - strExplorer, - "NoStartMenuNetworkPlaces", - SHELL_NO_POLICY - }, - { - REST_NOSMPINNEDLIST, - strExplorer, - "NoStartMenuPinnedList", - SHELL_NO_POLICY - }, - { - REST_NOSMMYMUSIC, - strExplorer, - "NoStartMenuMyMusic", - SHELL_NO_POLICY - }, - { - REST_NOSMEJECTPC, - strExplorer, - "NoStartMenuEjectPC", - SHELL_NO_POLICY - }, - { - REST_NOSMMOREPROGRAMS, - strExplorer, - "NoStartMenuMorePrograms", - SHELL_NO_POLICY - }, - { - REST_NOSMMFUPROGRAMS, - strExplorer, - "NoStartMenuMFUprogramsList", - SHELL_NO_POLICY - }, - { - REST_NOTRAYITEMSDISPLAY, - strExplorer, - "NoTrayItemsDisplay", - SHELL_NO_POLICY - }, - { - REST_NOTOOLBARSONTASKBAR, - strExplorer, - "NoToolbarsOnTaskbar", - SHELL_NO_POLICY - }, -#endif // WINE_FILEVERSION_MAJOR - - { - REST_NOSMCONFIGUREPROGRAMS, - strExplorer, - "NoSMConfigurePrograms", - SHELL_NO_POLICY - }, - -#if (WINE_FILEVERSION_MAJOR >= 6) - { - REST_HIDECLOCK, - strExplorer, - "HideClock", - SHELL_NO_POLICY - }, - { - REST_NOLOWDISKSPACECHECKS, - strExplorer, - "NoLowDiskSpaceChecks", - SHELL_NO_POLICY - }, -#endif - -#if (WINE_FILEVERSION_MAJOR <= 6) && (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_NOENTIRENETWORK, - "Network", - "NoEntireNetwork", // REGSTR_VAL_NOENTIRENETWORK - SHELL_NO_POLICY - }, - { - REST_NODESKTOPCLEANUP, - strExplorer, - "NoDesktopCleanupWizard", - SHELL_NO_POLICY - }, -#endif - -#if (WINE_FILEVERSION_MAJOR >= 6) - { - REST_BITBUCKNUKEONDELETE, - strExplorer, - "NoRecycleFiles", - SHELL_NO_POLICY - }, - { - REST_BITBUCKCONFIRMDELETE, - strExplorer, - "ConfirmFileDelete", - SHELL_NO_POLICY - }, - { - REST_BITBUCKNOPROP, - strExplorer, - "NoPropertiesRecycleBin", - SHELL_NO_POLICY - }, - { - REST_NODISPBACKGROUND, - strSystem, - "NoDispBackgroundPage", // REGSTR_VAL_DISPCPL_NOBACKGROUNDPAGE - SHELL_NO_POLICY - }, - { - REST_NODISPSCREENSAVEPG, - strSystem, - "NoDispScrSavPage", // REGSTR_VAL_DISPCPL_NOSCRSAVPAGE - SHELL_NO_POLICY - }, - { - REST_NODISPSETTINGSPG, - strSystem, - "NoDispSettingsPage", // REGSTR_VAL_DISPCPL_NOSETTINGSPAGE - SHELL_NO_POLICY - }, - { - REST_NODISPSCREENSAVEPREVIEW, - strSystem, - "NoScreenSavePreview", - SHELL_NO_POLICY - }, - { - REST_NODISPLAYCPL, - strSystem, - "NoDispCPL", // REGSTR_VAL_DISPCPL_NODISPCPL - SHELL_NO_POLICY - }, - { - REST_HIDERUNASVERB, - strExplorer, - "HideRunAsVerb", - SHELL_NO_POLICY - }, - { - REST_NOTHUMBNAILCACHE, - strExplorer, - "NoThumbnailCache", - SHELL_NO_POLICY - }, - { - REST_NOSTRCMPLOGICAL, - strExplorer, - "NoStrCmpLogical", - SHELL_NO_POLICY - }, - { - REST_NOPUBLISHWIZARD, - strExplorer, - "NoPublishingWizard", - SHELL_NO_POLICY - }, - { - REST_NOONLINEPRINTSWIZARD, - strExplorer, - "NoOnlinePrintsWizard", - SHELL_NO_POLICY - }, - { - REST_NOWEBSERVICES, - strExplorer, - "NoWebServices", - SHELL_NO_POLICY - }, -#endif // WINE_FILEVERSION_MAJOR - - { - REST_ALLOWUNHASHEDWEBVIEW, - strExplorer, - "AllowUnhashedWebView", - SHELL_NO_POLICY - }, -#if (WINE_FILEVERSION_MAJOR >= 6) - { - REST_ALLOWLEGACYWEBVIEW, - strExplorer, - "AllowLegacyWebView", - SHELL_NO_POLICY - }, -#endif - { - REST_REVERTWEBVIEWSECURITY, - strExplorer, - "RevertWebViewSecurity", - SHELL_NO_POLICY - }, - { - REST_INHERITCONSOLEHANDLES, - strExplorer, - "InheritConsoleHandles", - SHELL_NO_POLICY - }, - -#if (WINE_FILEVERSION_MAJOR >= 6) - -#if (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_SORTMAXITEMCOUNT, - strExplorer, - "SortMaxItemCount", - SHELL_NO_POLICY - }, -#endif - { - REST_NOREMOTERECURSIVEEVENTS, - strExplorer, - "NoRemoteRecursiveEvents", - SHELL_NO_POLICY - }, - -#endif // WINE_FILEVERSION_MAJOR - - { - REST_NOREMOTECHANGENOTIFY, - strExplorer, - "NoRemoteChangeNotify", - SHELL_NO_POLICY - }, - -#if (WINE_FILEVERSION_MAJOR >= 6) - -#if (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_NOSIMPLENETIDLIST, - strExplorer, - "NoSimpleNetIDList", - SHELL_NO_POLICY - }, -#endif -// #if (NTDDI_VERSION < NTDDI_LONGHORN) -// NOTE: Geoff Chappell is inacurrate here. - { - REST_NOENUMENTIRENETWORK, - strExplorer, - "NoEnumEntireNetwork", - SHELL_NO_POLICY - }, -// #endif -#if (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_NODETAILSTHUMBNAILONNETWORK, - strExplorer, - "NoDetailsThumbnailOnNetwork", - SHELL_NO_POLICY - }, -#endif - { - REST_NOINTERNETOPENWITH, - strExplorer, - "NoInternetOpenWith", - SHELL_NO_POLICY - }, -#if (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_ALLOWLEGACYLMZBEHAVIOR, - strExplorer, - "AllowLegacyLMZBehavior", - SHELL_NO_POLICY - }, -#endif - { - REST_DONTRETRYBADNETNAME, - strExplorer, - "DontRetryBadNetName", - SHELL_NO_POLICY - }, - { - REST_ALLOWFILECLSIDJUNCTIONS, - strExplorer, - "AllowFileCLSIDJunctions", - SHELL_NO_POLICY - }, - { - REST_NOUPNPINSTALL, - strExplorer, - "NoUPnPInstallTask", - SHELL_NO_POLICY - }, - -// "NormalizeLinkNetPidls" only in version 6.0 from Windows XP SP3. - -#if (NTDDI_VERSION >= NTDDI_LONGHORN) - { - REST_ARP_DONTGROUPPATCHES, - strAddRemoveProgs, - "DontGroupPatches", - SHELL_NO_POLICY - }, - { - REST_ARP_NOCHOOSEPROGRAMSPAGE, - strAddRemoveProgs, - "NoChooseProgramsPage", - SHELL_NO_POLICY - }, -#endif - -// "AllowCLSIDPROGIDMapping" in Windows XP SP3 and Windows Server 2003 SP2 only. -// Maybe in Vista+ too? - -#endif // WINE_FILEVERSION_MAJOR - -#endif // __REACTOS__ - -/* 0x4000061 - 0x4000086 */ - { - REST_NODISCONNECT, - strExplorer, - "NoDisconnect", - SHELL_NO_POLICY - }, - { - REST_NOSECURITY, - strExplorer, - "NoNTSecurity", - SHELL_NO_POLICY - }, - { - REST_NOFILEASSOCIATE, - strExplorer, - "NoFileAssociate", - SHELL_NO_POLICY - }, - -#ifdef __REACTOS__ +#include "PolicyData.h" + { 0, NULL, NULL } +}; -#if (WINE_FILEVERSION_MAJOR >= 6) -// #if (NTDDI_VERSION < NTDDI_LONGHORN) -// NOTE: Either Geoff Chappell or MSDN is inacurrate here. - { - REST_ALLOWCOMMENTTOGGLE, - strExplorer, - "ToggleCommentPosition", - SHELL_NO_POLICY - }, -// #endif -#if (NTDDI_VERSION < NTDDI_LONGHORN) - { - REST_USEDESKTOPINICACHE, - strExplorer, - "UseDesktopIniCache", - SHELL_NO_POLICY - }, -#endif +#undef DEFINE_POLICY -// "NoNetFolderInfoTip" only in version 6.0 from Windows XP SP3. +/* + * The restriction-related variables + */ +HANDLE g_hRestGlobalCounter = NULL; +LONG g_nRestCountValue = -1; +DWORD g_RestValues[_countof(s_PolicyTable)] = { 0 }; -#endif // WINE_FILEVERSION_MAJOR +/**************************************************************************** + * SHELL_GetCachedGlobalCounter + * + * Retrieves the global counter using cache in a thread-safe manner. + * If a cache of global counter exists, the function returns it. + * If there is no cache, the function creates a global counter. + * + * @param[in,out] phGlobalCounter The pointer to the handle of global counter. + * @param[in] rguid The GUID of global counter. + * @return The handle of the global counter. + * @implemented + */ +static HANDLE +SHELL_GetCachedGlobalCounter(_Inout_ HANDLE *phGlobalCounter, _In_ REFGUID rguid) +{ + HANDLE hGlobalCounter; + if (*phGlobalCounter) + return *phGlobalCounter; + hGlobalCounter = SHGlobalCounterCreate(rguid); + if (InterlockedCompareExchangePointer(phGlobalCounter, hGlobalCounter, NULL)) + CloseHandle(hGlobalCounter); + return *phGlobalCounter; +} -#endif // __REACTOS__ +/**************************************************************************** + * SHELL_GetRestrictionsCounter + * + * Retrieves the global counter for GUID_Restrictions using caching in a + * thread-safe manner. The variable g_hRestGlobalCounter is used for caching. + * + * @return The handle of the global counter. + * @see SHELL_GetCachedGlobalCounter + * @implemented + */ +static HANDLE SHELL_GetRestrictionsCounter(VOID) +{ + return SHELL_GetCachedGlobalCounter(&g_hRestGlobalCounter, &GUID_Restrictions); +} -#ifndef __REACTOS__ -// NOTE: This is a SHDOCVW-only policy. - { - 0x50000024, - strExplorer, - strNoFileURL, - SHELL_NO_POLICY - }, -#endif +/**************************************************************************** + * SHELL_QueryRestrictionsChanged + * + * @return The value of the global counter for GUID_Restrictions. + * @see SHELL_GetRestrictionsCounter + * @implemented + */ +static BOOL SHELL_QueryRestrictionsChanged(VOID) +{ + LONG Value = SHGlobalCounterGetValue(SHELL_GetRestrictionsCounter()); + if (g_nRestCountValue == Value) + return FALSE; - { - 0, - 0, - 0, - SHELL_NO_POLICY - } -}; + g_nRestCountValue = Value; + return TRUE; +} /************************************************************************* * SHRestricted [SHELL32.100] @@ -1335,64 +143,15 @@ static POLICYDATA sh32_policy_table[] = * b: 98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/ * c: 'The Windows 95 Registry', by John Woram, 1996 MIS: Press */ -DWORD WINAPI SHRestricted (RESTRICTIONS policy) +DWORD WINAPI SHRestricted (RESTRICTIONS rest) { - char regstr[256]; - HKEY xhkey; - DWORD retval, datsize = 4; - LPPOLICYDATA p; - - TRACE("(%08x)\n", policy); - - /* scan to see if we know this policy ID */ - for (p = sh32_policy_table; p->policy; p++) - { - if (policy == p->policy) - { - break; - } - } + TRACE("(0x%08lX)\n", rest); - if (p->policy == 0) - { - /* we don't know this policy, return 0 */ - TRACE("unknown policy: (%08x)\n", policy); - return 0; - } + /* If restrictions from registry have changed, reset all cached values to SHELL_NO_POLICY */ + if (SHELL_QueryRestrictionsChanged()) + FillMemory(&g_RestValues, sizeof(g_RestValues), 0xFF); - /* we have a known policy */ - - /* first check if this policy has been cached, return it if so */ - if (p->cache != SHELL_NO_POLICY) - { - return p->cache; - } - - lstrcpyA(regstr, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\"); - lstrcatA(regstr, p->appstr); - - /* return 0 and don't set the cache if any registry errors occur */ -#ifndef __REACTOS__ - retval = 0; - if (RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey) == ERROR_SUCCESS) -#else // FIXME: Actually this *MUST* use shlwapi!SHRestrictionLookup() - // See http://www.geoffchappell.com/studies/windows/shell/shell32/api/util/shrestricted.htm - retval = RegOpenKeyExA(HKEY_LOCAL_MACHINE, regstr, 0, KEY_READ, &xhkey); - if (retval != ERROR_SUCCESS) - { - retval = RegOpenKeyExA(HKEY_CURRENT_USER, regstr, 0, KEY_READ, &xhkey); - if (retval != ERROR_SUCCESS) - return 0; - } -#endif - { - if (RegQueryValueExA(xhkey, p->keystr, NULL, NULL, (LPBYTE)&retval, &datsize) == ERROR_SUCCESS) - { - p->cache = retval; - } - RegCloseKey(xhkey); - } - return retval; + return SHRestrictionLookup(rest, NULL, s_PolicyTable, g_RestValues); } /************************************************************************* @@ -1402,7 +161,7 @@ DWORD WINAPI SHRestricted (RESTRICTIONS policy) * * PARAMS * unused [I] Reserved. - * inpRegKey [I] Registry key to scan. + * pszKey [I] Registry key to scan. * * RETURNS * Success: -1. The policy cache is initialised. @@ -1412,30 +171,16 @@ DWORD WINAPI SHRestricted (RESTRICTIONS policy) * NOTES * Exported by ordinal. Introduced in Win98. */ -BOOL WINAPI SHSettingsChanged(LPCVOID unused, LPCVOID inpRegKey) +BOOL WINAPI SHSettingsChanged(LPCVOID unused, LPCWSTR pszKey) { - TRACE("(%p, %p)\n", unused, inpRegKey); + TRACE("(%p, %s)\n", unused, debugstr_w(pszKey)); - /* first check - if input is non-NULL and points to the secret - key string, then pass. Otherwise return 0. - */ - if (inpRegKey != NULL) - { - if (SHELL_OsIsUnicode()) - { - if (lstrcmpiW(inpRegKey, L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies") && - lstrcmpiW(inpRegKey, L"Policy")) - /* doesn't match, fail */ - return FALSE; - } - else - { - if (lstrcmpiA(inpRegKey, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies") && - lstrcmpiA(inpRegKey, "Policy")) - /* doesn't match, fail */ - return FALSE; - } - } + if (pszKey && + lstrcmpiW(L"Policy", pszKey) != 0 && + lstrcmpiW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies", pszKey) != 0) + { + return FALSE; + } - return TRUE; + return SHGlobalCounterIncrement(SHELL_GetRestrictionsCounter()); } diff --git a/dll/win32/shlwapi/ordinal.c b/dll/win32/shlwapi/ordinal.c index 37181442f48..bd25ca1144b 100644 --- a/dll/win32/shlwapi/ordinal.c +++ b/dll/win32/shlwapi/ordinal.c @@ -2665,6 +2665,7 @@ HWND WINAPI SHCreateWorkerWindowA(WNDPROC wndProc, HWND hWndParent, DWORD dwExSt return hWnd; } +#ifndef __REACTOS__ /* The followings are defined in */ typedef struct tagPOLICYDATA { DWORD policy; /* flags value passed to SHRestricted */ @@ -2679,6 +2680,7 @@ static const WCHAR strRegistryPolicyW[] = {'S','o','f','t','w','a','r','e','\\', 's','o','f','t','\\','W','i','n','d','o','w','s','\\', 'C','u','r','r','e','n','t','V','e','r','s','i','o','n', '\\','P','o','l','i','c','i','e','s',0}; +#endif /* ndef __REACTOS__ */ /************************************************************************* * @ [SHLWAPI.271] @@ -2695,6 +2697,25 @@ static const WCHAR strRegistryPolicyW[] = {'S','o','f','t','w','a','r','e','\\', */ DWORD WINAPI SHGetRestriction(LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpValue) { +#ifdef __REACTOS__ + WCHAR szPath[MAX_PATH]; + DWORD dwSize, dwValue = 0; + + TRACE("(%s, %s, %s)\n", debugstr_w(lpSubKey), debugstr_w(lpSubName), debugstr_w(lpValue)); + + if (!lpSubKey) + lpSubKey = L"Software\\Microsoft\\Windows\\CurrentVersion\\Policies"; + + PathCombineW(szPath, lpSubKey, lpSubName); + + dwSize = sizeof(dwValue); + if (SHGetValueW(HKEY_LOCAL_MACHINE, szPath, lpValue, NULL, &dwValue, &dwSize) == ERROR_SUCCESS) + return dwValue; + + dwSize = sizeof(dwValue); + SHGetValueW(HKEY_CURRENT_USER, szPath, lpValue, NULL, &dwValue, &dwSize); + return dwValue; +#else DWORD retval, datsize = sizeof(retval); HKEY hKey; @@ -2710,6 +2731,7 @@ DWORD WINAPI SHGetRestriction(LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpVal SHGetValueW(hKey, lpSubName, lpValue, NULL, &retval, &datsize); RegCloseKey(hKey); return retval; +#endif } /************************************************************************* @@ -2732,18 +2754,33 @@ DWORD WINAPI SHGetRestriction(LPCWSTR lpSubKey, LPCWSTR lpSubName, LPCWSTR lpVal * different POLICYDATA structure and implements a similar algorithm adapted to * that structure. */ +#ifdef __REACTOS__ +DWORD WINAPI +SHRestrictionLookup( + _In_ DWORD policy, + _In_ LPCWSTR initial, + _In_ const POLICYDATA *polTable, + _Inout_ LPDWORD polArr) +#else DWORD WINAPI SHRestrictionLookup( DWORD policy, LPCWSTR initial, LPPOLICYDATA polTable, LPDWORD polArr) +#endif { TRACE("(0x%08x %s %p %p)\n", policy, debugstr_w(initial), polTable, polArr); +#ifndef __REACTOS__ if (!polTable || !polArr) return 0; +#endif +#ifndef __REACTOS__ + for (;polTable->appstr; polTable++, polArr++) +#else for (;polTable->policy; polTable++, polArr++) +#endif { if (policy == polTable->policy) { diff --git a/hal/halx86/apic/apic.c b/hal/halx86/apic/apic.c index 8ab184e917c..ae2c2e5a4ab 100644 --- a/hal/halx86/apic/apic.c +++ b/hal/halx86/apic/apic.c @@ -376,7 +376,7 @@ HalpAllocateSystemInterrupt( /* Setup a redirection entry */ ReDirReg.Vector = Vector; - ReDirReg.DeliveryMode = APIC_MT_LowestPriority; + ReDirReg.MessageType = APIC_MT_LowestPriority; ReDirReg.DestinationMode = APIC_DM_Logical; ReDirReg.DeliveryStatus = 0; ReDirReg.Polarity = 0; @@ -475,7 +475,7 @@ ApicInitializeIOApic(VOID) /* Setup a redirection entry */ ReDirReg.Vector = APIC_FREE_VECTOR; - ReDirReg.DeliveryMode = APIC_MT_Fixed; + ReDirReg.MessageType = APIC_MT_Fixed; ReDirReg.DestinationMode = APIC_DM_Physical; ReDirReg.DeliveryStatus = 0; ReDirReg.Polarity = 0; @@ -500,7 +500,7 @@ ApicInitializeIOApic(VOID) /* Enable the timer interrupt (but keep it masked) */ ReDirReg.Vector = APIC_CLOCK_VECTOR; - ReDirReg.DeliveryMode = APIC_MT_Fixed; + ReDirReg.MessageType = APIC_MT_Fixed; ReDirReg.DestinationMode = APIC_DM_Physical; ReDirReg.TriggerMode = APIC_TGM_Edge; ReDirReg.Mask = 1; @@ -696,7 +696,7 @@ HalEnableSystemInterrupt( if (ReDirReg.Vector != Vector) { ReDirReg.Vector = Vector; - ReDirReg.DeliveryMode = APIC_MT_LowestPriority; + ReDirReg.MessageType = APIC_MT_LowestPriority; ReDirReg.DestinationMode = APIC_DM_Logical; ReDirReg.Destination = 0; } diff --git a/hal/halx86/apic/apicp.h b/hal/halx86/apic/apicp.h index e794fa9131b..3ba238abfc7 100644 --- a/hal/halx86/apic/apicp.h +++ b/hal/halx86/apic/apicp.h @@ -298,7 +298,7 @@ typedef union _IOAPIC_REDIRECTION_REGISTER struct { UINT64 Vector:8; - UINT64 DeliveryMode:3; + UINT64 MessageType:3; UINT64 DestinationMode:1; UINT64 DeliveryStatus:1; UINT64 Polarity:1; diff --git a/modules/rosapps/applications/sysutils/kill/kill.c b/modules/rosapps/applications/sysutils/kill/kill.c index bce146ad721..170cfd8c8a3 100644 --- a/modules/rosapps/applications/sysutils/kill/kill.c +++ b/modules/rosapps/applications/sysutils/kill/kill.c @@ -28,51 +28,47 @@ * from the old shell.exe */ -#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ +#define WIN32_LEAN_AND_MEAN /* Exclude rarely-used stuff from Windows headers */ #include + #include #include int -ExecuteKill(char * lpPid) +ExecuteKill(const char *lpPid) { - HANDLE hProcess; - DWORD dwProcessId; + HANDLE hProcess; + DWORD dwProcessId; + + dwProcessId = strtoul(lpPid, NULL, 10); + fprintf(stderr, "Killing the process with PID %lu...\n", dwProcessId); + + hProcess = OpenProcess(PROCESS_TERMINATE, FALSE, dwProcessId); + if (hProcess == NULL) + { + fprintf(stderr, "Could not open the process with PID %lu\n", dwProcessId); + return 1; + } - dwProcessId = (DWORD) atol(lpPid); - fprintf( stderr, "Killing PID %ld...\n",dwProcessId); - hProcess = OpenProcess( - PROCESS_TERMINATE, - FALSE, - dwProcessId - ); - if (NULL == hProcess) - { - fprintf( stderr, "Could not open the process with PID = %ld\n", dwProcessId); - return 0; - } - if (FALSE == TerminateProcess( - hProcess, - 0 - ) - ) { - fprintf( stderr, "Could not terminate the process with PID = %ld\n", dwProcessId); - return 0; - } - CloseHandle(hProcess); - return 0; + if (!TerminateProcess(hProcess, 0)) + { + fprintf(stderr, "Could not terminate the process with PID %lu\n", dwProcessId); + CloseHandle(hProcess); + return 1; + } + + CloseHandle(hProcess); + return 0; } -int main(int argc, char *argv[]) +int +main(int argc, char *argv[]) { - char tail; - DBG_UNREFERENCED_LOCAL_VARIABLE(tail); + if (argc != 2) + { + fprintf(stderr, "Usage: %s PID (Process ID)\n", argv[0]); + return 1; + } - if (argc < 2) - { - fprintf( stderr, "Usage: %s PID (Process ID) \n", argv[0] ); - return 1; - } - tail = ExecuteKill(argv[1]); - return 0; + return ExecuteKill(argv[1]); } diff --git a/modules/rostests/apitests/imm32/CMakeLists.txt b/modules/rostests/apitests/imm32/CMakeLists.txt index 0b428e03bbe..6af5bb17cda 100644 --- a/modules/rostests/apitests/imm32/CMakeLists.txt +++ b/modules/rostests/apitests/imm32/CMakeLists.txt @@ -10,11 +10,12 @@ list(APPEND SOURCE ImmIsUIMessage.c JapanImeConvTestA.c JapanImeConvTestW.c + KLID.c testlist.c resource.rc) add_executable(imm32_apitest ${SOURCE}) target_link_libraries(imm32_apitest wine ${PSEH_LIB}) set_module_type(imm32_apitest win32cui) -add_importlibs(imm32_apitest imm32 msvcrt user32 kernel32 ntdll) +add_importlibs(imm32_apitest advapi32 imm32 msvcrt user32 kernel32 ntdll) add_rostests_file(TARGET imm32_apitest) diff --git a/modules/rostests/apitests/imm32/KLID.c b/modules/rostests/apitests/imm32/KLID.c new file mode 100644 index 00000000000..bb95cfb1600 --- /dev/null +++ b/modules/rostests/apitests/imm32/KLID.c @@ -0,0 +1,199 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later) + * PURPOSE: Test for Keyboard Layout ID (KLID), HKL, and registry + * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com) + */ + +#include "precomp.h" + +#include +#include +#include + +typedef enum tagHKL_TYPE +{ + HKL_TYPE_PURE = 0, + HKL_TYPE_SPECIAL = 1, + HKL_TYPE_IME = 2, + HKL_TYPE_CHIMERA = 3, +} HKL_TYPE; + +static HKL_TYPE GetHKLType(HKL hKL) +{ + /* 0xEXXXYYYY: An IME HKL. EXXX is an IME keyboard. YYYY is a language */ + if (IS_IME_HKL(hKL)) + return HKL_TYPE_IME; + + /* 0xFXXXYYYY: A special HKL. XXX is a special ID. YYYY is a language */ + if (IS_SPECIAL_HKL(hKL)) + return HKL_TYPE_SPECIAL; + + /* 0xXXXXXXXX: The keyboard layout and language is the same value */ + if (LOWORD(hKL) == HIWORD(hKL)) + return HKL_TYPE_PURE; + + /* 0xXXXXYYYY: XXXX is a keyboard. YYYY is a language */ + return HKL_TYPE_CHIMERA; +} + +static HKEY OpenKeyboardLayouts(void) +{ + HKEY hKey = NULL; + RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts", + 0, KEY_READ, &hKey); + return hKey; +} + +static DWORD KLIDFromSpecialHKL(HKL hKL) +{ + WCHAR szName[16], szLayoutId[16]; + HKEY hkeyLayouts, hkeyKLID; + LSTATUS error; + DWORD dwSpecialId, dwLayoutId, cbValue, dwKLID = 0; + + hkeyLayouts = OpenKeyboardLayouts(); + ok(hkeyLayouts != NULL, "hkeyLayouts was NULL\n"); + + dwSpecialId = SPECIALIDFROMHKL(hKL); + + /* Search from "Keyboard Layouts" registry key */ + for (DWORD dwIndex = 0; dwIndex < 1000; ++dwIndex) + { + error = RegEnumKeyW(hkeyLayouts, dwIndex, szName, _countof(szName)); + szName[_countof(szName) - 1] = UNICODE_NULL; /* Avoid buffer overrun */ + if (error != ERROR_SUCCESS) + break; + + error = RegOpenKeyExW(hkeyLayouts, szName, 0, KEY_READ, &hkeyKLID); + if (error != ERROR_SUCCESS) + break; + + cbValue = sizeof(szLayoutId); + error = RegQueryValueExW(hkeyKLID, L"Layout Id", NULL, NULL, (LPBYTE)szLayoutId, &cbValue); + szLayoutId[_countof(szLayoutId) - 1] = UNICODE_NULL; /* Avoid buffer overrun */ + if (error != ERROR_SUCCESS) + { + RegCloseKey(hkeyKLID); + continue; + } + + dwLayoutId = wcstoul(szLayoutId, NULL, 16); + RegCloseKey(hkeyKLID); + if (dwLayoutId == dwSpecialId) /* Found */ + { + dwKLID = wcstoul(szName, NULL, 16); + break; + } + } + + RegCloseKey(hkeyLayouts); + return dwKLID; +} + +static DWORD KLIDFromHKL(HKL hKL) +{ + HKL_TYPE type = GetHKLType(hKL); + + trace("type: %d\n", type); + switch (type) + { + case HKL_TYPE_PURE: + case HKL_TYPE_CHIMERA: + return HIWORD(hKL); + + case HKL_TYPE_SPECIAL: + return KLIDFromSpecialHKL(hKL); + + case HKL_TYPE_IME: + return HandleToUlong(hKL); + } + + return 0; +} + +static void Test_KLID(DWORD dwKLID, HKL hKL) +{ + WCHAR szKLID[16], szValue[MAX_PATH]; + LSTATUS error; + DWORD dwValue, cbValue; + HKEY hkeyKLID, hkeyLayouts; + HKL_TYPE type; + + hkeyLayouts = OpenKeyboardLayouts(); + ok(hkeyLayouts != NULL, "hkeyLayouts was NULL\n"); + + StringCchPrintfW(szKLID, _countof(szKLID), L"%08lX", dwKLID); + RegOpenKeyExW(hkeyLayouts, szKLID, 0, KEY_READ, &hkeyKLID); + ok(hkeyKLID != NULL, "hkeyKLID was NULL\n"); + + error = RegQueryValueExW(hkeyKLID, L"Layout File", NULL, NULL, NULL, NULL); + ok_long(error, ERROR_SUCCESS); + + type = GetHKLType(hKL); + + if (type == HKL_TYPE_IME) + { + ok_long(dwKLID, HandleToUlong(hKL)); + error = RegQueryValueExW(hkeyKLID, L"IME File", NULL, NULL, NULL, NULL); + ok_long(error, ERROR_SUCCESS); + } + + if (type == HKL_TYPE_SPECIAL) + { + cbValue = sizeof(szValue); + error = RegQueryValueExW(hkeyKLID, L"Layout Id", NULL, NULL, (LPBYTE)&szValue, &cbValue); + ok_long(error, ERROR_SUCCESS); + + dwValue = wcstoul(szValue, NULL, 16); + ok_long(dwValue, SPECIALIDFROMHKL(hKL)); + } + + RegCloseKey(hkeyKLID); + RegCloseKey(hkeyLayouts); +} + +static void Test_HKL(HKL hKL) +{ + DWORD dwKLID; + + ok(hKL != NULL, "hKL was NULL\n"); + + dwKLID = KLIDFromHKL(hKL); + trace("dwKLID 0x%08lX, hKL %p\n", dwKLID, hKL); + + Test_KLID(dwKLID, hKL); +} + +START_TEST(KLID) +{ + HKL *phKLs; + INT iKL, cKLs; + + cKLs = GetKeyboardLayoutList(0, NULL); + trace("cKLs: %d\n", cKLs); + if (!cKLs) + { + skip("cKLs was zero\n"); + return; + } + + phKLs = calloc(cKLs, sizeof(HKL)); + if (!phKLs) + { + skip("!phKLs\n"); + return; + } + + ok_int(GetKeyboardLayoutList(cKLs, phKLs), cKLs); + + for (iKL = 0; iKL < cKLs; ++iKL) + { + trace("---\n"); + trace("phKLs[%d]: %p\n", iKL, phKLs[iKL]); + Test_HKL(phKLs[iKL]); + } + + free(phKLs); +} diff --git a/modules/rostests/apitests/imm32/testlist.c b/modules/rostests/apitests/imm32/testlist.c index 51005448c3d..a39c480f085 100644 --- a/modules/rostests/apitests/imm32/testlist.c +++ b/modules/rostests/apitests/imm32/testlist.c @@ -8,6 +8,7 @@ extern void func_imcc(void); extern void func_ImmEnumInputContext(void); extern void func_ImmGetImeInfoEx(void); extern void func_ImmIsUIMessage(void); +extern void func_KLID(void); extern void func_JapanImeConvTestA(void); extern void func_JapanImeConvTestW(void); @@ -19,6 +20,7 @@ const struct test winetest_testlist[] = { "ImmEnumInputContext", func_ImmEnumInputContext }, { "ImmGetImeInfoEx", func_ImmGetImeInfoEx }, { "ImmIsUIMessage", func_ImmIsUIMessage }, + { "KLID", func_KLID }, { "JapanImeConvTestA", func_JapanImeConvTestA }, { "JapanImeConvTestW", func_JapanImeConvTestW }, { 0, 0 } diff --git a/modules/rostests/apitests/ntdll/CMakeLists.txt b/modules/rostests/apitests/ntdll/CMakeLists.txt index abda236e613..cc4adfac82f 100644 --- a/modules/rostests/apitests/ntdll/CMakeLists.txt +++ b/modules/rostests/apitests/ntdll/CMakeLists.txt @@ -7,6 +7,7 @@ spec2def(ntdll_apitest.exe ntdll_apitest.spec) list(APPEND SOURCE LdrEnumResources.c + LdrLoadDll.c load_notifications.c locale.c NtAcceptConnectPort.c diff --git a/modules/rostests/apitests/ntdll/LdrLoadDll.c b/modules/rostests/apitests/ntdll/LdrLoadDll.c new file mode 100644 index 00000000000..a84a5617771 --- /dev/null +++ b/modules/rostests/apitests/ntdll/LdrLoadDll.c @@ -0,0 +1,201 @@ +/* + * PROJECT: ReactOS API Tests + * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later) + * PURPOSE: Test for LdrLoadDll + * COPYRIGHT: Copyright 2017 Thomas Faber + * Copyright 2024 Katayama Hirofumi MZ + */ + +#include "precomp.h" + +/* + +NTSTATUS +NTAPI +LdrLoadDll( + IN PWSTR SearchPath OPTIONAL, + IN PULONG DllCharacteristics OPTIONAL, + IN PUNICODE_STRING DllName, + OUT PVOID *BaseAddress +); + +*/ + +START_TEST(LdrLoadDll) +{ + NTSTATUS Status = STATUS_SUCCESS; + UNICODE_STRING DllName; + PVOID BaseAddress, BaseAddress2; + WCHAR szWinDir[MAX_PATH], szSysDir[MAX_PATH], szPath[MAX_PATH]; + WCHAR *pch; + + RtlInitEmptyUnicodeString(&DllName, NULL, 0); + GetWindowsDirectoryW(szWinDir, _countof(szWinDir)); + GetSystemDirectoryW(szSysDir, _countof(szSysDir)); + + Status = 0xDEADFACE; + StartSeh() + Status = LdrLoadDll(NULL, NULL, &DllName, NULL); + EndSeh(STATUS_ACCESS_VIOLATION); + ok_ntstatus(Status, 0xDEADFACE); + + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(NULL, NULL, &DllName, &BaseAddress); + EndSeh(STATUS_ACCESS_VIOLATION); + ok_ntstatus(Status, 0xDEADFACE); + ok_ptr(BaseAddress, InvalidPointer); + + Status = 0xDEADFACE; + StartSeh() + Status = LdrLoadDll(L"", NULL, &DllName, NULL); + EndSeh(STATUS_ACCESS_VIOLATION); + ok_ntstatus(Status, 0xDEADFACE); + + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(L"", NULL, &DllName, &BaseAddress); + EndSeh(STATUS_ACCESS_VIOLATION); + ok_ntstatus(Status, 0xDEADFACE); + ok_ptr(BaseAddress, InvalidPointer); + + RtlInitUnicodeString(&DllName, L"advapi32.dll"); + + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(NULL, NULL, &DllName, NULL); + if (NT_SUCCESS(Status)) + LdrUnloadDll(BaseAddress); + EndSeh(STATUS_ACCESS_VIOLATION); + ok_ntstatus(Status, 0xDEADFACE); + ok_ptr(BaseAddress, InvalidPointer); + + RtlInitUnicodeString(&DllName, L"advapi32.dll"); + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + BaseAddress = InvalidPointer; + Status = LdrLoadDll(NULL, NULL, &DllName, &BaseAddress); + ok_ntstatus(Status, STATUS_SUCCESS); + ok(BaseAddress != NULL && BaseAddress != InvalidPointer, "BaseAddress = %p\n", BaseAddress); + if (NT_SUCCESS(Status)) + { + BaseAddress2 = InvalidPointer; + Status = LdrLoadDll(NULL, NULL, &DllName, &BaseAddress2); + ok_ntstatus(Status, STATUS_SUCCESS); + ok_ptr(BaseAddress2, BaseAddress); + LdrUnloadDll(BaseAddress); + } + EndSeh(STATUS_SUCCESS); + ok_ntstatus(Status, STATUS_SUCCESS); + ok(BaseAddress != NULL, "BaseAddress was NULL\n"); + + RtlInitUnicodeString(&DllName, L"advapi32.dll"); + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(L"\\SystemRoot\\System32", NULL, &DllName, NULL); + EndSeh(STATUS_ACCESS_VIOLATION); + ok_ntstatus(Status, 0xDEADFACE); + ok_ptr(BaseAddress, InvalidPointer); + + /* Test with only backslashes in path; no file extension */ + StringCchPrintfW(szPath, _countof(szPath), L"%s\\advapi32", szSysDir); + RtlInitUnicodeString(&DllName, szPath); + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(szWinDir, NULL, &DllName, &BaseAddress); + ok_ntstatus(Status, STATUS_SUCCESS); + if (NT_SUCCESS(Status)) + LdrUnloadDll(BaseAddress); + EndSeh(STATUS_SUCCESS); + ok_ntstatus(Status, STATUS_SUCCESS); + ok(BaseAddress != NULL, "BaseAddress was NULL\n"); + + /* Test with only backslashes in path; with file extension */ + StringCchPrintfW(szPath, _countof(szPath), L"%s\\advapi32.dll", szSysDir); + RtlInitUnicodeString(&DllName, szPath); + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(szWinDir, NULL, &DllName, &BaseAddress); + ok_ntstatus(Status, STATUS_SUCCESS); + if (NT_SUCCESS(Status)) + LdrUnloadDll(BaseAddress); + EndSeh(STATUS_SUCCESS); + ok_ntstatus(Status, STATUS_SUCCESS); + ok(BaseAddress != NULL, "BaseAddress was NULL\n"); + + /* Test with one forward slash in path; no file extension */ + StringCchPrintfW(szPath, _countof(szPath), L"%s/advapi32", szSysDir); + RtlInitUnicodeString(&DllName, szPath); + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(szWinDir, NULL, &DllName, &BaseAddress); + ok_ntstatus(Status, STATUS_SUCCESS); + if (NT_SUCCESS(Status)) + LdrUnloadDll(BaseAddress); + EndSeh(STATUS_SUCCESS); + ok_ntstatus(Status, STATUS_SUCCESS); + ok(BaseAddress != NULL, "BaseAddress was NULL\n"); + + /* Test with one forward slash in path; with file extension */ + StringCchPrintfW(szPath, _countof(szPath), L"%s/advapi32.dll", szSysDir); + RtlInitUnicodeString(&DllName, szPath); + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(szWinDir, NULL, &DllName, &BaseAddress); + ok_ntstatus(Status, STATUS_SUCCESS); + if (NT_SUCCESS(Status)) + LdrUnloadDll(BaseAddress); + EndSeh(STATUS_SUCCESS); + ok_ntstatus(Status, STATUS_SUCCESS); + ok(BaseAddress != NULL, "BaseAddress was NULL\n"); + + /* Test with only forward slashes in path; no file extension */ + StringCchPrintfW(szPath, _countof(szPath), L"%s\\advapi32", szSysDir); + for (pch = szPath; *pch != UNICODE_NULL; ++pch) + { + if (*pch == L'\\') + *pch = L'/'; + } + + RtlInitUnicodeString(&DllName, szPath); + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(szWinDir, NULL, &DllName, &BaseAddress); + ok_ntstatus(Status, STATUS_SUCCESS); + if (NT_SUCCESS(Status)) + LdrUnloadDll(BaseAddress); + EndSeh(STATUS_SUCCESS); + ok_ntstatus(Status, STATUS_SUCCESS); + ok(BaseAddress != NULL, "BaseAddress was NULL\n"); + + /* Test with only forward slashes in path; with file extension */ + /* Test with only forward slashes in path; with file extension */ + StringCchPrintfW(szPath, _countof(szPath), L"%s\\advapi32.dll", szSysDir); + for (pch = szPath; *pch != UNICODE_NULL; ++pch) + { + if (*pch == L'\\') + *pch = L'/'; + } + + RtlInitUnicodeString(&DllName, szPath); + Status = 0xDEADFACE; + BaseAddress = InvalidPointer; + StartSeh() + Status = LdrLoadDll(szWinDir, NULL, &DllName, &BaseAddress); + ok_ntstatus(Status, STATUS_SUCCESS); + if (NT_SUCCESS(Status)) + LdrUnloadDll(BaseAddress); + EndSeh(STATUS_SUCCESS); + ok_ntstatus(Status, STATUS_SUCCESS); + ok(BaseAddress != NULL, "BaseAddress was NULL\n"); +} diff --git a/modules/rostests/apitests/ntdll/testlist.c b/modules/rostests/apitests/ntdll/testlist.c index f837fa29f8f..10cc0d987da 100644 --- a/modules/rostests/apitests/ntdll/testlist.c +++ b/modules/rostests/apitests/ntdll/testlist.c @@ -4,6 +4,7 @@ #include extern void func_LdrEnumResources(void); +extern void func_LdrLoadDll(void); extern void func_load_notifications(void); extern void func_NtAcceptConnectPort(void); extern void func_NtAccessCheck(void); @@ -106,6 +107,7 @@ extern void func_UserModeException(void); const struct test winetest_testlist[] = { { "LdrEnumResources", func_LdrEnumResources }, + { "LdrLoadDll", func_LdrLoadDll }, { "load_notifications", func_load_notifications }, { "NtAcceptConnectPort", func_NtAcceptConnectPort }, { "NtAccessCheck", func_NtAccessCheck }, diff --git a/modules/rostests/apitests/shell32/CMakeLists.txt b/modules/rostests/apitests/shell32/CMakeLists.txt index da5c512640e..642f398f9ec 100644 --- a/modules/rostests/apitests/shell32/CMakeLists.txt +++ b/modules/rostests/apitests/shell32/CMakeLists.txt @@ -56,6 +56,7 @@ set_target_properties(shell32_apitest target_link_libraries(shell32_apitest wine uuid ${PSEH_LIB} cpprt atl_classes) set_module_type(shell32_apitest win32cui) +target_compile_definitions(shell32_apitest PRIVATE UNICODE _UNICODE) add_importlibs(shell32_apitest user32 gdi32 shell32 shlwapi ole32 oleaut32 advapi32 shlwapi msvcrt kernel32 ntdll) add_pch(shell32_apitest shelltest.h "${PCH_SKIP_SOURCE}") add_rostests_file(TARGET shell32_apitest) diff --git a/modules/rostests/apitests/shell32/FindExecutable.cpp b/modules/rostests/apitests/shell32/FindExecutable.cpp index 132c9589e65..fa91932d041 100644 --- a/modules/rostests/apitests/shell32/FindExecutable.cpp +++ b/modules/rostests/apitests/shell32/FindExecutable.cpp @@ -8,30 +8,6 @@ #include "shelltest.h" #include #include -#include "shell32_apitest_sub.h" - -static char s_sub_program[MAX_PATH]; - -static BOOL -GetSubProgramPath(void) -{ - GetModuleFileNameA(NULL, s_sub_program, _countof(s_sub_program)); - PathRemoveFileSpecA(s_sub_program); - PathAppendA(s_sub_program, "shell32_apitest_sub.exe"); - - if (!PathFileExistsA(s_sub_program)) - { - PathRemoveFileSpecA(s_sub_program); - PathAppendA(s_sub_program, "testdata\\shell32_apitest_sub.exe"); - - if (!PathFileExistsA(s_sub_program)) - { - return FALSE; - } - } - - return TRUE; -} typedef struct TEST_ENTRY { @@ -170,11 +146,6 @@ static const TEST_ENTRY s_entries[] = { __LINE__, TRUE, "\"test program.bat\"", DIR_2, s_sys_bat_file }, { __LINE__, TRUE, "\"test program.bat\"", DIR_3, s_win_bat_file }, { __LINE__, TRUE, "\"test program.bat\"", DIR_4, s_sys_bat_file }, - { __LINE__, TRUE, "shell32_apitest_sub.exe", DIR_0, s_sub_program }, - { __LINE__, TRUE, "shell32_apitest_sub.exe", DIR_1, "shell32_apitest_sub.exe" }, - { __LINE__, FALSE, "shell32_apitest_sub.exe", DIR_2, "" }, - { __LINE__, FALSE, "shell32_apitest_sub.exe", DIR_3, "" }, - { __LINE__, FALSE, "shell32_apitest_sub.exe", DIR_4, "" }, { __LINE__, TRUE, "test file.txt", DIR_0, s_sys_notepad }, { __LINE__, TRUE, "test file.txt", DIR_1, s_sys_notepad }, { __LINE__, TRUE, "test file.txt", DIR_2, s_sys_notepad }, @@ -203,12 +174,6 @@ static void DoTestEntry(const TEST_ENTRY *pEntry) START_TEST(FindExecutable) { - if (!GetSubProgramPath()) - { - skip("shell32_apitest_sub.exe not found\n"); - return; - } - char cur_dir[MAX_PATH]; GetCurrentDirectoryA(_countof(cur_dir), cur_dir); if (PathIsRootA(cur_dir)) @@ -227,7 +192,7 @@ START_TEST(FindExecutable) GetWindowsDirectoryA(s_win_test_exe, _countof(s_win_test_exe)); PathAppendA(s_win_test_exe, "test program.exe"); - BOOL ret = CopyFileA(s_sub_program, s_win_test_exe, FALSE); + BOOL ret = CopyFileA(s_win_notepad, s_win_test_exe, FALSE); if (!ret) { skip("Please retry with admin rights\n"); @@ -236,7 +201,12 @@ START_TEST(FindExecutable) GetSystemDirectoryA(s_sys_test_exe, _countof(s_sys_test_exe)); PathAppendA(s_sys_test_exe, "test program.exe"); - ok_int(CopyFileA(s_sub_program, s_sys_test_exe, FALSE), TRUE); + ret = CopyFileA(s_win_notepad, s_sys_test_exe, FALSE); + if (!ret) + { + skip("Please retry with admin rights\n"); + return; + } GetWindowsDirectoryA(s_win_bat_file, _countof(s_win_bat_file)); PathAppendA(s_win_bat_file, "test program.bat"); @@ -269,6 +239,4 @@ START_TEST(FindExecutable) DeleteFileA(s_sys_bat_file); DeleteFileA(s_win_txt_file); DeleteFileA(s_sys_txt_file); - - DoWaitForWindow(CLASSNAME, CLASSNAME, TRUE, TRUE); } diff --git a/modules/rostests/apitests/shell32/ShellExecuteEx.cpp b/modules/rostests/apitests/shell32/ShellExecuteEx.cpp index 29f03be94b8..30b9080b7b3 100644 --- a/modules/rostests/apitests/shell32/ShellExecuteEx.cpp +++ b/modules/rostests/apitests/shell32/ShellExecuteEx.cpp @@ -7,436 +7,382 @@ */ #include "shelltest.h" -#include +#include +#include +#include #include -#include "shell32_apitest_sub.h" - -#define ok_ShellExecuteEx (winetest_set_location(__FILE__, __LINE__), 0) ? (void)0 : TestShellExecuteEx +#include +#include + +static WCHAR s_win_dir[MAX_PATH]; +static WCHAR s_sys_dir[MAX_PATH]; +static WCHAR s_win_notepad[MAX_PATH]; +static WCHAR s_sys_notepad[MAX_PATH]; +static WCHAR s_win_test_exe[MAX_PATH]; +static WCHAR s_sys_test_exe[MAX_PATH]; +static WCHAR s_win_bat_file[MAX_PATH]; +static WCHAR s_sys_bat_file[MAX_PATH]; +static WCHAR s_win_txt_file[MAX_PATH]; +static WCHAR s_sys_txt_file[MAX_PATH]; +static WCHAR s_win_notepad_cmdline[MAX_PATH]; +static WCHAR s_sys_notepad_cmdline[MAX_PATH]; +static WCHAR s_win_test_exe_cmdline[MAX_PATH]; +static WCHAR s_sys_test_exe_cmdline[MAX_PATH]; +static BOOL s_bWow64; + +#define REG_APPPATHS L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\" + +typedef enum TEST_RESULT +{ + TEST_FAILED, + TEST_SUCCESS_NO_PROCESS, + TEST_SUCCESS_WITH_PROCESS, +} TEST_RESULT; -static -BOOL -CreateAppPathRegKey(const WCHAR* Name) +typedef struct TEST_ENTRY { - HKEY RegistryKey; - LONG Result; - WCHAR Buffer[1024]; - WCHAR KeyValue[1024]; - DWORD Length = sizeof(KeyValue); - DWORD Disposition; - - wcscpy(Buffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\"); - wcscat(Buffer, L"IEXPLORE.EXE"); - Result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, Buffer, 0, KEY_READ, &RegistryKey); - if (Result != ERROR_SUCCESS) trace("Could not open iexplore.exe key. Status: %lu\n", Result); - if (Result) goto end; - Result = RegQueryValueExW(RegistryKey, NULL, NULL, NULL, (LPBYTE)KeyValue, &Length); - if (Result != ERROR_SUCCESS) trace("Could not read iexplore.exe key. Status: %lu\n", Result); - if (Result) goto end; - RegCloseKey(RegistryKey); - - wcscpy(Buffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\"); - wcscat(Buffer, Name); - Result = RegCreateKeyExW(HKEY_LOCAL_MACHINE, Buffer, 0, NULL, - 0, KEY_WRITE, NULL, &RegistryKey, &Disposition); - if (Result != ERROR_SUCCESS) trace("Could not create test key. Status: %lu\n", Result); - if (Result) goto end; - Result = RegSetValueW(RegistryKey, NULL, REG_SZ, KeyValue, 0); - if (Result != ERROR_SUCCESS) trace("Could not set value of the test key. Status: %lu\n", Result); - if (Result) goto end; - RegCloseKey(RegistryKey); -end: - if (RegistryKey) RegCloseKey(RegistryKey); - return Result == ERROR_SUCCESS; -} + INT line; + TEST_RESULT result; + LPCWSTR lpFile; + LPCWSTR cmdline; +} TEST_ENTRY, *PTEST_ENTRY; + +static void +TEST_DoTestEntry(INT line, TEST_RESULT result, LPCWSTR lpFile, LPCWSTR cmdline = NULL); -static -VOID -DeleteAppPathRegKey(const WCHAR* Name) +static void TEST_DoTestEntries(void) { - LONG Result; - WCHAR Buffer[1024]; - wcscpy(Buffer, L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\"); - wcscat(Buffer, Name); - Result = RegDeleteKeyW(HKEY_LOCAL_MACHINE, Buffer); - if (Result != ERROR_SUCCESS) trace("Could not remove the test key. Status: %lu\n", Result); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, NULL); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L""); + TEST_DoTestEntry(__LINE__, TEST_FAILED, L"This is an invalid path."); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, s_sys_bat_file, NULL); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, s_sys_test_exe, s_sys_test_exe_cmdline); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, s_sys_txt_file, NULL); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, s_win_bat_file, NULL); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, s_win_notepad, s_win_notepad_cmdline); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, s_win_test_exe, s_win_test_exe_cmdline); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, s_win_txt_file, NULL); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"notepad", s_sys_notepad_cmdline); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"notepad.exe", s_sys_notepad_cmdline); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"\"notepad.exe\"", s_sys_notepad_cmdline); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"\"notepad\"", s_sys_notepad_cmdline); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"test program.exe", s_sys_test_exe_cmdline); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"\"test program.exe\"", s_sys_test_exe_cmdline); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, s_win_dir); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, s_sys_dir); + TEST_DoTestEntry(__LINE__, TEST_FAILED, L"shell:ThisIsAnInvalidName"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"); // My Computer + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"); // My Computer (with shell:) + + if (!IsWindowsVistaOrGreater()) + { + WCHAR szCurDir[MAX_PATH]; + GetCurrentDirectoryW(_countof(szCurDir), szCurDir); + SetCurrentDirectoryW(s_sys_dir); + TEST_DoTestEntry(__LINE__, TEST_FAILED, L"::{21EC2020-3AEA-1069-A2DD-08002B30309D}"); // Control Panel (without path) + SetCurrentDirectoryW(szCurDir); + } + + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"); // Control Panel (with path) + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"); // Control Panel (with path and shell:) + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:AppData"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common Desktop"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common Programs"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common Start Menu"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Common StartUp"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:ControlPanelFolder"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Desktop"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Favorites"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Fonts"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Local AppData"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:My Pictures"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Personal"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Programs"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Recent"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:RecycleBinFolder"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:SendTo"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:Start Menu"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_NO_PROCESS, L"shell:StartUp"); } -static -VOID -TestShellExecuteEx(const WCHAR* Name, BOOL ExpectedResult) +static LPWSTR +getCommandLineFromProcess(HANDLE hProcess) { - SHELLEXECUTEINFOW ShellExecInfo; - BOOL Result; + PEB peb; + PROCESS_BASIC_INFORMATION info; + RTL_USER_PROCESS_PARAMETERS Params; - ZeroMemory(&ShellExecInfo, sizeof(ShellExecInfo)); - ShellExecInfo.cbSize = sizeof(ShellExecInfo); - ShellExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI; - ShellExecInfo.hwnd = NULL; - ShellExecInfo.nShow = SW_SHOWNORMAL; - ShellExecInfo.lpFile = Name; - ShellExecInfo.lpDirectory = NULL; + NtQueryInformationProcess(hProcess, ProcessBasicInformation, &info, sizeof(info), NULL); + ReadProcessMemory(hProcess, info.PebBaseAddress, &peb, sizeof(peb), NULL); + ReadProcessMemory(hProcess, peb.ProcessParameters, &Params, sizeof(Params), NULL); - Result = ShellExecuteExW(&ShellExecInfo); - ok(Result == ExpectedResult, "ShellExecuteEx lpFile %s failed. Error: %lu\n", wine_dbgstr_w(Name), GetLastError()); - if (ShellExecInfo.hProcess) - { - Result = TerminateProcess(ShellExecInfo.hProcess, 0); - if (!Result) trace("Terminate process failed. Error: %lu\n", GetLastError()); - WaitForSingleObject(ShellExecInfo.hProcess, INFINITE); - CloseHandle(ShellExecInfo.hProcess); - } + LPWSTR cmdline = Params.CommandLine.Buffer; + SIZE_T cchCmdLine = Params.CommandLine.Length; + LPWSTR pszBuffer = (LPWSTR)calloc(cchCmdLine + 1, sizeof(WCHAR)); + ReadProcessMemory(hProcess, cmdline, pszBuffer, cchCmdLine, NULL); + pszBuffer[cchCmdLine] = UNICODE_NULL; + + return pszBuffer; // needs free() } -static void DoAppPathTest(void) +static void TEST_DoTestEntryStruct(const TEST_ENTRY *pEntry) { - ok_ShellExecuteEx(L"iexplore", TRUE); - ok_ShellExecuteEx(L"iexplore.exe", TRUE); + SHELLEXECUTEINFOW info = { sizeof(info) }; + info.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_WAITFORINPUTIDLE | SEE_MASK_FLAG_NO_UI; + info.hwnd = NULL; + info.lpVerb = NULL; + info.lpFile = pEntry->lpFile; + info.nShow = SW_SHOWNORMAL; - if (CreateAppPathRegKey(L"iexplore.bat")) - { - ok_ShellExecuteEx(L"iexplore.bat", TRUE); - ok_ShellExecuteEx(L"iexplore.bat.exe", FALSE); - DeleteAppPathRegKey(L"iexplore.bat"); - } + BOOL ret = ShellExecuteExW(&info); + + TEST_RESULT result; + if (ret && info.hProcess) + result = TEST_SUCCESS_WITH_PROCESS; + else if (ret && !info.hProcess) + result = TEST_SUCCESS_NO_PROCESS; + else + result = TEST_FAILED; - if (CreateAppPathRegKey(L"iexplore.bat.exe")) + ok(pEntry->result == result, + "Line %d: result: %d vs %d\n", pEntry->line, pEntry->result, result); + + if (pEntry->result == TEST_SUCCESS_WITH_PROCESS && pEntry->cmdline && !s_bWow64) { - ok_ShellExecuteEx(L"iexplore.bat", FALSE); - ok_ShellExecuteEx(L"iexplore.bat.exe", TRUE); - DeleteAppPathRegKey(L"iexplore.bat.exe"); + LPWSTR cmdline = getCommandLineFromProcess(info.hProcess); + if (!cmdline) + { + skip("!cmdline\n"); + } + else + { + ok(lstrcmpiW(pEntry->cmdline, cmdline) == 0, + "Line %d: cmdline: '%ls' vs '%ls'\n", pEntry->line, + pEntry->cmdline, cmdline); + } + + TerminateProcess(info.hProcess, 0xDEADFACE); + free(cmdline); } + + CloseHandle(info.hProcess); } -typedef struct TEST_ENTRY -{ - INT lineno; - BOOL ret; - BOOL bProcessHandle; - LPCSTR file; - LPCSTR params; - LPCSTR curdir; -} TEST_ENTRY; - -static char s_sub_program[MAX_PATH]; -static char s_win_test_exe[MAX_PATH]; -static char s_sys_test_exe[MAX_PATH]; -static char s_win_bat_file[MAX_PATH]; -static char s_sys_bat_file[MAX_PATH]; -static char s_win_txt_file[MAX_PATH]; -static char s_sys_txt_file[MAX_PATH]; - -#define DONT_CARE 0x0BADF00D - -static const TEST_ENTRY s_entries_1[] = +static void +TEST_DoTestEntry(INT line, TEST_RESULT result, LPCWSTR lpFile, LPCWSTR cmdline) { - { __LINE__, TRUE, TRUE, "test program" }, - { __LINE__, TRUE, TRUE, "test program.bat" }, - { __LINE__, TRUE, TRUE, "test program.exe" }, - { __LINE__, FALSE, FALSE, " test program" }, - { __LINE__, FALSE, FALSE, " test program.bat" }, - { __LINE__, FALSE, FALSE, " test program.exe" }, - { __LINE__, FALSE, FALSE, "test program " }, - { __LINE__, TRUE, TRUE, "test program.bat " }, - { __LINE__, TRUE, TRUE, "test program.exe " }, - { __LINE__, TRUE, TRUE, "test program", "TEST" }, - { __LINE__, TRUE, TRUE, "test program.bat", "TEST" }, - { __LINE__, TRUE, TRUE, "test program.exe", "TEST" }, - { __LINE__, FALSE, FALSE, ".\\test program.bat" }, - { __LINE__, FALSE, FALSE, ".\\test program.exe" }, - { __LINE__, TRUE, TRUE, "\"test program\"" }, - { __LINE__, TRUE, TRUE, "\"test program.bat\"" }, - { __LINE__, TRUE, TRUE, "\"test program.exe\"" }, - { __LINE__, FALSE, FALSE, "\"test program\" TEST" }, - { __LINE__, FALSE, FALSE, "\"test program.bat\" TEST" }, - { __LINE__, FALSE, FALSE, "\"test program.exe\" TEST" }, - { __LINE__, FALSE, FALSE, " \"test program\"" }, - { __LINE__, FALSE, FALSE, " \"test program.bat\"" }, - { __LINE__, FALSE, FALSE, " \"test program.exe\"" }, - { __LINE__, FALSE, FALSE, "\"test program\" " }, - { __LINE__, FALSE, FALSE, "\"test program.bat\" " }, - { __LINE__, FALSE, FALSE, "\"test program.exe\" " }, - { __LINE__, FALSE, FALSE, "\".\\test program.bat\"" }, - { __LINE__, FALSE, FALSE, "\".\\test program.exe\"" }, - { __LINE__, TRUE, TRUE, s_win_test_exe }, - { __LINE__, TRUE, TRUE, s_sys_test_exe }, - { __LINE__, TRUE, TRUE, s_win_bat_file }, - { __LINE__, TRUE, TRUE, s_sys_bat_file }, - { __LINE__, TRUE, TRUE, s_win_bat_file, "TEST" }, - { __LINE__, TRUE, TRUE, s_sys_bat_file, "TEST" }, - { __LINE__, FALSE, FALSE, "invalid program" }, - { __LINE__, FALSE, FALSE, "invalid program.bat" }, - { __LINE__, FALSE, FALSE, "invalid program.exe" }, - { __LINE__, TRUE, TRUE, "test_file.txt" }, - { __LINE__, TRUE, TRUE, "test_file.txt", "parameters parameters" }, - { __LINE__, TRUE, TRUE, "test_file.txt", "parameters parameters", "." }, - { __LINE__, TRUE, TRUE, "shell32_apitest_sub.exe" }, - { __LINE__, TRUE, TRUE, ".\\shell32_apitest_sub.exe" }, - { __LINE__, TRUE, TRUE, "\"shell32_apitest_sub.exe\"" }, - { __LINE__, TRUE, TRUE, "\".\\shell32_apitest_sub.exe\"" }, - { __LINE__, TRUE, DONT_CARE, "https://google.com" }, - { __LINE__, TRUE, FALSE, "::{450d8fba-ad25-11d0-98a8-0800361b1103}" }, - { __LINE__, TRUE, FALSE, "shell:::{450d8fba-ad25-11d0-98a8-0800361b1103}" }, - { __LINE__, TRUE, FALSE, "shell:sendto" }, -}; - -static const TEST_ENTRY s_entries_2[] = -{ - { __LINE__, TRUE, TRUE, "test program" }, - { __LINE__, TRUE, TRUE, "test program", "TEST" }, - { __LINE__, TRUE, TRUE, "\"test program\"" }, - { __LINE__, TRUE, TRUE, s_win_test_exe }, - { __LINE__, TRUE, TRUE, s_sys_test_exe }, - { __LINE__, FALSE, FALSE, s_win_bat_file }, - { __LINE__, FALSE, FALSE, s_sys_bat_file }, - { __LINE__, FALSE, FALSE, s_win_bat_file, "TEST" }, - { __LINE__, FALSE, FALSE, s_sys_bat_file, "TEST" }, -}; - -typedef struct OPENWNDS + TEST_ENTRY entry = { line, result, lpFile, cmdline }; + TEST_DoTestEntryStruct(&entry); +} + +static BOOL +enableTokenPrivilege(LPCWSTR pszPrivilege) { - UINT count; - HWND *phwnd; -} OPENWNDS; + HANDLE hToken; + if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken)) + return FALSE; -static OPENWNDS s_wi0 = { 0 }, s_wi1 = { 0 }; + TOKEN_PRIVILEGES tkp = { 0 }; + if (!LookupPrivilegeValueW(NULL, pszPrivilege, &tkp.Privileges[0].Luid)) + return FALSE; + + tkp.PrivilegeCount = 1; + tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; + return AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, NULL, NULL); +} + +typedef struct WINDOW_LIST +{ + SIZE_T m_chWnds; + HWND *m_phWnds; +} WINDOW_LIST, *PWINDOW_LIST; static BOOL CALLBACK EnumWindowsProc(HWND hwnd, LPARAM lParam) { - OPENWNDS *info = (OPENWNDS *)lParam; - info->phwnd = (HWND *)realloc(info->phwnd, (info->count + 1) * sizeof(HWND)); - if (!info->phwnd) + if (!IsWindowVisible(hwnd)) + return TRUE; + + PWINDOW_LIST pList = (PWINDOW_LIST)lParam; + SIZE_T cb = (pList->m_chWnds + 1) * sizeof(HWND); + HWND *phWnds = (HWND *)realloc(pList->m_phWnds, cb); + if (!phWnds) return FALSE; - info->phwnd[info->count] = hwnd; - ++(info->count); + phWnds[pList->m_chWnds++] = hwnd; + pList->m_phWnds = phWnds; return TRUE; } -static void CleanupNewlyCreatedWindows(void) +static inline void TEST_GetWindowList(PWINDOW_LIST pList) { - EnumWindows(EnumWindowsProc, (LPARAM)&s_wi1); - for (UINT i1 = 0; i1 < s_wi1.count; ++i1) - { - BOOL bFound = FALSE; - for (UINT i0 = 0; i0 < s_wi0.count; ++i0) - { - if (s_wi1.phwnd[i1] == s_wi0.phwnd[i0]) - { - bFound = TRUE; - break; - } - } - if (!bFound) - PostMessageW(s_wi1.phwnd[i1], WM_CLOSE, 0, 0); - } - free(s_wi1.phwnd); - ZeroMemory(&s_wi1, sizeof(s_wi1)); + EnumWindows(EnumWindowsProc, (LPARAM)pList); } -static VOID DoTestEntry(const TEST_ENTRY *pEntry) +static void TEST_CloseNewWindows(PWINDOW_LIST List1, PWINDOW_LIST List2) { - SHELLEXECUTEINFOA info = { sizeof(info) }; - info.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI; - info.nShow = SW_SHOWNORMAL; - info.lpFile = pEntry->file; - info.lpParameters = pEntry->params; - info.lpDirectory = pEntry->curdir; - BOOL ret = ShellExecuteExA(&info); - ok(ret == pEntry->ret, "Line %u: ret expected %d, got %d\n", - pEntry->lineno, pEntry->ret, ret); - if (!pEntry->ret) - return; - - if ((UINT)pEntry->bProcessHandle != DONT_CARE) + for (SIZE_T i2 = 0; i2 < List2->m_chWnds; ++i2) { - if (pEntry->bProcessHandle) + BOOL bFoundInList1 = FALSE; + HWND hWnd = List2->m_phWnds[i2]; + for (SIZE_T i1 = 0; i1 < List1->m_chWnds; ++i1) { - ok(!!info.hProcess, "Line %u: hProcess expected non-NULL\n", pEntry->lineno); + if (hWnd == List1->m_phWnds[i1]) + { + bFoundInList1 = TRUE; + goto Escape; + } } - else +Escape: + if (!bFoundInList1) { - ok(!info.hProcess, "Line %u: hProcess expected NULL\n", pEntry->lineno); - return; - } - } - - WaitForInputIdle(info.hProcess, INFINITE); + for (INT i = 0; i < 5; ++i) + { + if (!IsWindow(hWnd)) + break; - CleanupNewlyCreatedWindows(); + SwitchToThisWindow(hWnd, TRUE); - if (WaitForSingleObject(info.hProcess, 10 * 1000) == WAIT_TIMEOUT) - { - TerminateProcess(info.hProcess, 11); - ok(0, "Process %s did not quit!\n", pEntry->file); + // Alt+F4 + keybd_event(VK_MENU, 0x38, 0, 0); + keybd_event(VK_F4, 0x3E, 0, 0); + keybd_event(VK_F4, 0x3E, KEYEVENTF_KEYUP, 0); + keybd_event(VK_MENU, 0x38, KEYEVENTF_KEYUP, 0); + Sleep(100); + } + } } - CloseHandle(info.hProcess); } -static BOOL -GetSubProgramPath(void) +static WINDOW_LIST s_List1, s_List2; + +static BOOL TEST_Start(void) { - GetModuleFileNameA(NULL, s_sub_program, _countof(s_sub_program)); - PathRemoveFileSpecA(s_sub_program); - PathAppendA(s_sub_program, "shell32_apitest_sub.exe"); + // Check Wow64 + s_bWow64 = FALSE; + IsWow64Process(GetCurrentProcess(), &s_bWow64); + if (s_bWow64) + skip("Wow64: Command Line check is skipped\n"); - if (!PathFileExistsA(s_sub_program)) - { - PathRemoveFileSpecA(s_sub_program); - PathAppendA(s_sub_program, "testdata\\shell32_apitest_sub.exe"); + // getCommandLineFromProcess needs this + enableTokenPrivilege(SE_DEBUG_NAME); - if (!PathFileExistsA(s_sub_program)) - { - return FALSE; - } - } + // s_win_dir + GetWindowsDirectoryW(s_win_dir, _countof(s_win_dir)); - return TRUE; -} + // s_sys_dir + GetSystemDirectoryW(s_sys_dir, _countof(s_sys_dir)); -static void DoTestEntries(void) -{ - if (!GetSubProgramPath()) - { - skip("shell32_apitest_sub.exe is not found\n"); - return; - } + // s_win_notepad + GetWindowsDirectoryW(s_win_notepad, _countof(s_win_notepad)); + PathAppendW(s_win_notepad, L"notepad.exe"); + + // s_sys_notepad + GetSystemDirectoryW(s_sys_notepad, _countof(s_sys_notepad)); + PathAppendW(s_sys_notepad, L"notepad.exe"); // s_win_test_exe - GetWindowsDirectoryA(s_win_test_exe, _countof(s_win_test_exe)); - PathAppendA(s_win_test_exe, "test program.exe"); - BOOL ret = CopyFileA(s_sub_program, s_win_test_exe, FALSE); + GetWindowsDirectoryW(s_win_test_exe, _countof(s_win_test_exe)); + PathAppendW(s_win_test_exe, L"test program.exe"); + BOOL ret = CopyFileW(s_win_notepad, s_win_test_exe, FALSE); if (!ret) { skip("Please retry with admin rights\n"); - return; - } - - // record open windows - if (!EnumWindows(EnumWindowsProc, (LPARAM)&s_wi0)) - { - skip("EnumWindows failed\n"); - DeleteFileA(s_win_test_exe); - free(s_wi0.phwnd); - return; + return FALSE; } // s_sys_test_exe - GetSystemDirectoryA(s_sys_test_exe, _countof(s_sys_test_exe)); - PathAppendA(s_sys_test_exe, "test program.exe"); - ok_int(CopyFileA(s_sub_program, s_sys_test_exe, FALSE), TRUE); + GetSystemDirectoryW(s_sys_test_exe, _countof(s_sys_test_exe)); + PathAppendW(s_sys_test_exe, L"test program.exe"); + ok_int(CopyFileW(s_win_notepad, s_sys_test_exe, FALSE), TRUE); // s_win_bat_file - GetWindowsDirectoryA(s_win_bat_file, _countof(s_win_bat_file)); - PathAppendA(s_win_bat_file, "test program.bat"); - FILE *fp = fopen(s_win_bat_file, "wb"); + GetWindowsDirectoryW(s_win_bat_file, _countof(s_win_bat_file)); + PathAppendW(s_win_bat_file, L"test program.bat"); + FILE *fp = _wfopen(s_win_bat_file, L"wb"); fprintf(fp, "exit /b 3"); fclose(fp); - ok_int(PathFileExistsA(s_win_bat_file), TRUE); + ok_int(PathFileExistsW(s_win_bat_file), TRUE); // s_sys_bat_file - GetSystemDirectoryA(s_sys_bat_file, _countof(s_sys_bat_file)); - PathAppendA(s_sys_bat_file, "test program.bat"); - fp = fopen(s_sys_bat_file, "wb"); + GetSystemDirectoryW(s_sys_bat_file, _countof(s_sys_bat_file)); + PathAppendW(s_sys_bat_file, L"test program.bat"); + fp = _wfopen(s_sys_bat_file, L"wb"); fprintf(fp, "exit /b 4"); fclose(fp); - ok_int(PathFileExistsA(s_sys_bat_file), TRUE); + ok_int(PathFileExistsW(s_sys_bat_file), TRUE); // s_win_txt_file - GetWindowsDirectoryA(s_win_txt_file, _countof(s_win_txt_file)); - PathAppendA(s_win_txt_file, "test_file.txt"); - fp = fopen(s_win_txt_file, "wb"); + GetWindowsDirectoryW(s_win_txt_file, _countof(s_win_txt_file)); + PathAppendW(s_win_txt_file, L"test_file.txt"); + fp = _wfopen(s_win_txt_file, L"wb"); fclose(fp); - ok_int(PathFileExistsA(s_win_txt_file), TRUE); + ok_int(PathFileExistsW(s_win_txt_file), TRUE); // s_sys_txt_file - GetSystemDirectoryA(s_sys_txt_file, _countof(s_sys_txt_file)); - PathAppendA(s_sys_txt_file, "test_file.txt"); - fp = fopen(s_sys_txt_file, "wb"); + GetSystemDirectoryW(s_sys_txt_file, _countof(s_sys_txt_file)); + PathAppendW(s_sys_txt_file, L"test_file.txt"); + fp = _wfopen(s_sys_txt_file, L"wb"); fclose(fp); - ok_int(PathFileExistsA(s_sys_txt_file), TRUE); - - for (UINT iTest = 0; iTest < _countof(s_entries_1); ++iTest) - { - DoTestEntry(&s_entries_1[iTest]); - } - - DeleteFileA(s_win_bat_file); - DeleteFileA(s_sys_bat_file); + ok_int(PathFileExistsW(s_sys_txt_file), TRUE); - for (UINT iTest = 0; iTest < _countof(s_entries_2); ++iTest) + // Check .txt settings + WCHAR szPath[MAX_PATH]; + FindExecutableW(s_sys_txt_file, NULL, szPath); + if (lstrcmpiW(PathFindFileNameW(szPath), L"notepad.exe") != 0) { - DoTestEntry(&s_entries_2[iTest]); + skip("Please associate .txt with notepad.exe before tests\n"); + return FALSE; } - DeleteFileA(s_win_test_exe); - DeleteFileA(s_sys_test_exe); - DeleteFileA(s_win_txt_file); - DeleteFileA(s_sys_txt_file); - - free(s_wi0.phwnd); -} + // command lines + StringCchPrintfW(s_win_notepad_cmdline, _countof(s_win_notepad_cmdline), + L"\"%s\" ", s_win_notepad); + StringCchPrintfW(s_sys_notepad_cmdline, _countof(s_sys_notepad_cmdline), + L"\"%s\" ", s_sys_notepad); + StringCchPrintfW(s_win_test_exe_cmdline, _countof(s_win_test_exe_cmdline), + L"\"%s\" ", s_win_test_exe); + StringCchPrintfW(s_sys_test_exe_cmdline, _countof(s_sys_test_exe_cmdline), + L"\"%s\" ", s_sys_test_exe); -WCHAR* ExeName = NULL; + TEST_GetWindowList(&s_List1); -BOOL CALLBACK EnumProc(_In_ HWND hwnd, _In_ LPARAM lParam) -{ - DWORD pid = 0; - GetWindowThreadProcessId(hwnd, &pid); - if (pid == GetCurrentProcessId() && - IsWindowVisible(hwnd)) - { - WCHAR Buffer[512] = {0}; - - GetWindowTextW(hwnd, Buffer, _countof(Buffer) - 1); - if (Buffer[0] && StrStrIW(Buffer, ExeName)) - { - HWND* pHwnd = (HWND*)lParam; - *pHwnd = hwnd; - return FALSE; - } - } return TRUE; } -BOOL WaitAndCloseWindow() +static void TEST_End(void) { - HWND hWnd = NULL; - for (int n = 0; n < 100; ++n) - { - Sleep(50); - - EnumWindows(EnumProc, (LPARAM)&hWnd); - - if (hWnd) - { - SendMessageW(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0); - return TRUE; - break; - } - } - return FALSE; + Sleep(500); + TEST_GetWindowList(&s_List2); + TEST_CloseNewWindows(&s_List1, &s_List2); + free(s_List1.m_phWnds); + free(s_List2.m_phWnds); + + DeleteFileW(s_win_test_exe); + DeleteFileW(s_sys_test_exe); + DeleteFileW(s_win_txt_file); + DeleteFileW(s_sys_txt_file); + DeleteFileW(s_win_bat_file); + DeleteFileW(s_sys_bat_file); } static void test_properties() { WCHAR Buffer[MAX_PATH * 4]; - CoInitialize(NULL); + HRESULT hrCoInit = CoInitialize(NULL); GetModuleFileNameW(NULL, Buffer, _countof(Buffer)); - SHELLEXECUTEINFOW info = { 0 }; + SHELLEXECUTEINFOW info = { sizeof(info) }; info.cbSize = sizeof(SHELLEXECUTEINFOW); info.fMask = SEE_MASK_INVOKEIDLIST | SEE_MASK_FLAG_NO_UI; info.lpVerb = L"properties"; info.lpFile = Buffer; - info.lpParameters = L""; info.nShow = SW_SHOW; BOOL bRet = ShellExecuteExW(&info); ok(bRet, "Failed! (GetLastError(): %d)\n", (int)GetLastError()); ok_ptr(info.hInstApp, (HINSTANCE)42); - ExeName = PathFindFileNameW(Buffer); WCHAR* Extension = PathFindExtensionW(Buffer); if (Extension) { @@ -444,80 +390,110 @@ static void test_properties() *Extension = UNICODE_NULL; } - if (bRet) - { - ok(WaitAndCloseWindow(), "Could not find properties window!\n"); - } - // Now retry it with the extension cut off bRet = ShellExecuteExW(&info); ok(bRet, "Failed! (GetLastError(): %d)\n", (int)GetLastError()); ok_ptr(info.hInstApp, (HINSTANCE)42); - if (bRet) - { - ok(WaitAndCloseWindow(), "Could not find properties window!\n"); - } - - info.lpFile = L"complete garbage, cannot run this!"; - // Now retry it with complete garabage + info.lpFile = L"complete garbage, cannot run this!"; bRet = ShellExecuteExW(&info); - ok(bRet == 0, "Succeeded!\n"); + ok_int(bRet, 0); ok_ptr(info.hInstApp, (HINSTANCE)2); + + if (SUCCEEDED(hrCoInit)) + CoUninitialize(); } static void test_sei_lpIDList() { + if (IsWindowsVistaOrGreater()) + { + skip("Vista+\n"); + return; + } + /* This tests ShellExecuteEx with lpIDList for explorer C:\ */ /* ITEMIDLIST for CLSID of 'My Computer' followed by PIDL for 'C:\' */ BYTE lpitemidlist[30] = { 0x14, 0, 0x1f, 0, 0xe0, 0x4f, 0xd0, 0x20, 0xea, 0x3a, 0x69, 0x10, 0xa2, 0xd8, 0x08, 0, 0x2b, 0x30, 0x30, 0x9d, // My Computer 0x8, 0, 0x23, 0x43, 0x3a, 0x5c, 0x5c, 0, 0, 0,}; // C:\\ + NUL-NUL ending - BYTE *lpBytes; - lpBytes = lpitemidlist; - - SHELLEXECUTEINFOW ShellExecInfo; - BOOL Result; - STARTUPINFOW si; - PROCESS_INFORMATION pi; - HWND hWnd; - ZeroMemory( &si, sizeof(si) ); - si.cb = sizeof(si); - ZeroMemory( &pi, sizeof(pi) ); - - ZeroMemory(&ShellExecInfo, sizeof(ShellExecInfo)); - ShellExecInfo.cbSize = sizeof(ShellExecInfo); + SHELLEXECUTEINFOW ShellExecInfo = { sizeof(ShellExecInfo) }; ShellExecInfo.fMask = SEE_MASK_IDLIST; ShellExecInfo.hwnd = NULL; ShellExecInfo.nShow = SW_SHOWNORMAL; - ShellExecInfo.lpFile = NULL; - ShellExecInfo.lpDirectory = NULL; - ShellExecInfo.lpIDList = lpBytes; - - Result = ShellExecuteExW(&ShellExecInfo); - ok(Result == TRUE, "ShellExecuteEx lpIDList 'C:\\' failed\n"); - trace("sei_lpIDList returned: %s\n", Result ? "SUCCESS" : "FAILURE"); - if (Result) + ShellExecInfo.lpIDList = lpitemidlist; + BOOL ret = ShellExecuteExW(&ShellExecInfo); + ok_int(ret, TRUE); +} + +static BOOL +CreateAppPath(LPCWSTR pszName, LPCWSTR pszValue) +{ + WCHAR szSubKey[MAX_PATH]; + StringCchPrintfW(szSubKey, _countof(szSubKey), L"%s\\%s", REG_APPPATHS, pszName); + + LSTATUS error; + HKEY hKey; + error = RegCreateKeyExW(HKEY_LOCAL_MACHINE, szSubKey, 0, NULL, 0, KEY_WRITE, NULL, + &hKey, NULL); + if (error != ERROR_SUCCESS) + trace("Could not create test key (%lu)\n", error); + + DWORD cbValue = (lstrlenW(pszValue) + 1) * sizeof(WCHAR); + error = RegSetValueExW(hKey, NULL, 0, REG_SZ, (LPBYTE)pszValue, cbValue); + if (error != ERROR_SUCCESS) + trace("Could not set value of the test key (%lu)\n", error); + + RegCloseKey(hKey); + + return error == ERROR_SUCCESS; +} + +static VOID +DeleteAppPath(LPCWSTR pszName) +{ + WCHAR szSubKey[MAX_PATH]; + StringCchPrintfW(szSubKey, _countof(szSubKey), L"%s\\%s", REG_APPPATHS, pszName); + + LSTATUS error = RegDeleteKeyW(HKEY_LOCAL_MACHINE, szSubKey); + if (error != ERROR_SUCCESS) + trace("Could not remove the test key (%lu)\n", error); +} + +static void TEST_AppPath(void) +{ + if (CreateAppPath(L"app_path_test.bat", s_win_test_exe)) + { + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"app_path_test.bat"); + TEST_DoTestEntry(__LINE__, TEST_FAILED, L"app_path_test.bat.exe"); + DeleteAppPath(L"app_path_test.bat"); + } + + if (CreateAppPath(L"app_path_test.bat.exe", s_sys_test_exe)) { - Sleep(700); - // Terminate Window - hWnd = FindWindowW(L"CabinetWClass", L"Local Disk (C:)"); - PostMessage(hWnd, WM_SYSCOMMAND, SC_CLOSE, 0); + TEST_DoTestEntry(__LINE__, TEST_FAILED, L"app_path_test.bat"); + TEST_DoTestEntry(__LINE__, TEST_SUCCESS_WITH_PROCESS, L"app_path_test.bat.exe"); + DeleteAppPath(L"app_path_test.bat.exe"); } } START_TEST(ShellExecuteEx) { - DoAppPathTest(); - DoTestEntries(); - test_properties(); +#ifdef _WIN64 + skip("Win64 is not supported yet\n"); + return; +#endif - DoWaitForWindow(CLASSNAME, CLASSNAME, TRUE, TRUE); - Sleep(100); + if (!TEST_Start()) + return; + TEST_AppPath(); + TEST_DoTestEntries(); + test_properties(); test_sei_lpIDList(); + TEST_End(); } diff --git a/modules/rostests/apitests/shell32/ShellHook.cpp b/modules/rostests/apitests/shell32/ShellHook.cpp index 1afb4155071..f2cb202f41d 100644 --- a/modules/rostests/apitests/shell32/ShellHook.cpp +++ b/modules/rostests/apitests/shell32/ShellHook.cpp @@ -2,15 +2,15 @@ * PROJECT: ReactOS api tests * LICENSE: LGPL-2.0-or-later (https://spdx.org/licenses/LGPL-2.0-or-later) * PURPOSE: Test for Shell Hook - * COPYRIGHT: Copyright 2020-2021 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com) + * COPYRIGHT: Copyright 2020-2024 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com) */ #include "shelltest.h" -#include "undocshell.h" struct TEST_ENTRY { INT lineno; - UINT nCount; + UINT cCreated; + UINT cDestroyed; BOOL bIsChild; BOOL bHasOwner; DWORD style; @@ -35,353 +35,228 @@ struct TEST_ENTRY static const TEST_ENTRY s_entries1[] = { // TYPE_0 - { __LINE__, 0, TYPE_0, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_0, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_0, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_0, STYLE_0, EXSTYLE_3 }, - { __LINE__, 1, TYPE_0, STYLE_1, EXSTYLE_0 }, - { __LINE__, 1, TYPE_0, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_0, STYLE_1, EXSTYLE_2 }, - { __LINE__, 1, TYPE_0, STYLE_1, EXSTYLE_3 }, - { __LINE__, 1, TYPE_0, STYLE_2, EXSTYLE_0 }, - { __LINE__, 1, TYPE_0, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_0, STYLE_2, EXSTYLE_2 }, - { __LINE__, 1, TYPE_0, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_0, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_0, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_0, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_0, STYLE_0, EXSTYLE_3 }, + { __LINE__, 1, 1, TYPE_0, STYLE_1, EXSTYLE_0 }, + { __LINE__, 1, 1, TYPE_0, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_0, STYLE_1, EXSTYLE_2 }, + { __LINE__, 1, 1, TYPE_0, STYLE_1, EXSTYLE_3 }, + { __LINE__, 1, 1, TYPE_0, STYLE_2, EXSTYLE_0 }, + { __LINE__, 1, 1, TYPE_0, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_0, STYLE_2, EXSTYLE_2 }, + { __LINE__, 1, 1, TYPE_0, STYLE_2, EXSTYLE_3 }, // TYPE_1 - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_3 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_0 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_1 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_2 }, - { __LINE__, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_3 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_0 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_2 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_1, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_3 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_0 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_2 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_1, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_3 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_0 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_2 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_1, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_3 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_0 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_2 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_1, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_3 }, // TYPE_2 - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_3 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_0 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_1 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_2 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_3 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_0 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_1 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_2 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_3 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_0 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_1 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_2 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_3 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_0 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_1 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_2 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_3 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_0 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_1 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_2 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_3 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_0 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_1 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_2 }, - { __LINE__, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_3 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_0 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_1 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_2 }, - { __LINE__, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_0, STYLE_2, EXSTYLE_3 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_0 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_2 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_0, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_1, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_1, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_1, EXSTYLE_2, STYLE_2, EXSTYLE_3 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_0 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_2 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_0, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_1, EXSTYLE_3 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_0 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_1 }, + { __LINE__, 1, 1, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_2 }, + { __LINE__, 1, 2, TYPE_2, STYLE_1, EXSTYLE_3, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_0, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_1, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_2, STYLE_2, EXSTYLE_3 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_0 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_2 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_0, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_1, EXSTYLE_3 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_0 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_1 }, + { __LINE__, 0, 0, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_2 }, + { __LINE__, 0, 1, TYPE_2, STYLE_2, EXSTYLE_3, STYLE_2, EXSTYLE_3 }, }; -typedef struct RUDEAPP_TEST_ENTRY -{ - INT lineno; - UINT nCount; - DWORD style; - DWORD exstyle; - BOOL bSetForeground; - BOOL bFullscreen; - BOOL bSetFullscreen; -} RUDEAPP_TEST_ENTRY; - -static const RUDEAPP_TEST_ENTRY s_entries2[] = -{ - /* STYLE_0 */ - { __LINE__, 0, STYLE_0, EXSTYLE_0, FALSE, FALSE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_0, FALSE, FALSE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_0, FALSE, TRUE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_0, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_0, TRUE, FALSE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_0, TRUE, FALSE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_0, TRUE, TRUE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_0, TRUE, TRUE, TRUE }, - - { __LINE__, 0, STYLE_0, EXSTYLE_1, FALSE, FALSE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_1, FALSE, FALSE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_1, FALSE, TRUE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_1, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_1, TRUE, FALSE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_1, TRUE, FALSE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_1, TRUE, TRUE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_1, TRUE, TRUE, TRUE }, - - { __LINE__, 0, STYLE_0, EXSTYLE_2, FALSE, FALSE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_2, FALSE, FALSE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_2, FALSE, TRUE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_2, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_2, TRUE, FALSE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_2, TRUE, FALSE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_2, TRUE, TRUE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_2, TRUE, TRUE, TRUE }, - - { __LINE__, 0, STYLE_0, EXSTYLE_3, FALSE, FALSE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_3, FALSE, FALSE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_3, FALSE, TRUE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_3, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_3, TRUE, FALSE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_3, TRUE, FALSE, TRUE }, - { __LINE__, 0, STYLE_0, EXSTYLE_3, TRUE, TRUE, FALSE }, - { __LINE__, 0, STYLE_0, EXSTYLE_3, TRUE, TRUE, TRUE }, - - /* STYLE_1 */ - { __LINE__, 0, STYLE_1, EXSTYLE_0, FALSE, FALSE, FALSE }, - { __LINE__, 1, STYLE_1, EXSTYLE_0, FALSE, FALSE, TRUE }, - { __LINE__, 1, STYLE_1, EXSTYLE_0, FALSE, TRUE, FALSE }, - { __LINE__, 1, STYLE_1, EXSTYLE_0, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_1, EXSTYLE_0, TRUE, FALSE, FALSE }, - { __LINE__, 1, STYLE_1, EXSTYLE_0, TRUE, FALSE, TRUE }, - { __LINE__, 1, STYLE_1, EXSTYLE_0, TRUE, TRUE, FALSE }, - { __LINE__, 1, STYLE_1, EXSTYLE_0, TRUE, TRUE, TRUE }, - - { __LINE__, 0, STYLE_1, EXSTYLE_1, FALSE, FALSE, FALSE }, - { __LINE__, 1, STYLE_1, EXSTYLE_1, FALSE, FALSE, TRUE }, - { __LINE__, 1, STYLE_1, EXSTYLE_1, FALSE, TRUE, FALSE }, - { __LINE__, 1, STYLE_1, EXSTYLE_1, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_1, EXSTYLE_1, TRUE, FALSE, FALSE }, - { __LINE__, 1, STYLE_1, EXSTYLE_1, TRUE, FALSE, TRUE }, - { __LINE__, 1, STYLE_1, EXSTYLE_1, TRUE, TRUE, FALSE }, - { __LINE__, 1, STYLE_1, EXSTYLE_1, TRUE, TRUE, TRUE }, - - { __LINE__, 0, STYLE_1, EXSTYLE_2, FALSE, FALSE, FALSE }, - { __LINE__, 0, STYLE_1, EXSTYLE_2, FALSE, FALSE, TRUE }, - { __LINE__, 0, STYLE_1, EXSTYLE_2, FALSE, TRUE, FALSE }, - { __LINE__, 0, STYLE_1, EXSTYLE_2, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_1, EXSTYLE_2, TRUE, FALSE, FALSE }, - { __LINE__, 0, STYLE_1, EXSTYLE_2, TRUE, FALSE, TRUE }, - { __LINE__, 0, STYLE_1, EXSTYLE_2, TRUE, TRUE, FALSE }, - { __LINE__, 0, STYLE_1, EXSTYLE_2, TRUE, TRUE, TRUE }, - - { __LINE__, 0, STYLE_1, EXSTYLE_3, FALSE, FALSE, FALSE }, - { __LINE__, 0, STYLE_1, EXSTYLE_3, FALSE, FALSE, TRUE }, - { __LINE__, 0, STYLE_1, EXSTYLE_3, FALSE, TRUE, FALSE }, - { __LINE__, 0, STYLE_1, EXSTYLE_3, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_1, EXSTYLE_3, TRUE, FALSE, FALSE }, - { __LINE__, 0, STYLE_1, EXSTYLE_3, TRUE, FALSE, TRUE }, - { __LINE__, 0, STYLE_1, EXSTYLE_3, TRUE, TRUE, FALSE }, - { __LINE__, 0, STYLE_1, EXSTYLE_3, TRUE, TRUE, TRUE }, - - /* STYLE_2 */ - { __LINE__, 0, STYLE_2, EXSTYLE_0, FALSE, FALSE, FALSE }, - { __LINE__, 1, STYLE_2, EXSTYLE_0, FALSE, FALSE, TRUE }, - { __LINE__, 1, STYLE_2, EXSTYLE_0, FALSE, TRUE, FALSE }, - { __LINE__, 1, STYLE_2, EXSTYLE_0, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_2, EXSTYLE_0, TRUE, FALSE, FALSE }, - { __LINE__, 1, STYLE_2, EXSTYLE_0, TRUE, FALSE, TRUE }, - { __LINE__, 1, STYLE_2, EXSTYLE_0, TRUE, TRUE, FALSE }, - { __LINE__, 1, STYLE_2, EXSTYLE_0, TRUE, TRUE, TRUE }, - - { __LINE__, 0, STYLE_2, EXSTYLE_1, FALSE, FALSE, FALSE }, - { __LINE__, 1, STYLE_2, EXSTYLE_1, FALSE, FALSE, TRUE }, - { __LINE__, 1, STYLE_2, EXSTYLE_1, FALSE, TRUE, FALSE }, - { __LINE__, 1, STYLE_2, EXSTYLE_1, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_2, EXSTYLE_1, TRUE, FALSE, FALSE }, - { __LINE__, 1, STYLE_2, EXSTYLE_1, TRUE, FALSE, TRUE }, - { __LINE__, 1, STYLE_2, EXSTYLE_1, TRUE, TRUE, FALSE }, - { __LINE__, 1, STYLE_2, EXSTYLE_1, TRUE, TRUE, TRUE }, - - { __LINE__, 0, STYLE_2, EXSTYLE_2, FALSE, FALSE, FALSE }, - { __LINE__, 0, STYLE_2, EXSTYLE_2, FALSE, FALSE, TRUE }, - { __LINE__, 0, STYLE_2, EXSTYLE_2, FALSE, TRUE, FALSE }, - { __LINE__, 0, STYLE_2, EXSTYLE_2, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_2, EXSTYLE_2, TRUE, FALSE, FALSE }, - { __LINE__, 0, STYLE_2, EXSTYLE_2, TRUE, FALSE, TRUE }, - { __LINE__, 0, STYLE_2, EXSTYLE_2, TRUE, TRUE, FALSE }, - { __LINE__, 0, STYLE_2, EXSTYLE_2, TRUE, TRUE, TRUE }, - - { __LINE__, 0, STYLE_2, EXSTYLE_3, FALSE, FALSE, FALSE }, - { __LINE__, 0, STYLE_2, EXSTYLE_3, FALSE, FALSE, TRUE }, - { __LINE__, 0, STYLE_2, EXSTYLE_3, FALSE, TRUE, FALSE }, - { __LINE__, 0, STYLE_2, EXSTYLE_3, FALSE, TRUE, TRUE }, - { __LINE__, 0, STYLE_2, EXSTYLE_3, TRUE, FALSE, FALSE }, - { __LINE__, 0, STYLE_2, EXSTYLE_3, TRUE, FALSE, TRUE }, - { __LINE__, 0, STYLE_2, EXSTYLE_3, TRUE, TRUE, FALSE }, - { __LINE__, 0, STYLE_2, EXSTYLE_3, TRUE, TRUE, TRUE }, -}; - -static UINT s_uShellHookMsg = 0; -static HWND s_hwndHookViewer = NULL; +static HHOOK s_hShellHook = NULL; +static UINT s_cCreated = 0; +static UINT s_cDestroyed = 0; +static WCHAR s_szName[] = L"ReactOS ShellHook testcase"; static HWND s_hwndParent = NULL; static HWND s_hwndTarget = NULL; -static UINT s_nWindowCreatedCount = 0; -static UINT s_nRudeAppActivated = 0; -static WCHAR s_szName[] = L"ReactOS ShellHook testcase"; +static HWND s_hwndMain = NULL; static HWND DoCreateWindow(HWND hwndParent, DWORD style, DWORD exstyle, BOOL bFullscreen = FALSE) { - INT x = CW_USEDEFAULT, y = CW_USEDEFAULT, cx = 100, cy = 100; + INT x = CW_USEDEFAULT, y = CW_USEDEFAULT, cx = 300, cy = 100; if (bFullscreen) { x = y = 0; @@ -399,9 +274,7 @@ static void DoTestEntryPart1(const TEST_ENTRY *pEntry) s_hwndParent = NULL; if (pEntry->bIsChild || pEntry->bHasOwner) - { s_hwndParent = DoCreateWindow(NULL, pEntry->owner_style, pEntry->owner_exstyle); - } DWORD style = pEntry->style; DWORD exstyle = pEntry->exstyle; @@ -410,124 +283,120 @@ static void DoTestEntryPart1(const TEST_ENTRY *pEntry) else style &= ~WS_CHILD; - s_nWindowCreatedCount = 0; + s_cCreated = s_cDestroyed = 0; s_hwndTarget = DoCreateWindow(s_hwndParent, style, exstyle); } static void DoTestEntryPart2(const TEST_ENTRY *pEntry) { - ok(s_nWindowCreatedCount == pEntry->nCount, - "Line %d: s_nWindowCreatedCount expected %u but was %u\n", - pEntry->lineno, pEntry->nCount, s_nWindowCreatedCount); - - PostMessageW(s_hwndTarget, WM_CLOSE, 0, 0); + DestroyWindow(s_hwndTarget); s_hwndTarget = NULL; if (pEntry->bIsChild || pEntry->bHasOwner) { - PostMessageW(s_hwndParent, WM_CLOSE, 0, 0); + DestroyWindow(s_hwndParent); s_hwndParent = NULL; } + + ok(s_cCreated == pEntry->cCreated, + "Line %d: cCreated expected %u but was %u\n", + pEntry->lineno, pEntry->cCreated, s_cCreated); + + ok(s_cDestroyed == pEntry->cDestroyed, + "Line %d: cDestroyed expected %u but was %u\n", + pEntry->lineno, pEntry->cDestroyed, s_cDestroyed); } -static void DoRudeAppTest1(const RUDEAPP_TEST_ENTRY *pEntry) +static +LRESULT CALLBACK +ShellProc( + INT nCode, + WPARAM wParam, + LPARAM lParam) { - s_hwndParent = NULL; - - DWORD style = pEntry->style; - DWORD exstyle = pEntry->exstyle; + if (nCode < 0) + return CallNextHookEx(s_hShellHook, nCode, wParam, lParam); - s_nRudeAppActivated = 0; - s_hwndTarget = DoCreateWindow(s_hwndParent, style, exstyle, pEntry->bFullscreen); - if (pEntry->bSetForeground) - SetForegroundWindow(s_hwndTarget); - if (pEntry->bSetFullscreen) + switch (nCode) { - MoveWindow(s_hwndTarget, 0, 0, - GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), TRUE); - } -} + case HSHELL_WINDOWCREATED: + s_cCreated++; + break; -static void DoRudeAppTest2(const RUDEAPP_TEST_ENTRY *pEntry) -{ - ok(s_nRudeAppActivated == pEntry->nCount, - "Line %d: s_nRudeAppActivated expected %u but was %u\n", - pEntry->lineno, pEntry->nCount, s_nRudeAppActivated); + case HSHELL_WINDOWDESTROYED: + s_cDestroyed++; + break; + } - PostMessageW(s_hwndTarget, WM_CLOSE, 0, 0); - s_hwndTarget = NULL; + return CallNextHookEx(s_hShellHook, nCode, wParam, lParam); } -static LRESULT CALLBACK -WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +static INT_PTR CALLBACK +DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - if (uMsg == s_uShellHookMsg && uMsg != 0) - { - switch (wParam) - { - case HSHELL_WINDOWCREATED: - if ((HWND)lParam != s_hwndTarget) - break; - ++s_nWindowCreatedCount; - break; - - case HSHELL_RUDEAPPACTIVATED: - if ((HWND)lParam != s_hwndTarget) - break; - ++s_nRudeAppActivated; - break; - } - } -#define ID_IGNITION 1000 -#define ID_BURNING 2000 -#define ID_RUDEAPPTEST1 3000 -#define ID_RUDEAPPTEST2 4000 +#define ID_TESTSTART 1000 +#define ID_TESTEND 2000 switch (uMsg) { - case WM_CREATE: - PostMessageW(hwnd, WM_COMMAND, ID_IGNITION, 0); - return DefWindowProcW(hwnd, uMsg, wParam, lParam); - case WM_COMMAND: - if (hwnd != s_hwndHookViewer) - break; + case WM_INITDIALOG: + ok_int(s_cCreated, 0); + ok_int(s_cDestroyed, 0); + PostMessageW(hwnd, WM_COMMAND, ID_TESTSTART, 0); + return TRUE; - if (ID_IGNITION <= wParam && wParam < ID_BURNING) - { - INT i = (INT)wParam - ID_IGNITION; - DoTestEntryPart1(&s_entries1[i]); - PostMessageW(hwnd, WM_COMMAND, ID_BURNING + i, 0); - } - else if (ID_BURNING <= wParam && wParam < ID_RUDEAPPTEST1) + case WM_COMMAND: + switch (LOWORD(wParam)) { - INT i = (INT)wParam - ID_BURNING; - DoTestEntryPart2(&s_entries1[i]); - ++i; - if (i == (INT)_countof(s_entries1)) - { - PostMessageW(hwnd, WM_COMMAND, ID_RUDEAPPTEST1, 0); + case IDOK: + case IDCANCEL: + DestroyWindow(hwnd); break; - } - PostMessageW(hwnd, WM_COMMAND, ID_IGNITION + i, 0); - } - else if (ID_RUDEAPPTEST1 <= wParam && wParam < ID_RUDEAPPTEST2) - { - INT i = (INT)wParam - ID_RUDEAPPTEST1; - DoRudeAppTest1(&s_entries2[i]); - PostMessageW(hwnd, WM_COMMAND, ID_RUDEAPPTEST2 + i, 0); - } - else if (ID_RUDEAPPTEST2 <= wParam) - { - INT i = (INT)wParam - ID_RUDEAPPTEST2; - DoRudeAppTest2(&s_entries2[i]); - ++i; - if (i == (INT)_countof(s_entries2)) + + default: { - PostQuitMessage(0); - break; + if (ID_TESTSTART <= LOWORD(wParam) && LOWORD(wParam) < ID_TESTEND) + { + UINT_PTR i = (UINT_PTR)wParam - ID_TESTSTART; + + if (i < _countof(s_entries1)) + { + DoTestEntryPart1(&s_entries1[i]); + PostMessageW(hwnd, WM_COMMAND, ID_TESTEND + i, 0); + } + else + { + DestroyWindow(hwnd); + } + } + else if (ID_TESTEND <= LOWORD(wParam)) + { + UINT_PTR i = (UINT_PTR)wParam - ID_TESTEND; + + if (i < _countof(s_entries1)) + { + DoTestEntryPart2(&s_entries1[i]); + PostMessageW(hwnd, WM_COMMAND, ID_TESTSTART + i + 1, 0); + } + } } - PostMessageW(hwnd, WM_COMMAND, ID_RUDEAPPTEST1 + i, 0); } break; + + case WM_DESTROY: + PostQuitMessage(0); + break; + } + + return 0; +} + +static LRESULT CALLBACK +WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_CREATE: + break; default: return DefWindowProcW(hwnd, uMsg, wParam, lParam); } @@ -536,14 +405,11 @@ WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) START_TEST(ShellHook) { - WNDCLASSW wc; - - ZeroMemory(&wc, sizeof(wc)); - wc.lpfnWndProc = WindowProc; + WNDCLASSW wc = { CS_HREDRAW | CS_VREDRAW, WindowProc }; wc.hInstance = GetModuleHandleW(NULL); wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hCursor = LoadCursor(NULL, IDC_ARROW); - wc.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); + wc.hbrBackground = (HBRUSH)(INT_PTR)(COLOR_3DFACE + 1); wc.lpszClassName = s_szName; if (!RegisterClassW(&wc)) { @@ -551,24 +417,33 @@ START_TEST(ShellHook) return; } - s_hwndHookViewer = DoCreateWindow(NULL, WS_OVERLAPPEDWINDOW | WS_VISIBLE, 0); - if (s_hwndHookViewer == NULL) + s_hShellHook = SetWindowsHookEx(WH_SHELL, ShellProc, NULL, GetCurrentThreadId()); + if (!s_hShellHook) + { + skip("!s_hShellHook\n"); + return; + } + + s_hwndMain = CreateDialogW(GetModuleHandleW(NULL), L"ShellHook", NULL, DialogProc); + if (!s_hShellHook) { - skip("CreateWindowExW failed\n"); + skip("!s_hwndMain\n"); + UnhookWindowsHookEx(s_hShellHook); return; } - s_uShellHookMsg = RegisterWindowMessageW(L"SHELLHOOK"); - RegisterShellHookWindow(s_hwndHookViewer); + ShowWindow(s_hwndMain, SW_SHOWNOACTIVATE); + UpdateWindow(s_hwndMain); MSG msg; while (GetMessageW(&msg, NULL, 0, 0)) { + if (IsDialogMessageW(s_hwndMain, &msg)) + continue; + TranslateMessage(&msg); DispatchMessageW(&msg); } - DeregisterShellHookWindow(s_hwndHookViewer); - DestroyWindow(s_hwndHookViewer); - s_hwndHookViewer = NULL; + UnhookWindowsHookEx(s_hShellHook); } diff --git a/modules/rostests/apitests/shell32/resource.rc b/modules/rostests/apitests/shell32/resource.rc index 177ef5b3f03..1e7f377ee96 100644 --- a/modules/rostests/apitests/shell32/resource.rc +++ b/modules/rostests/apitests/shell32/resource.rc @@ -16,3 +16,10 @@ FONT 9, "Tahoma" CONTROL "edt1", edt1, "EDIT", ES_AUTOHSCROLL | ES_MULTILINE | WS_BORDER | WS_TABSTOP, 19, 18, 80, 14 LTEXT "stc1", stc1, 24, 49, 72, 21 } + +ShellHook DIALOG 0, 0, 200, 84 +CAPTION "ReactOS ShellHook test dialog" +STYLE DS_MODALFRAME | WS_POPUPWINDOW | WS_CAPTION +FONT 9, "Tahoma" +{ +} diff --git a/modules/rostests/apitests/user32/CMakeLists.txt b/modules/rostests/apitests/user32/CMakeLists.txt index 4ecc693f1ed..ccfecb9a340 100644 --- a/modules/rostests/apitests/user32/CMakeLists.txt +++ b/modules/rostests/apitests/user32/CMakeLists.txt @@ -25,6 +25,7 @@ list(APPEND SOURCE GetSystemMetrics.c GetUserObjectInformation.c GetWindowPlacement.c + GW_ENABLEDPOPUP.c InitializeLpkHooks.c KbdLayout.c keybd_event.c diff --git a/modules/rostests/apitests/user32/GW_ENABLEDPOPUP.c b/modules/rostests/apitests/user32/GW_ENABLEDPOPUP.c new file mode 100644 index 00000000000..8213a58e237 --- /dev/null +++ b/modules/rostests/apitests/user32/GW_ENABLEDPOPUP.c @@ -0,0 +1,142 @@ +/* + * PROJECT: ReactOS API tests + * LICENSE: LGPL-2.1+ (https://spdx.org/licenses/LGPL-2.1+) + * PURPOSE: Test for GW_ENABLEDPOPUP + * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ + */ + +#include "precomp.h" +#include + +static HWND s_hwnd = NULL; +static HWND s_hwndChild1 = NULL; +static HWND s_hwndChild2 = NULL; +static HWND s_hwndChild3 = NULL; + +static VOID DoTestBody(VOID) +{ + HWND hwndRet; +#define CHECK(hwndTarget) do { \ + hwndRet = GetWindow(s_hwnd, GW_ENABLEDPOPUP); \ + trace("hwndRet: %p\n", hwndRet); \ + ok_int(hwndRet == hwndTarget, TRUE); \ +} while (0) + + trace("%p, %p, %p, %p\n", s_hwnd, s_hwndChild1, s_hwndChild2, s_hwndChild3); + + CHECK(s_hwndChild3); + + EnableWindow(s_hwndChild3, FALSE); + + CHECK(s_hwndChild2); + + EnableWindow(s_hwndChild2, FALSE); + + CHECK(NULL); + + EnableWindow(s_hwndChild2, TRUE); + + CHECK(s_hwndChild2); + + ShowWindow(s_hwndChild1, SW_HIDE); + + CHECK(s_hwndChild2); + + ShowWindow(s_hwndChild2, SW_HIDE); + + CHECK(NULL); + + ShowWindow(s_hwndChild2, SW_SHOWNOACTIVATE); + + CHECK(s_hwndChild2); + + EnableWindow(s_hwndChild1, TRUE); + ShowWindow(s_hwndChild2, SW_SHOWNOACTIVATE); + + CHECK(s_hwndChild2); + + ShowWindow(s_hwndChild1, SW_SHOWNOACTIVATE); + + CHECK(s_hwndChild2); + + ShowWindow(s_hwndChild2, SW_HIDE); + + CHECK(s_hwndChild1); +} + +static LRESULT CALLBACK +WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ + switch (uMsg) + { + case WM_CREATE: + SetTimer(hwnd, 999, 500, NULL); + break; + case WM_DESTROY: + if (s_hwnd == hwnd) + { + DestroyWindow(s_hwndChild1); + DestroyWindow(s_hwndChild2); + DestroyWindow(s_hwndChild3); + PostQuitMessage(0); + } + break; + case WM_TIMER: + KillTimer(hwnd, wParam); + if (wParam == 999 && hwnd == s_hwnd) + { + DoTestBody(); + DestroyWindow(hwnd); + break; + } + break; + default: + return DefWindowProcW(hwnd, uMsg, wParam, lParam); + } + return 0; +} + +START_TEST(GW_ENABLEDPOPUP) +{ + WNDCLASSW wc = { 0 }; + MSG msg; + + wc.lpfnWndProc = WindowProc; + wc.hInstance = GetModuleHandleW(NULL); + wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); + wc.hCursor = LoadCursor(NULL, IDC_ARROW); + wc.hbrBackground = (HBRUSH)(COLOR_3DFACE + 1); + wc.lpszClassName = L"GW_ENABLEDPOPUP"; + if (!RegisterClassW(&wc)) + { + skip("RegisterClass failed\n"); + return; + } + + s_hwnd = CreateWindowW(L"GW_ENABLEDPOPUP", L"GW_ENABLEDPOPUP", + WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 100, 100, + NULL, NULL, wc.hInstance, NULL); + s_hwndChild1 = CreateWindowW(L"GW_ENABLEDPOPUP", L"Child #1", + WS_POPUPWINDOW | WS_CHILD | WS_VISIBLE | WS_DISABLED, + 100, 100, 100, 100, + s_hwnd, NULL, wc.hInstance, NULL); + s_hwndChild2 = CreateWindowW(L"GW_ENABLEDPOPUP", L"Child #2", + WS_POPUPWINDOW | WS_CHILD | WS_VISIBLE, + 200, 200, 100, 100, + s_hwnd, NULL, wc.hInstance, NULL); + s_hwndChild3 = CreateWindowW(L"GW_ENABLEDPOPUP", L"Child #3", + WS_POPUPWINDOW | WS_CHILD | WS_VISIBLE, + 300, 100, 100, 100, + s_hwndChild2, NULL, wc.hInstance, NULL); + if (!s_hwnd || !s_hwndChild1 || !s_hwndChild2 || !s_hwndChild3) + { + skip("CreateWindow failed\n"); + } + + while (GetMessage(&msg, NULL, 0, 0)) + { + TranslateMessage(&msg); + DispatchMessageW(&msg); + } +} diff --git a/modules/rostests/apitests/user32/testlist.c b/modules/rostests/apitests/user32/testlist.c index 0ff533691b8..101ec0a3892 100644 --- a/modules/rostests/apitests/user32/testlist.c +++ b/modules/rostests/apitests/user32/testlist.c @@ -27,6 +27,7 @@ extern void func_GetSetWindowInt(void); extern void func_GetSystemMetrics(void); extern void func_GetUserObjectInformation(void); extern void func_GetWindowPlacement(void); +extern void func_GW_ENABLEDPOPUP(void); extern void func_InitializeLpkHooks(void); extern void func_KbdLayout(void); extern void func_keybd_event(void); @@ -85,6 +86,7 @@ const struct test winetest_testlist[] = { "GetSystemMetrics", func_GetSystemMetrics }, { "GetUserObjectInformation", func_GetUserObjectInformation }, { "GetWindowPlacement", func_GetWindowPlacement }, + { "GW_ENABLEDPOPUP", func_GW_ENABLEDPOPUP }, { "InitializeLpkHooks", func_InitializeLpkHooks }, { "KbdLayout", func_KbdLayout }, { "keybd_event", func_keybd_event }, diff --git a/sdk/include/ndk/i386/ketypes.h b/sdk/include/ndk/i386/ketypes.h index 4d77e015b02..757fd4e82d4 100644 --- a/sdk/include/ndk/i386/ketypes.h +++ b/sdk/include/ndk/i386/ketypes.h @@ -75,8 +75,10 @@ Header Name: #define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS)) #define PCR ((KPCR *)K0IPCR) #if defined(CONFIG_SMP) || defined(NT_BUILD) -#undef KeGetPcr +//#undef KeGetPcr #define KeGetPcr() ((KPCR *)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr))) +#else +#define KeGetPcr() PCR #endif // diff --git a/sdk/include/ndk/inline_ntcurrentteb.h b/sdk/include/ndk/inline_ntcurrentteb.h index 13d99b6d1d9..a065945e610 100644 --- a/sdk/include/ndk/inline_ntcurrentteb.h +++ b/sdk/include/ndk/inline_ntcurrentteb.h @@ -1,29 +1,31 @@ #ifndef _INLINE_NT_CURRENTTEB_H_ #define _INLINE_NT_CURRENTTEB_H_ -#if defined(_M_IX86) -FORCEINLINE struct _TEB * NtCurrentTeb(void) +#ifdef __cplusplus +extern "C" { +#endif + +FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { +#if defined(_M_IX86) return (struct _TEB *)__readfsdword(0x18); -} -#elif defined(_M_ARM) -FORCEINLINE struct _TEB * NtCurrentTeb(void) -{ - __debugbreak(); - return (struct _TEB *)0; -} #elif defined(_M_AMD64) -FORCEINLINE struct _TEB * NtCurrentTeb(void) -{ return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self)); -} -#elif defined(_M_PPC) -FORCEINLINE struct _TEB * NtCurrentTeb(void) -{ - return (struct _TEB *)__readfsdword_winnt(0x18); -} +#elif defined(_M_ARM) + // return (struct _TEB *)KeGetPcr()->Used_Self; + return (struct _TEB *)(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW); +#elif defined (_M_ARM64) + //UNIMPLEMENTED; + return 0; +// #elif defined(_M_PPC) +// return (struct _TEB *)_read_teb_dword(0x18); #else #error Unsupported architecture #endif +} + +#ifdef __cplusplus +} +#endif -#endif//_INLINE_NT_CURRENTTEB_H_ +#endif // _INLINE_NT_CURRENTTEB_H_ diff --git a/sdk/include/ndk/psfuncs.h b/sdk/include/ndk/psfuncs.h index 76f2dc94ea4..48fa4a934e2 100644 --- a/sdk/include/ndk/psfuncs.h +++ b/sdk/include/ndk/psfuncs.h @@ -420,15 +420,23 @@ NtCreateThread( FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { #if defined(_M_IX86) - return (PTEB)__readfsdword(0x18); + return (struct _TEB *)__readfsdword(0x18); #elif defined (_M_AMD64) return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self)); #elif defined (_M_ARM) - return (struct _TEB *)KeGetPcr()->Used_Self; + // return (struct _TEB *)KeGetPcr()->Used_Self; + return (struct _TEB *)(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW); +#elif defined (_M_ARM64) + //UNIMPLEMENTED; + return 0; +// #elif defined(_M_PPC) +// return (struct _TEB *)_read_teb_dword(0x18); +#else +#error Unsupported architecture #endif } #else -struct _TEB * NtCurrentTeb(void); +struct _TEB * NtCurrentTeb(VOID); #endif NTSYSCALLAPI diff --git a/sdk/include/psdk/msctf.idl b/sdk/include/psdk/msctf.idl index f7f3b12327d..787c3d88d1c 100644 --- a/sdk/include/psdk/msctf.idl +++ b/sdk/include/psdk/msctf.idl @@ -62,9 +62,9 @@ cpp_quote("EXTERN_C HRESULT WINAPI TF_DllDetachInOther(VOID);") cpp_quote("EXTERN_C HRESULT WINAPI TF_CreateCategoryMgr(_Out_ ITfCategoryMgr **ppcat);") cpp_quote("EXTERN_C HRESULT WINAPI TF_CreateDisplayAttributeMgr(_Out_ ITfDisplayAttributeMgr **ppdam);") cpp_quote("EXTERN_C HICON WINAPI TF_GetLangIcon(_In_ LANGID LangID, _Out_ LPWSTR pszText, _In_ INT cchText);") -cpp_quote("EXTERN_C HRESULT WINAPI TF_InitMlngInfo(VOID);") +cpp_quote("EXTERN_C VOID WINAPI TF_InitMlngInfo(VOID);") cpp_quote("EXTERN_C INT WINAPI TF_MlngInfoCount(VOID);") -cpp_quote("EXTERN_C BOOL WINAPI TF_GetMlngHKL(_In_ INT iKL, _Out_ HKL *phKL, _Out_ LPWSTR pszText, _In_ INT cchText);") +cpp_quote("EXTERN_C BOOL WINAPI TF_GetMlngHKL(_In_ INT iKL, _Out_opt_ HKL *phKL, _Out_opt_ LPWSTR pszText, _In_ INT cchText);") cpp_quote("EXTERN_C INT WINAPI TF_GetMlngIconIndex(_In_ INT iKL);") cpp_quote("EXTERN_C HICON WINAPI TF_InatExtractIcon(_In_ INT iKL);") cpp_quote("EXTERN_C HRESULT WINAPI TF_RunInputCPL(VOID);") @@ -950,6 +950,38 @@ interface ITfTextEditSink : IUnknown [in] ITfEditRecord *pEditRecord); } +[ + object, + uuid(AA80E80C-2021-11D2-93E0-0060B067B86E), + pointer_default(unique) +] +interface ITfContextOwner : IUnknown +{ + HRESULT GetACPFromPoint( + [in] const POINT *ptScreen, + [in] DWORD dwFlags, + [out] LONG *pacp); + + HRESULT GetTextExt( + [in] LONG acpStart, + [in] LONG acpEnd, + [out] RECT *prc, + [out] BOOL *pfClipped); + + HRESULT GetScreenExt( + [out] RECT *prc); + + HRESULT GetStatus( + [out] TF_STATUS *pdcs); + + HRESULT GetWnd( + [out] HWND *phwnd); + + HRESULT GetAttribute( + [in] REFGUID rguidAttribute, + [out] VARIANT *pvarValue); +} + [ object, uuid(5F20AA40-B57A-4F34-96AB-3576F377CC79), diff --git a/sdk/include/psdk/shlobj.h b/sdk/include/psdk/shlobj.h index ba9f05b4878..3d27f328631 100644 --- a/sdk/include/psdk/shlobj.h +++ b/sdk/include/psdk/shlobj.h @@ -1832,11 +1832,11 @@ typedef enum RESTRICTIONS REST_NODETAILSTHUMBNAILONNETWORK = 0x40000094, #endif REST_NOINTERNETOPENWITH = 0x40000095, -#if (NTDDI_VERSION < NTDDI_VISTA) - REST_ALLOWLEGACYLMZBEHAVIOR = 0x40000096, /* not documented */ -#endif #endif #if (NTDDI_VERSION >= NTDDI_WINXPSP2) +#if (NTDDI_VERSION < NTDDI_VISTA) + REST_ALLOWLEGACYLMZBEHAVIOR = 0x4000009A, /* not documented */ +#endif REST_DONTRETRYBADNETNAME = 0x4000009B, REST_ALLOWFILECLSIDJUNCTIONS, REST_NOUPNPINSTALL, diff --git a/sdk/include/psdk/wincon.h b/sdk/include/psdk/wincon.h index bb6e1ed8dc5..1af408d0357 100644 --- a/sdk/include/psdk/wincon.h +++ b/sdk/include/psdk/wincon.h @@ -119,8 +119,8 @@ extern "C" { /* * Read input flags */ -#define CONSOLE_READ_KEEPEVENT 0x0001 -#define CONSOLE_READ_CONTINUE 0x0002 +#define CONSOLE_READ_NOREMOVE 0x0001 +#define CONSOLE_READ_NOWAIT 0x0002 /* * Event types diff --git a/sdk/include/psdk/winuser.h b/sdk/include/psdk/winuser.h index 3cc85d18397..62253ad597b 100644 --- a/sdk/include/psdk/winuser.h +++ b/sdk/include/psdk/winuser.h @@ -764,6 +764,7 @@ extern "C" { #define GW_HWNDFIRST 0 #define GW_HWNDLAST 1 #define GW_OWNER 4 +#define GW_ENABLEDPOPUP 6 #define SW_HIDE 0 #define SW_NORMAL 1 #define SW_SHOWNORMAL 1 diff --git a/sdk/include/reactos/imm32_undoc.h b/sdk/include/reactos/imm32_undoc.h index a37c8ea4e58..184f6e13eac 100644 --- a/sdk/include/reactos/imm32_undoc.h +++ b/sdk/include/reactos/imm32_undoc.h @@ -13,7 +13,16 @@ extern "C" { #include -#define IS_IME_HKL(hkl) ((((ULONG_PTR)(hkl)) & 0xF0000000) == 0xE0000000) +#define IME_MASK (0xE0000000UL) +#define SUBST_MASK (0xD0000000UL) +#define SPECIAL_MASK (0xF0000000UL) + +#define IS_IME_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == IME_MASK) +#define IS_SPECIAL_HKL(hKL) ((((ULONG_PTR)(hKL)) & 0xF0000000) == SPECIAL_MASK) +#define SPECIALIDFROMHKL(hKL) ((WORD)(HIWORD(hKL) & 0x0FFF)) + +#define IS_IME_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == IME_MASK) +#define IS_SUBST_KLID(dwKLID) ((((ULONG)(dwKLID)) & 0xF0000000) == SUBST_MASK) typedef struct tagIMEINFOEX { diff --git a/sdk/include/reactos/shlwapi_undoc.h b/sdk/include/reactos/shlwapi_undoc.h index 1a46c7b7438..746284d2cb4 100644 --- a/sdk/include/reactos/shlwapi_undoc.h +++ b/sdk/include/reactos/shlwapi_undoc.h @@ -25,6 +25,27 @@ extern "C" { #endif /* defined(__cplusplus) */ +#define SHELL_NO_POLICY ((DWORD)-1) + +typedef struct tagPOLICYDATA +{ + DWORD policy; /* flags value passed to SHRestricted */ + LPCWSTR appstr; /* application str such as "Explorer" */ + LPCWSTR keystr; /* name of the actual registry key / policy */ +} POLICYDATA, *LPPOLICYDATA; + +HANDLE WINAPI SHGlobalCounterCreate(REFGUID guid); +PVOID WINAPI SHInterlockedCompareExchange(PVOID *dest, PVOID xchg, PVOID compare); +LONG WINAPI SHGlobalCounterGetValue(HANDLE hGlobalCounter); +LONG WINAPI SHGlobalCounterIncrement(HANDLE hGlobalCounter); + +DWORD WINAPI +SHRestrictionLookup( + _In_ DWORD policy, + _In_ LPCWSTR key, + _In_ const POLICYDATA *polTable, + _Inout_ LPDWORD polArr); + BOOL WINAPI SHAboutInfoA(LPSTR lpszDest, DWORD dwDestLen); BOOL WINAPI SHAboutInfoW(LPWSTR lpszDest, DWORD dwDestLen); #ifdef UNICODE diff --git a/sdk/include/reactos/undocshell.h b/sdk/include/reactos/undocshell.h index 5d0689827f9..8f180604359 100644 --- a/sdk/include/reactos/undocshell.h +++ b/sdk/include/reactos/undocshell.h @@ -49,14 +49,12 @@ typedef struct _TRAYNOTIFYDATAW #endif /* defined (_SHELLAPI_H) || defined (_INC_SHELLAPI) */ - /**************************************************************************** * Taskbar WM_COMMAND identifiers */ #define TWM_DOEXITWINDOWS (WM_USER + 342) #define TWM_CYCLEFOCUS (WM_USER + 348) - /**************************************************************************** * IDList Functions */ @@ -96,7 +94,6 @@ HRESULT WINAPI SHILCreateFromPathW ( BOOL WINAPI StrRetToStrNA(LPSTR,DWORD,LPSTRRET,const ITEMIDLIST*); BOOL WINAPI StrRetToStrNW(LPWSTR,DWORD,LPSTRRET,const ITEMIDLIST*); - /**************************************************************************** * SHChangeNotifyRegister API */ @@ -258,6 +255,7 @@ ExtractIconResInfoW( /**************************************************************************** * File Menu Routines */ + /* FileMenu_Create nSelHeight constants */ #define FM_DEFAULT_SELHEIGHT -1 #define FM_FULL_SELHEIGHT 0 @@ -732,6 +730,8 @@ Activate_RunDLL( _In_ LPCWSTR cmdline, _In_ INT cmdshow); +BOOL WINAPI SHSettingsChanged(LPCVOID unused, LPCWSTR pszKey); + /***************************************************************************** * Shell32 resources */ diff --git a/sdk/include/xdk/arm/ke.h b/sdk/include/xdk/arm/ke.h index dc344b30c11..5a611a0dfde 100644 --- a/sdk/include/xdk/arm/ke.h +++ b/sdk/include/xdk/arm/ke.h @@ -334,14 +334,13 @@ typedef struct _KPCR } KPCR, *PKPCR; #define CP15_PCR_RESERVED_MASK 0xFFF -//#define KIPCR() ((ULONG_PTR)(_MoveFromCoprocessor(CP15_TPIDRPRW)) & ~CP15_PCR_RESERVED_MASK) +#define KIPCR() (((ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRPRW)) & ~CP15_PCR_RESERVED_MASK) FORCEINLINE PKPCR -KeGetPcr( - VOID) +KeGetPcr(VOID) { - return (PKPCR)(_MoveFromCoprocessor(CP15_TPIDRPRW) & ~CP15_PCR_RESERVED_MASK); + return (PKPCR)KIPCR(); } #if (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS) @@ -349,8 +348,8 @@ FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID) { - return *((PUCHAR)KeGetPcr() + 0x580); + return (ULONG)*((PUCHAR)KIPCR() + 0x580); } #endif /* (NTDDI_VERSION < NTDDI_WIN7) || !defined(NT_PROCESSOR_GROUPS) */ -$endif +$endif (_NTDDK_) diff --git a/sdk/include/xdk/winnt_old.h b/sdk/include/xdk/winnt_old.h index 80edfb0c475..f92b936d989 100644 --- a/sdk/include/xdk/winnt_old.h +++ b/sdk/include/xdk/winnt_old.h @@ -4298,7 +4298,7 @@ RtlSecureZeroMemory(_Out_writes_bytes_all_(Length) PVOID Buffer, } #if defined(_M_IX86) -FORCEINLINE struct _TEB * NtCurrentTeb(void) +FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { return (struct _TEB *)__readfsdword(0x18); } @@ -4307,17 +4307,17 @@ FORCEINLINE PVOID GetCurrentFiber(VOID) return (PVOID)(ULONG_PTR)__readfsdword(0x10); } #elif defined (_M_AMD64) -FORCEINLINE struct _TEB * NtCurrentTeb(void) +FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self)); } FORCEINLINE PVOID GetCurrentFiber(VOID) { - #ifdef NONAMELESSUNION +#ifdef NONAMELESSUNION return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, DUMMYUNIONNAME.FiberData)); - #else +#else return (PVOID)__readgsqword(FIELD_OFFSET(NT_TIB, FiberData)); - #endif +#endif } #elif defined (_M_ARM) #define CP15_PMSELR 15, 0, 9, 12, 5 @@ -4325,20 +4325,20 @@ FORCEINLINE PVOID GetCurrentFiber(VOID) #define CP15_TPIDRURW 15, 0, 13, 0, 2 #define CP15_TPIDRURO 15, 0, 13, 0, 3 #define CP15_TPIDRPRW 15, 0, 13, 0, 4 -FORCEINLINE struct _TEB * NtCurrentTeb(void) +FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { return (struct _TEB *)(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW); } FORCEINLINE PVOID GetCurrentFiber(VOID) { - #ifdef NONAMELESSUNION - return ((PNT_TIB )(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW))->DUMMYUNIONNAME.FiberData; - #else - return ((PNT_TIB )(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW))->FiberData; - #endif +#ifdef NONAMELESSUNION + return ((PNT_TIB)(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW))->DUMMYUNIONNAME.FiberData; +#else + return ((PNT_TIB)(ULONG_PTR)_MoveFromCoprocessor(CP15_TPIDRURW))->FiberData; +#endif } #elif defined (_M_ARM64) -FORCEINLINE struct _TEB * NtCurrentTeb(void) +FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { //UNIMPLEMENTED; return 0; @@ -4359,11 +4359,11 @@ FORCEINLINE unsigned long _read_teb_dword(const unsigned long Offset) : "r7"); return result; } -FORCEINLINE struct _TEB * NtCurrentTeb(void) +FORCEINLINE struct _TEB * NtCurrentTeb(VOID) { return (struct _TEB *)_read_teb_dword(0x18); } -FORCEINLINE PVOID GetCurrentFiber(void) +FORCEINLINE PVOID GetCurrentFiber(VOID) { return _read_teb_dword(0x10); } @@ -4371,7 +4371,7 @@ FORCEINLINE PVOID GetCurrentFiber(void) #error Unknown architecture #endif -FORCEINLINE PVOID GetFiberData(void) +FORCEINLINE PVOID GetFiberData(VOID) { return *((PVOID *)GetCurrentFiber()); } @@ -4398,7 +4398,7 @@ FORCEINLINE PVOID GetFiberData(void) #if defined(_MSC_VER) FORCEINLINE VOID -MemoryBarrier (VOID) +MemoryBarrier(VOID) { LONG Barrier; __asm { xchg Barrier, eax } diff --git a/sdk/include/xdk/x86/ke.h b/sdk/include/xdk/x86/ke.h index b367a93d1b5..713eff15061 100644 --- a/sdk/include/xdk/x86/ke.h +++ b/sdk/include/xdk/x86/ke.h @@ -283,8 +283,6 @@ typedef struct _CONTEXT { } CONTEXT; #include "poppack.h" -#define KeGetPcr() PCR - #define PCR_MINOR_VERSION 1 #define PCR_MAJOR_VERSION 1 @@ -325,6 +323,18 @@ typedef struct _KPCR { ULONG HalReserved[16]; } KPCR, *PKPCR; +/* NOTE: This macro is not exposed in the DDK/WDK for _M_IX86. + * If it were, this would be its definition. */ +#if 0 +// #define KeGetPcr() ((PKPCR)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr))) +FORCEINLINE +PKPCR +KeGetPcr(VOID) +{ + return (PKPCR)__readfsdword(FIELD_OFFSET(KPCR, SelfPcr)); +} +#endif + #if (NTDDI_VERSION >= NTDDI_WIN7) _CRT_DEPRECATE_TEXT("KeGetCurrentProcessorNumber is deprecated. Use KeGetCurrentProcessorNumberEx or KeGetCurrentProcessorIndex instead.") #endif diff --git a/sdk/lib/atl/atlsimpstr.h b/sdk/lib/atl/atlsimpstr.h index 2b571a299e0..ce0286602b4 100644 --- a/sdk/lib/atl/atlsimpstr.h +++ b/sdk/lib/atl/atlsimpstr.h @@ -373,6 +373,11 @@ class CSimpleStringT return m_pszData; } + void Preallocate(_In_ int nLength) + { + PrepareWrite(nLength); + } + void ReleaseBufferSetLength(_In_ int nNewLength) { ATLASSERT(nNewLength >= 0); diff --git a/sdk/lib/cmlib/hivewrt.c b/sdk/lib/cmlib/hivewrt.c index c4fe4d4059d..58af3ce8a32 100644 --- a/sdk/lib/cmlib/hivewrt.c +++ b/sdk/lib/cmlib/hivewrt.c @@ -130,7 +130,7 @@ HvpWriteLog( * Now calculate the bitmap and buffer sizes to hold up our * contents in a buffer. */ - BitmapSize = ROUND_UP(sizeof(ULONG) + RegistryHive->DirtyVector.SizeOfBitMap / 8, HSECTOR_SIZE); + BitmapSize = ROUND_UP(sizeof(ULONG) + RegistryHive->DirtyVector.SizeOfBitMap, HSECTOR_SIZE); BufferSize = HV_LOG_HEADER_SIZE + BitmapSize; /* Now allocate the base header block buffer */ diff --git a/sdk/lib/rossym/delete.c b/sdk/lib/rossym/delete.c index 65f694e63c0..951193e5d12 100644 --- a/sdk/lib/rossym/delete.c +++ b/sdk/lib/rossym/delete.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/dwarfabbrev.c b/sdk/lib/rossym/dwarfabbrev.c index b5cf60bd548..e26962c1101 100644 --- a/sdk/lib/rossym/dwarfabbrev.c +++ b/sdk/lib/rossym/dwarfabbrev.c @@ -6,7 +6,6 @@ * explicit reference counting if this turns out not to be acceptable. */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/dwarfaranges.c b/sdk/lib/rossym/dwarfaranges.c index e9e82c1f8fc..497a76b36f4 100644 --- a/sdk/lib/rossym/dwarfaranges.c +++ b/sdk/lib/rossym/dwarfaranges.c @@ -2,7 +2,6 @@ * Dwarf address ranges parsing code. */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/dwarfcfa.c b/sdk/lib/rossym/dwarfcfa.c index 41970587e3a..72aab355fcb 100644 --- a/sdk/lib/rossym/dwarfcfa.c +++ b/sdk/lib/rossym/dwarfcfa.c @@ -8,7 +8,6 @@ * the same encoding. */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/dwarfget.c b/sdk/lib/rossym/dwarfget.c index d32177cd1db..e2df849a94f 100644 --- a/sdk/lib/rossym/dwarfget.c +++ b/sdk/lib/rossym/dwarfget.c @@ -2,7 +2,6 @@ * Dwarf data format parsing routines. */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/dwarfinfo.c b/sdk/lib/rossym/dwarfinfo.c index 1d71d8a1cc8..8d6346fc51e 100644 --- a/sdk/lib/rossym/dwarfinfo.c +++ b/sdk/lib/rossym/dwarfinfo.c @@ -2,7 +2,6 @@ * Dwarf info parse and search. */ -#define NTOSAPI #include #include #include diff --git a/sdk/lib/rossym/dwarfopen.c b/sdk/lib/rossym/dwarfopen.c index 9a5f20c80fa..414d0130288 100644 --- a/sdk/lib/rossym/dwarfopen.c +++ b/sdk/lib/rossym/dwarfopen.c @@ -1,4 +1,4 @@ -#define NTOSAPI + #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/dwarfpc.c b/sdk/lib/rossym/dwarfpc.c index 2bb863d0f48..8b1c68c4467 100644 --- a/sdk/lib/rossym/dwarfpc.c +++ b/sdk/lib/rossym/dwarfpc.c @@ -11,7 +11,6 @@ * The encoding may be small, but it sure isn't simple! */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/dwarfpubnames.c b/sdk/lib/rossym/dwarfpubnames.c index 8a8d802b797..fe8c6755698 100644 --- a/sdk/lib/rossym/dwarfpubnames.c +++ b/sdk/lib/rossym/dwarfpubnames.c @@ -1,4 +1,4 @@ -#define NTOSAPI + #include #include #include diff --git a/sdk/lib/rossym/fromfile.c b/sdk/lib/rossym/fromfile.c index fbefb637959..6c653bf5af4 100644 --- a/sdk/lib/rossym/fromfile.c +++ b/sdk/lib/rossym/fromfile.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/frommem.c b/sdk/lib/rossym/frommem.c index 21f8334585d..b94edea7b3b 100644 --- a/sdk/lib/rossym/frommem.c +++ b/sdk/lib/rossym/frommem.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/fromraw.c b/sdk/lib/rossym/fromraw.c index 33be4fd6003..f5cb3f670fc 100644 --- a/sdk/lib/rossym/fromraw.c +++ b/sdk/lib/rossym/fromraw.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/getraw.c b/sdk/lib/rossym/getraw.c index 6635f19de94..6ad751e95f9 100644 --- a/sdk/lib/rossym/getraw.c +++ b/sdk/lib/rossym/getraw.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/iofile.c b/sdk/lib/rossym/iofile.c index 97069c50076..b0cf99a795c 100644 --- a/sdk/lib/rossym/iofile.c +++ b/sdk/lib/rossym/iofile.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym/pe.c b/sdk/lib/rossym/pe.c index e86e2196f9f..4d84bc4ddaf 100644 --- a/sdk/lib/rossym/pe.c +++ b/sdk/lib/rossym/pe.c @@ -1,4 +1,4 @@ -#define NTOSAPI + #include #include #include diff --git a/sdk/lib/rossym/zwfile.c b/sdk/lib/rossym/zwfile.c index 7711014392e..772e8f06c69 100644 --- a/sdk/lib/rossym/zwfile.c +++ b/sdk/lib/rossym/zwfile.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym_new/frommem.c b/sdk/lib/rossym_new/frommem.c index d4b2251a28d..33e186581e0 100644 --- a/sdk/lib/rossym_new/frommem.c +++ b/sdk/lib/rossym_new/frommem.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include diff --git a/sdk/lib/rossym_new/fromraw.c b/sdk/lib/rossym_new/fromraw.c index ae484252424..09ac986dbed 100644 --- a/sdk/lib/rossym_new/fromraw.c +++ b/sdk/lib/rossym_new/fromraw.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym_new/getraw.c b/sdk/lib/rossym_new/getraw.c index 1f11057a38e..d6b09a63b4e 100644 --- a/sdk/lib/rossym_new/getraw.c +++ b/sdk/lib/rossym_new/getraw.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym_new/iofile.c b/sdk/lib/rossym_new/iofile.c index 97069c50076..b0cf99a795c 100644 --- a/sdk/lib/rossym_new/iofile.c +++ b/sdk/lib/rossym_new/iofile.c @@ -7,7 +7,6 @@ * PROGRAMMERS: Ge van Geldorp (gvg@reactos.com) */ -#define NTOSAPI #include #include #include "rossympriv.h" diff --git a/sdk/lib/rossym_new/precomp.h b/sdk/lib/rossym_new/precomp.h index 13026f11122..76b1bd4f057 100644 --- a/sdk/lib/rossym_new/precomp.h +++ b/sdk/lib/rossym_new/precomp.h @@ -1,4 +1,4 @@ -#define NTOSAPI + #include #include #include diff --git a/subsystems/mvdm/ntvdm/emulator.c b/subsystems/mvdm/ntvdm/emulator.c index 68ff9f3cba8..4f3dfb64e98 100644 --- a/subsystems/mvdm/ntvdm/emulator.c +++ b/subsystems/mvdm/ntvdm/emulator.c @@ -228,7 +228,7 @@ ConsoleEventThread(LPVOID Parameter) InputRecords, ARRAYSIZE(InputRecords), &NumRecords, - CONSOLE_READ_CONTINUE)) + CONSOLE_READ_NOWAIT)) { DWORD LastError = GetLastError(); DPRINT1("Error reading console input (0x%p, %lu) - Error %lu\n", ConsoleInput, NumRecords, LastError); diff --git a/win32ss/user/ntuser/msgqueue.c b/win32ss/user/ntuser/msgqueue.c index c8ae61ad4eb..b704dbce5ca 100644 --- a/win32ss/user/ntuser/msgqueue.c +++ b/win32ss/user/ntuser/msgqueue.c @@ -1986,8 +1986,7 @@ co_MsqPeekHardwareMessage(IN PTHREADINFO pti, ( Window == PWND_BOTTOM && CurrentMessage->Msg.hwnd == NULL ) || // 2 ( Window != PWND_BOTTOM && UserHMGetHandle(Window) == CurrentMessage->Msg.hwnd ) || // 3 ( is_mouse_message(CurrentMessage->Msg.message) ) ) && // Null window for anything mouse. - ( ( ( MsgFilterLow == 0 && MsgFilterHigh == 0 ) && CurrentMessage->QS_Flags & QSflags ) || - ( MsgFilterLow <= CurrentMessage->Msg.message && MsgFilterHigh >= CurrentMessage->Msg.message ) ) ) + ( CurrentMessage->QS_Flags & QSflags ) ) { idSave = MessageQueue->idSysPeek; MessageQueue->idSysPeek = (ULONG_PTR)CurrentMessage; @@ -2000,6 +1999,13 @@ co_MsqPeekHardwareMessage(IN PTHREADINFO pti, UpdateKeyStateFromMsg(MessageQueue, &msg); AcceptMessage = co_IntProcessHardwareMessage(&msg, &Remove, &NotForUs, ExtraInfo, MsgFilterLow, MsgFilterHigh); + + if (MsgFilterLow != 0 || MsgFilterHigh != 0) + { + /* Don't return message if not in range */ + if (msg.message < MsgFilterLow || msg.message > MsgFilterHigh) + AcceptMessage = FALSE; + } if (Remove) { diff --git a/win32ss/user/ntuser/nonclient.c b/win32ss/user/ntuser/nonclient.c index a3852066b69..796f5772690 100644 --- a/win32ss/user/ntuser/nonclient.c +++ b/win32ss/user/ntuser/nonclient.c @@ -394,11 +394,13 @@ DefWndDoSizeMove(PWND pwnd, WORD wParam) if (msg.message == WM_KEYDOWN && (msg.wParam == VK_RETURN || msg.wParam == VK_ESCAPE)) break; // Exit on Return or Esc - if (!g_bWindowSnapEnabled && (msg.message == WM_LBUTTONUP)) + if (!g_bWindowSnapEnabled && (msg.message == WM_LBUTTONUP || + (msg.message == WM_MOUSEMOVE && (msg.wParam & MK_LBUTTON) == 0))) { // If no WindowSnapEnabled: Exit on button-up immediately break; } - else if (g_bWindowSnapEnabled && msg.message == WM_LBUTTONUP) + else if (g_bWindowSnapEnabled && (msg.message == WM_LBUTTONUP || + (msg.message == WM_MOUSEMOVE && (msg.wParam & MK_LBUTTON) == 0))) { // If WindowSnapEnabled: Decide whether to snap before exiting DWORD ExStyleTB, StyleTB; BOOL IsTaskBar; diff --git a/win32ss/user/user32/windows/cursoricon.c b/win32ss/user/user32/windows/cursoricon.c index a3f8a48602e..eb160a88c13 100644 --- a/win32ss/user/user32/windows/cursoricon.c +++ b/win32ss/user/user32/windows/cursoricon.c @@ -179,6 +179,12 @@ static int bitmap_info_size( const BITMAPINFO * info, WORD coloruse ) static int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width, LONG *height, WORD *bpp, DWORD *compr ) { + #define CR 13 + #define LF 10 + #define EOFM 26 // DOS End Of File Marker + #define HighBitDetect 0x89 // Byte with high bit set to test if not 7-bit + /* wine's definition */ + static const BYTE png_sig_pattern[] = { HighBitDetect, 'P', 'N', 'G', CR, LF, EOFM, LF }; if (header->biSize == sizeof(BITMAPCOREHEADER)) { const BITMAPCOREHEADER *core = (const BITMAPCOREHEADER *)header; @@ -198,7 +204,15 @@ static int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width, *compr = header->biCompression; return 1; } - ERR("(%d): unknown/wrong size for header\n", header->biSize ); + if (memcmp(&header->biSize, png_sig_pattern, sizeof(png_sig_pattern)) == 0) + { + ERR("Cannot yet display PNG icons\n"); + /* for PNG format details see https://en.wikipedia.org/wiki/PNG */ + } + else + { + ERR("Unknown/wrong size for header of 0x%x\n", header->biSize ); + } return -1; } @@ -1377,7 +1391,10 @@ CURSORICON_LoadFromFileW( /* Do the dance */ if(!CURSORICON_GetCursorDataFromBMI(&cursorData, (BITMAPINFO*)(&bits[entry->dwDIBOffset]))) - goto end; + { + ERR("Failing File is \n '%S'.\n", lpszName); + goto end; + } hCurIcon = NtUserxCreateEmptyCurObject(FALSE); if(!hCurIcon) diff --git a/win32ss/user/winsrv/consrv/coninput.c b/win32ss/user/winsrv/consrv/coninput.c index f61cbd3eacb..c2ce602592e 100644 --- a/win32ss/user/winsrv/consrv/coninput.c +++ b/win32ss/user/winsrv/consrv/coninput.c @@ -537,8 +537,8 @@ ReadInputBuffer(IN PGET_INPUT_INFO InputInfo, NumEventsRead = 0; Status = ConDrvGetConsoleInput(InputBuffer->Header.Console, InputBuffer, - (GetInputRequest->Flags & CONSOLE_READ_KEEPEVENT) != 0, - (GetInputRequest->Flags & CONSOLE_READ_CONTINUE ) == 0, + (GetInputRequest->Flags & CONSOLE_READ_NOREMOVE) != 0, + (GetInputRequest->Flags & CONSOLE_READ_NOWAIT ) == 0, InputRecord, GetInputRequest->NumRecords, &NumEventsRead); @@ -656,7 +656,7 @@ CON_API(SrvGetConsoleInput, DPRINT("SrvGetConsoleInput\n"); - if (GetInputRequest->Flags & ~(CONSOLE_READ_KEEPEVENT | CONSOLE_READ_CONTINUE)) + if (GetInputRequest->Flags & ~(CONSOLE_READ_NOREMOVE | CONSOLE_READ_NOWAIT)) { return STATUS_INVALID_PARAMETER; }