This commit is contained in:
Igor Pavlov
2023-12-22 17:17:05 +00:00
committed by Kornel
parent ec44a8a070
commit a36c48cece
954 changed files with 42199 additions and 25482 deletions

View File

File diff suppressed because it is too large Load Diff

View File

@@ -1,38 +1,77 @@
// ContextMenu.h
#ifndef __CONTEXT_MENU_H
#define __CONTEXT_MENU_H
#ifndef ZIP7_INC_CONTEXT_MENU_H
#define ZIP7_INC_CONTEXT_MENU_H
#include "../../../Common/MyWindows.h"
#include <ShlObj.h>
#include "../../../Windows/Shell.h"
#include "MyExplorerCommand.h"
#include "../../../Common/MyString.h"
#include "../FileManager/MyCom2.h"
enum ECtxCommandType
#ifdef CMF_EXTENDEDVERBS
#define Z7_WIN_CMF_EXTENDEDVERBS CMF_EXTENDEDVERBS
#else
#define Z7_WIN_CMF_EXTENDEDVERBS 0x00000100
#endif
enum enum_CtxCommandType
{
CtxCommandType_Normal,
CtxCommandType_OpenRoot,
CtxCommandType_OpenChild,
CtxCommandType_CrcRoot,
CtxCommandType_CrcChild,
CtxCommandType_CrcChild
};
class CZipContextMenu:
class CZipContextMenu Z7_final:
public IContextMenu,
public IShellExtInit,
public IExplorerCommand,
public IEnumExplorerCommand,
public CMyUnknownImp
{
Z7_COM_UNKNOWN_IMP_4_MT(
IContextMenu,
IShellExtInit,
IExplorerCommand,
IEnumExplorerCommand
)
// IShellExtInit
STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder, LPDATAOBJECT dataObject, HKEY hkeyProgID) Z7_override;
// IContextMenu
STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags) Z7_override;
STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici) Z7_override;
STDMETHOD(GetCommandString)(
#ifdef Z7_OLD_WIN_SDK
UINT
#else
UINT_PTR
#endif
idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax) Z7_override;
// IExplorerCommand
STDMETHOD (GetTitle) (IShellItemArray *psiItemArray, LPWSTR *ppszName) Z7_override;
STDMETHOD (GetIcon) (IShellItemArray *psiItemArray, LPWSTR *ppszIcon) Z7_override;
STDMETHOD (GetToolTip) (IShellItemArray *psiItemArray, LPWSTR *ppszInfotip) Z7_override;
STDMETHOD (GetCanonicalName) (GUID *pguidCommandName) Z7_override;
STDMETHOD (GetState) (IShellItemArray *psiItemArray, BOOL fOkToBeSlow, EXPCMDSTATE *pCmdState) Z7_override;
STDMETHOD (Invoke) (IShellItemArray *psiItemArray, IBindCtx *pbc) Z7_override;
STDMETHOD (GetFlags) (EXPCMDFLAGS *pFlags) Z7_override;
STDMETHOD (EnumSubCommands) (IEnumExplorerCommand **ppEnum) Z7_override;
// IEnumExplorerCommand
STDMETHOD (Next) (ULONG celt, IExplorerCommand **pUICommand, ULONG *pceltFetched) Z7_override;
STDMETHOD (Skip) (ULONG celt) Z7_override;
STDMETHOD (Reset) (void) Z7_override;
STDMETHOD (Clone) (IEnumExplorerCommand **ppenum) Z7_override;
public:
enum ECommandInternalID
enum enum_CommandInternalID
{
kCommandNULL,
kOpen,
@@ -54,48 +93,22 @@ public:
kHash_Generate_SHA256,
kHash_TestArc
};
MY_UNKNOWN_IMP4_MT(
IContextMenu,
IShellExtInit,
IExplorerCommand,
IEnumExplorerCommand
)
// IShellExtInit
STDMETHOD(Initialize)(LPCITEMIDLIST pidlFolder, LPDATAOBJECT dataObject, HKEY hkeyProgID);
// IContextMenu
STDMETHOD(QueryContextMenu)(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags);
STDMETHOD(InvokeCommand)(LPCMINVOKECOMMANDINFO lpici);
STDMETHOD(GetCommandString)(UINT_PTR idCmd, UINT uType, UINT *pwReserved, LPSTR pszName, UINT cchMax);
HRESULT InitContextMenu(const wchar_t *folder, const wchar_t * const *names, unsigned numFiles);
public:
void Init_For_7zFM()
{
// _isMenuForFM = true;
// _fileNames_WereReduced = false;
}
void LoadItems(IShellItemArray *psiItemArray);
// IExplorerCommand
STDMETHOD (GetTitle) (IShellItemArray *psiItemArray, LPWSTR *ppszName);
STDMETHOD (GetIcon) (IShellItemArray *psiItemArray, LPWSTR *ppszIcon);
STDMETHOD (GetToolTip) (IShellItemArray *psiItemArray, LPWSTR *ppszInfotip);
STDMETHOD (GetCanonicalName) (GUID *pguidCommandName);
STDMETHOD (GetState) (IShellItemArray *psiItemArray, BOOL fOkToBeSlow, EXPCMDSTATE *pCmdState);
STDMETHOD (Invoke) (IShellItemArray *psiItemArray, IBindCtx *pbc);
STDMETHOD (GetFlags) (EXPCMDFLAGS *pFlags);
STDMETHOD (EnumSubCommands) (IEnumExplorerCommand **ppEnum);
// IEnumExplorerCommand
STDMETHOD (Next) (ULONG celt, IExplorerCommand **pUICommand, ULONG *pceltFetched);
STDMETHOD (Skip) (ULONG celt);
STDMETHOD (Reset) (void);
STDMETHOD (Clone) (IEnumExplorerCommand **ppenum);
CZipContextMenu();
~CZipContextMenu();
struct CCommandMapItem
{
ECommandInternalID CommandInternalID;
enum_CommandInternalID CommandInternalID;
UString Verb;
UString UserString;
// UString HelpString;
@@ -103,7 +116,7 @@ public:
UString ArcName;
UString ArcType;
bool IsPopup;
ECtxCommandType CtxCommandType;
enum_CtxCommandType CtxCommandType;
CCommandMapItem():
IsPopup(false),
@@ -118,33 +131,34 @@ public:
}
};
private:
bool _isMenuForFM;
UStringVector _fileNames;
NWindows::NShell::CFileAttribs _attribs;
private:
bool _isMenuForFM;
bool _fileNames_WereReduced; // = true, if only first 16 items were used in QueryContextMenu()
bool _dropMode;
UString _dropPath;
CObjectVector<CCommandMapItem> _commandMap;
CObjectVector<CCommandMapItem> _commandMap_Cur;
HBITMAP _bitmap;
CBoolPair _elimDup;
UInt32 _writeZone;
CBoolPair _elimDup;
bool IsSeparator;
bool IsRoot;
CObjectVector< CMyComPtr<IExplorerCommand> > SubCommands;
ULONG CurrentSubCommand;
unsigned CurrentSubCommand;
void Set_UserString_in_LastCommand(const UString &s)
{
_commandMap.Back().UserString = s;
}
HRESULT GetFileNames(LPDATAOBJECT dataObject, UStringVector &fileNames);
int FindVerb(const UString &verb);
void FillCommand(ECommandInternalID id, UString &mainString, CCommandMapItem &cmi);
void AddCommand(ECommandInternalID id, UString &mainString, CCommandMapItem &cmi);
int FindVerb(const UString &verb) const;
void FillCommand(enum_CommandInternalID id, UString &mainString, CCommandMapItem &cmi) const;
void AddCommand(enum_CommandInternalID id, UString &mainString, CCommandMapItem &cmi);
void AddMapItem_ForSubMenu(const char *ver);
HRESULT InvokeCommandCommon(const CCommandMapItem &cmi);

