diff -Naur pywin32-b301-orig/SWIG/swig_lib/python/pythoncom.i pywin32-b301/SWIG/swig_lib/python/pythoncom.i --- pywin32-b301-orig/SWIG/swig_lib/python/pythoncom.i 2021-05-30 16:31:38 +0800 +++ pywin32-b301/SWIG/swig_lib/python/pythoncom.i 2021-10-05 19:09:14 +0800 @@ -8,6 +8,10 @@ %typedef long HRESULT_KEEP; // This will keep HRESULT, and return typedef long FLAGS; +typedef WCHAR OLECHAR; +typedef OLECHAR* BSTR; +typedef MAPIERROR MAPIERROR; +typedef ADRLIST ADRLIST; %typemap(python,out) HRESULT { $target = Py_None; diff -Naur pywin32-b301-orig/SWIG/swig_lib/python/pywintypes.i pywin32-b301/SWIG/swig_lib/python/pywintypes.i --- pywin32-b301-orig/SWIG/swig_lib/python/pywintypes.i 2021-05-30 16:31:38 +0800 +++ pywin32-b301/SWIG/swig_lib/python/pywintypes.i 2021-10-05 19:10:04 +0800 @@ -33,6 +33,8 @@ typedef unsigned long ULONG; %apply unsigned long {ULONG}; +typedef STARTUPINFO STARTUPINFO; +%apply STARTUPINFO {STARTUPINFO}; %{ #include "PyWinTypes.h" @@ -53,6 +55,7 @@ } // Override the SWIG default for this. +%typedef PyObject PyObject; %typemap(python,out) PyObject *{ if ($source==NULL) return NULL; // get out now! $target = $source; @@ -62,7 +65,7 @@ // Map API functions that return BOOL to // functions that return None, but raise exceptions. // These functions must set the win32 LastError. -%typedef BOOL BOOLAPI +%typedef BOOL BOOLAPI; %typemap(python,out) BOOLAPI { $target = Py_None; @@ -79,7 +82,7 @@ } } -%typedef DWORD DWORDAPI +%typedef DWORD DWORDAPI; %typemap(python,out) DWORDAPI { $target = Py_None; @@ -108,11 +111,13 @@ } } +%typedef TCHAR TCHAR; %typemap(python,in) TCHAR * { if (!PyWinObject_AsTCHAR($source, &$target, FALSE)) return NULL; } +%typedef WCHAR WCHAR; %typemap(python,arginit) TCHAR *,OLECHAR *, WCHAR * { $target = NULL; @@ -198,6 +203,7 @@ return NULL; } +%typedef OVERLAPPED OVERLAPPED; %typemap(python,in) OVERLAPPED * { if (!PyWinObject_AsOVERLAPPED($source, &$target, TRUE)) @@ -252,6 +258,7 @@ } +%typedef SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES; %typemap(python,in) SECURITY_ATTRIBUTES *{ if (!PyWinObject_AsSECURITY_ATTRIBUTES($source, &$target)) @@ -406,6 +413,7 @@ // LARGE_INTEGER support // //--------------------------------------------------------------------------- +%typedef LARGE_INTEGER LARGE_INTEGER; %typemap(python,in) LARGE_INTEGER { if (!PyWinObject_AsLARGE_INTEGER($source, &$target)) return NULL; @@ -415,6 +423,7 @@ if (!PyWinObject_AsLARGE_INTEGER($source, $target)) return NULL; } +%typedef ULARGE_INTEGER ULARGE_INTEGER; %typemap(python,in) ULARGE_INTEGER { if (!PyWinObject_AsULARGE_INTEGER($source, &$target)) return NULL; @@ -529,6 +538,7 @@ // TIME // //--------------------------------------------------------------------------- +%typedef FILETIME FILETIME; %typemap(python,in) FILETIME * { if (!PyWinObject_AsFILETIME($source, $target, FALSE)) return NULL; @@ -567,6 +577,7 @@ // SOCKET support. // //--------------------------------------------------------------------------- +%typedef UINT_PTR SOCKET; %typemap(python,in) SOCKET *(SOCKET sockettemp) { $target = &sockettemp; @@ -596,6 +607,6 @@ #endif PyWinGlobals_Ensure(); PyDict_SetItemString(d, "error", PyWinExc_ApiError); -#endif SWIG_PYTHONCOM +#endif // SWIG_PYTHONCOM %}