Re: QueryInterface failure.
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