Labelmanager2_tlb::IDocument* __fastcall Open(BSTR strDocName/*[in]*/,
VARIANT_BOOL ReadOnly/*[in,def,opt]*/)
{
TDispID dispid(/ Open / DISPID(7));
TAutoArgs<2> _args;
_args[1] = strDocName /*[VT_BSTR:0]*/;
_args[2] = ReadOnly /*[VT_BOOL:0]*/;
OleFunction(_dispid, _args);
return (Labelmanager2_tlb::IDocument* /*[C1]*/)(LPDISPATCH) /*[VT_DISPATCH:1]*/_args.GetRetVariant();
}
Its looks like the opterator= doesnt work.
I tried step execution ,than i found
_args[1] = strDocName /*[VT_BSTR:0]*/;
this line is entering into the bool opertartor as follow
OleVariant& operator =(const bool rhs)
{
PVariant(this)->operator=(rhs);
return *this;
}
so ,maybe we can as follow
Labelmanager2_tlb::IDocument* __fastcall Open(BSTR strDocName/*[in]*/,
VARIANT_BOOL ReadOnly/*[in,def,opt]*/)
{
TDispID dispid(/ Open / DISPID(7));
TAutoArgs<2> _args;
UnicodeString strChange = strDocName;
_args[1] = strChange /*[VT_BSTR:0]*/;
_args[2] = ReadOnly /*[VT_BOOL:0]*/;
OleFunction(_dispid, _args);
return (Labelmanager2_tlb::IDocument* /*[C1]*/)(LPDISPATCH) /*[VT_DISPATCH:1]*/_args.GetRetVariant();
}