Skip to content

Commit

Permalink
Removed considerations for Windows 95/98/ME
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam committed Oct 13, 2024
1 parent c670569 commit 2935175
Show file tree
Hide file tree
Showing 31 changed files with 48 additions and 85 deletions.
5 changes: 4 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ https://mhammond.github.io/pywin32_installers.html.

Coming in build 309, as yet unreleased
--------------------------------------

* Removed considerations for Windows 95/98/ME (#2400, @Avasam)
This removes the following constants:
* `win32con.FILE_ATTRIBUTE_ATOMIC_WRITE`
* `win32con.FILE_ATTRIBUTE_XACTION_WRITE`
* Remove temporary `win32com.server.policy` reexports hack (#2344, @Avasam)
Import `DispatcherWin32trace` and `DispatcherTrace` from `win32com.server.dispatcher` instead.
* Fixed `win32timezone.TimeZoneInfo` initialization from a `[DYNAMIC_]TIME_ZONE_INFORMATION` (#2339, @Avasam)
Expand Down
2 changes: 0 additions & 2 deletions Pythonwin/doc/debugger/probs.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
<H1><IMG SRC="pythonwin.gif" WIDTH=64 HEIGHT=64>Pythonwin Debugger Known Problems </H1>
<P>This document lists the currently known problems with the pywin.debugger package. </P>
<P>You may also wish to view the <A HREF="index.html">debugger overview</A>, the <A HREF="tutorial.html">debugger tutorial</A>, or the <A HREF="general.html">general debugger documentation</A>. </P>
<H3>Exiting the debugger on Windows 95 sometimes causes a crash.</H3>
<P>There is a problem with the "hierlist" control on Windows 95. I don't know what it is. </P>
<H3>Closing the main debugger application while debugging may cause strange results. </H3>
<P>This is particularly true when debugging non-Pythonwin applications. I have made some efforts in this area, but it is pretty hard and complex. </P>
<P>Closing the debugger dialog, selecting "End/Close" from one of the property pages, or "Close" from the debugging toolbar should always work as expected. </P>
Expand Down
4 changes: 1 addition & 3 deletions Pythonwin/doc/debugger/tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ <H3>From the MS-DOS Prompt</H3>
<P>Change to the Pythonwin\pywin\debugger directory.</P>
<P>For Windows NT users, type:</P>
<CODE><P>fail.py&lt;enter&gt;</CODE> </P>
<P>Or Windows 95/98 (sob - you would hope that 98 would have fixed some of 95s dumbness!)</P>
<CODE><P>&lt;path to python.exe&gt;\python.exe fail.py</P>
</CODE><P>or</P>
<P>or</P>
<CODE><P>start fail.py</CODE> </P>
<H2>Using the Debugger</H2>
<P>If all goes well, you should see the debugger appear in a full GUI frame, with a particular line in fail.py highlighted. Part of the screen should look something like: </P>
Expand Down
1 change: 0 additions & 1 deletion Pythonwin/pywin/Demos/splittst.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ def OnCreateClient(self, cp, context):
self.v3.InsertItem(0, "Icon 1", 0)
self.v3.InsertItem(0, "Icon 2", 1)
self.v3.InsertItem(0, "Icon 3", 2)
# self.v3.Arrange(commctrl.LVA_DEFAULT) Hmmm - win95 aligns left always???
return 1

def OnDestroy(self, msg):
Expand Down
3 changes: 1 addition & 2 deletions Pythonwin/pywin/framework/dlgappcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ def OnPaint(self):
dc.DrawIcon((left, top), hIcon)
self.EndPaint(paintStruct)

# Only needed to provide a minimized icon (and this seems
# less important under win95/NT4
# Only needed to provide a minimized icon
def OnEraseBkgnd(self, dc):
if self.IsIconic():
return 1
Expand Down
7 changes: 0 additions & 7 deletions Pythonwin/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ <H2><a name="KnownProblems">Known Problems</a></H2>
<UL>
<LI>Some of the configuration options (eg, &quot;Docking Windows&quot;) do not
take affect until you restart Pythonwin. </LI>
<LI>Under Windows 9x, any attempt to use Pythonwin features from an MS-DOS
prompt seems to cause immediate death.&nbsp; This means that you can not use
the Pythonwin debugger for programs running under Python.exe on Windows
9x.&nbsp; You should still be able to use the debugger normally from inside
Pythonwin itself. </LI>
<LI>Pythonwin will occasionally crash upon exiting under Windows 9x. The crash is in
&quot;user.exe&quot; (old 16 bit code) which makes debugging difficult. It does not happen on Windows NT, so I'm stumped on this one. If someone could even just narrow it down to exactly what code will cause the crash at exit I would really appreciate it. </LI>
<LI>Some of the menu items are always grey.&nbsp; This functionality is simply not yet implemented in
Pythonwin. </LI>
</UL>
Expand Down
1 change: 0 additions & 1 deletion com/win32com/src/PythonCOM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ static CoSetCancelObjectfunc pfnCoSetCancelObject = NULL;
// WinXP or later
LPFNOBJECTFROMLRESULT pfnObjectFromLresult = NULL;

// May not be available on Windows 95, although I'm not sure that's even a concern anymore
typedef HRESULT(STDAPICALLTYPE *CoCreateInstanceExfunc)(REFCLSID, IUnknown *, DWORD, COSERVERINFO *, ULONG, MULTI_QI *);
static CoCreateInstanceExfunc pfnCoCreateInstanceEx = NULL;
typedef HRESULT(STDAPICALLTYPE *CoInitializeSecurityfunc)(PSECURITY_DESCRIPTOR, LONG, SOLE_AUTHENTICATION_SERVICE *,
Expand Down
4 changes: 2 additions & 2 deletions com/win32com/src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ HRESULT PyCom_CoInitializeEx(LPVOID reserved, DWORD dwInit)
CEnterLeaveFramework _celf;
if (g_bCoInitThreadHasInit && g_dwCoInitThread == GetCurrentThreadId())
return S_OK;
// Do a LoadLibrary, as the Ex version may not always exist
// on Win95.
// Do a LoadLibrary, as the Ex version may not always exist on Win95.
// TODO: We no longer support Windows 95, how should this code be updated ?
HMODULE hMod = GetModuleHandle(_T("ole32.dll"));
if (hMod == 0)
return E_HANDLE;
Expand Down
1 change: 0 additions & 1 deletion com/win32com/src/extensions/PyIType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ PyObject *pythoncom_unregistertypelib(PyObject *self, PyObject *args)
return NULL;

PY_INTERFACE_PRECALL;
// WARNING: Requires Win95 OSR2 or later!!!
HRESULT hr = UnRegisterTypeLib(clsid, major, minor, lcid, syskind);
PY_INTERFACE_POSTCALL;
if (FAILED(hr))
Expand Down
2 changes: 1 addition & 1 deletion com/win32com/src/include/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// are changed infrequently
//

// _WIN32_DCOM screws win95 and NT :-( However, we need to define this
// _WIN32_DCOM screws Windows NT :-( However, we need to define this
// so we don't lose all the constants etc that come with DCOM
//
#define _WIN32_DCOM
Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/ifilter/src/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// are changed infrequently
//

// _WIN32_DCOM screws win95 and NT :-( However, we need to define this
// _WIN32_DCOM screws Windows NT :-( However, we need to define this
// so we don't lose all the constants etc that come with DCOM
//
#define _WIN32_DCOM
Expand Down
10 changes: 5 additions & 5 deletions com/win32comext/shell/demos/IShellLinkDataList.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@
console_props = {
"Signature": shellcon.NT_CONSOLE_PROPS_SIG,
"InsertMode": True,
"FullScreen": False, ## True looks like "DOS Mode" from win98!
"FullScreen": False, # True looks like "DOS Mode" from win98!
"FontFamily": 54,
"CursorSize": 75, ## pct of character size
"CursorSize": 75, # pct of character size
"ScreenBufferSize": (152, 256),
"AutoPosition": False,
"FontSize": (4, 5),
"FaceName": "",
"HistoryBufferSize": 32,
"InputBufferSize": 0,
"QuickEdit": True,
"Font": 0, ## 0 should always be present, use win32console.GetNumberOfConsoleFonts() to find how many available
"Font": 0, # 0 should always be present, use win32console.GetNumberOfConsoleFonts() to find how many available
"FillAttribute": 7,
"PopupFillAttribute": 245,
"WindowSize": (128, 32),
"WindowOrigin": (0, 0),
"FontWeight": 400,
"HistoryNoDup": False,
"NumberOfHistoryBuffers": 32,
## ColorTable copied from a 'normal' console shortcut, with some obvious changes
## These do not appear to be documented. From experimentation, [0] is background, [7] is foreground text
# ColorTable copied from a 'normal' console shortcut, with some obvious changes
# These do not appear to be documented. From experimentation, [0] is background, [7] is foreground text
"ColorTable": (
255,
8388608,
Expand Down
2 changes: 0 additions & 2 deletions com/win32comext/shell/demos/servers/empty_volume_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ class EmptyVolumeCache:
_public_methods_ = IEmptyVolumeCache_Methods + IEmptyVolumeCache2_Methods

def Initialize(self, hkey, volume, flags):
# This should never be called, except on win98.
print("Unless we are on 98, Initialize call is unexpected!")
raise COMException(hresult=winerror.E_NOTIMPL)

def InitializeEx(self, hkey, volume, key_name, flags):
Expand Down
2 changes: 1 addition & 1 deletion com/win32comext/shell/shellcon.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
SSF_DOUBLECLICKINWEBVIEW = 128
SSF_SHOWATTRIBCOL = 256
SSF_DESKTOPHTML = 512
SSF_WIN95CLASSIC = 1024
SSF_WIN95CLASSIC = 1024 # Still exists
SSF_DONTPRETTYPATH = 2048
SSF_SHOWINFOTIP = 8192
SSF_MAPNETDRVBUTTON = 4096
Expand Down
5 changes: 3 additions & 2 deletions win32/Demos/rastest.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ def Connect(entryName, bUseCallback):
win32event.ResetEvent(callbackEvent)
else:
theCallback = None
# in order to *use* the username/password of a particular dun entry, one must
# explicitly get those params under win95....
# in order to *use* the username/password of a particular dun entry,
# one must explicitly get those params under Win95 ...
# TODO: We no longer support Windows 95, how should this code be updated ?
try:
dp, b = win32ras.GetEntryDialParams(None, entryName)
except:
Expand Down
2 changes: 1 addition & 1 deletion win32/Lib/commctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ICC_PROGRESS_CLASS = 32 # progress
ICC_HOTKEY_CLASS = 64 # hotkey
ICC_ANIMATE_CLASS = 128 # animate
ICC_WIN95_CLASSES = 255
ICC_WIN95_CLASSES = 255 # Load animate control, header, hot key, list-view, progress bar, status bar, tab, tooltip, toolbar, trackbar, tree-view, and up-down control classes.
ICC_DATE_CLASSES = 256 # month picker, date picker, time picker, updown
ICC_USEREX_CLASSES = 512 # comboex
ICC_COOL_CLASSES = 1024 # rebar (coolbar) control
Expand Down
4 changes: 0 additions & 4 deletions win32/Lib/win32con.py
Original file line number Diff line number Diff line change
Expand Up @@ -2152,10 +2152,6 @@ def SUBLANGID(lgid):
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 8192
FILE_ATTRIBUTE_ENCRYPTED = 16384
FILE_ATTRIBUTE_VIRTUAL = 65536
# These FILE_ATTRIBUTE_* flags are apparently old definitions from Windows 95
# and conflict with current values above - but they live on for b/w compat...
FILE_ATTRIBUTE_ATOMIC_WRITE = 512
FILE_ATTRIBUTE_XACTION_WRITE = 1024

FILE_NOTIFY_CHANGE_FILE_NAME = 1
FILE_NOTIFY_CHANGE_DIR_NAME = 2
Expand Down
2 changes: 1 addition & 1 deletion win32/Lib/win32gui_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ def EmptyMENUITEMINFO(mask=None, text_buf_size=512):
| win32con.MIIM_STATE
| win32con.MIIM_STRING
| win32con.MIIM_SUBMENU
| win32con.MIIM_TYPE
)
# Note: No MIIM_TYPE - this screws win2k/98.

if mask & win32con.MIIM_STRING:
text_buffer = _make_empty_text_buffer(text_buf_size)
Expand Down
3 changes: 1 addition & 2 deletions win32/Lib/win32timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ class TimeZoneInfo(datetime.tzinfo):
1
"""

# this key works for WinNT+, but not for the Win95 line.
tzRegKey = r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones"

def __init__(self, param=None, fix_standard_time=False):
Expand All @@ -519,7 +518,7 @@ def __init__(self, param=None, fix_standard_time=False):

def _FindTimeZoneKey(self):
"""Find the registry key for the time zone name (self.timeZoneName)."""
# for multi-language compatability, match the time zone name in the
# for multi-language compatibility, match the time zone name in the
# "Std" key of the time zone key.
zoneNames = dict(self._get_indexed_time_zone_keys("Std"))
# Also match the time zone key name itself, to be compatible with
Expand Down
2 changes: 1 addition & 1 deletion win32/help/process_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ <h1><a name="SUMMARY">SUMMARY</a></h1>
<h2><A NAME="Introduction">Introduction</A></h2>
<p>

To get process information for both NT and W2K (but not the 9x family)
To get process information,
you can use the Performance Data Helper library(PDH) available in the
SDK at microsoft's ftp site. It provides a convenient interface to
performance information stored fundamentally in the registry. The
Expand Down
2 changes: 1 addition & 1 deletion win32/scripts/regsetup.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ def RegisterShellInfo(searchPaths):
core path, you can avoid packages re-registering the same path.
-m filename -- Find and register the specific file name as a module.
Do not include a path on the filename!
--shell -- Register everything with the Win95/NT shell.
--shell -- Register everything with the NT shell.
--upackage name -- Unregister the package
--uapp name -- Unregister the app (identical to --upackage)
--umodule name -- Unregister the module
Expand Down
8 changes: 3 additions & 5 deletions win32/src/PySECURITY_ATTRIBUTES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ PYWINTYPES_EXPORT PyTypeObject PySECURITY_ATTRIBUTESType = {
// @comm On platforms that support security descriptor operations, SECURITY_DESCRIPTOR
// defaults to a blank security descriptor with no owner, group, dacl, or sacl.
// Set to None to use a NULL security descriptor instead.
// When PySECURITY_ATTRIBUTES is created on Windows 95/98/Me, SECURITY_DESCRIPTOR defaults
// to None and should not be changed.
// When SECURITY_DESCRIPTOR is not None, any of its methods can be invoked directly
// on the PySECURITY_ATTRIBUTES object

Expand All @@ -106,9 +104,9 @@ PySECURITY_ATTRIBUTES::PySECURITY_ATTRIBUTES(void)
m_sa.nLength = sizeof(SECURITY_ATTRIBUTES);
m_obSD = new PySECURITY_DESCRIPTOR(SECURITY_DESCRIPTOR_MIN_LENGTH);
m_sa.lpSecurityDescriptor = ((PySECURITY_DESCRIPTOR *)m_obSD)->GetSD();
// On win95/98/me (or any platform that doesn't have NT security) the
// initialization of the SECURITY_DESCRIPTOR should fail, leaving the
// sd NULL.
// On platforms that don't have NT security,
// the initialization of the SECURITY_DESCRIPTOR should fail,
// leaving the sd NULL.
if (m_sa.lpSecurityDescriptor == NULL) {
Py_DECREF(m_obSD);
Py_INCREF(Py_None);
Expand Down
12 changes: 4 additions & 8 deletions win32/src/PySECURITY_DESCRIPTOR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,18 +284,14 @@ BOOL PySECURITY_DESCRIPTOR::SetSD(PSECURITY_DESCRIPTOR psd)
if (this->m_psd)
free(this->m_psd);
DWORD sdsize = GetSecurityDescriptorLength(psd);
if (sdsize == 0) {
// GetSecurityDescriptorLength returns 0 on Win9x where the
// SECURITY_DESCRIPTOR stuff is not supported.
this->m_psd = NULL;
return TRUE;
}
else if (_IsSelfRelative(psd)) {
else if (_IsSelfRelative(psd))
{
this->m_psd = malloc(sdsize);
memcpy(this->m_psd, psd, sdsize);
return TRUE;
}
else {
else
{
// should be last-ditch fallback, everything should pass SD already in self-relative form
if (!_MakeSelfRelativeSD(psd, &(this->m_psd)))
return FALSE;
Expand Down
4 changes: 1 addition & 3 deletions win32/src/win32apimodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ static PyObject *PyDuplicateHandle(PyObject *self, PyObject *args)
}

// @pymethod int|win32api|GetHandleInformation|Retrieves a handle's flags.
// @comm Not available on Win98/Me
// @rdesc Returns a combination of HANDLE_FLAG_INHERIT, HANDLE_FLAG_PROTECT_FROM_CLOSE
static PyObject *PyGetHandleInformation(PyObject *self, PyObject *args)
{
Expand All @@ -249,7 +248,6 @@ static PyObject *PyGetHandleInformation(PyObject *self, PyObject *args)
}

// @pymethod |win32api|SetHandleInformation|Sets a handles's flags
// @comm Not available on Win98/Me
static PyObject *PySetHandleInformation(PyObject *self, PyObject *args)
{
CHECK_PFN(SetHandleInformation);
Expand Down Expand Up @@ -4007,7 +4005,7 @@ static PyObject *PyRegSetValueEx(PyObject *self, PyObject *args)
// @flag REG_QWORD_LITTLE_ENDIAN|A 64-bit number in little-endian format. This is equivalent to REG_QWORD.<nl>In
// little-endian format, a multi-byte value is stored in memory from the lowest byte (the little end) to the highest
// byte. For example, the value 0x12345678 is stored as (0x78 0x56 0x34 0x12) in little-endian format. Windows NT
// and Windows 95 are designed to run on little-endian computer architectures. A user may connect to computers that
// is designed to run on little-endian computer architectures. A user may connect to computers that
// have big-endian architectures, such as some UNIX systems.
// @flag REG_DWORD_BIG_ENDIAN|A 32-bit number in big-endian format.
// In big-endian format, a multi-byte value is stored in memory from the highest byte (the big end) to the lowest
Expand Down
12 changes: 2 additions & 10 deletions win32/src/win32clipboardmodule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -557,17 +557,9 @@ static PyObject *py_get_clipboard_sequence_number(PyObject *self, PyObject *args
DWORD rc;
typedef HRESULT(WINAPI * PFNGetClipboardSequenceNumber)();

// @comm This method is not available on some early Windows (eg 95) machines.
HMODULE hmod = LoadLibrary(TEXT("user32.dll"));
PFNGetClipboardSequenceNumber pfnGetClipboardSequenceNumber = NULL;
if (hmod)
pfnGetClipboardSequenceNumber =
(PFNGetClipboardSequenceNumber)GetProcAddress(hmod, "GetClipboardSequenceNumber");
if (pfnGetClipboardSequenceNumber == NULL) {
if (hmod)
FreeLibrary(hmod);
return PyErr_Format(PyExc_RuntimeError, "This version of Windows does not support this function");
}
PFNGetClipboardSequenceNumber pfnGetClipboardSequenceNumber =
(PFNGetClipboardSequenceNumber)GetProcAddress(hmod, "GetClipboardSequenceNumber");
Py_BEGIN_ALLOW_THREADS;
rc = (*pfnGetClipboardSequenceNumber)();
if (hmod)
Expand Down
2 changes: 1 addition & 1 deletion win32/src/win32file.i
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ PyHANDLE CreateFile(
// @flag OPEN_ALWAYS|Opens the file, if it exists. If the file does not exist, the function creates the file as if dwCreationDisposition were CREATE_NEW.
// @flag TRUNCATE_EXISTING|Opens the file. Once opened, the file is truncated so that its size is zero bytes. The calling process must open the file with at least GENERIC_WRITE access. The function fails if the file does not exist.
DWORD dwFlagsAndAttributes, // @pyparm int|flagsAndAttributes||file attributes
PyHANDLE INPUT_NULLOK // @pyparm <o PyHANDLE>|hTemplateFile||Specifies a handle with GENERIC_READ access to a template file. The template file supplies file attributes and extended attributes for the file being created. Under Win95, this must be 0, else an exception will be raised.
PyHANDLE INPUT_NULLOK // @pyparm <o PyHANDLE>|hTemplateFile||Specifies a handle with GENERIC_READ access to a template file. The template file supplies file attributes and extended attributes for the file being created.
);

// CreateIoCompletionPort gets special treatment due to its special result
Expand Down
5 changes: 2 additions & 3 deletions win32/src/win32gui.i
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,6 @@ static PyObject *PyTransparentBlt(PyObject *self, PyObject *args)

// @pyswig |MaskBlt|Combines the color data for the source and destination
// bitmaps using the specified mask and raster operation.
// @comm This function is not supported on Win9x.
// @pyseeapi MaskBlt
static PyObject *PyMaskBlt(PyObject *self, PyObject *args)
{
Expand Down Expand Up @@ -6982,8 +6981,8 @@ static PyObject *PySystemParametersInfo(PyObject *self, PyObject *args, PyObject
// @flag SPI_SETFASTTASKSWITCH|Unsupported (obsolete)
// @flag SPI_SETSCREENSAVERRUNNING|Unsupported (documented as internal use only)
// @flag SPI_SCREENSAVERRUNNING|Same as SPI_SETSCREENSAVERRUNNING
// @flag SPI_SETPENWINDOWS|Unsupported (only relevant for win95)
// @flag SPI_GETWINDOWSEXTENSION|Unsupported (only relevant for win95)
// @flag SPI_SETPENWINDOWS|Unsupported (only relevant for Win95)
// @flag SPI_GETWINDOWSEXTENSION|Unsupported (only relevant for Win95)
// @flag SPI_GETGRIDGRANULARITY|Unsupported (obsolete)
// @flag SPI_SETGRIDGRANULARITY|Unsupported (obsolete)
// @flag SPI_LANGDRIVER|Unsupported (use is not documented)
Expand Down
7 changes: 4 additions & 3 deletions win32/src/win32print/win32print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1909,13 +1909,11 @@ static PyObject *PyDeviceCapabilities(PyObject *self, PyObject *args)
// @flagh Capability|Returned value
switch (capability) {
// none of these use the output pointer, just the returned DWORD
case DC_BINADJUST:
case DC_COLLATE:
case DC_COPIES:
case DC_COLORDEVICE:
case DC_DUPLEX:
case DC_DRIVER:
case DC_EMF_COMPLIANT:
case DC_EXTRA:
case DC_FIELDS:
case DC_ORIENTATION:
Expand Down Expand Up @@ -2111,8 +2109,11 @@ static PyObject *PyDeviceCapabilities(PyObject *self, PyObject *args)
}
break;
}
// last 3 are 95/98/Me only
// https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/winddiui/nf-winddiui-drvdevicecapabilities
// Not used for NT-based operating systems.
case DC_BINADJUST:
case DC_DATATYPE_PRODUCED:
case DC_EMF_COMPLIANT:
case DC_MANUFACTURER:
case DC_MODEL:
default:
Expand Down
Loading

0 comments on commit 2935175

Please sign in to comment.