Re: Thread apartment IE7
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Thu, 4 Jan 2007 11:07:58 -0500
Cedric Scheyder <cedric.scheyder@xxxxxxxxxxxxxxxxx> wrote:
hr = iElem->put_value(T2OLE(sValue));
put_value expects a BSTR. T2OLE does not produce one. You see, while any
BSTR can be treated as LPOLESTR, not every LPOLESTR can be treated as a
BSTR. A BSTR must be allocated with SysAllocString or similar.
Make it
hr = iElem->put_value(CComBSTR(sValue));
Also, if by any chance you are trying to do this to <input type="file">,
it's not going to work: value property is read-only for this control,
for security reasons.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- References:
- Re: Thread apartment IE7
- From: Igor Tandetnik
- Re: Thread apartment IE7
- From: Igor Tandetnik
- Re: Thread apartment IE7
- From: Igor Tandetnik
- Re: Thread apartment IE7
- Prev by Date: Re: Thread apartment IE7
- Next by Date: Re: Thread apartment IE7
- Previous by thread: Re: Thread apartment IE7
- Next by thread: Re: Thread apartment IE7
- Index(es):
Loading