I see now what file does it mod? and what offset if your using a filestream or what? just installed sharp develop so code would help me learn just a little bit more
shellbrd.dll, Bitmap image: 1050, 2050, 3050 An example of its usage: Code: [DllImport("kernel32.dll", SetLastError = true)] public static extern IntPtr LoadResource(IntPtr hModule, IntPtr hResInfo); [DllImport("kernel32.dll", SetLastError = true)] public static extern IntPtr BeginUpdateResource(string pFileName, [MarshalAs(UnmanagedType.Bool)]bool bDeleteExistingResources); [DllImport("kernel32.dll", SetLastError = true)] public static extern bool UpdateResource(IntPtr hUpdate, uint lpType, uint lpName, uint wLanguage, byte[] lpData, uint cbData); [DllImport("kernel32.dll", SetLastError = true)] public static extern bool EndUpdateResource(IntPtr hUpdate, bool fDiscard); [DllImport("kernel32.dll", SetLastError = true)] public static extern uint SizeofResource(IntPtr hModule, IntPtr hResInfo); private string NewImage = Path.GetTempPath() + "\\"; private string IDS = CultureInfo.InstalledUICulture.Name; private string windir = Environment.GetEnvironmentVariable("WINDIR"); private const uint BitMap = 0x2; private int id = 0; private int[,] imageID = new int[,] { { 1050 }, { 2050 }, { 3050 } }; private string SourceFile(string IMAGES) { string TempDir = NewImage; string IMAGE = ""; { IMAGE = "My image"; } return TempDir + IMAGE; } USAGE: foreach (uint IMAGE in imageID) { byte[] IMG = File.ReadAllBytes(SourceFile(IMAGE.ToString())); byte[] RES = new byte[IMG.Length - 14]; id = CultureInfo.GetCultureInfoByIetfLanguageTag(IDS).LCID; Buffer.BlockCopy(IMG, 14, RES, 0, RES.Length); IntPtr ipTarget = BeginUpdateResource(windir + "\\Branding\\ShellBrd\\shellbrd.dll", false); if (UpdateResource(ipTarget, BitMap, IMAGE, Convert.ToUInt32(id), RES, (uint)RES.Length)) { EndUpdateResource(ipTarget, false); } }
got it but I don't like CS ill do something in VB and show what I come up with.. ill do the drag and drop stuff should be nice
@ luky, its a portable app (no installation) Update: Code: Changelog 1.4: Updated silent mode switches Added restore switch