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. about dlls in visual C ++ 6 and Visual C++ 2005

about dlls in visual C ++ 6 and Visual C++ 2005

Scheduled Pinned Locked Moved C / C++ / MFC
c++visual-studiohelptutorial
7 Posts 4 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.
  • D Offline
    D Offline
    DSPCottage
    wrote on last edited by
    #1

    Dear all I have two programs: 1. the source code of a dll suppose that a.dll 2. the source code of program which uses a.dll suppose b.exe. both of them were written in vc6 IDE, and both are operational now I compile the a.dll in visual C++ 2005. but when I want to use a.dll with b.exe , when I call GetProcAddress to retrieve the address of functions , Null value is returned. I dont know how to overcome this problem. If u have any idea please let me know. I must say that a.dll should be backward compatible , thus it is not possible to change b.exe program. Regards Mahdi

    N I 2 Replies Last reply
    0
    • D DSPCottage

      Dear all I have two programs: 1. the source code of a dll suppose that a.dll 2. the source code of program which uses a.dll suppose b.exe. both of them were written in vc6 IDE, and both are operational now I compile the a.dll in visual C++ 2005. but when I want to use a.dll with b.exe , when I call GetProcAddress to retrieve the address of functions , Null value is returned. I dont know how to overcome this problem. If u have any idea please let me know. I must say that a.dll should be backward compatible , thus it is not possible to change b.exe program. Regards Mahdi

      N Offline
      N Offline
      Naveen
      wrote on last edited by
      #2

      Gut Mikh Tappe wrote:

      when I call GetProcAddress to retrieve the address of functions , Null value is returned

      Check the below two things. 1) Debug the application and when the GetProcAddress returns NULL, put err,hr in the watch window to find the last error occured. 2)Take the dependecy walker and open the dll. In the export section of the dll, check whether the function is exported or not.

      nave [OpenedFileFinder] [My Blog]

      D 1 Reply Last reply
      0
      • N Naveen

        Gut Mikh Tappe wrote:

        when I call GetProcAddress to retrieve the address of functions , Null value is returned

        Check the below two things. 1) Debug the application and when the GetProcAddress returns NULL, put err,hr in the watch window to find the last error occured. 2)Take the dependecy walker and open the dll. In the export section of the dll, check whether the function is exported or not.

        nave [OpenedFileFinder] [My Blog]

        D Offline
        D Offline
        DSPCottage
        wrote on last edited by
        #3

        thank you mr Nave I found that I didnt export functions of dll. But i dont know what dependency walker is. whould you please let me know about it. I download a tiny software to see the export list of the dll. Regards Mahdi

        N 1 Reply Last reply
        0
        • D DSPCottage

          thank you mr Nave I found that I didnt export functions of dll. But i dont know what dependency walker is. whould you please let me know about it. I download a tiny software to see the export list of the dll. Regards Mahdi

          N Offline
          N Offline
          Naveen
          wrote on last edited by
          #4

          Gut Mikh Tappe wrote:

          But i dont know what dependency walker is.

          Dependency Walker 2.2[^]

          nave [OpenedFileFinder] [My Blog]

          D 1 Reply Last reply
          0
          • N Naveen

            Gut Mikh Tappe wrote:

            But i dont know what dependency walker is.

            Dependency Walker 2.2[^]

            nave [OpenedFileFinder] [My Blog]

            D Offline
            D Offline
            DSPCottage
            wrote on last edited by
            #5

            Thank you mr nave you are my abroad friend. Hope you to be successfull. Regards Mahdi

            E 1 Reply Last reply
            0
            • D DSPCottage

              Thank you mr nave you are my abroad friend. Hope you to be successfull. Regards Mahdi

              E Offline
              E Offline
              Eytukan
              wrote on last edited by
              #6

              Always keep in mind there's nothing to do with which version of the VC compiler was used to make the dll. Always check for the dependency & exported functions ,that's it.


              OK,. what country just started work for the day ? The ASP.NET forum is flooded with retarded questions. -Christian Graus Best wishes to Rexx[^]

              1 Reply Last reply
              0
              • D DSPCottage

                Dear all I have two programs: 1. the source code of a dll suppose that a.dll 2. the source code of program which uses a.dll suppose b.exe. both of them were written in vc6 IDE, and both are operational now I compile the a.dll in visual C++ 2005. but when I want to use a.dll with b.exe , when I call GetProcAddress to retrieve the address of functions , Null value is returned. I dont know how to overcome this problem. If u have any idea please let me know. I must say that a.dll should be backward compatible , thus it is not possible to change b.exe program. Regards Mahdi

                I Offline
                I Offline
                Iain Clarke Warrior Programmer
                wrote on last edited by
                #7

                In addition to the previous (good) answers, you'll want to look up "name decoration", and "extern "C" {" in the search engine of your choice. Iain.

                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