Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ https://mhammond.github.io/pywin32_installers.html .

Coming in build 310, as yet unreleased
--------------------------------------
* Drop support for Vista, set Windows 7 as the minimal Windows version. (#, @Avasam)
* Restores many IIDs in `win32com(ext).shell.shell`. See #2486 for details.

Build 309, released 2025/03/09
------------------------------
Expand Down
5 changes: 0 additions & 5 deletions com/win32comext/shell/src/PyIApplicationDestinations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "shell_pch.h"

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

#include "PyIApplicationDestinations.h"

// @doc - This file contains autoduck documentation
Expand Down Expand Up @@ -90,7 +87,6 @@ PyObject *PyIApplicationDestinations::RemoveAllDestinations(PyObject *self, PyOb
}

// @object PyIApplicationDestinations|Allows an application to removed items from its jump lists
// @comm Available on Windows 7 and later
static struct PyMethodDef PyIApplicationDestinations_methods[] = {
{"SetAppID", PyIApplicationDestinations::SetAppID,
1}, // @pymeth SetAppID|Specifies the application whose jump list is to be accessed
Expand All @@ -103,4 +99,3 @@ static struct PyMethodDef PyIApplicationDestinations_methods[] = {
PyComTypeObject PyIApplicationDestinations::type("PyIApplicationDestinations", &PyIUnknown::type,
sizeof(PyIApplicationDestinations), PyIApplicationDestinations_methods,
GET_PYCOM_CTOR(PyIApplicationDestinations));
#endif // WINVER
4 changes: 0 additions & 4 deletions com/win32comext/shell/src/PyIApplicationDestinations.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Requires Windows 7 SDK to build
#if WINVER >= 0x0601
// This file declares the IApplicationDestinations Interface for Python.
// Generated by makegw.py
// ---------------------------------------------------
Expand All @@ -21,5 +19,3 @@ class PyIApplicationDestinations : public PyIUnknown {
PyIApplicationDestinations(IUnknown *pdisp);
~PyIApplicationDestinations();
};

#endif // WINVER
6 changes: 0 additions & 6 deletions com/win32comext/shell/src/PyIApplicationDocumentLists.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "shell_pch.h"

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

#include "PyIApplicationDocumentLists.h"

// @doc - This file contains autoduck documentation
Expand Down Expand Up @@ -72,7 +69,6 @@ PyObject *PyIApplicationDocumentLists::GetList(PyObject *self, PyObject *args)
}

// @object PyIApplicationDocumentLists|Interface used to retrieve the jump lists for an application
// @comm Available on Windows 7 and later
static struct PyMethodDef PyIApplicationDocumentLists_methods[] = {
{"SetAppID", PyIApplicationDocumentLists::SetAppID,
1}, // @pymeth SetAppID|Specifies the application whose jump list is to be accessed
Expand All @@ -83,5 +79,3 @@ PyComTypeObject PyIApplicationDocumentLists::type("PyIApplicationDocumentLists",
sizeof(PyIApplicationDocumentLists),
PyIApplicationDocumentLists_methods,
GET_PYCOM_CTOR(PyIApplicationDocumentLists));

#endif // WINVER
5 changes: 0 additions & 5 deletions com/win32comext/shell/src/PyIApplicationDocumentLists.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

// This file declares the IApplicationDocumentLists Interface for Python.
// Generated by makegw.py
// ---------------------------------------------------
Expand All @@ -21,5 +18,3 @@ class PyIApplicationDocumentLists : public PyIUnknown {
PyIApplicationDocumentLists(IUnknown *pdisp);
~PyIApplicationDocumentLists();
};

#endif // WINVER
6 changes: 0 additions & 6 deletions com/win32comext/shell/src/PyICustomDestinationList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "shell_pch.h"

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

#include "PyICustomDestinationList.h"

// @doc - This file contains autoduck documentation
Expand Down Expand Up @@ -228,7 +225,6 @@ PyObject *PyICustomDestinationList::AbortList(PyObject *self, PyObject *args)
}

// @object PyICustomDestinationList|Interface used to customize an application's jump list
// @comm Requires Windows 7 or later
static struct PyMethodDef PyICustomDestinationList_methods[] = {
{"SetAppID", PyICustomDestinationList::SetAppID,
1}, // @pymeth SetAppID|Specifies the taskbar identifier for the jump list
Expand All @@ -251,5 +247,3 @@ static struct PyMethodDef PyICustomDestinationList_methods[] = {
PyComTypeObject PyICustomDestinationList::type("PyICustomDestinationList", &PyIUnknown::type,
sizeof(PyICustomDestinationList), PyICustomDestinationList_methods,
GET_PYCOM_CTOR(PyICustomDestinationList));

#endif // WINVER
5 changes: 0 additions & 5 deletions com/win32comext/shell/src/PyICustomDestinationList.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
//
// Interface Declaration

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

class PyICustomDestinationList : public PyIUnknown {
public:
MAKE_PYCOM_CTOR(PyICustomDestinationList);
Expand All @@ -28,5 +25,3 @@ class PyICustomDestinationList : public PyIUnknown {
PyICustomDestinationList(IUnknown *pdisp);
~PyICustomDestinationList();
};

#endif // WINVER
5 changes: 0 additions & 5 deletions com/win32comext/shell/src/PyIObjectArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "shell_pch.h"

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

#include "PyIObjectArray.h"

// @doc - This file contains autoduck documentation
Expand Down Expand Up @@ -67,5 +64,3 @@ static struct PyMethodDef PyIObjectArray_methods[] = {

PyComTypeObject PyIObjectArray::type("PyIObjectArray", &PyIUnknown::type, sizeof(PyIObjectArray),
PyIObjectArray_methods, GET_PYCOM_CTOR(PyIObjectArray));

#endif // WINVER
5 changes: 0 additions & 5 deletions com/win32comext/shell/src/PyIObjectArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
//
// Interface Declaration

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

class PyIObjectArray : public PyIUnknown {
public:
MAKE_PYCOM_CTOR(PyIObjectArray);
Expand All @@ -21,5 +18,3 @@ class PyIObjectArray : public PyIUnknown {
PyIObjectArray(IUnknown *pdisp);
~PyIObjectArray();
};

#endif // WINVER
5 changes: 0 additions & 5 deletions com/win32comext/shell/src/PyIObjectCollection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "shell_pch.h"

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

#include "PyIObjectArray.h"
#include "PyIObjectCollection.h"

Expand Down Expand Up @@ -124,5 +121,3 @@ PyComTypeObject PyIObjectCollection::type("PyIObjectCollection",
&PyIObjectArray::type, // @base PyIObjectCollection|PyIObjectArray
sizeof(PyIObjectCollection), PyIObjectCollection_methods,
GET_PYCOM_CTOR(PyIObjectCollection));

#endif // WINVER
5 changes: 0 additions & 5 deletions com/win32comext/shell/src/PyIObjectCollection.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
//
// Interface Declaration

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

class PyIObjectCollection : public PyIObjectArray {
public:
MAKE_PYCOM_CTOR(PyIObjectCollection);
Expand All @@ -23,5 +20,3 @@ class PyIObjectCollection : public PyIObjectArray {
PyIObjectCollection(IUnknown *pdisp);
~PyIObjectCollection();
};

#endif // WINVER
6 changes: 0 additions & 6 deletions com/win32comext/shell/src/PyIShellLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

#include "shell_pch.h"

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

#include "PyIShellLibrary.h"

// @doc - This file contains autoduck documentation
Expand Down Expand Up @@ -431,7 +428,6 @@ PyObject *PyIShellLibrary::SaveInKnownFolder(PyObject *self, PyObject *args)
}

// @object PyIShellLibrary|Interface used to access Libraries
// @comm Requires Windows 7 or later
static struct PyMethodDef PyIShellLibrary_methods[] = {
{"LoadLibraryFromItem", PyIShellLibrary::LoadLibraryFromItem,
1}, // @pymeth LoadLibraryFromItem|Loads an existing library file
Expand Down Expand Up @@ -463,5 +459,3 @@ static struct PyMethodDef PyIShellLibrary_methods[] = {

PyComTypeObject PyIShellLibrary::type("PyIShellLibrary", &PyIUnknown::type, sizeof(PyIShellLibrary),
PyIShellLibrary_methods, GET_PYCOM_CTOR(PyIShellLibrary));

#endif // WINVER
5 changes: 0 additions & 5 deletions com/win32comext/shell/src/PyIShellLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
//
// Interface Declaration

// Requires Windows 7 SDK to build
#if WINVER >= 0x0601

class PyIShellLibrary : public PyIUnknown {
public:
MAKE_PYCOM_CTOR(PyIShellLibrary);
Expand Down Expand Up @@ -36,5 +33,3 @@ class PyIShellLibrary : public PyIUnknown {
PyIShellLibrary(IUnknown *pdisp);
~PyIShellLibrary();
};

#endif // WINVER
24 changes: 1 addition & 23 deletions com/win32comext/shell/src/shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ generates Windows .hlp files.
#include "PyITransferMediumItem.h"
#include "PyIIdentityName.h"

// These Require Windows 7 SDK to build
#include "PyIEnumObjects.h"
#include "PyIApplicationDocumentLists.h"
#include "PyIApplicationDestinations.h"
Expand Down Expand Up @@ -1492,7 +1491,7 @@ static PyObject *PySHGetFolderLocation(PyObject *self, PyObject *args)

// @pymethod |shell|SHAddToRecentDocs|Adds a document to the shell's list of recently used documents or clears all
// documents from the list. The user gains access to the list through the Start menu of the Windows taskbar.
// @comm On Windows 7, the entry is also added to the application's jump list.
// @comm The entry is also added to the application's jump list.
// @pyseeapi SHAddToRecentDocs
// @comm The underlying API function has no return value, and therefore no way to indicate failure.
static PyObject *PySHAddToRecentDocs(PyObject *self, PyObject *args)
Expand Down Expand Up @@ -1557,8 +1556,6 @@ static PyObject *PySHAddToRecentDocs(PyObject *self, PyObject *args)
PyObject_FreePIDL(buf);
break;
}
#if WINVER >= 0x0601
// Introduced in Windows 7
case SHARD_APPIDINFO: {
// @flag SHARD_APPIDINFO|Tuple of (<o PyIShellItem>, str), where str is an AppID
SHARDAPPIDINFO buf;
Expand Down Expand Up @@ -1639,7 +1636,6 @@ static PyObject *PySHAddToRecentDocs(PyObject *self, PyObject *args)
PY_INTERFACE_POSTCALL;
break;
}
#endif // WINVER
default:
PyErr_SetString(PyExc_NotImplementedError, "SHARD value not supported");
return NULL;
Expand Down Expand Up @@ -3520,7 +3516,6 @@ static PyObject *PySHCreateStreamOnFileEx(PyObject *self, PyObject *args, PyObje
static PyObject *PySetCurrentProcessExplicitAppUserModelID(PyObject *self, PyObject *args)
{
// @comm Should be used early in process startup before creating any windows
// @comm Requires Windows 7 or later
// @pyparm str|AppID||The Application User Model ID used to group taskbar buttons
if (pfnSetCurrentProcessExplicitAppUserModelID == NULL)
return PyCom_BuildPyException(E_NOTIMPL);
Expand All @@ -3543,7 +3538,6 @@ static PyObject *PySetCurrentProcessExplicitAppUserModelID(PyObject *self, PyObj

// @pymethod str|shell|GetCurrentProcessExplicitAppUserModelID|Retrieves the current taskbar identifier
// @comm Will only retrieve an identifier if set by the application, not a system-assigned default.
// @comm Requires Windows 7 or later
static PyObject *PyGetCurrentProcessExplicitAppUserModelID(PyObject *self, PyObject *args)
{
if (pfnGetCurrentProcessExplicitAppUserModelID == NULL)
Expand Down Expand Up @@ -3805,8 +3799,6 @@ static const PyCom_InterfaceSupportInfo g_interfaceSupportData[] = {
PYCOM_INTERFACE_FULL(CurrentItem), // based on IRelatedItem with no extra methods
PYCOM_INTERFACE_FULL(DisplayItem), // based on IRelatedItem with no extra methods
PYCOM_INTERFACE_FULL(IdentityName), // based on IRelatedItem with no extra methods
// These require Windows 7 SDK to build
#if WINVER >= 0x0601
PYCOM_INTERFACE_CLIENT_ONLY(EnumObjects),
PYCOM_INTERFACE_CLIENT_ONLY(ApplicationDocumentLists),
PYCOM_INTERFACE_CLSID_ONLY(ApplicationDocumentLists),
Expand All @@ -3821,7 +3813,6 @@ static const PyCom_InterfaceSupportInfo g_interfaceSupportData[] = {
PYCOM_INTERFACE_CLIENT_ONLY(CustomDestinationList),
PYCOM_INTERFACE_CLSID_ONLY(ShellLibrary),
PYCOM_INTERFACE_CLIENT_ONLY(ShellLibrary),
#endif
};

static int AddConstant(PyObject *dict, const char *key, long value)
Expand Down Expand Up @@ -4115,8 +4106,6 @@ PYWIN_MODULE_INIT_FUNC(shell)
ADD_IID(FOLDERID_Contacts);
ADD_IID(FOLDERID_SidebarParts);
ADD_IID(FOLDERID_SidebarDefaultParts);
// Removed in Windows 7 SDK
// ADD_IID(FOLDERID_TreeProperties);
ADD_IID(FOLDERID_PublicGameTasks);
ADD_IID(FOLDERID_GameTasks);
ADD_IID(FOLDERID_SavedGames);
Expand All @@ -4127,8 +4116,6 @@ PYWIN_MODULE_INIT_FUNC(shell)
ADD_IID(FOLDERID_UsersFiles);
ADD_IID(FOLDERID_SearchHome);
ADD_IID(FOLDERID_OriginalImages);
#if WINVER >= 0x0601
// Added in Windows 7 SDK
ADD_IID(FOLDERID_DeviceMetadataStore);
ADD_IID(FOLDERID_DocumentsLibrary);
ADD_IID(FOLDERID_HomeGroup);
Expand All @@ -4145,7 +4132,6 @@ PYWIN_MODULE_INIT_FUNC(shell)
ADD_IID(FOLDERID_UserProgramFilesCommon);
ADD_IID(FOLDERID_UsersLibraries);
ADD_IID(FOLDERID_VideosLibrary);
#endif // WINVER

// Known folder types
ADD_IID(FOLDERTYPEID_Invalid);
Expand All @@ -4161,13 +4147,6 @@ PYWIN_MODULE_INIT_FUNC(shell)
ADD_IID(FOLDERTYPEID_Contacts);
ADD_IID(FOLDERTYPEID_NetworkExplorer);
ADD_IID(FOLDERTYPEID_UserFiles);
// Removed in Windows 7 SDK
// ADD_IID(FOLDERTYPEID_Library);
// ADD_IID(FOLDERTYPEID_MusicDetails);
// ADD_IID(FOLDERTYPEID_MusicIcons);
// ADD_IID(FOLDERTYPEID_NotSpecified);
#if WINVER >= 0x0601
// Added in Windows 7 SDK
ADD_IID(FOLDERTYPEID_Communications);
ADD_IID(FOLDERTYPEID_Generic);
ADD_IID(FOLDERTYPEID_GenericLibrary);
Expand All @@ -4184,7 +4163,6 @@ PYWIN_MODULE_INIT_FUNC(shell)
ADD_IID(FOLDERTYPEID_StartMenu);
ADD_IID(FOLDERTYPEID_UsersLibraries);
ADD_IID(FOLDERTYPEID_Videos);
#endif // WINVER

// ??? The shell passes this resource type to IShellResources.OpenResource,
// but it doesn't seem to be defined anywhere ???
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ def __init__(
# CRYPT_DECRYPT_MESSAGE_PARA.dwflags is in an ifdef for some unknown reason
# See github PR #1444 for more details...
("CRYPT_DECRYPT_MESSAGE_PARA_HAS_EXTRA_FIELDS", None),
# Minimum Windows version supported (Vista / Windows Server 2008)
# Minimum Windows version supported (Windows 7 / Windows Server 2008)
# https://learn.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
("_WIN32_WINNT", hex(0x0600)),
("WINVER", hex(0x0600)),
("_WIN32_WINNT", hex(0x0601)),
("WINVER", hex(0x0601)),
)
)
self.pch_header = pch_header
Expand Down