One extra note: I use ClassInterfaceType AutoDual. With late binding, at
least the indexer property works all right.

Signature
Best regards,
Ruslan Popov
Hi,
Currently I am finding one support professional for you on this issue. If
any update, we will reply here at the first time.
Best Regards,
Wei-Dong XU
Microsoft Product Support Services
This posting is provided "AS IS" with no warranties, and confers no rights.
It is my pleasure to be of assistance.
Ruslan Popov - 02 Nov 2005 08:49 GMT
Thanks. Here's some extra info. In the type library, the methods of interest
look like the following:
[id(00000000), propget]
HRESULT Item(
[in] BSTR name,
[out, retval] VARIANT* pRetVal);
[id(00000000), propputref]
HRESULT Item(
[in] BSTR name,
[in] VARIANT pRetVal);
[id(0x6002000d)]
HRESULT SetProperty(
[in] BSTR name,
[in] VARIANT value);
It looks like VBA does not treat parameters defined as "[in] VARIANT" like
variants. That's surprising. It may be possible to define the parameter as
VBA variant by mean of MarshalAs(short) attribute. I'm going to figure that
out.

Signature
Best regards,
Ruslan Popov
Ken Halter - 02 Nov 2005 17:52 GMT
> Hi,
>
> Currently I am finding one support professional for you on this issue. If
> any update, we will reply here at the first time.
<rant mode on>
I must say.... answers like this are worse than no answer at all. I've seen
dozens of these "I am finding someone for you" posts from MS employees and
not once have I seen any follow ups. How about this for a policy. Don't
waste people's time unless you already have the answer the "support
professional" gave you. At least, that way, people won't assume the question
is already in the process of actually getting a decent answer.
</rant mode off>

Signature
Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com
Please keep all discussions in the groups..
Ruslan Popov - 02 Nov 2005 20:30 GMT
Well, what I noticed, is the following. There're so cool guys in Microsoft
who know all the internals, who actually develop all the low-level stuff
(e.g. marshalling between COM and .NET). I saw some such guys in blogs. But
they apparently don't visit these newsgroups. Because when some more or less
serious question is asked here, it is often difficult to get a relevant
answer.
So, it looks to me sometimes that it's easier to find an appropriate person
to ask a question by oneself than the same for the guys who manage these
newsgroups.
I'm not a frequent visitor of the NG, though, so I judge by what I find in
the newsgroup search engines.

Signature
Best regards,
Ruslan Popov
Ruslan Popov - 02 Nov 2005 23:07 GMT
Hi Wei-Dong,
I've figured out the problem. Thanks Thomas Quinn
(http://blogs.msdn.com/tq/default.aspx).
It's the fault of tlbexp that marks my property with "propputref". The IDL
should be changed to propput, then recompiled by midl. Then it should work
ok. I'm impressed by getting help from Thomas so fast, he investigated that
in just hours. Thanks for your help, too.

Signature
Best regards,
Ruslan Popov
"Peter Huang" [MSFT] - 03 Nov 2005 06:36 GMT
Hi
Thanks for your quickly reply and knowledge sharing!
Also thanks for Ken's feedback, I think that is just a process to notify
the community that we have been aware of the post.
Best regards,
Peter Huang
Microsoft Online Partner Support

Signature
Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.