Re: Using same interfaces for in-proc vs. out-proc
Drew wrote:
OK. I've included the header generated from the cut down IDL and =
shared.h
and am able to compile/link. Now I'm trying to test a simple COM =
client
using VB6 and it appears that -all- coclasses must be included in the =
cut
down version of the IDL because VB does not see any interface other =
than my
Application interface and the Document interface that is exposed =
through the
Application interface. So is my observation correct that all coclasses =
must
be included in the cut down IDL and that their GUIDs must be unique =
between
EXE and DLL projects?
This is a bit surprising. I expected VB to follow the link and read =
shared.tlb. It looks like it does, but only extracts the types that are =
referenced by those mentioned in the "main" TLB (likely recursively).
You seem to have interfaces that are not reachable from the root =
application object. I'm curious - how are those supposed to be used from =
VB? Anyway, you can make them visible by forward-declaring them in =
"main" TLB:
library MyLibrary {
importlib("shared.tlb")
interface IMyOtherInterface;
coclass MyServer {
[default] interface IMyApplicationInterface;
};
}
This should make IMyOtherInterface, and everything that it references, =
visible in VB.
--
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