Thread: More Than Just Code In A DLL File?

  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    73

    More Than Just Code In A DLL File?

    I am wondering how and if there is a way to put Bitmap images and .MP3 sound files into a DLL file and how I would possibly go about loading them into my program. Help?

  2. #2
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Add them as a resource and use LoadResource.

  3. #3
    Registered User
    Join Date
    Dec 2004
    Posts
    73
    How about a non-resource file, such as MP3, MPEG, etc..... Is there away to put that in a DLL/import it?

  4. #4
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002
    Posts
    2,544
    You can add binary files as a resource:
    Code:
    IDSND_INTRO RCDATA "intro.mp3"
    IDMOV_END RCDATA "end.mpg"

  5. #5
    Registered User
    Join Date
    Dec 2004
    Posts
    73
    How would I import/export them? Should I use __declspec (dllexport) or if they are defined like you show then can I just use them as/is?

  6. #6
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File transfer- the file sometimes not full transferred
    By shu_fei86 in forum C# Programming
    Replies: 13
    Last Post: 03-13-2009, 12:44 PM
  2. Problems passing a file pointer to functions
    By smitchell in forum C Programming
    Replies: 4
    Last Post: 09-30-2008, 02:29 PM
  3. To find the memory leaks without using any tools
    By asadullah in forum C Programming
    Replies: 2
    Last Post: 05-12-2008, 07:54 AM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  5. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 03:30 PM