Embed image in DLL

Is it possible to embed an image (say, a GIF file) inside a DLL? like a VB executable would store a picturebox-control contents?

The DLL will be used by an ASP script to return an HTML string. I could just reference it by building the <img src> tag into the string and have the image stored separatley on disk, but I want the DLL to be completely self-contained.

I reckon it may be possible to do it by encoding the image in Base64, but I thought I would ask EE before I waste any time on it.
Any examples would be nice.
astromexAsked:
Who is Participating?
 
fds_fatboyCommented:
You could store it in a resource file and output it as a byte array - or even write it out to a temp file as when you need it. I don't know if it possible to reference it in the <img src= ...> tag like that though.
0
 
astromexAuthor Commented:
Hi again fds_fatboy.
I've not used resource files before, how do they work? I am using VB6 by the way.

Re: the <img> tag,
What I meant was that the DLL would output the string "<img src='images/logo.gif'>" and as long as the file "logo.gif" is in the "images" directory (within web scope), then the browser will display it.
0
 
astromexAuthor Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.