|
|
|
|
|
| | |
|
Active Server Pages what is asp programming how to sample asp example code scripts software asp forum mail sessions applications global.asa CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
The QueryInterface() method in COM |
From: |
Sayan Mukherjee |
Date: |
7/17/2001 6:27:02 AM |
IP: |
202.33.252.99 |
Hi all,
I have a server component written in VC++ 6.0
which has 5 interfaces. I have a client program
that can successfully do CoCreateInstance() on each of the interfaces.
What I want is to do CoCreateInstance() on any
one interface and use QueryInterface() to get
pointers to the other interfaces. This saves
memory as compared to doing multiple
CoCreateInstance() because the same COM object
is used while returning pointers to the other
interfaces.
But when I try to do the above, QueryInterface()
does not work and its return value is a big
negative number. I have already got an
implementation of QueryInterface(). If I run the
client code in Debug mode, I find that the
control goes into the ATL code and calls its
implementation of QI().
Please help with some constructive suggestion or
code examples. You can also give me URL's of
palces where you are sure that a solution can
be found. Don't send http://msdn.microsoft.com
as your suggestion!
Waiting for a reply.
With best regards,
Sayan
|
|
|

|
|
|
|
|
|
|
|
|
|