Results 1 to 8 of 8

Thread: anyone tried to embedd an image or an audio clip in a *.dll file ??

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    Saudi Arabia , Riyadh
    Posts
    8

    anyone tried to embedd an image or an audio clip in a *.dll file ??

    I am trying to make an application but i want to hide the files like Images and stuff, say I want to make a card game but i want to hide the image files in a dll file....

    Is it possible ??
    Allah only forbids you, with regard to those who fight you for (your) Faith, and drive you out, of your homes, and support (others) in driving you out, from turning to them (for friendship and protection). It is such as turn to them (in these circumstances), that do wrong. [The Holy Quran 60:9]
    http://www.al-islam.com

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Yeah its possible. Read up on resources. I've never worked with audio file, but I'm sure it can be done. Here is an example I did with images.

    Both projects are included.

    Link
    Last edited by DevGrp; Dec 10th, 2002 at 10:38 PM.
    Dont gain the world and lose your soul

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    Saudi Arabia , Riyadh
    Posts
    8
    oh thank u , yours worked fine ....

    I will see how can i do it in mine...


    by the way I have a little question, would it be the same thing with a Microsoft Access database file *.mdb ?? Can I also embedd a database in a DLL ?? is it feasible ?? or should I make the *.mdb an external password protected file ??
    Allah only forbids you, with regard to those who fight you for (your) Faith, and drive you out, of your homes, and support (others) in driving you out, from turning to them (for friendship and protection). It is such as turn to them (in these circumstances), that do wrong. [The Holy Quran 60:9]
    http://www.al-islam.com

  4. #4
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    i dont think that for a game a db would be a good idea
    \m/\m/

  5. #5
    Hyperactive Member Scott Penner's Avatar
    Join Date
    Dec 2000
    Location
    Mountain View
    Posts
    327

    Lightbulb

    oh,
    by the way
    What are you hoping to accomplish by hiding the images in the dll? You know that any .NET resource editor should be able to pull the images out, right?

    Storing a database in a dll makes no sense. If you don't want to ship the mdb file, then you will need to write the code to create it on the fly, or just use XML for that matter. (Both alternatives are pretty easy with .NET.)
    -scott
    he he he

  6. #6

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    Saudi Arabia , Riyadh
    Posts
    8
    No I won't use a db for my game

    Creating a DB on the fly using my code ?? Okay I create The Tables and load the values whenever the Program is excuted, but then where should i save the changes of inserted records ?

    Second, I think that once u build a DLL file u can't see what's inside it unless u use a code like Assembly.Load(CardImages) to access it.
    Allah only forbids you, with regard to those who fight you for (your) Faith, and drive you out, of your homes, and support (others) in driving you out, from turning to them (for friendship and protection). It is such as turn to them (in these circumstances), that do wrong. [The Holy Quran 60:9]
    http://www.al-islam.com

  7. #7
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    You can find what is in the dll using reflection. You can even call the methods too. Reflection is very powerfull.
    Dont gain the world and lose your soul

  8. #8
    Member HumanCompiler's Avatar
    Join Date
    Dec 2002
    Location
    Decatur, IN USA
    Posts
    52
    yes, Reflection kicks a$$

    I would go with Scott Penner's idea if I were you. In fact, you don't even have to directly use XML if you don't want to. The ADO.NET DataSet allows you to directly save your data directly to an XML file (the DataSet, but in a serialized way ) and then load it from that file
    -Erik Porter
    .NET MVP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width