Re: [python-win32] Creating a process and getting a handle

2008-01-22 Thread Alec Bennett
Please post what you find on this, I'm curious too. If you do go the enum windows route, It thought I'd post my notes on this since I recently got it working. It's somewhat confusing (for me at least) since it uses a callback: # Callback function for findWindowHandle def windowEnumerationHandler

[python-win32] Getting Network Information/Statistics

2008-01-22 Thread >.>
I got the interface name from win32util.browse() in Vista and XP. I think XP is Giving me the wrong number because it differs from what I'm reading in perfmon everytime and it seems to be counting down from that number after every subsequent call. ex: perfmon will give me a last of 0.0 and win32pd

Re: [python-win32] Creating a process and getting a handle

2008-01-22 Thread Tim Roberts
Mike Driscoll wrote: > I am trying to get a handle on an external process (Internet Explorer 6 in > this case) that I open using win32process. I need the handle so that I can > make said process the top window. When you call CreateProcess, that window should automatically become the top window.

[python-win32] Creating a process and getting a handle

2008-01-22 Thread Mike Driscoll
Hi, I am trying to get a handle on an external process (Internet Explorer 6 in this case) that I open using win32process. I need the handle so that I can make said process the top window. Here's what I've tried so far: import win32process import win32gui info = win32process.CreateProcess(None,

Re: [python-win32] Getting Network Information/Statistics

2008-01-22 Thread Tim Roberts
sai rabbit wrote: > I want to get bytes sent and received in total and by each application > if possible. I tried winpdh and winpdhutil but it reports the wrong > number for Received in XP and doesn't seem to work for network stats > in Vista: > > [code] > >>> import win32pdh > >>> intf = 'Intel

Re: [python-win32] problem accessing OPC clients from thread

2008-01-22 Thread Tim Roberts
caxelrud wrote: > Hi, > I need some help on OPC and Python (using makepy and Matrikon simulator). > I am getting an error when trying to AddItem. > The error is: > The item definition doesn't conform to the server's syntax. > OPC_E_INVALIDITEMID 0xC0040008L > > Any idea ? > Thanks > Here the code:

[python-win32] Getting Network Information/Statistics

2008-01-22 Thread sai rabbit
I want to get bytes sent and received in total and by each application if possible. I tried winpdh and winpdhutil but it reports the wrong number for Received in XP and doesn't seem to work for network stats in Vista: [code] >>> import win32pdh >>> intf = 'Intel[R] PRO_100 Network Connection' >>>

Re: [python-win32] problem accessing OPC clients from thread

2008-01-22 Thread caxelrud
Hi, I need some help on OPC and Python (using makepy and Matrikon simulator). I am getting an error when trying to AddItem. The error is: The item definition doesn't conform to the server's syntax. OPC_E_INVALIDITEMID 0xC0040008L Any idea ? Thanks Here the code: >>> import win32com.client >>> op

Re: [python-win32] ctypes and python dll callbacks

2008-01-22 Thread Mark Hammond
> Sorry but where can I find "RegisterServiceCtrlHandlerEx" ? I could > only find "servicemanager.RegisterServiceCtrlHandler" which is different and > do not catch logon/logoff events. servicemanager.RegisterServiceCtrlHandler() automatically calls RegisterServiceCtrlHandlerEx on 2k and later. See

Re: [python-win32] ctypes and python dll callbacks

2008-01-22 Thread le dahut
Sorry but where can I find "RegisterServiceCtrlHandlerEx" ? I could only find "servicemanager.RegisterServiceCtrlHandler" which is different and do not catch logon/logoff events. Thanks. Mark Hammond a écrit : >> Hello, >> I'm trying to use RegisterServiceCtrlHandlerEx. Since it isn't >> availa