[python-win32] how to create a valid Sink

2007-05-09 Thread Christian K.
Hi, I'd like to ask for help on how to create a valid event Sink which I can pass to the Advise() method of a message stores table. Any class I made up so far gives the same error: File stdin, line 333, in notify TypeError: The Python instance can not be converted to a COM object So what

Re: [python-win32] VT_UI1 ByRef behavior

2007-05-09 Thread Kevin Patterson
Alrighty, I'll keep looking in to it. I think it is easy to make the buffers get returned as a python list. Almost all the code exists to help with that. The tough part is telling the COM that the array being passed IN needs to become a Safe Array where the size of each element is only VT_UI1.

Re: [python-win32] Win32 service with tray icon

2007-05-09 Thread Larry Bates
Mark Hammond wrote: I'm writing a win32 service in Python. I'd like to add a tray icon displayed whenever the service is running. I have played around with SysTrayIcon.py [1], but if a user logs off and logs back on, the tray icon disappears even though the service is still running. I

[python-win32] GetOpenFileNameW InitialDir

2007-05-09 Thread Michel Claveau
Hi! I'have a problem with this code : import win32gui fname=win32gui.GetOpenFileNameW(InitialDir=C:\\dev)[0] print fname The InitialDir is not set. It's already the last dir opened, and not my request. Any idea ? Thanks by advance. Michel Claveau

Re: [python-win32] GetOpenFileNameW InitialDir

2007-05-09 Thread Paul Moore
On 09/05/07, Michel Claveau [EMAIL PROTECTED] wrote: I'have a problem with this code : import win32gui fname=win32gui.GetOpenFileNameW(InitialDir=C:\\dev)[0] print fname The InitialDir is not set. It's already the last dir opened, and not my request. Any idea ? Thanks by

Re: [python-win32] how to create a valid Sink

2007-05-09 Thread Mark Hammond
I'd like to ask for help on how to create a valid event Sink which I can pass to the Advise() method of a message stores table. This might be tricky unless pywin32 already has support for the specific interface you need. Any class I made up so far gives the same error: File stdin, line

Re: [python-win32] how to create a valid Sink

2007-05-09 Thread Christian K.
Mark Hammond wrote: I'd like to ask for help on how to create a valid event Sink which I can pass to the Advise() method of a message stores table. This might be tricky unless pywin32 already has support for the specific interface you need. I want to receive 'new mail' notifications from

Re: [python-win32] how to create a valid Sink

2007-05-09 Thread Mark Hammond
Forgive my ignorance but those are my first steps with com. Does that mean I should create and register a COM server? You should create one - you probably don't need to register it. Basically I'm trying to reimplement the following code in python:

[python-win32] Re: GetOpenFileNameW InitialDir

2007-05-09 Thread Roger Upole
Hi! I'have a problem with this code : import win32gui fname=win32gui.GetOpenFileNameW(InitialDir=C:\\dev)[0] print fname The InitialDir is not set. It's already the last dir opened, and not my request. Any idea ? Thanks by advance. Michel Claveau I can't