Btw, for now, you could workaround the problem by using Type.InvokeMember
(http://msdn.microsoft.com/en-us/library/66btctbe.aspx) directly as such:
import clr
from System.Reflection import BindingFlags
bindingFlags = BindingFlags.InvokeMethod | BindingFlags.Instance |
BindingFlags.Public | BindingFlags.IgnoreReturn
t = clr.GetClrType(type(p))
from System import Array, Byte
a = Array[Byte](map(lambda c: ord(c),elem))
t.InvokeMember("AppendChunk", bindingFlags, None, p, Array[object]([a])
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shri Borde
Sent: Wednesday, August 27, 2008 10:04 PM
To: Discussion of IronPython
Cc: Martin Maly
Subject: Re: [IronPython] What is .AppendChunk expecting?
System.Scripting.Com.VarEnumSelector.GetManagedMarshalType does not deal with
VT_ARRAY. Curt, I believe we need to add code to handle this.
Vernon, could you open a CodePlex bug please?
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Curt Hagenlocher
Sent: Wednesday, August 27, 2008 10:01 PM
To: Discussion of IronPython
Subject: Re: [IronPython] What is .AppendChunk expecting?
On Wed, Aug 27, 2008 at 9:51 PM, Vernon Cole <[EMAIL PROTECTED]> wrote:
>
> 2) implemented as:
> from System import Array,Byte
> a = Array[Byte](map(lambda c: ord(c),elem))
> p.AppendChunk(a)
> gives:
> SystemError: Unexpected VarEnum 8209.
8209 is 0x2011, which is indeed VT_UI1 | VT_ARRAY. Do you know as
what type this argument ends up getting passed when you call this
through pythoncom?
--
Curt Hagenlocher
[EMAIL PROTECTED]
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com