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. LoadLibrary Help

LoadLibrary Help

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialc++help
6 Posts 5 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
    AR Reddy
    wrote on last edited by
    #1

    Hi, I am very new to VC++ and I got to work in VC++. My requirement is to call dll from an exe and I need to pass some value to the dll. I need to use that value in the dll. I am using LoadLibrary method to invoke the dll. But how to pass a value and how to use that value in the dll. Please help me. for example: LoadLibrary("test.dll", "display this text"); On load of dll (::OnInitDialog()): i want to display the message "dispay this text". How could I do this. Please help me out in this. Thanks in Advance,

    AR Reddy

    S K D 3 Replies Last reply
    0
    • A AR Reddy

      Hi, I am very new to VC++ and I got to work in VC++. My requirement is to call dll from an exe and I need to pass some value to the dll. I need to use that value in the dll. I am using LoadLibrary method to invoke the dll. But how to pass a value and how to use that value in the dll. Please help me. for example: LoadLibrary("test.dll", "display this text"); On load of dll (::OnInitDialog()): i want to display the message "dispay this text". How could I do this. Please help me out in this. Thanks in Advance,

      AR Reddy

      S Offline
      S Offline
      sashoalm
      wrote on last edited by
      #2

      see GetProcAddress[^]

      There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

      A 1 Reply Last reply
      0
      • S sashoalm

        see GetProcAddress[^]

        There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition. Blaise Pascal

        A Offline
        A Offline
        AR Reddy
        wrote on last edited by
        #3

        Thanks sashoalm, Now I got to know how to pass the value to a dll. But how to get that value from dll method. Please let me know. I am very poor in VC++. Thanks in advance,

        AR Reddy

        C 1 Reply Last reply
        0
        • A AR Reddy

          Thanks sashoalm, Now I got to know how to pass the value to a dll. But how to get that value from dll method. Please let me know. I am very poor in VC++. Thanks in advance,

          AR Reddy

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

          You first need to read some basic document about, see, for instance [^]. :)

          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
          [My articles]

          1 Reply Last reply
          0
          • A AR Reddy

            Hi, I am very new to VC++ and I got to work in VC++. My requirement is to call dll from an exe and I need to pass some value to the dll. I need to use that value in the dll. I am using LoadLibrary method to invoke the dll. But how to pass a value and how to use that value in the dll. Please help me. for example: LoadLibrary("test.dll", "display this text"); On load of dll (::OnInitDialog()): i want to display the message "dispay this text". How could I do this. Please help me out in this. Thanks in Advance,

            AR Reddy

            K Offline
            K Offline
            KarstenK
            wrote on last edited by
            #5

            if you have the Header and lib of the dll you can dynamicly link in the dll. Read this: Step by Step: Calling C++ DLLs from VC++ and VB - Part 1[^]

            Press F1 for help or google it. Greetings from Germany

            1 Reply Last reply
            0
            • A AR Reddy

              Hi, I am very new to VC++ and I got to work in VC++. My requirement is to call dll from an exe and I need to pass some value to the dll. I need to use that value in the dll. I am using LoadLibrary method to invoke the dll. But how to pass a value and how to use that value in the dll. Please help me. for example: LoadLibrary("test.dll", "display this text"); On load of dll (::OnInitDialog()): i want to display the message "dispay this text". How could I do this. Please help me out in this. Thanks in Advance,

              AR Reddy

              D Offline
              D Offline
              David Crow
              wrote on last edited by
              #6

              AR Reddy wrote:

              ...and I need to pass some value to the dll.

              There's no such concept. DLLs contain exported functions. You first have to load one of those functions (via GetProcAddress()) and then pass arguments to it.

              "Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

              "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

              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