Pythonwin com?
Sam Schulenburg
samschul at pacbell.net
Thu May 11 23:55:52 EDT 2000
Mark;
You cought my typo. Frame is initialized as a null dictionary.
The function call Buff=GetFrame(1,Frame) returns Buff as an array of
singleton tupples. i.e ((1,),(2,)...(n,)). I have to double check
tommorow, but I believe Visual Basic returns a double valued array such
as Frame[0][0]=1,Frame[0][1]=0,and Frame[1][0]=2, Frame[1][1]=0,etc.
This Object was written by Roper Scientific a few years ago, and
updated as needed over the years.
On another note. The examples I have discribed work under Pywin-129,
but not subsequent versions under WinNT 4.0.
Sam Schulenburg
In article <PqJS4.917$Kc3.4797 at news-server.bigpond.net.au>,
"Mark Hammond" <mhammond at skippinet.com.au> wrote:
> "Sam Schulenburg" <samschul at pacbell.net> wrote in message
> news:8ffgdr$840$1 at nnrp1.deja.com...
>
> > Frame = {} # Here I have to set Frame up as a tuple
>
> That doesnt look like a tuple to me?
>
> > return self._ApplyTypes_(0xa,
> This decoded is:
>
> > 1,
> > (24, 0),
> 24 = VT_VOID - function has no return value.
>
> > ((2, 1), (16396, 3)),
>
> 2 params:
> (2,1) == VT_I2, PARAMFLAG_FIN
> (19396,3) == VT_BYREF | VT_VARIANT, PARAMFLAG_FIN|PARAMFLAG_FOUT
>
> ie, first param in an "in" integer.
>
> second param in an "in/out" byref variant. The "in" implies it is not
> simply an out.
>
> My guess is that the problem is the VT_VARIANT - ie, Python doesnt
know
> the type of the param at all - it only knows it is byref.
>
> What are the types of the objects in the array? What we can do is
change
> the makepy definition for:
>
> > def PutFrame(self,
> > frame=defaultNamedNotOptArg,
> > FrameArray=defaultNamedNotOptArg):
> > """Put Frame Data"""
> > return self._ApplyTypes_(0xb,
> > 1,
> > (24, 0),
> > ((2, 1), (16396, 3)),
>
> Note the params are almost identical - we could change this to
VT_BYREF |
> VT_I2 (or some more specific type than variant - whatever makes
sense).
>
> Who wrote the object?
>
> Mark.
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
More information about the Python-list
mailing list