More Than Just Code In A DLL File?

This is a discussion on More Than Just Code In A DLL File? within the Windows Programming forums, part of the Platform Specific Boards category; I am wondering how and if there is a way to put Bitmap images and .MP3 sound files into a ...

  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,265

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, 01:44 PM
  2. Problems passing a file pointer to functions
    By smitchell in forum C Programming
    Replies: 4
    Last Post: 09-30-2008, 03: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, 08:54 AM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 05:54 PM
  5. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 04:30 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21