Skip to content

Commit

Permalink
Discard changes to com/win32comext/shell/src/shell.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Oct 27, 2024
1 parent 81d2fd5 commit eb95661
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions com/win32comext/shell/src/shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2532,15 +2532,15 @@ static PyObject *PyShellExecuteEx(PyObject *self, PyObject *args, PyObject *kw)

static char *kw_items[] = {
"fMask", "hwnd", "lpVerb", "lpFile", "lpParameters", "lpDirectory", "nShow",
"lpIDList", "lpClass", "hkeyClass", "dwHotKey", "hMonitor", NULL,
"lpIDList", "lpClass", "hkeyClass", "dwHotKey", "hIcon", "hMonitor", NULL,
};
PyObject *obhwnd = Py_None, *obVerb = NULL, *obFile = NULL, *obParams = NULL;
PyObject *obDirectory = NULL, *obIDList = NULL, *obClass = NULL;
PyObject *obhkeyClass = NULL, *obHotKey = NULL, PyObject *obhMonitor = NULL;
PyObject *obhkeyClass = NULL, *obHotKey = NULL, *obhIcon = NULL;
PyObject *obhMonitor = NULL;
// @pyparm int|fMask|0|The default mask for the structure. Other
// masks may be added based on what paramaters are supplied.
if (!PyArg_ParseTupleAndKeywords(args, kw, "|lOOOOOlOOOOO", kw_items,
&info.fMask, // @pyparm int|fMask|0|
if (!PyArg_ParseTupleAndKeywords(args, kw, "|lOOOOOlOOOOOO", kw_items, &info.fMask,
&obhwnd, // @pyparm <o PyHANDLE>|hwnd|0|
&obVerb, // @pyparm string|lpVerb||
&obFile, // @pyparm string|lpFile||
Expand All @@ -2551,6 +2551,7 @@ static PyObject *PyShellExecuteEx(PyObject *self, PyObject *args, PyObject *kw)
&obClass, // @pyparm string|obClass||
&obhkeyClass, // @pyparm int|hkeyClass||
&obHotKey, // @pyparm int|dwHotKey||
&obhIcon, // @pyparm <o PyHANDLE>|hIcon||
&obhMonitor)) // @pyparm <o PyHANDLE>|hMonitor||
goto done;
if (!PyWinObject_AsHANDLE(obhwnd, (HANDLE *)&info.hwnd))
Expand Down Expand Up @@ -2584,6 +2585,17 @@ static PyObject *PyShellExecuteEx(PyObject *self, PyObject *args, PyObject *kw)
if (PyErr_Occurred())
goto done;
}
if (obhIcon) {
// SEE_MASK_ICON is defined around 'if (NTDDI_VERSION < NTDDI_LONGHORN)' and commented as 'not used'
#ifndef SEE_MASK_ICON
PyErr_SetString(PyExc_NotImplementedError, "SEE_MASK_ICON not declared on this platform");
goto done;
#else
info.fMask |= SEE_MASK_ICON;
if (!PyWinObject_AsHANDLE(obhIcon, &info.hIcon))
goto done;
#endif
}
if (obhMonitor) {
info.fMask |= SEE_MASK_HMONITOR;
if (!PyWinObject_AsHANDLE(obhMonitor, &info.hMonitor))
Expand Down

0 comments on commit eb95661

Please sign in to comment.