views:

1108

answers:

2

I am guessing, as Images and Icons are stored in a resx file, I am guessing that it should be relatively easy to store a byte array (or similar stream) in an embedded Resource file.

How might this be done, should I pretend the binary stream is a Bitmap, or if the Resource file is the wrong place to be embedding binary data, what other techniques should I investigate?

+1  A: 

Create an RTF file containing the data, and then check out these articles:

How to embed and access resources by using Visual C#

Getting an embedded resource file out of an assembly

Mitch Wheat
BTW, it was an easy google...
Mitch Wheat
Not according to my last 1/2 hr ;p
johnc
@lagerdalek: ;) ...
Mitch Wheat
the trick is getting your keywords right. half the prob is getting that correct :)
Pure.Krome
+1  A: 

Mitch has pointed to the right answer, but one trick you can keep up your sleeve is storing the data compressed and decompressing on first access. It helps keep your DLLs small. I use this trick to Embed X64 and X32 versions of a native dll:

See for example the code here: http://code.google.com/p/videobrowser/source/browse/trunk/MediaInfoProvider/LibraryLoader.cs

Sam Saffron