/* Keywords: .NET, C#, Resources, ala Win32, .rc, .res, .resx, raw data The piece of code below makes an executable that builds a .resx file from Binary files. Once your resources are created : - Create a MyRes.cs file with an MyRes class, add it the project. - Insert the MyRes.resx file to the project too. Read the resources in the file with the following code : System.Resources.ResourceManager rm = new System.Resources.ResourceManager(typeof(MyRes)); ResourceSet rs = rm.GetResourceSet(CultureInfo.InvariantCulture, true, false); IDictionaryEnumerator de = rs.GetEnumerator(); while (de.MoveNext()) if (file_name == (string)de.Key) break; byte[] mem = (byte[])de.Value; ms = new MemoryStream(mem, 0, mem.Length, false, false); -- Now you've got your stream, so have fun ! Sanx, */ using System; using System.IO; using System.Collections; using System.Resources; class MainApp { public static void Main(string[] args) { // First create the resource file and add strings IResourceWriter rw = new ResXResourceWriter("MyRes.resx"); foreach (string s in args) { FileStream fs = new FileStream(s, FileMode.Open, FileAccess.Read); byte[] arr = new byte[fs.Length]; fs.Read(arr, 0, (int)fs.Length); rw.AddResource(s, arr); fs.Close(); } rw.Close(); } }