Re: [python-win32] MemoryError: CreatingSafeArray when trying touse VBCOM API

2007-01-10 Thread Mark Hammond
> if I do: > s = win32com.client.Record("myStruct", o) > s.myString = "test" > s.myInt = 12 > > o.myFunct(arg1=("test","test"), arg2=1, arg3=s) > > it then complains: > TypeError: Objects for SAFEARRAYS must be sequences (of > sequences), or a > buffer object. In your original mail, you indicated

Re: [python-win32] MemoryError: CreatingSafeArray when trying to use VBCOM API

2007-01-10 Thread Rex Corrovan
I figured out when this happens. It happens when you try to pass an array into an arg that requires a Record. I am really confused as to how this all works, but will start trying to find some info on what is going on. Form what I can see, the code in the makepy generated file is trying to take

Re: [python-win32] win32ui and resources for dialogs

2007-01-10 Thread Mark Hammond
> Hi Mark > > I made the following change: > > > --- > // @pymethod |PyCDialog|CreateWindow|Create a modeless window for the > dialog box. > static PyObject *ui_dialog_create_window( PyObject *self, > PyObject *args ) > { > AFX_MANAGE_STATE(AfxGetStaticModuleState()); > >

Re: [python-win32] GetVolumeInformation throwing exception

2007-01-10 Thread Tim Roberts
Gustavo Tabares wrote: > Hrm ok, so this: > > win32api.GetVolumeInformation('F:') > > only works if your current working directory isn't somewhere on that > drive (as in my example code)? The rest of the time you need to > specify an additional slash or to be safe always include the os > separator.

Re: [python-win32] GetVolumeInformation throwing exception

2007-01-10 Thread Gustavo Tabares
Hrm ok, so this: win32api.GetVolumeInformation('F:') only works if your current working directory isn't somewhere on that drive (as in my example code)? The rest of the time you need to specify an additional slash or to be safe always include the os separator. Thanks, Gus On 1/10/07, Tim Robe

Re: [python-win32] GetVolumeInformation throwing exception

2007-01-10 Thread Tim Roberts
Gustavo Tabares wrote: > > I'm having a problem with the code below and I'm not sure if there is > a bug in win32api.GetVolumeInformation. There is a simple workaround, > but I'm curious nonetheless. Any help is appreciated. > ... > The simple workaround is to add os.sep to the F: string in the las

[python-win32] GetVolumeInformation throwing exception

2007-01-10 Thread Gustavo Tabares
Hi all, I'm having a problem with the code below and I'm not sure if there is a bug in win32api.GetVolumeInformation. There is a simple workaround, but I'm curious nonetheless. Any help is appreciated. I'm using Python 2.5 final with pywin32-210. # F: is a mapped network drive of a Windows XP

Re: [python-win32] win32ui and resources for dialogs

2007-01-10 Thread Michael Morisak
Mark Hammond schrieb: >> i tried to add this to the source of python-win32 >> but i refuses to compile with some link issue >> > > What issue is that? I'd like for pywin32 to build without too much effort - > and at least fail gracefully when it doesn't. > > As Niki says, avoiding MFC is a go

Re: [python-win32] win32ui and resources for dialogs

2007-01-10 Thread Mark Hammond
> i tried to add this to the source of python-win32 > but i refuses to compile with some link issue What issue is that? I'd like for pywin32 to build without too much effort - and at least fail gracefully when it doesn't. As Niki says, avoiding MFC is a good idea. You should also find win32gui

Re: [python-win32] win32ui and resources for dialogs

2007-01-10 Thread Niki Spahiev
Michael Morisak wrote: > > Does anybody know what i could do about this problem > I do not want to write this whole dlg in c++ since i would have to do a > lot of COM in this dialog then Do you really need MFC for dialogs? Using MFC for python plug-in is a PITA. We use ctypes for pure win32 dia

Re: [python-win32] win32ui and resources for dialogs

2007-01-10 Thread Michael Morisak
Michael Morisak schrieb: > Hi > > > I have the following Situation: > > I have a dialog resource in an dll and I want to open a modal dialog > with this resource. > > dlg= pywin.mfc.dialog.Dialog(myDialogID) > dlg.DoModal() > > works but the problem is that i would set the Parent of the Dialog > i