From 2935175be35de1c736b735dbd9780cd2eb4c7bb9 Mon Sep 17 00:00:00 2001
From: Avasam
Date: Sun, 13 Oct 2024 17:44:17 -0400
Subject: [PATCH] Removed considerations for Windows 95/98/ME
---
CHANGES.txt | 5 ++++-
Pythonwin/doc/debugger/probs.html | 2 --
Pythonwin/doc/debugger/tutorial.html | 4 +---
Pythonwin/pywin/Demos/splittst.py | 1 -
Pythonwin/pywin/framework/dlgappcore.py | 3 +--
Pythonwin/readme.html | 7 -------
com/win32com/src/PythonCOM.cpp | 1 -
com/win32com/src/dllmain.cpp | 4 ++--
com/win32com/src/extensions/PyIType.cpp | 1 -
com/win32com/src/include/stdafx.h | 2 +-
com/win32comext/ifilter/src/stdafx.h | 2 +-
com/win32comext/shell/demos/IShellLinkDataList.py | 10 +++++-----
.../shell/demos/servers/empty_volume_cache.py | 2 --
com/win32comext/shell/shellcon.py | 2 +-
win32/Demos/rastest.py | 5 +++--
win32/Lib/commctrl.py | 2 +-
win32/Lib/win32con.py | 4 ----
win32/Lib/win32gui_struct.py | 2 +-
win32/Lib/win32timezone.py | 3 +--
win32/help/process_info.html | 2 +-
win32/scripts/regsetup.py | 2 +-
win32/src/PySECURITY_ATTRIBUTES.cpp | 8 +++-----
win32/src/PySECURITY_DESCRIPTOR.cpp | 12 ++++--------
win32/src/win32apimodule.cpp | 4 +---
win32/src/win32clipboardmodule.cpp | 12 ++----------
win32/src/win32file.i | 2 +-
win32/src/win32gui.i | 5 ++---
win32/src/win32print/win32print.cpp | 7 ++++---
win32/src/win32process.i | 6 ++----
win32/src/win32rasmodule.cpp | 9 ++++-----
win32/src/win32trace.cpp | 2 +-
31 files changed, 48 insertions(+), 85 deletions(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index 0868cac2f..bdec09397 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -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)
diff --git a/Pythonwin/doc/debugger/probs.html b/Pythonwin/doc/debugger/probs.html
index 381af0dba..911553b00 100644
--- a/Pythonwin/doc/debugger/probs.html
+++ b/Pythonwin/doc/debugger/probs.html
@@ -10,8 +10,6 @@
Pythonwin Debugger Known Problems
This document lists the currently known problems with the pywin.debugger package.
You may also wish to view the debugger overview, the debugger tutorial, or the general debugger documentation.
-Exiting the debugger on Windows 95 sometimes causes a crash.
-There is a problem with the "hierlist" control on Windows 95. I don't know what it is.
Closing the main debugger application while debugging may cause strange results.
This is particularly true when debugging non-Pythonwin applications. I have made some efforts in this area, but it is pretty hard and complex.
Closing the debugger dialog, selecting "End/Close" from one of the property pages, or "Close" from the debugging toolbar should always work as expected.
diff --git a/Pythonwin/doc/debugger/tutorial.html b/Pythonwin/doc/debugger/tutorial.html
index b521d8f13..8f81fb4fb 100644
--- a/Pythonwin/doc/debugger/tutorial.html
+++ b/Pythonwin/doc/debugger/tutorial.html
@@ -33,9 +33,7 @@ From the MS-DOS Prompt
Change to the Pythonwin\pywin\debugger directory.
For Windows NT users, type:
fail.py<enter>
-Or Windows 95/98 (sob - you would hope that 98 would have fixed some of 95s dumbness!)
-<path to python.exe>\python.exe fail.py
-
or
+or
start fail.py
Using the Debugger
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:
diff --git a/Pythonwin/pywin/Demos/splittst.py b/Pythonwin/pywin/Demos/splittst.py
index 2dbeb1e22..faca3e23f 100644
--- a/Pythonwin/pywin/Demos/splittst.py
+++ b/Pythonwin/pywin/Demos/splittst.py
@@ -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):
diff --git a/Pythonwin/pywin/framework/dlgappcore.py b/Pythonwin/pywin/framework/dlgappcore.py
index c023a20e1..80261c32f 100644
--- a/Pythonwin/pywin/framework/dlgappcore.py
+++ b/Pythonwin/pywin/framework/dlgappcore.py
@@ -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
diff --git a/Pythonwin/readme.html b/Pythonwin/readme.html
index a84397d34..15eaec44d 100644
--- a/Pythonwin/readme.html
+++ b/Pythonwin/readme.html
@@ -37,13 +37,6 @@
- Some of the configuration options (eg, "Docking Windows") do not
take affect until you restart Pythonwin.
-- Under Windows 9x, any attempt to use Pythonwin features from an MS-DOS
- prompt seems to cause immediate death. This means that you can not use
- the Pythonwin debugger for programs running under Python.exe on Windows
- 9x. You should still be able to use the debugger normally from inside
- Pythonwin itself.
-- Pythonwin will occasionally crash upon exiting under Windows 9x. The crash is in
- "user.exe" (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.
- Some of the menu items are always grey. This functionality is simply not yet implemented in
Pythonwin.
diff --git a/com/win32com/src/PythonCOM.cpp b/com/win32com/src/PythonCOM.cpp
index 6b76b7c98..e99884685 100644
--- a/com/win32com/src/PythonCOM.cpp
+++ b/com/win32com/src/PythonCOM.cpp
@@ -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 *,
diff --git a/com/win32com/src/dllmain.cpp b/com/win32com/src/dllmain.cpp
index bac646ece..f1f80e8d9 100644
--- a/com/win32com/src/dllmain.cpp
+++ b/com/win32com/src/dllmain.cpp
@@ -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;
diff --git a/com/win32com/src/extensions/PyIType.cpp b/com/win32com/src/extensions/PyIType.cpp
index e45e54925..587e1d9cc 100644
--- a/com/win32com/src/extensions/PyIType.cpp
+++ b/com/win32com/src/extensions/PyIType.cpp
@@ -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))
diff --git a/com/win32com/src/include/stdafx.h b/com/win32com/src/include/stdafx.h
index 8b8b51337..d012a5d6b 100644
--- a/com/win32com/src/include/stdafx.h
+++ b/com/win32com/src/include/stdafx.h
@@ -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
diff --git a/com/win32comext/ifilter/src/stdafx.h b/com/win32comext/ifilter/src/stdafx.h
index 8a9b1c26c..436ee84e5 100644
--- a/com/win32comext/ifilter/src/stdafx.h
+++ b/com/win32comext/ifilter/src/stdafx.h
@@ -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
diff --git a/com/win32comext/shell/demos/IShellLinkDataList.py b/com/win32comext/shell/demos/IShellLinkDataList.py
index 4327dc701..83cce82ea 100644
--- a/com/win32comext/shell/demos/IShellLinkDataList.py
+++ b/com/win32comext/shell/demos/IShellLinkDataList.py
@@ -20,9 +20,9 @@
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),
@@ -30,7 +30,7 @@
"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),
@@ -38,8 +38,8 @@
"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,
diff --git a/com/win32comext/shell/demos/servers/empty_volume_cache.py b/com/win32comext/shell/demos/servers/empty_volume_cache.py
index b5fb32e15..7cd79b1f7 100644
--- a/com/win32comext/shell/demos/servers/empty_volume_cache.py
+++ b/com/win32comext/shell/demos/servers/empty_volume_cache.py
@@ -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):
diff --git a/com/win32comext/shell/shellcon.py b/com/win32comext/shell/shellcon.py
index 90a5073eb..44d4d0ada 100644
--- a/com/win32comext/shell/shellcon.py
+++ b/com/win32comext/shell/shellcon.py
@@ -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
diff --git a/win32/Demos/rastest.py b/win32/Demos/rastest.py
index 4b6d1b289..0840010b2 100644
--- a/win32/Demos/rastest.py
+++ b/win32/Demos/rastest.py
@@ -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:
diff --git a/win32/Lib/commctrl.py b/win32/Lib/commctrl.py
index 26641e845..9a0bc9d1c 100644
--- a/win32/Lib/commctrl.py
+++ b/win32/Lib/commctrl.py
@@ -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
diff --git a/win32/Lib/win32con.py b/win32/Lib/win32con.py
index 5e798ee29..be052b038 100644
--- a/win32/Lib/win32con.py
+++ b/win32/Lib/win32con.py
@@ -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
diff --git a/win32/Lib/win32gui_struct.py b/win32/Lib/win32gui_struct.py
index 945ededc9..48a827f7b 100644
--- a/win32/Lib/win32gui_struct.py
+++ b/win32/Lib/win32gui_struct.py
@@ -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)
diff --git a/win32/Lib/win32timezone.py b/win32/Lib/win32timezone.py
index a62fc5bfb..0ed019631 100644
--- a/win32/Lib/win32timezone.py
+++ b/win32/Lib/win32timezone.py
@@ -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):
@@ -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
diff --git a/win32/help/process_info.html b/win32/help/process_info.html
index 97a61a8b0..f2e66506d 100644
--- a/win32/help/process_info.html
+++ b/win32/help/process_info.html
@@ -61,7 +61,7 @@
-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
diff --git a/win32/scripts/regsetup.py b/win32/scripts/regsetup.py
index da2f870e1..d478c2c9b 100644
--- a/win32/scripts/regsetup.py
+++ b/win32/scripts/regsetup.py
@@ -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
diff --git a/win32/src/PySECURITY_ATTRIBUTES.cpp b/win32/src/PySECURITY_ATTRIBUTES.cpp
index b1601ff39..0a6fa50a9 100644
--- a/win32/src/PySECURITY_ATTRIBUTES.cpp
+++ b/win32/src/PySECURITY_ATTRIBUTES.cpp
@@ -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
@@ -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);
diff --git a/win32/src/PySECURITY_DESCRIPTOR.cpp b/win32/src/PySECURITY_DESCRIPTOR.cpp
index 4ad9aa1d0..4d19960b2 100644
--- a/win32/src/PySECURITY_DESCRIPTOR.cpp
+++ b/win32/src/PySECURITY_DESCRIPTOR.cpp
@@ -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;
diff --git a/win32/src/win32apimodule.cpp b/win32/src/win32apimodule.cpp
index 026816e69..b000073c9 100644
--- a/win32/src/win32apimodule.cpp
+++ b/win32/src/win32apimodule.cpp
@@ -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)
{
@@ -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);
@@ -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.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
diff --git a/win32/src/win32clipboardmodule.cpp b/win32/src/win32clipboardmodule.cpp
index 9ffe4b076..8c80c4e0b 100644
--- a/win32/src/win32clipboardmodule.cpp
+++ b/win32/src/win32clipboardmodule.cpp
@@ -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)
diff --git a/win32/src/win32file.i b/win32/src/win32file.i
index 5b1b010d7..bdae5e7b1 100644
--- a/win32/src/win32file.i
+++ b/win32/src/win32file.i
@@ -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 |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 |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
diff --git a/win32/src/win32gui.i b/win32/src/win32gui.i
index 518e84cf9..1ceb64fc0 100644
--- a/win32/src/win32gui.i
+++ b/win32/src/win32gui.i
@@ -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)
{
@@ -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)
diff --git a/win32/src/win32print/win32print.cpp b/win32/src/win32print/win32print.cpp
index 9a4ce5829..84f8f4f7c 100644
--- a/win32/src/win32print/win32print.cpp
+++ b/win32/src/win32print/win32print.cpp
@@ -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:
@@ -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:
diff --git a/win32/src/win32process.i b/win32/src/win32process.i
index 331ed0f23..48fa03398 100644
--- a/win32/src/win32process.i
+++ b/win32/src/win32process.i
@@ -675,7 +675,6 @@ PyObject *MyCreateProcess(
// @flag CREATE_UNICODE_ENVIRONMENT|Indicates the format of the lpEnvironment parameter. If this flag is set, the environment block pointed to by lpEnvironment uses Unicode characters. Otherwise, the environment block uses ANSI characters.
// @flag DEBUG_PROCESS|If this flag is set, the calling process is treated as a debugger, and the new process is debugged. The system notifies the debugger of all debug events that occur in the process being debugged.
// If you create a process with this flag set, only the calling thread (the thread that called CreateProcess) can call the WaitForDebugEvent function.
- // Windows 95/98: This flag is not valid if the new process is a 16-bit application.
// @flag DEBUG_ONLY_THIS_PROCESS|If this flag is not set and the calling process is being debugged, the new process becomes another process being debugged by the calling process's debugger. If the calling process is not a process being debugged, no debugging-related actions occur.
// @flag DETACHED_PROCESS|For console processes, the new process does not have access to the console of the parent process. The new process can call the AllocConsole function at a later time to create a new console. This flag cannot be used with the CREATE_NEW_CONSOLE flag.
@@ -1770,10 +1769,9 @@ PyObject *PyWriteProcessMemory(PyObject *self, PyObject *args)
#define CREATE_PRESERVE_CODE_AUTHZ_LEVEL CREATE_PRESERVE_CODE_AUTHZ_LEVEL
#define CREATE_NO_WINDOW CREATE_NO_WINDOW
-
-#define DEBUG_PROCESS DEBUG_PROCESS // If this flag is set, the calling process is treated as a debugger, and the new process is a process being debugged. The system notifies the debugger of all debug events that occur in the process being debugged.
+// If this flag is set, the calling process is treated as a debugger, and the new process is a process being debugged. The system notifies the debugger of all debug events that occur in the process being debugged.
// If you create a process with this flag set, only the calling thread (the thread that called CreateProcess) can call the WaitForDebugEvent function.
-// Windows 95 and Windows 98: This flag is not valid if the new process is a 16-bit application.
+#define DEBUG_PROCESS DEBUG_PROCESS
#define DEBUG_ONLY_THIS_PROCESS DEBUG_ONLY_THIS_PROCESS // If not set and the calling process is being debugged, the new process becomes another process being debugged by the calling process's debugger. If the calling process is not a process being debugged, no debugging-related actions occur.
diff --git a/win32/src/win32rasmodule.cpp b/win32/src/win32rasmodule.cpp
index 3ed8c33fe..8e87882db 100644
--- a/win32/src/win32rasmodule.cpp
+++ b/win32/src/win32rasmodule.cpp
@@ -531,11 +531,10 @@ static PyObject *PyRasDial(PyObject *self, PyObject *args)
args, "OzOO:Dial",
&obExtensions, // @pyparm |dialExtensions||An object providing the RASDIALEXTENSIONS
// information, or None
- &fileName, // @pyparm string|fileName||Specifies the filename of the phonebook entry, or None. Ignored on
- // Win95.
- &obParams, // @pyparm |RasDialParams||A tuple describing a RASDIALPARAMS structure.
- &obCallback)) // @pyparm method or hwnd|callback||The method to be called when RAS events occur, or None.
- // If not None, the function must have the signature of
+ &fileName, // @pyparm string|fileName||Specifies the filename of the phonebook entry, or None.
+ &obParams, // @pyparm |RasDialParams||A tuple describing a RASDIALPARAMS structure.
+ &obCallback)) // @pyparm method or hwnd|callback||The method to be called when RAS events occur, or None.
+ // If not None, the function must have the signature of
return NULL;
if (!PyObjectToRasDialParams(obParams, &dialParams))
return NULL;
diff --git a/win32/src/win32trace.cpp b/win32/src/win32trace.cpp
index c4360168c..2fbf94afb 100644
--- a/win32/src/win32trace.cpp
+++ b/win32/src/win32trace.cpp
@@ -43,7 +43,7 @@ const TCHAR *EVENT_EMPTY_OBJECT_NAME = _T("Global\\PythonTraceOutputEmptyEvent")
// Global\\ etc goodness:
// On NT4/9x, 'Global\\' is not understood and will fail.
// On 2k/XP, anyone can create 'global' objects.
-// On Vista, you need elavated perms to create global objects - however, once
+// On Vista, you need elevated perms to create global objects - however, once
// it has been created and permissions adjusted, a user with normal
// permissions can open these global objects.
// As a service generally will be able to create global objects, we want a