[python-win32] How to create a empty com object
Mark Hammond
mhammond at skippinet.com.au
Sat Feb 19 01:03:28 CET 2011
[Re-added the python-win32 list - please keep replies on list]
On 19/02/2011 12:51 AM, matteo.boscolo at boscolini.eu wrote:
> with None It dose not work ..
In what way doesn't it work? AFAIK, None is the closest thing Python
has to Nothing - although you could try setting it to pythoncon.Empty
See the docs for nothing at
http://msdn.microsoft.com/en-us/library/0x9tb07z.aspx
> I need to create an empty ITDComponent I think ..
There isn't really any such thing...
Cheers,
Mark
>
> regards,
> Matteo
>
> From: "Mark Hammond" skippy.hammond at gmail.com
> To: "Matteo Boscolo" matteo.boscolo at boscolini.eu
> Cc:
> Date: Fri, 18 Feb 2011 17:09:50 +1100
> Subject: Re: [python-win32] How to create a empty com object
>
> > On 18/02/2011 3:30 AM, Matteo Boscolo wrote:
> > > Hi all,
> > > I have a property that need an empty comobject
> > >
> > > |C++ definition:
> > > HRESULT activeComponent(
> > > [out, retval] ITDComponent** pVal)
> > > HRESULT activeComponent([in] ITDComponent* pVal)|
> > >
> > > how can I do it with python ??
> > > In vb6 i use the following code:
> > > pComponent.Document.activeComponent = Nothing
> >
> > You might find setting it to None works...
> >
> > HTH,
> >
> > Mark
More information about the python-win32
mailing list