Re: BSTR * or VARIANT with VT_BSTR|VT_BYREF
From: Rossen Tzonev (rossenbg_at_hotmail.com)
Date: 10/21/04
- Next message: souleata_at_xrs.net: "RE: Iwebbrowser & IHTMLDocument2"
- Previous message: Brian Muth: "Re: licensed attribute"
- In reply to: Igor Tandetnik: "Re: BSTR * or VARIANT with VT_BSTR|VT_BYREF"
- Next in thread: Brian Muth: "Re: BSTR * or VARIANT with VT_BSTR|VT_BYREF"
- Reply: Brian Muth: "Re: BSTR * or VARIANT with VT_BSTR|VT_BYREF"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 22 Oct 2004 02:27:56 +0300
Well Igor,
Sorry for not finishing my words. Here is example:
if BSTR** worked, then this is valid ( get\put pointer to variable which
holds pointer to BSTR )
[ id(1), propget ] HRESULT SomeProperty( [ out ] BSTR ** _pVal );
[ id(1), propput ] HRESULT SomeProperty( [ in ] BSTR * _pVal );
Because BSTR** does not work then I had to change it to:
[ id(1), propget ] HRESULT SomeProperty( [ out ] VARIANT * _pVal );
[ id(1), propput ] HRESULT SomeProperty( [ in ] VARIANT _pVal );
>From my point of view ( when looked as [ out ] parameter ) "VARIANT *" with
VT_BSTR|VT_BYREF do the same job as "BSTR**" and produce the same output
meaning :)
The purpose to experiment with all this stuff was to try some C++ tactics :)
I reach the case "BSTR **" for [ out ] and BSTR* for [ in ] and I hit the
problem I described at the beginning of this thread. In the upper code I
wanted to hold pointer to data, not the data itself, into in-process COM
object which definetely is into the memory space of the client. Just some
C++ tactics as I said.
-- Rossen Tzonev Sofia, Bulgaria "Igor Tandetnik" <itandetnik@mvps.org> wrote in message news:uWrAmxutEHA.2800@tk2msftngp13.phx.gbl... > "Rossen Tzonev" <rossenbg@hotmail.com> wrote in message > news:OGY8BqutEHA.2800@tk2msftngp13.phx.gbl >> I do not know what to say except that in MSDN I have read recently >> that when "Invoke" is used to do some stuff at any level ( my code or >> MS underlying one ) only Automation types of data are allowed. It is >> forbidded to use another one, because of incorrect bahaviour. and >> BSTR** is not Automation one :) VARIANT with VT_BSTR | VT_BYREF is >> Autonation > > VARIANT with VT_BSTR | VT_BYREF holds a BSTR*, not a BSTR**, so where do > you see a contradiction? > -- > With best wishes, > Igor Tandetnik > > "On two occasions, I have been asked [by members of Parliament], 'Pray, > Mr. Babbage, if you put into the machine wrong figures, will the right > answers come out?' I am not able to rightly apprehend the kind of > confusion of ideas that could provoke such a question." -- Charles Babbage >
- Next message: souleata_at_xrs.net: "RE: Iwebbrowser & IHTMLDocument2"
- Previous message: Brian Muth: "Re: licensed attribute"
- In reply to: Igor Tandetnik: "Re: BSTR * or VARIANT with VT_BSTR|VT_BYREF"
- Next in thread: Brian Muth: "Re: BSTR * or VARIANT with VT_BSTR|VT_BYREF"
- Reply: Brian Muth: "Re: BSTR * or VARIANT with VT_BSTR|VT_BYREF"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|