<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user">
    <title>gmane.comp.python.comtypes.user</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/601"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/600"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/599"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/598"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/597"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/596"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/595"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/594"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/593"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/592"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/591"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/590"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/589"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/588"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/587"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/586"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/585"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/584"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/583"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.comtypes.user/582"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/601">
    <title>Added support for NumPy arrays</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/601</link>
    <description>&lt;pre&gt;Hi everyone,

I just (re)added support for setting (see
http://sourceforge.net/mailarchive/message.php?msg_id=26953764) and getting
safearrays as NumPy arrays. By default, for backwards compatibility,
safearrays are retrieved as tuples. With python &amp;gt;= 2.5, you can now do the
following:


This is a much faster way to access large arrays. If you didn't have speed
issues before, you probably won't need this.

Enjoy,

Chris Farrow
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
comtypes-users mailing list
comtypes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/comtypes-us&lt;/pre&gt;</description>
    <dc:creator>Chris Farrow</dc:creator>
    <dc:date>2012-05-05T02:47:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/600">
    <title>Re: How to create a array of objects in AutoCAD ?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/600</link>
    <description>&lt;pre&gt;'u' in array.array('u',obj) i thick it just mean unicode character, so i
does not work.

circle is a object in AutoCAD, and it will show in the AutoCAD, just a
normal object like 'line','polyline' and so on:
http://www.kxcad.net/autodesk/autocad/AutoCAD_ActiveX_and_VBA_Reference/idh_circle_object.htm

i thick it is extends from IDispath, and I found these at
comtypes.automation(Line 795):

# These are not yet implemented:
##    POINTER(IUnknown): VT_UNKNOWN,
##    POINTER(IDispatch): VT_DISPATCH,

so i guess comtypes not suport it yet.

2012/4/27 Alkin Nasuf &amp;lt;nasufster-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/__________&lt;/pre&gt;</description>
    <dc:creator>孔欣驰</dc:creator>
    <dc:date>2012-04-27T08:27:42</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/599">
    <title>Re: How to create a array of objects in AutoCAD ?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/599</link>
    <description>&lt;pre&gt;Yes you can. That is an advantage of comtypes. 

Since I don't know what "circle" variable contains I would suggest you also to try.

hatch.AddOterLoop(array.array('u',circle[0])), where I guess that 'u' defines an object data type. You can also try, 

hatch.AddOterLoop(circle[0])

I have never used AutoCad so I am just guessing. Pleas show what variable "circle" contains.

Alkin

On 27 Apr 2012, at 08:25, niki &amp;lt;niki&amp;lt; at &amp;gt;vintech.bg&amp;gt; wrote:


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
comtypes-users mailing list
comtypes-users&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users
&lt;/pre&gt;</description>
    <dc:creator>Alkin Nasuf</dc:creator>
    <dc:date>2012-04-27T08:05:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/598">
    <title>Re: How to create a array of objects in AutoCAD ?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/598</link>
    <description>&lt;pre&gt;
Wild guess: can you use safearray here?

HTH
Niki

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
comtypes-users mailing list
comtypes-users&amp;lt; at &amp;gt;lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users
&lt;/pre&gt;</description>
    <dc:creator>niki</dc:creator>
    <dc:date>2012-04-27T07:25:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/597">
    <title>Re: How to create a array of objects in AutoCAD ?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/597</link>
    <description>&lt;pre&gt;How about 

hatch.AppendOuterLoop(array.array('d',[circle, ])). 

Now I am not sure about the type of the array i.e 'd' could be something else for objects.

Alkin


On 27 Apr 2012, at 04:59, 孔欣驰 &amp;lt;kxc2010-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
comtypes-users mailing list
comtypes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/comtypes-users
&lt;/pre&gt;</description>
    <dc:creator>Alkin Nasuf</dc:creator>
    <dc:date>2012-04-27T07:12:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/596">
    <title>Re: How to create a array of objects in AutoCAD ?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/596</link>
    <description>&lt;pre&gt;Thanks for your help,This is page is the VBA method description from
AutoCAD 2008 developer Help

http://www.kxcad.net/autodesk/autocad/AutoCAD_ActiveX_and_VBA_Reference/idh_appendouterloop.htm

the circle is a object in AutoCAD,In fact,this problem also appear in every
method which arguments contain array of object.

so, I want know when i use comtypes+AutoCAD, how can i send a array of
autocad object to autocad method.

Look forward to your reply

2012/4/26 Alkin Nasuf &amp;lt;nasufster-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
comtypes-users mailing list
comtypes-users-5NWGOfrQ&lt;/pre&gt;</description>
    <dc:creator>孔欣驰</dc:creator>
    <dc:date>2012-04-27T03:59:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/595">
    <title>Re: How to create a array of objects in AutoCAD ?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/595</link>
    <description>&lt;pre&gt;Dear 孔欣驰,

I might be wrong, but your question is more related to autoCAD rather than comtypes. In particular the use of "hatch.AppendOuterLoop([circle])" method. What type of arguments does it take? Could it be that the argument types you are passing are inappropriate?

What "circle" contains i.e. is it a list or an object?

Try "hatch.AppendOuterLoop(circle)"
or
"hatch.AppendOuterLoop([circle, ])".

Just shooting in the dark. I would suggest you reading the "AppendOuterLoop" method description.

Cheers,

Alkin
On 26 Apr 2012, at 08:52, 孔欣驰 &amp;lt;kxc2010&amp;lt; at &amp;gt;gmail.com&amp;gt; wrote:


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
______________________________________&lt;/pre&gt;</description>
    <dc:creator>Alkin Nasuf</dc:creator>
    <dc:date>2012-04-26T08:19:28</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/594">
    <title>How to create a array of objects in AutoCAD ?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/594</link>
    <description>&lt;pre&gt;circle = doc.ModelSpace.AddCircle(array.array('d',[0,0,0]), 100)
hatch = doc.ModelSpace.AddHatch(2, "AR-CONC", False)
hatch.AppendOuterLoop([circle])
hatch.Evaluate

I want addhatch to a circle in CAD, but when I call
hatch.AppendOuterLoop([circle]), comtypes raise a COMError:

COMError: (-2145320837, None, (u'\u5bf9\u8c61\u6570\u7ec4\u65e0\u6548',
u'AutoCAD.Application', u'C:\\Program Files\\AutoCAD
2008\\HELP\\OLE_ERR.CHM', -2145320837, None))

How can I call "AppendOuterLoop" in right way?
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
comtypes-users mailing list
comtypes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public&lt;/pre&gt;</description>
    <dc:creator>孔欣驰</dc:creator>
    <dc:date>2012-04-26T07:52:11</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/593">
    <title>Re: Supporting Component Categories (Patchprovided)</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/593</link>
    <description>&lt;pre&gt;Am 24.04.2012 09:43, schrieb Jan Wedel:

Thank you for your understanding.

Thomas


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Thomas Heller</dc:creator>
    <dc:date>2012-04-24T10:19:21</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/592">
    <title>Re: Supporting Component Categories (Patchprovided)</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/592</link>
    <description>&lt;pre&gt;Hi Thomas,

that is really sad and especially bad for us because we're have a 
serious problem here and were hoping that your experience might be able 
to help us.
However, I completely understand that you were doing this project and 
support in your spare time and no one (specifically including me) should 
demand anything from you.

I wish you all the best in whatever you're doing.

//Jan

provided)
that I
on this
sourceforge SVN
add
e.g.
perfectly.
Mi
Apr
reg_clsid,
reg_clsid,
Categories\\%s"
from
----------------------------------------------------------------------
to
------------------------------------------------------------------------
------



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.c&lt;/pre&gt;</description>
    <dc:creator>Jan Wedel</dc:creator>
    <dc:date>2012-04-24T07:43:51</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/591">
    <title>Re: Supporting Component Categories (Patchprovided)</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/591</link>
    <description>&lt;pre&gt;Jan, and others,

my apologies.  I don't have time to support comtypes any longer
(apart that I may, from time to time, answer some easy or even
interesting questions on this mailing list).

I don't even have a machine setup so that I can connect to
the sourceforge SVN server, so I cannot commit patches any more.

(If someone wants to take over the project, that would be great).

Thomas

Am 17.04.2012 10:31, schrieb Jan Wedel:



------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
&lt;/pre&gt;</description>
    <dc:creator>Thomas Heller</dc:creator>
    <dc:date>2012-04-20T19:17:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/590">
    <title>Re: How to create an instance of Interface of aCOM.</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/590</link>
    <description>&lt;pre&gt;Sorry
It's a TUPLE !!
Thank you

  ikeya
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2_______________________________________________
comtypes-users mailing list
comtypes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/comtypes-users
&lt;/pre&gt;</description>
    <dc:creator>takeshi ikeya</dc:creator>
    <dc:date>2012-04-20T10:11:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/589">
    <title>Re: How to create an instance of Interface of aCOM.</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/589</link>
    <description>&lt;pre&gt;If you had a look on my first reply, then you see the answer. It has to
be a tuple of values:

 

cc.GetModule( ('{BC26FBAC-00E1-11D4-B5D0-00600831E1F3}', 2, 0) )

 

 

Von: takeshi ikeya [mailto:takeshi.ikeya-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org] 
Gesendet: Freitag, 20. April 2012 00:22
An: comtypes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
Betreff: Re: [comtypes-users] How to create an instance of Interface of
a COM.

 

As a fact, I was thinking in my bed, and fond that I didn't specify the
Interface.

So this morning, I dashed to my PC.

And there was a mail from you.

Thanks

All goes well.

Leaving a little question

 

cc.GetModule('IntegMotorInterface.dll')

works well.

 

cc.GetModule('{BC26FBAC-00E1-11D4-B5D0-00600831E1F3}', 2, 0)

as you say, I place a quotation, but

end up with error

Traceback (most recent call last):

  File "&amp;lt;pyshell#2&amp;gt;", line 1, in &amp;lt;module&amp;gt;

    cc.GetModule('{BC26FBAC-00E1-11D4-B5D0-00600831E1F3}', 2, 0)

TypeError: GetModule() takes exactly 1 argument (3&lt;/pre&gt;</description>
    <dc:creator>Jan Wedel</dc:creator>
    <dc:date>2012-04-20T07:29:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/588">
    <title>Re: How to create an instance of Interface of aCOM.</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/588</link>
    <description>&lt;pre&gt;As a fact, I was thinking in my bed, and fond that I didn't specify the
Interface.
So this morning, I dashed to my PC.
And there was a mail from you.
Thanks
All goes well.
Leaving a little question

cc.GetModule('IntegMotorInterface.dll')
works well.

cc.GetModule('{BC26FBAC-00E1-11D4-B5D0-00600831E1F3}', 2, 0)
as you say, I place a quotation, but
end up with error
Traceback (most recent call last):
  File "&amp;lt;pyshell#2&amp;gt;", line 1, in &amp;lt;module&amp;gt;
    cc.GetModule('{BC26FBAC-00E1-11D4-B5D0-00600831E1F3}', 2, 0)
TypeError: GetModule() takes exactly 1 argument (3 given)

So I deleted last 2 argments (,2 ,0).
More error messages.
Why ?

Regards
  ikeya
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2_______________________________________________
comtypes-users mailing list
comtypes-users-5NWGOfrQmn&lt;/pre&gt;</description>
    <dc:creator>takeshi ikeya</dc:creator>
    <dc:date>2012-04-19T22:21:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/587">
    <title>Re: Serious problem with RPC_E_SERVERFAULT(0x80010105)</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/587</link>
    <description>&lt;pre&gt;Hi, I managed to get the windows debug symbols to work and I get this 
exception:
(d18.cc8): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=0725ff5b ebx=029e76e8 ecx=00390000 edx=029e76e8 esi=03686278 
edi=029e76e0
eip=774265c9 esp=0021ecbc ebp=0021ecf0 iopl=0         nv up ei pl nz na 
pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             
efl=00210206
ntdll!RtlpLowFragHeapFree+0x31:
774265c9 8b4604          mov     eax,dword ptr [esi+4] 
ds:0023:0368627c=????????

And this is the stack trace (if it helps at all):

#  ChildEBP RetAddr  Args to Child              
00 0021ecf0 7742657a 0021edcc 029e76e8 01f685fe 
ntdll!RtlpLowFragHeapFree+0x31 (FPO: [Non-Fpo])
01 0021ed04 76f49c46 00390000 00000000 029e76e0 ntdll!RtlFreeHeap+0x101 
(FPO: [Non-Fpo])
02 0021ed18 7718afbd 00390000 00000000 029e76e8 kernel32!HeapFree+0x14 
(FPO: [Non-Fpo])
03 0021ed2c 7718afd9 7725f6f8 029e76e8 002&lt;/pre&gt;</description>
    <dc:creator>Jan Wedel</dc:creator>
    <dc:date>2012-04-19T14:46:39</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/586">
    <title>Re: How to create an instance of Interface of aCOM.</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/586</link>
    <description>&lt;pre&gt;Ok, 

your first attempt didnt work because you needed a string:

cc.GetModule("{BC26FBAC-00E1-11D4-B5D0-00600831E1F3}", 2, 0)

When using QueryInterface, you need an interface ;)

That means:

smiCom = 
smi.QueryInterface(comtypes.gen.INTEGMOTORINTERFACELib.IMyInterface)

where you should replace "IMyInterface" with the name of the interface 
you need.

Von: takeshi ikeya [mailto:takeshi.ikeya-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org] 
Gesendet: Donnerstag, 19. April 2012 13:34
An: comtypes-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
Betreff: Re: [comtypes-users] How to create an instance of Interface of 
a COM.

Thank you Jan for your quick responce.
I tried according to your advice.

this is OK

SyntaxError: invalid syntax
  and -11D4- is hilighted
So, I tried this

# Generating comtypes.gen._BC26FBAC_00E1_11D4_B5D0_00600831E1F3_0_2_0
# Generating comtypes.gen.INTEGMOTORINTERFACELib
&amp;lt;module 'comtypes.gen.INTEGMOTORINTERFACELib' from 
'C:\Python27\lib\site-packages\comtypes\gen\_BC26FBAC_00E1_1&lt;/pre&gt;</description>
    <dc:creator>Jan Wedel</dc:creator>
    <dc:date>2012-04-19T11:58:33</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/585">
    <title>Re: How to create an instance of Interface of aCOM.</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/585</link>
    <description>&lt;pre&gt;Thank you Jan for your quick responce.
I tried according to your advice.

this is OK

SyntaxError: invalid syntax
  and -11D4- is hilighted
So, I tried this

# Generating comtypes.gen._BC26FBAC_00E1_11D4_B5D0_00600831E1F3_0_2_0
# Generating comtypes.gen.INTEGMOTORINTERFACELib
&amp;lt;module 'comtypes.gen.INTEGMOTORINTERFACELib' from
'C:\Python27\lib\site-packages\comtypes\gen\_BC26FBAC_00E1_11D4_B5D0_00600831E1F3_0_2_0.py'&amp;gt;

seems OK


No problem, as this far.
But


Traceback (most recent call last):
  File "&amp;lt;pyshell#5&amp;gt;", line 1, in &amp;lt;module&amp;gt;
    smiCom = smi.QueryInterface(comtypes.gen.INTEGMOTORINTERFACELib)
  File "C:\Python27\lib\site-packages\comtypes\__init__.py", line 1075, in
QueryInterface
    p = POINTER(interface)()
TypeError: must be a ctypes type

What is this Error ?
How can I go ahead ?

Regards
  ikeya
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in U&lt;/pre&gt;</description>
    <dc:creator>takeshi ikeya</dc:creator>
    <dc:date>2012-04-19T11:34:24</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/584">
    <title>Serious problem with RPC_E_SERVERFAULT (0x80010105)</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/584</link>
    <description>&lt;pre&gt;Hi,

we have almost finished our COM server using comtypes. Once we tried to 
deploy it on a Windows Server 2008, the client shows an 
RPC_E_SERVERFAULT (0x80010105). We've tried three different Win XP 
machines which all work, Win 2008 server and Win 7 shows the same 
issues. I can reproduce the issue with two different c++ based clients 
and using comtypes client as well.

The problem is, that there is no exception thrown within python code. 
I've debugged my application with winpdb and neither my code nor the 
surrounding comtypes python code throws an exception, as far as I can 
say. However, when I attach the windows debugger to the python process 
and add a breakpoint on uncatched exceptions, the debugger stops 
somewhere within assembler code of PyObject_Call and shows an illegal 
access violation. I can't say who is accessing which memory. For every 
crash, I see an entry in the windows event console showing python.exe 
and ntdll.dll.

Again, according to my previous question, probably I'm messing up&lt;/pre&gt;</description>
    <dc:creator>Jan Wedel</dc:creator>
    <dc:date>2012-04-19T10:44:56</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/583">
    <title>Re: How to create an instance of Interface of aCOM.</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/583</link>
    <description>&lt;pre&gt;Hi,

if your interfaces are located in a type library, you need to load the 
type lib first:

from comtypes.client import GetModule
GetModule(('{TYPELIB_GUID}', VERSION_MAJOR, VERSION_MINOR))

or your can use the dll directly:

GetModule('typelib.dll')

When correctly loaded, you should be able to import the generated python 
file

import comtypes.gen.YOUR_TYPELIB_ALIAS

then you can do the type cast to your interface

instance = 
smi.QueryInterface(comtypes.gen.YOUR_TYPELIB_ALIAS.IYourInterface)

//Jan

Von: takeshi ikeya [mailto:takeshi.ikeya-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org] 
Gesendet: Donnerstag, 19. April 2012 06:09
An: comtypes-users
Betreff: [comtypes-users] How to create an instance of Interface of a 
COM.

Could anyone help me ?
I'm trying to use Animatics' SMIEngine from comtypes.
It's expalined here.
http://www.animatics.com/products/software/animatics/code-dev-software/smiengine.html

I installed SMIEngine.
I could create an instance of 'SMIEngine.SMIHost'.
This is what I did.
Next, I must&lt;/pre&gt;</description>
    <dc:creator>Jan Wedel</dc:creator>
    <dc:date>2012-04-19T08:12:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/582">
    <title>How to create an instance of Interface of a COM.</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/582</link>
    <description>&lt;pre&gt;Could anyone help me ?
I'm trying to use Animatics' SMIEngine from comtypes.
It's expalined here.
http://www.animatics.com/products/software/animatics/code-dev-software/smiengine.html

I installed SMIEngine.
I could create an instance of 'SMIEngine.SMIHost'.
This is what I did.
Next, I must create an instance of ISMIComm.
At this point, I lost my way.

I looked it with OLE/COM Object Viewer.

SMIHost Class
 +--ISMICMotion
 +--ISMIComm
 +--ISMIPath
 +--ISupportErrorInfo
 +--IUnknown

SMIHost Class
  CLSID = Notes Link
   +--{ GUID } [&amp;lt;no name.] = SMIHost Class
   +--{ GUID } [AppID] = { GUID }
       +--InprocServer32 = C:\WINDOWS\system32\IntegMotorInterface.dll
       +--InprocServer32 = Both
       +--ProgID = SMIEngine.SMIHost.1
       +--Programmable
       +--TypeLib = { GUID }
       +--VersionIndependentProgID = SMIEngine.SMIHost
  AppID
   +--{ GUID } = SMIHost Class
  SMIEngine.SMIHost.1 = SMIHost Class
   +--CLSID = { GUID }
  TypeLib =
   +--{ GUID }
       +--2.0 = IntegMotorInterface 2.0 Type Li&lt;/pre&gt;</description>
    <dc:creator>takeshi ikeya</dc:creator>
    <dc:date>2012-04-19T04:08:50</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.comtypes.user/581">
    <title>Supporting Component Categories (Patch provided)</title>
    <link>http://permalink.gmane.org/gmane.comp.python.comtypes.user/581</link>
    <description>&lt;pre&gt;Hi,

Ive patched comtypes to support COM categories. In my case, an OPC 
client requires categories. It checks the registry for supported 
categories and if not one category is found, it will not support 
interaction with the server even if the server has implemented and 
published all required interfaces. 

An object can publish its supported categories which are represented by 
an registry entry. 

Ive changed the "comtypes\server\register.py" and added a few lines 
(see diff below). I'm not sure if I used the registry functions 
correctly, but it works for me. Using the following code, you can add a 
new attribute "_reg_catids_" to your python COM class which should be a 
list of GUID strings:

class MyComServer(CoClass):
(...)

_reg_catids_ = [ '{ FIRST CATID }', '{ SECOND CATID }', ]

(..)

This is probably not the most flexible way to do it (it may support e.g. 
interface objects instead of strings), but for me it works perfectly. It 
would be nice if this could be added to comtypes trunk.

This is &lt;/pre&gt;</description>
    <dc:creator>Jan Wedel</dc:creator>
    <dc:date>2012-04-17T08:31:36</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.comtypes.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.comtypes.user</link>
  </textinput>
</rdf:RDF>

