Howto get the process id
Alexander Eisenhuth
newsuser at stacom-software.de
Thu Jul 1 04:00:27 EDT 2004
Alexander Eisenhuth schrieb:
> Hi,
>
> I've a wxPython Application on Windows that glues a database, Excel, and
> a GUI for configuration issues using COM. Works pretty good. In the next
> step I want to integrate the GUI-dialog more into Excel, so it should
> look like a modal toplevel dialoge of Excel.
>
> I've a class for the main dialog derived from wxFrame, and doing on
> startup:
> wxFrame.__init__(self, NULL, -1, cnfDesText, size=(800,600))
>
> My Idea is now to give as parent the Window handle of Excel to the
> constructor of wxFrame.
>
> Not sure how the window handle can be retrieved (VBA, win32-Extension,
> wxWindows, ...)
>
From gmane.comp.python.wxpython - list I got a hint:
> If you can get the handle then you can probably use wx.Window_FromHWND to turn it into a wx.Window.
So I tried to get the process-id. A look into th e win32
extensions showed me a chapter of how to do it with a COM
server. I took the code:
>>> object='process'
>>> junk, instances =
win32pdh.EnumObjectItems(None,None,object,win32pdh.PERF_DETAIL_WIZARD)
Traceback (most recent call last):
File "<input>", line 1, in ?
error: (-1073738824, 'EnumObjectItems for buffer size', 'No
error message is available')
Have I overlook something ?? (I'm using XP Home)
Thanks a lot for comments
Alexander
More information about the Python-list
mailing list