Hey guys
Got a quick question I have Visual Studio Professional and was wondering when making a class libary (.dll) can you add any files you want? I want to add around 100 audio files in a dll . It's for my other program
(also if yes which audio files just wav or MP3)
Thanks
Question about Dll
Started by CriticalError, Jan 04 2011 04:06 PM
3 replies to this topic
#1
Posted 04 January 2011 - 04:06 PM
|
|
|
#2
Posted 04 January 2011 - 10:34 PM
Yes you can. We usually call it resource dll if the dll containing only embedded files and no actual codes. There is no limitation of what kind of files can be embedded into a dll. However we usually use RC_DATA type for types not specifically defined by MS. I believe there is special type of WAV resource. I just don't remember the constant names.
#3
Posted 05 January 2011 - 03:29 AM
Well yeah I did try to embed to Mp3 audio files there are around 114 of them an it totals up to around 1.60GB, however it gave me an error and it did not work. I will get that error back up.
#4
Posted 05 January 2011 - 09:11 AM
OMG! Don't get me wrong, but that's a very wrong way to use resource dll. Only embed tiny resources and not in large number. Using separate files is much better that your current approach. For example, it would take longer time to search your files also take longer time to load a file since when loading it must seek the through 1.60GB content.
If you want to store large number of files of considerable size into a single file, maybe you should consider using a database that can store data into one file. This approach is better since the db file is designed for easy searching and loading. SQLite and Firebird (embedded) to name some db that support storing to single file.
If you want to store large number of files of considerable size into a single file, maybe you should consider using a database that can store data into one file. This approach is better since the db file is designed for easy searching and loading. SQLite and Firebird (embedded) to name some db that support storing to single file.


Sign In
Create Account


Back to top









