[EMAIL PROTECTED] wrote:
> I'm trying to call a COM-function which first parameter is a reference to a 
> VARIANT. The COM object that contains this function supports early-bound 
> automation over MakePy.
>
> The corresponding C-code  is:
>
> LONG lValue;
> lValue = plQueryNote->GetVarSize();
> LPBYTE buff = new BYTE[lValue];
> VARIANT varData;
> varData.vt = VT_BYREF;
> varData.byref = buff;
> plQueryNote->ReadVarBlock(&varData,0,lValue);
>
> I have no idea how to define the VARIANT and how to pass it as 
> byref-style-parameter in python with win32com. I found no documentation for a 
> problem like this in the web. It would be great if someone could help me.

Is the parameter declared as [out,retval] in the type library?  If so,
then Python should create the variant and return it to you:
    varData = QueryNote.ReadVarBlock( 0, lValue )

-- 
Tim Roberts, [EMAIL PROTECTED]
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to