QueryInterface calls
-
Hi! I have observed that when a COM object is created its QI method is called for the following interfaces: 1. IUnknown 2. IMarshal x2 3. {0000001B-0000-0000-C000-000000000046} (IdentityUnmarshal ??) 4. IUnknown 5. ISdtMarshalInfo 6. IExternalConnection 7. {4C1E39E1-E3E3-4296-AA86-3C938D896E92} :wtf: 8. IManagedObject 9. IConnectionPointContainer x2 10.{1C73A30-2A1C-11CE-ADE5-00AA0044773D} :sigh: 11. IFeed (this is my interface) 12. {1C73A30-2A1C-11CE-ADE5-00AA0044773D} 13. IFeed Could any of you explain where these calls come from? Could be SCM doing his things? Proxy/Stub related? :confused: Thanks in advance Gizzo
-
Hi! I have observed that when a COM object is created its QI method is called for the following interfaces: 1. IUnknown 2. IMarshal x2 3. {0000001B-0000-0000-C000-000000000046} (IdentityUnmarshal ??) 4. IUnknown 5. ISdtMarshalInfo 6. IExternalConnection 7. {4C1E39E1-E3E3-4296-AA86-3C938D896E92} :wtf: 8. IManagedObject 9. IConnectionPointContainer x2 10.{1C73A30-2A1C-11CE-ADE5-00AA0044773D} :sigh: 11. IFeed (this is my interface) 12. {1C73A30-2A1C-11CE-ADE5-00AA0044773D} 13. IFeed Could any of you explain where these calls come from? Could be SCM doing his things? Proxy/Stub related? :confused: Thanks in advance Gizzo
Simple OOPS concept of Construction and Destruction Ifeed Derived From IConnectionPointContainer which from IManagedObject from IExternalConnection from iSdtMarshalInfo with Super One IUnknown
[Vote One Here, Complete my Survey....] Alok Gupta
visit me at http://www.thisisalok.tk "I Think Believe this Will Help" -
Simple OOPS concept of Construction and Destruction Ifeed Derived From IConnectionPointContainer which from IManagedObject from IExternalConnection from iSdtMarshalInfo with Super One IUnknown
[Vote One Here, Complete my Survey....] Alok Gupta
visit me at http://www.thisisalok.tk "I Think Believe this Will Help"Hi again, IFeed is my interface and it is derived from IDispatch. The class that implements IFeed is CFeedCOM... i think i'm going to post it...
class CFeedCOM : public CReferenceCountedObject, public IFeed, public ISupportErrorInfo, public IConnectionPointContainerImpl, public CProxy_IFeedEvents
CReferenceCountedObject is taken from Lim Bio Liong (this guy have saved my life with his articles). The reason I wanted to know what happens under the hood of an object creation is: When a client fails (sometimes, not always) the next client trying to connect to the server doesn't follow the same steps that the previous one. Instead of querying all the interfaces posted in my previous message, my object is asked for: 1. IUnknown 2. IMarshal x2 3. {0000001B-0000-0000-C000-000000000046} 4. IID_IUnknown And now, something happens, and my object is released until m_cRef goes to zero. Then, QI is called for IManagedObject, m_cRef is incremented to 2, and again released until zero. This causes the destruction of my object of course what I'm trying to avoid. I don't know if I explained the problem. I only want to know what is happening there. Thanks for answering. Best regards, Gizzo.