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
5 changes: 1 addition & 4 deletions AutoDuck/pywin32.mak
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ WIN32_SOURCE = $(WIN32_SOURCE_DIR)/*.cpp \
$(WIN32_SOURCE_DIR)/win32crypt/*.cpp \
$(GENDIR)/win32evtlog.d $(GENDIR)/win32event.d $(GENDIR)/win32file.d \
$(GENDIR)/win32service.d $(GENDIR)/win32pipe.d $(GENDIR)/win32security.d \
$(GENDIR)/win32process.d $(GENDIR)/wincerapi.d $(GENDIR)/win32gui.d \
$(GENDIR)/win32process.d $(GENDIR)/win32gui.d \
$(GENDIR)/win32inet.d $(GENDIR)/_winxptheme.d \
$(GENDIR)/win32job.d \
winxpgui.d
Expand Down Expand Up @@ -162,9 +162,6 @@ $(GENDIR)/win32security.d: $(WIN32_SOURCE_DIR)/$(*B).i
$(GENDIR)/win32process.d: $(WIN32_SOURCE_DIR)/$(*B).i
$(PYTHON) makedfromi.py -o$*.d $(WIN32_SOURCE_DIR)/$(*B).i

$(GENDIR)/wincerapi.d: $(WIN32_SOURCE_DIR)/$(*B).i
$(PYTHON) makedfromi.py -o$*.d $(WIN32_SOURCE_DIR)/$(*B).i

$(GENDIR)/win32gui.d: $(WIN32_SOURCE_DIR)/$(*B).i
$(PYTHON) makedfromi.py -o$*.d $(WIN32_SOURCE_DIR)/$(*B).i

Expand Down
2 changes: 0 additions & 2 deletions com/win32com/src/ErrorUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -977,11 +977,9 @@ void GetScodeString(HRESULT hr, LPTSTR buf, int bufSize)
MAKE_HRESULT_ENTRY(CONNECT_E_CANNOTCONNECT),
MAKE_HRESULT_ENTRY(CONNECT_E_OVERRIDDEN),

#ifndef NO_PYCOM_IPROVIDECLASSINFO
MAKE_HRESULT_ENTRY(CLASS_E_NOTLICENSED),
MAKE_HRESULT_ENTRY(CLASS_E_NOAGGREGATION),
MAKE_HRESULT_ENTRY(CLASS_E_CLASSNOTAVAILABLE),
#endif // NO_PYCOM_IPROVIDECLASSINFO

MAKE_HRESULT_ENTRY(CTL_E_ILLEGALFUNCTIONCALL),
MAKE_HRESULT_ENTRY(CTL_E_OVERFLOW),
Expand Down
4 changes: 0 additions & 4 deletions com/win32com/src/PyGatewayBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@ void *PyGatewayBase::ThisAsIID(IID iid)
if (iid == IID_IUnknown || iid == IID_IDispatch)
// IDispatch * == IUnknown *
return (IDispatch *)(PyGatewayBase *)this;
#ifndef NO_PYCOM_IDISPATCHEX
else if (iid == IID_IDispatchEx)
// IDispatchEx * probably == IUnknown *, but no real need to assume that!
return (IDispatchEx *)this;
#endif // NO_PYCOM_IDISPATCHEX
else if (iid == IID_ISupportErrorInfo)
return (ISupportErrorInfo *)this;
else if (iid == IID_IInternalUnwrapPythonObject)
Expand Down Expand Up @@ -696,7 +694,6 @@ STDMETHODIMP PyGatewayBase::Invoke(DISPID dispid, REFIID riid, LCID lcid, WORD w
return hr;
}

#ifndef NO_PYCOM_IDISPATCHEX
////////////////////////////////////////////////////////////////////////////
//
// The IDispatchEx implementation
Expand Down Expand Up @@ -850,7 +847,6 @@ STDMETHODIMP PyGatewayBase::GetNameSpaceParent(IUnknown **ppunk)
return PyCom_SetCOMErrorFromPyException(IID_IDispatchEx);
}

#endif // NO_PYCOM_IDISPATCHEX

////////////////////////////////////////////////////////////////////////////
//
Expand Down
3 changes: 0 additions & 3 deletions com/win32com/src/PyIDispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -600,8 +600,6 @@ PyComTypeObject PyIDispatch::type("PyIDispatch",
&PyIUnknown::type, // @base PyIDispatch|PyIUnknown
sizeof(PyIDispatch), PyIDispatch_methods, GET_PYCOM_CTOR(PyIDispatch));

#ifndef NO_PYCOM_IDISPATCHEX

//////////////////////////////////////////////////////////////////
//
// PyIDispatchEx
Expand Down Expand Up @@ -846,4 +844,3 @@ PyComTypeObject PyIDispatchEx::type("PyIDispatchEx",
&PyIDispatch::type, // @base PyIDispatchEx|PyIDispatch
sizeof(PyIDispatchEx), PyIDispatchEx_methods, GET_PYCOM_CTOR(PyIDispatchEx));

#endif // NO_PYCOM_IDISPATCHEX
2 changes: 0 additions & 2 deletions com/win32com/src/PyStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ PyObject *pythoncom_StgOpenStorageOnILockBytes(PyObject *self, PyObject *args)
return PyCom_PyObjectFromIUnknown(pResult, IID_IStorage, FALSE);
}

#ifndef MS_WINCE
// @pymethod int|pythoncom|StgIsStorageFile|Indicates whether a particular disk file contains a storage object.
PyObject *pythoncom_StgIsStorageFile(PyObject *self, PyObject *args)
{
Expand All @@ -265,7 +264,6 @@ PyObject *pythoncom_StgIsStorageFile(PyObject *self, PyObject *args)
// returns a failure HRESULT.
return PyLong_FromLong(hr == 0);
}
#endif // MS_WINCE

// @pymethod <o PyIStorage>|pythoncom|StgOpenStorage|Opens an existing root storage object in the file system.
PyObject *pythoncom_StgOpenStorage(PyObject *self, PyObject *args)
Expand Down
42 changes: 0 additions & 42 deletions com/win32com/src/PythonCOM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ extern PyObject *pythoncom_StgCreateStorageEx(PyObject *self, PyObject *args, Py
extern PyObject *pythoncom_FmtIdToPropStgName(PyObject *self, PyObject *args);
extern PyObject *pythoncom_PropStgNameToFmtId(PyObject *self, PyObject *args);

#ifndef MS_WINCE
extern PyObject *pythoncom_StgIsStorageFile(PyObject *self, PyObject *args);
#endif // MS_WINCE
extern PyObject *pythoncom_StgCreateDocfile(PyObject *self, PyObject *args);
extern PyObject *pythoncom_StgCreateDocfileOnILockBytes(PyObject *self, PyObject *args);
extern PyObject *pythoncom_StgOpenStorageOnILockBytes(PyObject *self, PyObject *args);
Expand All @@ -67,9 +65,7 @@ extern PyObject *pythoncom_loadtypelib(PyObject *self, PyObject *args);
extern PyObject *pythoncom_loadregtypelib(PyObject *self, PyObject *args);
extern PyObject *pythoncom_registertypelib(PyObject *self, PyObject *args);
extern PyObject *pythoncom_unregistertypelib(PyObject *self, PyObject *args);
#ifndef MS_WINCE
extern PyObject *pythoncom_querypathofregtypelib(PyObject *self, PyObject *args);
#endif // MS_WINCE

// Type object helpers
PyObject *Py_NewFUNCDESC(PyObject *self, PyObject *args);
Expand Down Expand Up @@ -119,7 +115,6 @@ static CoInitializeSecurityfunc pfnCoInitializeSecurity = NULL;

BOOL PyCom_HasDCom()
{
#ifndef MS_WINCE
static BOOL bHaveDCOM = -1;
if (bHaveDCOM == -1) {
HMODULE hMod = GetModuleHandle(_T("ole32.dll"));
Expand All @@ -131,9 +126,6 @@ BOOL PyCom_HasDCom()
bHaveDCOM = FALSE; // not much we can do!
}
return bHaveDCOM;
#else // no DCOM on WinCE.
return FALSE;
#endif
}

#ifdef _MSC_VER
Expand Down Expand Up @@ -180,7 +172,6 @@ static PyObject *pythoncom_CoCreateInstance(PyObject *self, PyObject *args)
#pragma optimize("", on)
#endif // _MSC_VER

#ifndef MS_WINCE
#ifdef _MSC_VER
#pragma optimize("", off)
#endif // _MSC_VER
Expand Down Expand Up @@ -484,7 +475,6 @@ static PyObject *pythoncom_CoTreatAsClass(PyObject *self, PyObject *args)
Py_INCREF(Py_None);
return Py_None;
}
#endif // MS_WINCE

// @pymethod <o PyIClassFactory>|pythoncom|MakePyFactory|Creates a new <o PyIClassFactory> object wrapping a PythonCOM
// Class Factory object.
Expand Down Expand Up @@ -528,7 +518,6 @@ static PyObject *pythoncom_GetGatewayCount(PyObject *self, PyObject *args)
return PyLong_FromLong(_PyCom_GetGatewayCount());
}

#ifndef MS_WINCE
// @pymethod <o PyIUnknown>|pythoncom|GetActiveObject|Retrieves an object representing a running object registered with
// OLE
static PyObject *pythoncom_GetActiveObject(PyObject *self, PyObject *args)
Expand Down Expand Up @@ -583,7 +572,6 @@ static PyObject *pythoncom_connect(PyObject *self, PyObject *args)
// @comm This function is equivalent to <om pythoncom.GetActiveObject>(clsid).<om
// pythoncom.QueryInterace>(pythoncom.IID_IDispatch)
}
#endif // MS_WINCE

// @pymethod <o PyIDispatch>|pythoncom|new|Create a new instance of an OLE automation server.
static PyObject *pythoncom_new(PyObject *self, PyObject *args)
Expand All @@ -606,7 +594,6 @@ static PyObject *pythoncom_new(PyObject *self, PyObject *args)
return rc;
}

#ifndef MS_WINCE
// @pymethod <o PyIID>|pythoncom|CreateGuid|Creates a new, unique GUIID.
static PyObject *pythoncom_createguid(PyObject *self, PyObject *args)
{
Expand Down Expand Up @@ -647,7 +634,6 @@ static PyObject *pythoncom_progidfromclsid(PyObject *self, PyObject *args)
CoTaskMemFree(progid);
return ob;
}
#endif // MS_WINCE

// @pymethod string|pythoncom|GetScodeString|Returns the string for an OLE scode (HRESULT)
static PyObject *pythoncom_GetScodeString(PyObject *self, PyObject *args)
Expand Down Expand Up @@ -801,7 +787,6 @@ static PyObject *pythoncom_MakeTime(PyObject *self, PyObject *args)
return PyWinMethod_NewTime(self, args);
}

#ifndef MS_WINCE
// @pymethod <o PyIMoniker>,int,<o PyIBindCtx>|pythoncom|MkParseDisplayName|Parses a moniker display name into a moniker
// object. The inverse of <om PyIMoniker.GetDisplayName>
static PyObject *pythoncom_MkParseDisplayName(PyObject *self, PyObject *args)
Expand Down Expand Up @@ -992,7 +977,6 @@ static PyObject *pythoncom_GetClassFile(PyObject *self, PyObject *args)
return PyCom_BuildPyException(hr);
return PyWinObject_FromIID(clsid);
}
#endif // MS_WINCE

// @pymethod |pythoncom|CoInitialize|Initialize the COM libraries for the calling thread.
static PyObject *pythoncom_CoInitialize(PyObject *self, PyObject *args)
Expand Down Expand Up @@ -1072,7 +1056,6 @@ static PyObject *pythoncom_CoFreeUnusedLibraries(PyObject *self, PyObject *args)
return Py_None;
}

#ifndef MS_WINCE
// @pymethod <o PyIRunningObjectTable>|pythoncom|GetRunningObjectTable|Creates a new <o PyIRunningObjectTable> object.
static PyObject *pythoncom_GetRunningObjectTable(PyObject *self, PyObject *args)
{
Expand Down Expand Up @@ -1316,7 +1299,6 @@ static PyObject *pythoncom_CoReleaseMarshalData(PyObject *self, PyObject *args)
return Py_None;
}

#endif // MS_WINCE

// @pymethod <o PyIUnknown>|pythoncom|CoGetObject|Converts a display name into a moniker that identifies the object
// named, and then binds to the object identified by the moniker.
Expand Down Expand Up @@ -1969,13 +1951,11 @@ static struct PyMethodDef pythoncom_methods[] = {
1}, // @pymeth _GetInterfaceCount|Retrieves the number of interface objects currently in existance
{"_GetGatewayCount", pythoncom_GetGatewayCount,
1}, // @pymeth _GetInterfaceCount|Retrieves the number of gateway objects currently in existance
#ifndef MS_WINCE
{"CoCreateFreeThreadedMarshaler", pythoncom_CoCreateFreeThreadedMarshaler,
1}, // @pymeth CoCreateFreeThreadedMarshaler|Creates an aggregatable object capable of context-dependent
// marshaling.
{"CoCreateInstanceEx", pythoncom_CoCreateInstanceEx,
1}, // @pymeth CoCreateInstanceEx|Create a new instance of an OLE automation server possibly on a remote machine.
#endif // MS_WINCE
{"CoCreateInstance", pythoncom_CoCreateInstance,
1}, // @pymeth CoCreateInstance|Create a new instance of an OLE automation server.
{"CoFreeUnusedLibraries", pythoncom_CoFreeUnusedLibraries,
Expand All @@ -1985,7 +1965,6 @@ static struct PyMethodDef pythoncom_methods[] = {
1}, // @pymeth CoInitialize|Initialize the COM libraries for the calling thread.
{"CoInitializeEx", pythoncom_CoInitializeEx,
1}, // @pymeth CoInitializeEx|Initialize the COM libraries for the calling thread.
#ifndef MS_WINCE
{"CoInitializeSecurity", pythoncom_CoInitializeSecurity,
1}, // @pymeth CoInitializeSecurity|Registers security and sets the default security values.
{"CoGetInterfaceAndReleaseStream", pythoncom_CoGetInterfaceAndReleaseStream,
Expand All @@ -2000,12 +1979,10 @@ static struct PyMethodDef pythoncom_methods[] = {
1}, // @pymeth CoUnmarshalInterface|Unmarshals an interface
{"CoReleaseMarshalData", pythoncom_CoReleaseMarshalData,
1}, // @pymeth CoReleaseMarshalData|Frees resources used by a marshalled interface
#endif // MS_WINCE
{"CoGetObject", pythoncom_CoGetObject,
1}, // @pymeth CoGetObject|Converts a display name into a moniker that identifies the object named, and then binds
// to the object identified by the moniker.
{"CoUninitialize", pythoncom_CoUninitialize, 1}, // @pymeth CoUninitialize|Uninitialize the COM libraries.
#ifndef MS_WINCE
{"CoRegisterClassObject", pythoncom_CoRegisterClassObject,
1}, // @pymeth CoRegisterClassObject|Registers an EXE class object with OLE so other applications can connect to
// it.
Expand Down Expand Up @@ -2040,7 +2017,6 @@ static struct PyMethodDef pythoncom_methods[] = {
1}, // @pymeth CreateTypeLib|Provides access to a new object instance that supports the ICreateTypeLib interface.
{"CreateTypeLib2", pythoncom_CreateTypeLib2, 1}, // @pymeth CreateTypeLib2|Provides access to a new object instance
// that supports the ICreateTypeLib2 interface.
#endif // MS_WINCE
{"CreateStreamOnHGlobal", pythoncom_CreateStreamOnHGlobal,
1}, // @pymeth CreateStreamOnHGlobal|Creates an in-memory stream storage object
{"CreateILockBytesOnHGlobal", pythoncom_CreateILockBytesOnHGlobal,
Expand All @@ -2049,22 +2025,18 @@ static struct PyMethodDef pythoncom_methods[] = {
{"EnableQuitMessage", pythoncom_EnableQuitMessage,
1}, // @pymeth EnableQuitMessage|Indicates the thread PythonCOM should post a WM_QUIT message to.
{"FUNCDESC", Py_NewFUNCDESC, 1}, // @pymeth FUNCDESC|Returns a new <o FUNCDESC> object.
#ifndef MS_WINCE
{"GetActiveObject", pythoncom_GetActiveObject,
1}, // @pymeth GetActiveObject|Retrieves an object representing a running object registered with OLE
{"GetClassFile", pythoncom_GetClassFile,
1}, // @pymeth GetClassFile|Supplies the CLSID associated with the given filename.
#endif // MS_WINCE
{"GetFacilityString", pythoncom_GetFacilityString,
1}, // @pymeth GetFacilityString|Returns the facility string, given an OLE scode.
{"GetRecordFromGuids", pythoncom_GetRecordFromGuids,
1}, // @pymeth GetRecordFromGuids|Creates a new record object from the given GUIDs
{"GetRecordFromTypeInfo", pythoncom_GetRecordFromTypeInfo,
1}, // @pymeth GetRecordFromTypeInfo|Creates a <o PyRecord> object from a <o PyITypeInfo> interface
#ifndef MS_WINCE
{"GetRunningObjectTable", pythoncom_GetRunningObjectTable,
1}, // @pymeth GetRunningObjectTable|Obtains a <o PyIRunningObjectTable> object.
#endif // MS_WINCE
{"GetScodeString", pythoncom_GetScodeString, 1}, // @pymeth GetScodeString|Returns the string for an OLE scode.
{"GetScodeRangeString", pythoncom_GetScodeRangeString,
1}, // @pymeth GetScodeRangeString|Returns the scode range string, given an OLE scode.
Expand All @@ -2078,11 +2050,9 @@ static struct PyMethodDef pythoncom_methods[] = {
{"MakeTime", pythoncom_MakeTime, 1},
{"MakePyFactory", pythoncom_MakePyFactory,
1}, // @pymeth MakePyFactory|Creates a new <o PyIClassFactory> object wrapping a PythonCOM Class Factory object.
#ifndef MS_WINCE
{"MkParseDisplayName", pythoncom_MkParseDisplayName,
1}, // @pymeth MkParseDisplayName|Parses a moniker display name into a moniker object. The inverse of
// IMoniker::GetDisplayName.
#endif // MS_WINCE
{"new", pythoncom_new, 1},
{"New", pythoncom_new, 1}, // @pymeth New|Create a new instance of an OLE automation server.
{"ObjectFromAddress", pythoncom_ObjectFromAddress,
Expand All @@ -2106,24 +2076,19 @@ static struct PyMethodDef pythoncom_methods[] = {
{"OleSaveToStream", pythoncom_OleSaveToStream, 1}, // @pymeth OleSaveToStream|Save an object to an IStream.
{"OleLoad", pythoncom_OleLoad,
1}, // @pymeth OleLoad|Loads into memory an object nested within a specified storage object.
#ifndef MS_WINCE
{"ProgIDFromCLSID", pythoncom_progidfromclsid, 1}, // @pymeth ProgIDFromCLSID|Converts a CLSID string to a progID.
#endif // MS_WINCE
{"PumpWaitingMessages", pythoncom_PumpWaitingMessages,
1}, // @pymeth PumpWaitingMessages|Pumps all waiting messages for the current thread.
{"PumpMessages", pythoncom_PumpMessages,
1}, // @pymeth PumpMessages|Pumps all messages for the current thread until a WM_QUIT message.
#ifndef MS_WINCE
{"QueryPathOfRegTypeLib", pythoncom_querypathofregtypelib,
1}, // @pymeth QueryPathOfRegTypeLib|Retrieves the path of a registered type library
#endif // MS_WINCE
{"ReadClassStg", pythoncom_ReadClassStg, 1}, // @pymeth ReadClassStg|Reads a CLSID from a storage object
{"ReadClassStm", pythoncom_ReadClassStm, 1}, // @pymeth ReadClassStm|Reads a CLSID from a <o PyIStream> object
{"RegisterTypeLib", pythoncom_registertypelib,
1}, // @pymeth RegisterTypeLib|Adds information about a type library to the system registry.
{"UnRegisterTypeLib", pythoncom_unregistertypelib,
1}, // @pymeth UnRegisterTypeLib|Removes a type library from the system registry.
#ifndef MS_WINCE
{"RegisterActiveObject", pythoncom_RegisterActiveObject,
1}, // @pymeth RegisterActiveObject|Register an object as the active object for its class
{"RevokeActiveObject", pythoncom_RevokeActiveObject,
Expand All @@ -2134,7 +2099,6 @@ static struct PyMethodDef pythoncom_methods[] = {
{"RevokeDragDrop", pythoncom_RevokeDragDrop,
1}, // @pymeth RevokeDragDrop|Revokes the specified window as the target of an OLE drag-and-drop operation.
{"DoDragDrop", pythoncom_DoDragDrop, 1}, // @pymeth DoDragDrop|Carries out an OLE drag and drop operation.
#endif // MS_WINCE
{"StgCreateDocfile", pythoncom_StgCreateDocfile,
1}, // @pymeth StgCreateDocfile|Creates a new compound file storage object using the OLE-provided compound file
// implementation for the <o PyIStorage> interface.
Expand All @@ -2144,10 +2108,8 @@ static struct PyMethodDef pythoncom_methods[] = {
{"StgOpenStorageOnILockBytes", pythoncom_StgOpenStorageOnILockBytes,
1}, // @pymeth StgOpenStorageOnILockBytes|Open an existing storage object that does not reside in a disk file, but
// instead has an underlying <o PyILockBytes> byte array provided by the caller.
#ifndef MS_WINCE
{"StgIsStorageFile", pythoncom_StgIsStorageFile,
1}, // @pymeth StgIsStorageFile|Indicates whether a particular disk file contains a storage object.
#endif // MS_WINCE
{"STGMEDIUM", Py_NewSTGMEDIUM,
1}, // @pymeth STGMEDIUM|Creates a new <o PySTGMEDIUM> object suitable for the <o PyIDataObject> interface.
{"StgOpenStorage", pythoncom_StgOpenStorage,
Expand Down Expand Up @@ -2361,10 +2323,8 @@ PYWIN_MODULE_INIT_FUNC(pythoncom)
ADD_CONSTANT(DISPID_PROPERTYPUT);
ADD_CONSTANT(DISPID_NEWENUM);
ADD_CONSTANT(DISPID_EVALUATE);
#ifndef NO_PYCOM_IDISPATCHEX
ADD_CONSTANT(DISPID_STARTENUM);
ADD_CONSTANT(DISPID_UNKNOWN);
#endif
#ifdef DISPID_THIS
ADD_CONSTANT(DISPID_THIS);
#endif
Expand Down Expand Up @@ -2641,7 +2601,6 @@ PYWIN_MODULE_INIT_FUNC(pythoncom)
ADD_CONSTANT(COWAIT_WAITALL);
ADD_CONSTANT(COWAIT_ALERTABLE);

#ifndef NO_PYCOM_IDISPATCHEX
ADD_CONSTANT(fdexNameCaseSensitive); // Request that the name lookup be done in a case-sensitive manner. May be
// ignored by object that does not support case-sensitive lookup.
ADD_CONSTANT(fdexNameEnsure); // Request that the member be created if it does not already exist. The new member
Expand All @@ -2666,7 +2625,6 @@ PYWIN_MODULE_INIT_FUNC(pythoncom)
ADD_CONSTANT(fdexPropCannotConstruct); // The member cannot be called as a constructor using DISPATCH_CONSTRUCT.
ADD_CONSTANT(fdexPropCanSourceEvents); // The member can fire events.
ADD_CONSTANT(fdexPropCannotSourceEvents); // The member cannot fire events.
#endif // NO_PYCOM_IDISPATCHEX

ADD_CONSTANT(DESCKIND_FUNCDESC);
ADD_CONSTANT(DESCKIND_VARDESC);
Expand Down
Loading