-
Notifications
You must be signed in to change notification settings - Fork 844
Remove considerations for Windows 2000 and Windows Vista #2667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Avasam
wants to merge
3
commits into
mhammond:main
Choose a base branch
from
Avasam:Remove-considerations-for-Windows-2000-and-Windows-Vista
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+86
−339
Open
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1422,7 +1422,6 @@ static PyObject *PySHGetFolderPath(PyObject *self, PyObject *args) | |
| } | ||
|
|
||
| // @pymethod |shell|SHSetFolderPath|Sets the location of one of the special folders | ||
| // @comm This function is only available on Windows 2000 or later | ||
| static PyObject *PySHSetFolderPath(PyObject *self, PyObject *args) | ||
| { | ||
| int csidl; | ||
|
|
@@ -2631,11 +2630,6 @@ static PyObject *PyAssocCreate(PyObject *self, PyObject *args) | |
| // interface. | ||
| static PyObject *PyAssocCreateForClasses(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. kinda like the above, I think I'd rather just avoid using the function pointer entirely (and ditto below) |
||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnAssocCreateForClasses == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *ret = NULL; | ||
| PyObject *obClasses, *obiid; | ||
| if (!PyArg_ParseTuple(args, "OO:AssocCreateForClasses", &obClasses, &obiid)) | ||
|
|
@@ -2803,11 +2797,6 @@ done: { | |
| // defaults can be further configured via the IDefaultExtractIconInit interface. | ||
| static PyObject *PySHCreateDefaultExtractIcon(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateDefaultExtractIcon == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| // be lazy - don't take IID as a param! | ||
| if (!PyArg_ParseTuple(args, ":SHCreateDefaultExtractIcon")) | ||
| return NULL; | ||
|
|
@@ -2825,11 +2814,6 @@ static PyObject *PySHCreateDefaultExtractIcon(PyObject *self, PyObject *args) | |
| // @pymethod <o PyIUnknown>|shell|SHCreateDataObject| | ||
| static PyObject *PySHCreateDataObject(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateDataObject == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *ret = NULL; | ||
| PyObject *obParent; | ||
| PyObject *obChildren; | ||
|
|
@@ -2879,11 +2863,6 @@ static PyObject *PySHCreateDataObject(PyObject *self, PyObject *args) | |
| // @pymethod <o PyIUnknown>|shell|SHCreateDefaultContextMenu| | ||
| static PyObject *PySHCreateDefaultContextMenu(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateDefaultContextMenu == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *ret = NULL; | ||
| PyObject *obdcm, *obiid; | ||
| IID iid = IID_IContextMenu; | ||
|
|
@@ -2917,10 +2896,6 @@ static PyObject *PySHCreateDefaultContextMenu(PyObject *self, PyObject *args) | |
| // @pymethod str|shell|SHGetNameFromIDList|Retrieves the display name of an item from an ID list. | ||
| static PyObject *PySHGetNameFromIDList(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHGetNameFromIDList == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
| PyObject *ret = NULL; | ||
| PyObject *obpidl; | ||
| SIGDN flags; | ||
|
|
@@ -2954,11 +2929,6 @@ static PyObject *PySHGetNameFromIDList(PyObject *self, PyObject *args) | |
| // @pymethod <o PyIShellItemArray>|shell|SHCreateShellItemArray|Creates a Shell item array object. | ||
| static PyObject *PySHCreateShellItemArray(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateShellItemArray == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *ret = NULL; | ||
| PyObject *obParent; | ||
| PyObject *obChildren; | ||
|
|
@@ -3006,11 +2976,6 @@ static PyObject *PySHCreateShellItemArray(PyObject *self, PyObject *args) | |
| // interface that contains a list of items (eg CF_HDROP) | ||
| static PyObject *PySHCreateShellItemArrayFromDataObject(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateShellItemArrayFromDataObject == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *ret = NULL; | ||
| PyObject *obdo; | ||
| PyObject *obiid = Py_None; | ||
|
|
@@ -3046,11 +3011,6 @@ static PyObject *PySHCreateShellItemArrayFromDataObject(PyObject *self, PyObject | |
| // item identifiers | ||
| static PyObject *PySHCreateShellItemArrayFromIDLists(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateShellItemArrayFromIDLists == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *ret = NULL; | ||
| PyObject *obpidls; | ||
| PCIDLIST_ABSOLUTE_ARRAY pidls = NULL; | ||
|
|
@@ -3084,11 +3044,6 @@ static PyObject *PySHCreateShellItemArrayFromIDLists(PyObject *self, PyObject *a | |
| // item | ||
| static PyObject *PySHCreateShellItemArrayFromShellItem(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateShellItemArrayFromShellItem == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *obsi; | ||
| IShellItem *isi = NULL; | ||
| IID iid = IID_IShellItemArray; | ||
|
|
@@ -3116,10 +3071,6 @@ static PyObject *PySHCreateShellItemArrayFromShellItem(PyObject *self, PyObject | |
| // object from a PIDL. Can also create <o PyIShellItem2> objects. | ||
| static PyObject *PySHCreateItemFromIDList(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateItemFromIDList == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
| PyObject *ret = NULL; | ||
| PyObject *obpidl; | ||
| IID iid = IID_IShellItem; | ||
|
|
@@ -3151,11 +3102,6 @@ static PyObject *PySHCreateItemFromIDList(PyObject *self, PyObject *args) | |
| // parsing name. | ||
| static PyObject *PySHCreateItemFromParsingName(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateItemFromParsingName == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *ret = NULL; | ||
| PyObject *obname, *obctx, *obiid; | ||
| // @pyparm str|name||The display name of the item to create, eg a file path | ||
|
|
@@ -3203,11 +3149,6 @@ static PyObject *PySHCreateItemFromParsingName(PyObject *self, PyObject *args) | |
| // relative parsing name. | ||
| static PyObject *PySHCreateItemFromRelativeName(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateItemFromRelativeName == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *ret = NULL; | ||
| PyObject *obname, *obctx, *obiid, *obparent; | ||
| // @pyparm <o PyIShellItem>|Parent||Shell item interface on the parent folder | ||
|
|
@@ -3267,11 +3208,6 @@ static PyObject *PySHCreateItemFromRelativeName(PyObject *self, PyObject *args) | |
| // inside a known folder. | ||
| static PyObject *PySHCreateItemInKnownFolder(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateItemInKnownFolder == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| DWORD flags; | ||
| PyObject *obname; | ||
| IID riid = IID_IShellItem; | ||
|
|
@@ -3302,10 +3238,6 @@ static PyObject *PySHCreateItemInKnownFolder(PyObject *self, PyObject *args) | |
| // ID. | ||
| static PyObject *PySHCreateItemWithParent(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHCreateItemWithParent == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
| PyObject *ret = NULL; | ||
| PyObject *obpidlparent, *obsfparent, *obpidl; | ||
| IID riid = IID_IShellItem; | ||
|
|
@@ -3352,11 +3284,6 @@ static PyObject *PySHCreateItemWithParent(PyObject *self, PyObject *args) | |
| // @pymethod <o PyIDL>|shell|SHGetIDListFromObject|Retrieves the PIDL of an object. | ||
| static PyObject *PySHGetIDListFromObject(PyObject *self, PyObject *args) | ||
| { | ||
| // @comm This function is only available on Vista and later; a | ||
| // COM exception with E_NOTIMPL will be thrown if the function can't be located. | ||
| if (pfnSHGetIDListFromObject == NULL) | ||
| return PyCom_BuildPyException(E_NOTIMPL); | ||
|
|
||
| PyObject *ret = NULL; | ||
| PyObject *ob; | ||
|
|
||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't hate these comments because they help explain why there is a function pointer used. Removing the comment removes all context. I'm fine with updating the comment to be current and supply the context, or to remove the function pointer entirely.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add back or modify the comment.Edit: this file only contained a single
CHECK_PFNusage, removed along with comment.Anyway I realized it later, but I think all these
CHECK_PFNmacros can be removed (looks like they're all for functions that should now always exist at build and runtime).But I'd do that in its own PR. The main concern there will be to not accidentally remove cygwin workaround/support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right - I was trying to suggest that this means we can remove the function pointers entirely rather than just the null checks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what I ended up doing. Which rendered the line
CHECK_PFN(SHGetPropertyStoreForWindow)dead code, so I removed it. Making the macroCHECK_PFN(in this file) unused, so I removed it.