> Thanks very much for your reply but I would really like the members to
> be visible. Rather than going through all the hassle of GetIDsOfNames
[quoted text clipped - 4 lines]
>
> Is that true?
Yes. Now I unterstand what you want to achieve.
You have to define an interface with the methods you want to
expose and let your class implement that interface.
In this case you have to use ClassInterfaceType.None.
Rob
emma_middlebrook@fastmail.fm - 20 Sep 2005 19:39 GMT
> > Thanks very much for your reply but I would really like the members to
> > be visible. Rather than going through all the hassle of GetIDsOfNames
[quoted text clipped - 10 lines]
> expose and let your class implement that interface.
> In this case you have to use ClassInterfaceType.None.
Robert
Thanks very much for your reply again and sorry I didn't make myself
properly clear before. I did read MSDN and so roughly tried to do what
you suggest i.e. I got the class to implement an interface that I
wished to expose (without System.Object stuff) and tried it out. It
didn't seem to work but thinking about it, it might be because I didn't
explicitly use None thinking that it might be the default. Am at home
now but will have another look tomorrow!
Thanks for you help
Emma
emma_middlebrook@fastmail.fm - 21 Sep 2005 10:30 GMT
Hi
Your advice worked perfectly. Thankyou. I now have my class as follows
in the type library:
coclass DistributionFactory {
interface _Object;
[default] interface IDistributionFactory;
};
Now I have two further questions!
1. Is there a way to remove the superfluous (for us) _Object interface?
2. Would anyone be able to suggest a reason why unmanaged code would
ever want to make use of that interface?
Many thanks to the newsrgoup!
Emma