> I have been delving in to the process of adding support for IExtractImage to > pythonwin. I have run makegw on the necessary files, added the resulting .cpp > and .h files to com/win32comext/shell/src, added references in shell.cpp and > setup.py, and now it seems all that is left to do is implement the proper > data types which makegw did not know how to handle. (Also, if it would > help anyone, I patched my makegw to run under Python 2.5 with no regex > or regsub modules.)
Excellent - please feel free to send me the patches. makegw is *very* dumb though. > I have a few questions about the next steps, for those who may have done this before: > I am left with a few lines of code in the PyIExtractImage.cpp file that look like this: > if (bPythonIsHappy && !PyObject_AsDWORD *( obpdwPriority, &pdwPriority )) bPythonIsHappy = FALSE; See above - makepy is dumb :) For now, PyInt_AsLong should work fine for a DWORD. HBITMAP should just use PyLong_FromVoidPtr (or however that is spelt), and a SIZE already has PyWinObject_FromSIZE. You will just need to correct the invalid indirections created by makegw - eg, your line above would read as: > DWORD dwPriority; > if (bPythonIsHappy && !PyInt_AsLong( obpdwPriority, (long *)&dwPriority )) bPythonIsHappy = FALSE; Also, please see the existing support for IExtractIcon - this new interface should be almost identical - just one or 2 data types appear to be different between the interfaces (HICON -> HBITMAP being the most obvious one) Cheers, Mark _______________________________________________ Python-win32 mailing list Python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32