[pywin32-checkins] pywin32/com/win32comext/shell/src PyIExtractIcon.cpp,1.2,1.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2004-04-09 11:30:47
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27152 Modified Files: PyIExtractIcon.cpp Log Message: ExtractIcon returns (None,None) when it wants the app to extract it, and GetIconLocation includes hresult in the return value. Index: PyIExtractIcon.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/PyIExtractIcon.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** PyIExtractIcon.cpp 7 Oct 2003 02:32:11 -0000 1.2 --- PyIExtractIcon.cpp 9 Apr 2004 11:17:27 -0000 1.3 *************** *** 50,57 **** if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIEI, IID_IExtractIcon ); return Py_BuildValue("ii", hiconLarge, hiconSmall); ! Py_INCREF(Py_None); ! return Py_None; ! } --- 50,59 ---- if ( FAILED(hr) ) return PyCom_BuildPyException(hr, pIEI, IID_IExtractIcon ); + if (hr==S_FALSE) + return Py_BuildValue("OO", Py_None, Py_None); return Py_BuildValue("ii", hiconLarge, hiconSmall); ! // @rdesc The result is (hicon_large, hicon_small), or ! // (None,None) if the underlying function returns S_FALSE, indicating ! // the calling application should extract it. } *************** *** 83,87 **** PyObject *retStr = PyWinObject_FromTCHAR(buf); free(buf); ! return Py_BuildValue("Nii", retStr, iIndex, flags); } --- 85,89 ---- PyObject *retStr = PyWinObject_FromTCHAR(buf); free(buf); ! return Py_BuildValue("iNii", hr, retStr, iIndex, flags); } *************** *** 123,127 **** } Py_DECREF(result); - printf("hresult is %x\n", hr); return hr; } --- 125,128 ---- |