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. COM
  4. Implementing IDispatch::GetIDSOfNames

Implementing IDispatch::GetIDSOfNames

Scheduled Pinned Locked Moved COM
question
7 Posts 2 Posters 0 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.
  • A Offline
    A Offline
    Alex Cramer
    wrote on last edited by
    #1

    I need to implement IDispatch::GetIDSOfNames without creating type library, i.e. I need to return certain ID for certain name. How??

    V 1 Reply Last reply
    0
    • A Alex Cramer

      I need to implement IDispatch::GetIDSOfNames without creating type library, i.e. I need to return certain ID for certain name. How??

      V Offline
      V Offline
      Vi2
      wrote on last edited by
      #2

      You must implement your version of GetIDsOfNames and correlate it with Invoke. Also you must implement the GetTypeInfoCount and GetTypeInfo to return E_NOTIMPL. And last, you should describe your interface as empty interface, derived from IDispatch. With best wishes, Vita

      A 1 Reply Last reply
      0
      • V Vi2

        You must implement your version of GetIDsOfNames and correlate it with Invoke. Also you must implement the GetTypeInfoCount and GetTypeInfo to return E_NOTIMPL. And last, you should describe your interface as empty interface, derived from IDispatch. With best wishes, Vita

        A Offline
        A Offline
        Alex Cramer
        wrote on last edited by
        #3

        Yes, thanks, but can I ask some more about memory management. How to allocate memory in IDispatch::GetIDSOfNames implementation? (hich function is needed?)

        V 1 Reply Last reply
        0
        • A Alex Cramer

          Yes, thanks, but can I ask some more about memory management. How to allocate memory in IDispatch::GetIDSOfNames implementation? (hich function is needed?)

          V Offline
          V Offline
          Vi2
          wrote on last edited by
          #4

          I do not see any problem with memory. GetIDSOfNames does not return any memory pointer. If you want to allocate the internal buffers's memory then you can use any strategy you want. With best wishes, Vita

          A 1 Reply Last reply
          0
          • V Vi2

            I do not see any problem with memory. GetIDSOfNames does not return any memory pointer. If you want to allocate the internal buffers's memory then you can use any strategy you want. With best wishes, Vita

            A Offline
            A Offline
            Alex Cramer
            wrote on last edited by
            #5

            Sorry, I thought I must allocate memory for rgDispId. Now all correct! P.S. Russian programmers answered me for the my last 4 questions. Hm...

            V 1 Reply Last reply
            0
            • A Alex Cramer

              Sorry, I thought I must allocate memory for rgDispId. Now all correct! P.S. Russian programmers answered me for the my last 4 questions. Hm...

              V Offline
              V Offline
              Vi2
              wrote on last edited by
              #6

              Welcome on www.RSDN.ru, if you can read the Russian text. With best wishes, Vita

              A 1 Reply Last reply
              0
              • V Vi2

                Welcome on www.RSDN.ru, if you can read the Russian text. With best wishes, Vita

                A Offline
                A Offline
                Alex Cramer
                wrote on last edited by
                #7

                Yeah... My nick is ADK there...

                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