Advertisement

Adding Binary Files to EXE

Started by September 30, 2000 03:13 PM
2 comments, last by Celtof 24 years, 1 month ago
I''d like to add binary files to my exe (I use VC++) , so I plan to use resource files but I don''t know how. My binary is not a bitmap, nor an icon.. I can give it an ID (ex IDR_BIN), but I don''t know how I can use this resource after that. How can I ''load'' it ? with a fopen ? Thanks for your reply or a link to a page which explains that Thans !!! Sorry for this stupid question, but I''m a newbie
why would u want to?
Advertisement
You can simply load the ressource like any other ressource, with the win32 ressource functions. Look at MSDN !

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
    HRSRC hrsrc = ::FindResource(...);HGLOBAL hglobal = ::LoadResource(..., hrsrc);void* pdata = ::LockResource(hglobal);    

Look up these three functions in MSDN, replace "..." with proper arguments, add error handling and you should be good to go.

This topic is closed to new replies.

Advertisement