IRunningObjectTable::Register
-
hello, I have implemented a component from scratch. i mean including the classfactory. (no ATL) I create an instance of the object and when i try to register it with the running object table it queries for two interfaces IMarshal and IProxyManager( i determined this using the IID's). why are these being invoked? Also initially i had derived my interface from IUnknown and the call to register failed(crashed). when i derived it from IDispatch and implemented the IDispatch methods i found that the GetTypeInfoCount,GetTypeInfo and the GetIdsfromNames methods are being called. Why are these being called? The parameter values for these methods are also some huge values like 55648930 Could someone explain this to me. Thanks in advance Gita
-
hello, I have implemented a component from scratch. i mean including the classfactory. (no ATL) I create an instance of the object and when i try to register it with the running object table it queries for two interfaces IMarshal and IProxyManager( i determined this using the IID's). why are these being invoked? Also initially i had derived my interface from IUnknown and the call to register failed(crashed). when i derived it from IDispatch and implemented the IDispatch methods i found that the GetTypeInfoCount,GetTypeInfo and the GetIdsfromNames methods are being called. Why are these being called? The parameter values for these methods are also some huge values like 55648930 Could someone explain this to me. Thanks in advance Gita
Hi Gita, My first question is why do you use the ROT for component registering? Usually you do this only if you are writing your own moniker class. I can't say anything about the IProxyManager interface, but if the IMarshal interface was queried it means that somebody wants to create a proxy for your object. Regards, Alex Gorev, Dundas Software.
-
Hi Gita, My first question is why do you use the ROT for component registering? Usually you do this only if you are writing your own moniker class. I can't say anything about the IProxyManager interface, but if the IMarshal interface was queried it means that somebody wants to create a proxy for your object. Regards, Alex Gorev, Dundas Software.
Hello Alex, I am not writing my own moniker class but i am using monikers. I need to access my component from another process. I use the component to exchange data between an ActiveX component and an application. So i register it with ROT using an ItemMoniker created with the ClassId. And then i get an itf pointer to the same object from my application. Initially i tried by registering the OCX itself with ROT and it worked fine. I could even invoke the methods. But the problem was revoking it from the ROT. I aint in a position to decide when the use of OCX is over. So i decided to have another component between the ocx and appln. I am new to this. So its trial and error. I found use of Monikers and ROT the simplest. Is there a better way to do it? I have one more question. I finally managed to register the object with the ROT (i tried with the ROT method Register and well as RegisterActiveObject) but when i try to get an itf pointer to it , in my application, it simply deletes the entry from ROT!! I am unable to pinpoint where i am going wrong. Any suggestions? -Gita
-
Hello Alex, I am not writing my own moniker class but i am using monikers. I need to access my component from another process. I use the component to exchange data between an ActiveX component and an application. So i register it with ROT using an ItemMoniker created with the ClassId. And then i get an itf pointer to the same object from my application. Initially i tried by registering the OCX itself with ROT and it worked fine. I could even invoke the methods. But the problem was revoking it from the ROT. I aint in a position to decide when the use of OCX is over. So i decided to have another component between the ocx and appln. I am new to this. So its trial and error. I found use of Monikers and ROT the simplest. Is there a better way to do it? I have one more question. I finally managed to register the object with the ROT (i tried with the ROT method Register and well as RegisterActiveObject) but when i try to get an itf pointer to it , in my application, it simply deletes the entry from ROT!! I am unable to pinpoint where i am going wrong. Any suggestions? -Gita
Hi, If you want to keep the object in the ROT till it's registration is explicitly revoked you can use the "strong" registartion by specifying ROTFLAGS_REGISTRATIONKEEPSALIVE flag in the IRunningObjectTable::Register method. Regards, Alex Gorev, Dundas Software.
-
Hi, If you want to keep the object in the ROT till it's registration is explicitly revoked you can use the "strong" registartion by specifying ROTFLAGS_REGISTRATIONKEEPSALIVE flag in the IRunningObjectTable::Register method. Regards, Alex Gorev, Dundas Software.
Hi Alex, The trouble is that it gets deleted despite me using the ROTFLAGS_REGISTRATIONKEEPSALIVE flag! -Gita
-
Hi Alex, The trouble is that it gets deleted despite me using the ROTFLAGS_REGISTRATIONKEEPSALIVE flag! -Gita
Hi! ??? Concerning MSDN it MUST stay there till you call Revoke method.... ??? I have no idea what's going on... Alex Gorev, Dundas Software.