Let's stop polluting this thread any longer. I posted further reply
in your real thread.
1) Assuming these are all Automation-compatible interfaces,
that's indeed what you need to do.
2) Not sure what you mean by a DLL desribing all interfaces.
The type library serves that role, but you can certainly bundle
it within a self-registering resource DLL which would kind of
fit what you describe (at least semantically if not syntactically).
It's a variation on 1).
Type libraries are registered via regtlib.exe. Or programmatically
via LoadRegTypeLib().
Not sure what you mean by a registration ref count issue. I'm
not aware of any reference counting during registration...
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Angela Yan" <yanyan9@hotmail.com> wrote in message
news:%23Mdx5rcqGHA.3248@TK2MSFTNGP04.phx.gbl...
Hi,
So am I correct to say that there are 2 methods to deal with the problem:
1. Compile the common IDL file that containing all the shared interfaces
into a typlib. Then all the projects import the IDL file and the typlib
in their respective 'main' IDL files. During deployment, it needs to
register the common typlib (hmm.. how to register??) and take care of the
registration refCount issue.
2. Compile a DLL project that describes all the shared interfaces. Then
all the projects can use wizard "implement interface" to point to that
DLL project and implement the respective interfaces. The imported DLL
project path will be auto added into stdafx.h. In this case, does it need
to take care refCount issue for the common DLL during deployment??
Thank you very much.
Angela
"Alexander Nickolov" <agnickolov@mvps.org> wrote in message
news:uOQXpHcqGHA.4988@TK2MSFTNGP04.phx.gbl...
That question really has nothing to do with the original thread.
You'll probably want to group all shared interfaces as a separate
project that only produces a proxy/stub DLL (or a type library,
whatever is appropriate). Then in the other projects you only
refer to those interfaces, but do not generate any marshaling info
for them. That means you import the shared IDL and importlib()
the shared type library.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Angela Yan" <yanyan9@hotmail.com> wrote in message
news:euBC4tvpGHA.4368@TK2MSFTNGP05.phx.gbl...
Hi All,
I am something very similar now. But my question is: what if I have 2
local servers which implement the same interface, should I regsvr one
or both local server's proxy/stub? Or, should I compile the common IDL
file into a common typelib and regsvr it? Or is there any other
recommendation?
Thanks.
Angela
"Dinesh Venugopalan" <DineshVenugopalan@discussions.microsoft.com>
wrote in message
news:3708CAF9-2EA6-44DF-A780-29B002B2FB77@microsoft.com...
Hi All,
Thanks for the help. I created and registered the proxy dll. Now The
code is
working like charm. I am sorry for the late post here.
Dinesh Venugopalan
"Alexander Nickolov" wrote:
No. You have to build and register the proxy stub DLL yourself.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Dinesh Venugopalan" <dinesh@epiance.com> wrote in message
news:OOR28FSkGHA.896@TK2MSFTNGP04.phx.gbl...
Hi,
I am using VC8. As rightly pointed out I dont see any .mk file. If
its
part of the solution then wont this proxy/stub get compiled and
registered
when I compile my Exe? I have a feeling that something may be wrong
the
way I declared my Interface in the .h file or the way I am adding
it to
the exe class.
Thanks in advance for the help.
Dinesh
"Alexander Nickolov" <agnickolov@mvps.org> wrote in message
news:u09j9jKkGHA.4224@TK2MSFTNGP05.phx.gbl...
In VC 7.0 and later the ATL appwizard creates a proxy/stub DLL
project in the solution instead.
--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD
email: agnickolov@mvps.org
MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================
"Sandy" <sk9000@gmail.com> wrote in message
news:1150388060.511568.327640@f6g2000cwb.googlegroups.com...
Probably you have not registered the proxy/stub dll for the
interface
which is required for cross-apartment marshalling.
This would not have been an issue when your object was in a dll
beacuse
then the object would have been created in the same apartment as
the
client's, hence no marshalling dll required.
With out-of-process object, the marshalling dll is required.
If you used the VC wizard to build your COM dll/exe, then it may
have
created the make file (something like ...ps.mk) to generate the
proxy
stub dll for your interface. Just build this make file and
register the
dll using regsvr32. That should do.
regards