[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 478
  • Last Modified:

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.
  • 2
1 Solution
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:

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now