Re: [comtypes-users] GetModule error
On Feb 10, 2008 7:45 PM, Roman Yakovenko [EMAIL PROTECTED] wrote: The code generation works fine. I was able to create main object DiaSource, but for some reason I was not able to call loadDataFromPdb method. I've got AttributeError: 'DiaSource' object has no attribute 'loadDataFromPdb' exception. Can you attach the script you created? I am sure I am doing something wrong. msdia = comtypes.client.GetModule( r'D:\Program Files\Microsoft Visual Studio .NET 2003\Visual Studio SDKs\DIA SDK\bin\msdia71.dll' ) ds = msdia.DiaSource() ds.loadDataFromPdb('xxx.pdb') Okey, I found my problem and solution: ds = comtypes.client.CreateObject( msdia.DiaSource ) ds.loadDataFromPdb(control_pdb) -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users
Re: [comtypes-users] GetModule error
Roman Yakovenko schrieb: Unfortunately I have very basic COM knowledge and I thought, may I say expected :-) , comtypes will keep me long away from it. I will check the new versions, may be they don't have such problems. I will let you know. As I said, I'll have to investigate further. The problem with msdia71.dll is not yet solved. I will post here when I know more (but don't hold your breath). Thomas - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users
Re: [comtypes-users] GetModule error
Roman Yakovenko schrieb: Good morning. I got error while calling comtypes.client.GetModule function. Here is the call stack: e:\Python25\pythonw.exe -u pdb_reader.py Traceback (most recent call last): File pdb_reader.py, line 8, in module print comtypes.client.GetModule( r'D:\Program Files\Microsoft Visual Studio .NET 2003\Visual Studio SDKs\DIA SDK\bin\msdia71.dll' ) File e:\python25\Lib\site-packages\comtypes\client\_generate.py, line 100, in GetModule is_current, mod = _CreateWrapper(tlib, pathname) File e:\python25\Lib\site-packages\comtypes\client\_generate.py, line 191, in _CreateWrapper return True, imp.load_module(modname, file_, module_path, desc) File e:\Python25\lib\site-packages\comtypes\gen\_106173A0_0173_4E5C_84E7_E915422BE997_0_2_0.py, line 761, in module ( ['out'], POINTER(POINTER(IDiaSymbol)), 'ppSymbol' )), File e:\python25\Lib\site-packages\comtypes\__init__.py, line 239, in __setattr__ self._make_methods(value) File e:\python25\Lib\site-packages\comtypes\__init__.py, line 492, in _make_methods prototype = WINFUNCTYPE(restype, *argtypes) File e:\Python25\lib\ctypes\__init__.py, line 121, in WINFUNCTYPE class WinFunctionType(_CFuncPtr): TypeError: Error when calling the metaclass bases item 5 in _argtypes_ has no from_param method I am using standard Python 2.5 installation with ctypes module, which comes with it. I am using SVN version of comtypes. The interfaces, I try to access, are derived from IUnknown one. I can reproduce the problem, and will lokk into it. Thanks, Thomas - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users