Hello. We have an ATL pipeline component and we would like to insert our
own
Dictionary object within the Orderform (thinking that both ASP and ASP.NET
users can access it later). We do not want to pollute the Orderform with
our
own keys and so would like to have them separated out into a
sub-dictionary.
How do I accomplish this?
The following test code did not work. It was generating an exception (and
I
have yet to find out how to troubleshoot):
CComPtr<IDictionary> pTest;
pTest.CoCreateInstance( IID_IDictionary );
pTest->put_Value( CComBSTR( "Test" ), CComVariant( "Value" ) );
CComQIPtr<IDispatch> pDisp( pTest );
PutDictValue( m_pdictOrder, L"_my_own_dictionary", CComVariant( pDisp ) );
where PutDictValue() simply calls:
hr = pdict->putref_Value( bstrName, var );
among other things.
Anything that jumps out? It's been a long time since I touched this code
so
pardon me if my usage of the ATL objects is totally off. I would love to
be
corrected.
Thanks,
Ever