Login  Register

Re: Some more wonderings in COM-Wonderland

Posted by Blair McGlashan-3 on Dec 02, 2005; 10:04pm
URL: https://forum.world.st/type-library-for-IShellFolder2-tp3376630p3376690.html

"rush" <[hidden email]> wrote in message
news:dmp7ls$e10$[hidden email]...

>I am still looking for typelibrary I could use for IShellFolder2, so I
>tried
> to poke around IEnumIDList. I have located typelib for it and AX wizards
> generated me a wrapper as a subclass of IUnknown.
>
> Anyway dolphin has IEnumXXX class, and various enum classes seem to
> inherit
> from there so I guess  my IEnumIDList should also go there. Those classes
> seem to be written by hand, generally only overiding class methods
> elementClass and defineFunctions. So probably all I need to do is add a
> subclass to IEnumXXX and define those two methods.

Yep, these are created by hand because if you simply auto-generate them
there is nothing to share the obvious similarity. Of course in a statically
typed language one IEnumXXX really isn't like another, but in Smalltalk we
don't care so much about the argument types.

>... Do I also need to poke
> around class guid? is it ok just to tell it:
>
> IEnumIDList guid: (IID fromString:
> '{000214F2-0000-0000-C000-000000000046}' ) "got this magic number from
> idl."
>

Yes, that's all you need to do to set it up to have the right interface
identifier.

> rush
> p.s. I have noticed that only IEnumRect does not have defineFunctions
> overided, is that on purpose or omission?

It's a very old sample (an implementation of a sample in the classic OLE2
book), so probably an omission.

Regards

Blair