Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. IRunningObjectTable::Register

IRunningObjectTable::Register

Scheduled Pinned Locked Moved C / C++ / MFC
c++question
6 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    User 731968
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • U User 731968

      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

      A Offline
      A Offline
      Alex Gorev
      wrote on last edited by
      #2

      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.

      U 1 Reply Last reply
      0
      • A Alex Gorev

        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.

        U Offline
        U Offline
        User 731968
        wrote on last edited by
        #3

        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

        A 1 Reply Last reply
        0
        • U User 731968

          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

          A Offline
          A Offline
          Alex Gorev
          wrote on last edited by
          #4

          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.

          U 1 Reply Last reply
          0
          • A Alex Gorev

            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.

            U Offline
            U Offline
            User 731968
            wrote on last edited by
            #5

            Hi Alex, The trouble is that it gets deleted despite me using the ROTFLAGS_REGISTRATIONKEEPSALIVE flag! -Gita

            A 1 Reply Last reply
            0
            • U User 731968

              Hi Alex, The trouble is that it gets deleted despite me using the ROTFLAGS_REGISTRATIONKEEPSALIVE flag! -Gita

              A Offline
              A Offline
              Alex Gorev
              wrote on last edited by
              #6

              Hi! ??? Concerning MSDN it MUST stay there till you call Revoke method.... ??? I have no idea what's going on... Alex Gorev, Dundas Software.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups