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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. DLL header hiding question...

DLL header hiding question...

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

    :(( Hi, I was wondering if I am given a DLL with a set of header files to use (of which i don't have the source to). Is there a way to create a new DLL (with a new set of header files) that uses the functions of the old DLL without giving access to the old header files? Is this possible? In short, I want to create a new wrapper DLL with a new set of header files without sharing information of the old headers. I've been looking all over the web and couldn't find anything. Thanks! RCJ

    D L 2 Replies Last reply
    0
    • J JulesChrono

      :(( Hi, I was wondering if I am given a DLL with a set of header files to use (of which i don't have the source to). Is there a way to create a new DLL (with a new set of header files) that uses the functions of the old DLL without giving access to the old header files? Is this possible? In short, I want to create a new wrapper DLL with a new set of header files without sharing information of the old headers. I've been looking all over the web and couldn't find anything. Thanks! RCJ

      D Offline
      D Offline
      DaneStorm
      wrote on last edited by
      #2

      Hi There I don't know if I have understand your question correct, but my answer is, to what I have undertand :-) : I would create a new header file, called DllInterface.h which will declare all the functions/methods that you want to export. Afterwards, create a new class called CreatorDll, which will implement all the original methods. In this class, in your cpp file, only include all the header files you want to hide. In the corresponding header file include the Interface file. If you have some classes which you want to offer users of the dll, make creator functions in your creator class, which returns with instances of the corresponding classes. Then the places where you want to use the dll, only include the headerfile for the creator. This is the way I do, when I want to export some methods of class, which perhaps uses a lot of classes. I hope this gives you an idea, or maybe can help you in the wanted direction. Best regards, Søren Madsen Denmark

      1 Reply Last reply
      0
      • J JulesChrono

        :(( Hi, I was wondering if I am given a DLL with a set of header files to use (of which i don't have the source to). Is there a way to create a new DLL (with a new set of header files) that uses the functions of the old DLL without giving access to the old header files? Is this possible? In short, I want to create a new wrapper DLL with a new set of header files without sharing information of the old headers. I've been looking all over the web and couldn't find anything. Thanks! RCJ

        L Offline
        L Offline
        lzzqqq
        wrote on last edited by
        #3

        I think it can been make: 1.We create a dll project whitch the new header file. 2.at our dll project,we relocate the function to the old function in the old dll,use Loadlibrary("old.dll"); and GetProcAddress(...) can do it. 3.builder our dll project,so we get a new dll. :)

        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