Thread: Can applications store data in DLL's ?

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    104

    Lightbulb Can applications store data in DLL's ?

    Is it possible to create a dll to be used by an application to store changing data in? What I'm thinking of is using a dll as sort of an encrypted data file.

  2. #2
    Registered User sean345's Avatar
    Join Date
    Mar 2002
    Posts
    346
    I do not think it is possible to store data in a DLL like you would a file. If you are using windows you could try storing the data in the registry.

    - Sean
    If cities were built like software is built, the first woodpecker to come along would level civilization.
    Black Frog Studios

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Dll files (as exe files) are meant to be read only......

  4. #4
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Location
    Bangalore, India
    Posts
    345
    If you are talking of only the file with an extension .dll, there is no problem. But if your question was in perspective of "Dynamic Link Library", the answer is "No"! You could instead try on some for of IPC.

  5. #5
    Registered User
    Join Date
    Dec 2001
    Posts
    104
    Could you elaborate on what IPC is?

  6. #6
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    IPC means Inter Process Communication (a means of sharing data between applications at runtime - though what relevance it has here is beyond me )

    Most compilers (or more specifically linkers) will allow you to create your own section in a dll and nominate it as shared.......In that section you can hold data variables that are shared with any process that loads the dll...

    So a shared section with an int is created in a dll....2 processes both load that dll at runtime......both can read and write to that int...

  7. #7
    Registered User
    Join Date
    Dec 2001
    Posts
    104
    What about a wrapper?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Fixing my program
    By Mcwaffle in forum C Programming
    Replies: 5
    Last Post: 11-05-2008, 03:55 AM
  2. singly linked circular list
    By DarkDot in forum C++ Programming
    Replies: 0
    Last Post: 04-24-2007, 08:55 PM
  3. Where to store the data?
    By cerin in forum C++ Programming
    Replies: 6
    Last Post: 03-01-2005, 09:02 PM
  4. C Programming Question
    By TK in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 07-04-2002, 07:11 PM
  5. Do you store store one off data arrays in a class?
    By blood.angel in forum C++ Programming
    Replies: 5
    Last Post: 06-24-2002, 12:05 PM