[python-win32] VARIANT as byref parameter
Mark Hammond
mhammond at skippinet.com.au
Thu Sep 18 02:14:51 CEST 2008
> Well, that implies that the buffer is an in/out variant, not an output.
> I'm not sure how to construct a buffer Pythoncom will correctly
> translate in this instance. Mark, maybe?
I'm not sure - but I'm not even sure it is legal automation to do that:
> LONG lValue;
> lValue = plQueryNote->GetVarSize();
> LPBYTE buff = new BYTE[lValue];
> VARIANT varData;
> varData.vt = VT_BYREF;
> varData.byref = buff;
> plQueryNote->ReadVarBlock(&varData,0,lValue);
Isn't VT_BYREF a modifier? It looks to me like the variant in this snippet
isn't legal. What I'd really like to see is an example in VBScript/VB or
any other IDispatch aware language that isn't c++ ;)
Cheers,
MArk
More information about the python-win32
mailing list