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. COM DLL from Delphi in ActiveX Control

COM DLL from Delphi in ActiveX Control

Scheduled Pinned Locked Moved C / C++ / MFC
comdelphihelpquestion
7 Posts 3 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.
  • C Offline
    C Offline
    CraZyToLearn
    wrote on last edited by
    #1

    I want to create ActiveX control which calls COM DLL from Delphi. I have tried this way HINSTANCE m_sampleDLL = LoadLibrary("D:\\SampleDLL.dll"); m_sample_dll = (SAMPLE)GetProcAddress(m_sampleDLL,"TestFunction"); but I am unable to get handle to Testfunction. Is this way is correct? or wether I have to use some other technique to call DLL which COM and written in Delphi. Please Help! THANX...

    :) CraZyToLearn :)

    CPalliniC R 2 Replies Last reply
    0
    • C CraZyToLearn

      I want to create ActiveX control which calls COM DLL from Delphi. I have tried this way HINSTANCE m_sampleDLL = LoadLibrary("D:\\SampleDLL.dll"); m_sample_dll = (SAMPLE)GetProcAddress(m_sampleDLL,"TestFunction"); but I am unable to get handle to Testfunction. Is this way is correct? or wether I have to use some other technique to call DLL which COM and written in Delphi. Please Help! THANX...

      :) CraZyToLearn :)

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      You have to access COM components methods following COM rules. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      In testa che avete, signor di Ceprano?

      C 1 Reply Last reply
      0
      • C CraZyToLearn

        I want to create ActiveX control which calls COM DLL from Delphi. I have tried this way HINSTANCE m_sampleDLL = LoadLibrary("D:\\SampleDLL.dll"); m_sample_dll = (SAMPLE)GetProcAddress(m_sampleDLL,"TestFunction"); but I am unable to get handle to Testfunction. Is this way is correct? or wether I have to use some other technique to call DLL which COM and written in Delphi. Please Help! THANX...

        :) CraZyToLearn :)

        R Offline
        R Offline
        Rajkumar R
        wrote on last edited by
        #3

        Pallini's reply still holds. But are you sure SampleDLL.dll has exported function called TestFunction.

        C 1 Reply Last reply
        0
        • R Rajkumar R

          Pallini's reply still holds. But are you sure SampleDLL.dll has exported function called TestFunction.

          C Offline
          C Offline
          CraZyToLearn
          wrote on last edited by
          #4

          Thanks Rajkumar , TestFunction is not export function, but its COM componet so is there any other way, We cant change Delphi DLL.

          :) CraZyToLearn :)

          R 1 Reply Last reply
          0
          • CPalliniC CPallini

            You have to access COM components methods following COM rules. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

            C Offline
            C Offline
            CraZyToLearn
            wrote on last edited by
            #5

            Thanks CPallini, I really new to all these, Will you please help me in this respect, Means How to access COM components Methods.

            :) CraZyToLearn :)

            CPalliniC 1 Reply Last reply
            0
            • C CraZyToLearn

              Thanks Rajkumar , TestFunction is not export function, but its COM componet so is there any other way, We cant change Delphi DLL.

              :) CraZyToLearn :)

              R Offline
              R Offline
              Rajkumar R
              wrote on last edited by
              #6

              what you are expected from sampleDLL.dll. As you are calling from your activex, you might be having some specfication to use it. Do you want the COM object to be created from the dll?

              1 Reply Last reply
              0
              • C CraZyToLearn

                Thanks CPallini, I really new to all these, Will you please help me in this respect, Means How to access COM components Methods.

                :) CraZyToLearn :)

                CPalliniC Offline
                CPalliniC Offline
                CPallini
                wrote on last edited by
                #7

                See here.

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

                In testa che avete, signor di Ceprano?

                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