View File

@@ -1,7 +1,7 @@
// ContextMenuFlags.h
#ifndef __CONTEXT_MENU_FLAGS_H
#define __CONTEXT_MENU_FLAGS_H
#ifndef ZIP7_INC_CONTEXT_MENU_FLAGS_H
#define ZIP7_INC_CONTEXT_MENU_FLAGS_H
namespace NContextMenuFlags
{

View File

@@ -1,4 +1,4 @@
// DLLExports.cpp
// DLLExportsExplorer.cpp
//
// Notes:
// Win2000:
@@ -9,9 +9,23 @@
#include "StdAfx.h"
#include "../../../Common/MyWindows.h"
// #include "../../../Common/IntToString.h"
#if defined(__clang__) && __clang_major__ >= 4
#pragma GCC diagnostic ignored "-Wnonportable-system-include-path"
#endif
// <olectl.h> : in new Windows Kit 10.0.2**** (NTDDI_WIN10_MN is defined)
// <OleCtl.h> : in another Windows Kit versions
#if defined(NTDDI_WIN10_MN) || defined(__MINGW32__) || defined(__MINGW64__)
#include <olectl.h>
#else
#include <OleCtl.h>
#endif
#if defined(__MINGW32__) || defined(__MINGW64__)
#include <shlguid.h>
#else
#include <ShlGuid.h>
#endif
#include "../../../Common/MyInitGuid.h"
@@ -32,7 +46,7 @@ static LPCTSTR const k_Approved = TEXT("Software\\Microsoft\\Windows\\CurrentVer
// {23170F69-40C1-278A-1000-000100020000}
static LPCTSTR const k_Clsid = TEXT("{23170F69-40C1-278A-1000-000100020000}");
DEFINE_GUID(CLSID_CZipContextMenu,
Z7_DEFINE_GUID(CLSID_CZipContextMenu,
k_7zip_GUID_Data1,
k_7zip_GUID_Data2,
k_7zip_GUID_Data3_Common,
@@ -42,11 +56,11 @@ using namespace NWindows;
extern
HINSTANCE g_hInstance;
HINSTANCE g_hInstance = 0;
HINSTANCE g_hInstance = NULL;
extern
HWND g_HWND;
HWND g_HWND = 0;
HWND g_HWND = NULL;
extern
LONG g_DllRefCount;
@@ -56,21 +70,20 @@ LONG g_DllRefCount = 0; // Reference count of this DLL.
// #define ODS(sz) OutputDebugStringW(L#sz)
#define ODS(sz)
class CShellExtClassFactory:
class CShellExtClassFactory Z7_final:
public IClassFactory,
public CMyUnknownImp
{
public:
CShellExtClassFactory() { InterlockedIncrement(&g_DllRefCount); }
~CShellExtClassFactory() { InterlockedDecrement(&g_DllRefCount); }
MY_UNKNOWN_IMP1_MT(IClassFactory)
Z7_COM_UNKNOWN_IMP_1_MT(IClassFactory)
STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, void**);
STDMETHODIMP LockServer(BOOL);
STDMETHOD(CreateInstance)(LPUNKNOWN, REFIID, void**) Z7_override Z7_final;
STDMETHOD(LockServer)(BOOL) Z7_override Z7_final;
public:
CShellExtClassFactory() { InterlockedIncrement(&g_DllRefCount); }
~CShellExtClassFactory() { InterlockedDecrement(&g_DllRefCount); }
};
STDMETHODIMP CShellExtClassFactory::CreateInstance(LPUNKNOWN pUnkOuter,
Z7_COMWF_B CShellExtClassFactory::CreateInstance(LPUNKNOWN pUnkOuter,
REFIID riid, void **ppvObj)
{
ODS("CShellExtClassFactory::CreateInstance()\r\n");
@@ -92,14 +105,15 @@ STDMETHODIMP CShellExtClassFactory::CreateInstance(LPUNKNOWN pUnkOuter,
if (!shellExt)
return E_OUTOFMEMORY;
HRESULT res = shellExt->QueryInterface(riid, ppvObj);
IContextMenu *ctxm = shellExt;
const HRESULT res = ctxm->QueryInterface(riid, ppvObj);
if (res != S_OK)
delete shellExt;
return res;
}
STDMETHODIMP CShellExtClassFactory::LockServer(BOOL /* fLock */)
Z7_COMWF_B CShellExtClassFactory::LockServer(BOOL /* fLock */)
{
return S_OK; // Check it
}
@@ -169,7 +183,8 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
catch(...) { return E_OUTOFMEMORY; }
if (!cf)
return E_OUTOFMEMORY;
HRESULT res = cf->QueryInterface(riid, ppv);
IClassFactory *cf2 = cf;
const HRESULT res = cf2->QueryInterface(riid, ppv);
if (res != S_OK)
delete cf;
return res;
@@ -217,7 +232,7 @@ static BOOL RegisterServer()
STDAPI DllRegisterServer(void)
{
return RegisterServer() ? S_OK: SELFREG_E_CLASS;
return RegisterServer() ? S_OK: SELFREG_E_CLASS;
}
static BOOL UnregisterServer()

View File

@@ -45,7 +45,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /YX /FD /c
# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "LANG" /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "Z7_LANG" /D "Z7_LONG_PATH" /FAcs /Yu"StdAfx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "NDEBUG"
@@ -72,7 +72,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "LANG" /Yu"StdAfx.h" /FD /GZ /c
# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "_MBCS" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "Z7_LANG" /D "Z7_LONG_PATH" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "_DEBUG"
@@ -98,8 +98,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "ReleaseU"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "LANG" /D "_MBCS" /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "LANG" /Yu"StdAfx.h" /FD /c
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "Z7_LANG" /D "_MBCS" /Yu"StdAfx.h" /FD /c
# ADD CPP /nologo /Gz /MD /W4 /WX /GX /O1 /D "NDEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "Z7_LANG" /D "Z7_LONG_PATH" /Yu"StdAfx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "NDEBUG"
@@ -127,8 +127,8 @@ LINK32=link.exe
# PROP Intermediate_Dir "DebugU"
# PROP Ignore_Export_Lib 1
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "LANG" /D "_MBCS" /Yu"StdAfx.h" /FD /GZ /c
# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "LANG" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "Z7_LANG" /D "_MBCS" /Yu"StdAfx.h" /FD /GZ /c
# ADD CPP /nologo /Gz /MTd /W4 /WX /Gm /GX /ZI /Od /D "_DEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "EXPLORER_EXPORTS" /D "Z7_LANG" /D "Z7_LONG_PATH" /Yu"StdAfx.h" /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x419 /d "_DEBUG"
@@ -270,6 +270,10 @@ SOURCE=..\FileManager\LangUtils.h
# End Source File
# Begin Source File
SOURCE=..\FileManager\MyCom2.h
# End Source File
# Begin Source File
SOURCE=..\FileManager\ProgramLocation.cpp
# End Source File
# Begin Source File
@@ -298,6 +302,18 @@ SOURCE=..\FileManager\RegistryUtils.h
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\..\C\7zTypes.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\7zWindows.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Compiler.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\CpuArch.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -307,6 +323,15 @@ SOURCE=..\..\..\..\C\CpuArch.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sort.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Sort.h
# End Source File
# Begin Source File
SOURCE=..\..\..\..\C\Threads.c
# SUBTRACT CPP /YX /Yc /Yu
# End Source File
@@ -320,6 +345,10 @@ SOURCE=..\..\..\..\C\Threads.h
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Common\Common.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\IntToString.cpp
# End Source File
# Begin Source File
@@ -356,6 +385,10 @@ SOURCE=..\..\..\Common\MyVector.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\MyWindows.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Common\NewHandler.cpp
# End Source File
# Begin Source File
@@ -440,6 +473,10 @@ SOURCE=..\..\..\Windows\Control\PropertyPage.h
# End Group
# Begin Source File
SOURCE=..\..\..\Windows\COM.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Windows\DLL.cpp
# End Source File
# Begin Source File
@@ -567,5 +604,9 @@ SOURCE=".\7-zip.dll.manifest"
SOURCE=.\ContextMenuFlags.h
# End Source File
# Begin Source File
SOURCE=..\FileManager\FM.ico
# End Source File
# End Target
# End Project

View File

@@ -1,7 +1,7 @@
// MyExplorerCommand.h
#ifndef __MY_EXPLORER_COMMAND_H
#define __MY_EXPLORER_COMMAND_H
#ifndef ZIP7_INC_MY_EXPLORER_COMMAND_H
#define ZIP7_INC_MY_EXPLORER_COMMAND_H
#if _MSC_VER >= 1910
#define USE_SYS_shobjidl_core
@@ -17,7 +17,9 @@
ShObjIdl.h : old Windows SDK
ShObjIdl_core.h : new Windows 10 SDK */
#ifndef Z7_OLD_WIN_SDK
#include <ShObjIdl.h>
#endif
#ifndef __IShellItem_INTERFACE_DEFINED__
#define __IShellItem_INTERFACE_DEFINED__

View File

@@ -18,12 +18,15 @@ void ShowErrorMessage(HWND window, LPCWSTR message)
void ShowErrorMessageHwndRes(HWND window, UINT resID)
{
ShowErrorMessage(window, LangString(resID));
UString s = LangString(resID);
if (s.IsEmpty())
s.Add_UInt32(resID);
ShowErrorMessage(window, s);
}
void ShowErrorMessageRes(UINT resID)
{
ShowErrorMessageHwndRes(0, resID);
ShowErrorMessageHwndRes(NULL, resID);
}
static void ShowErrorMessageDWORD(HWND window, DWORD errorCode)

View File

@@ -1,16 +1,16 @@
// MyMessages.h
#ifndef __MY_MESSAGES_H
#define __MY_MESSAGES_H
#ifndef ZIP7_INC_MY_MESSAGES_H
#define ZIP7_INC_MY_MESSAGES_H
#include "../../../Common/MyString.h"
void ShowErrorMessage(HWND window, LPCWSTR message);
inline void ShowErrorMessage(LPCWSTR message) { ShowErrorMessage(0, message); }
inline void ShowErrorMessage(LPCWSTR message) { ShowErrorMessage(NULL, message); }
void ShowErrorMessageHwndRes(HWND window, UInt32 langID);
void ShowErrorMessageRes(UInt32 langID);
void ShowLastErrorMessage(HWND window = 0);
void ShowLastErrorMessage(HWND window = NULL);
#endif

View File

@@ -67,8 +67,9 @@ static Func_RegDeleteKeyExW func_RegDeleteKeyExW;
static void Init_RegDeleteKeyExW()
{
if (!func_RegDeleteKeyExW)
func_RegDeleteKeyExW = (Func_RegDeleteKeyExW)
(void *)GetProcAddress(GetModuleHandleW(L"advapi32.dll"), "RegDeleteKeyExW");
func_RegDeleteKeyExW = Z7_GET_PROC_ADDRESS(
Func_RegDeleteKeyExW, GetModuleHandleW(L"advapi32.dll"),
"RegDeleteKeyExW");
}
#define INIT_REG_WOW if (wow != 0) Init_RegDeleteKeyExW();
@@ -205,7 +206,7 @@ LONG SetContextMenuHandler(bool setMode, const UString &path, UInt32 wow)
if (setMode)
for (unsigned i = 0; i < 2; i++)
{
for (unsigned k = 0; k < ARRAY_SIZE(k_shellex_Prefixes); k++)
for (unsigned k = 0; k < Z7_ARRAY_SIZE(k_shellex_Prefixes); k++)
{
CSysString s (k_shellex_Prefixes[k]);
s += (i == 0 ? k_KeyPostfix_ContextMenu : k_KeyPostfix_DragDrop);

View File

@@ -1,7 +1,7 @@
// RegistryContextMenu.h
#ifndef __REGISTRY_CONTEXT_MENU_H
#define __REGISTRY_CONTEXT_MENU_H
#ifndef ZIP7_INC_REGISTRY_CONTEXT_MENU_H
#define ZIP7_INC_REGISTRY_CONTEXT_MENU_H
#ifndef UNDER_CE

View File

@@ -1,14 +1,6 @@
// StdAfx.h
#ifndef __STDAFX_H
#define __STDAFX_H
// #define _WIN32_WINNT 0x0400
#define _WIN32_WINNT 0x0500
#define WINVER _WIN32_WINNT
#include "../../../Common/Common.h"
#include <ShlObj.h>
#if _MSC_VER >= 1800
#pragma warning(disable : 4464) // relative include path contains '..'
#endif
#include "../FileManager/StdAfx.h"

View File

@@ -1,13 +1,13 @@
PROG = 7-zip.dll
DEF_FILE = Explorer.def
CFLAGS = $(CFLAGS) \
-DLANG \
-DZ7_LANG \
!IFDEF UNDER_CE
LIBS = $(LIBS) Commctrl.lib
!ELSE
LIBS = $(LIBS) htmlhelp.lib comdlg32.lib Mpr.lib Gdi32.lib
CFLAGS = $(CFLAGS) -DWIN_LONG_PATH
CFLAGS = $(CFLAGS) -DZ7_LONG_PATH
!ENDIF
EXPLORER_OBJS = \
@@ -70,6 +70,7 @@ FM_OBJS = \
C_OBJS = \
$O\CpuArch.obj \
$O\Sort.obj \
$O\Threads.obj \
!include "../../7zip.mak"

View File

@@ -10,4 +10,6 @@
#define IDS_CONTEXT_COMPRESS_EMAIL 2329
#define IDS_CONTEXT_COMPRESS_TO_EMAIL 2330
#define IDS_SELECT_FILES 3015
#define IDB_MENU_LOGO 190

View File

@@ -7,4 +7,4 @@ MY_VERSION_INFO_DLL("7-Zip Shell Extension", "7-zip")
1 24 MOVEABLE PURE "7-zip.dll.manifest"
#endif
IDI_ICON ICON "..\FileManager\FM.ico"
IDI_ICON ICON "../FileManager/FM.ico"

View File

@@ -13,6 +13,7 @@ BEGIN
IDS_CONTEXT_COMPRESS_TO "Add to {0}"
IDS_CONTEXT_COMPRESS_EMAIL "Compress and email..."
IDS_CONTEXT_COMPRESS_TO_EMAIL "Compress to {0} and email"
IDS_SELECT_FILES "You must select one or more files"
END
IDB_MENU_LOGO BITMAP "../../UI/Explorer/MenuLogo.bmp"