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.
Who is Participating?
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.
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.
astromexAuthor Commented:
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.