how do i edit and replace image a windows dll file in C#
-
Monday, April 16, 2012 3:08 PM
ok what i want to do is change a image in a dll file easy to do in a resource hacker what i want to do replace a image in a dll file and code it to my program so when i push a button replace image i dialog box comes up to replace that image inside of the dll file here is a example in resource hacker this is not the dll im editing by the way like this dll here i dont want to use this one my m8 wated to change this one thats why i did the print screen i want to change basebrd dll but want to get the and edit it in C# do i still have a product design cant work at the moment with out a design view so if anyone could help with a bit of code on how to do this very new to this hope you can help thanks in advance elfenliedtopfan5
also i have the int face of the design just a button with change new blue effects logo
- Edited by elfenliedtopfan5 Monday, April 16, 2012 3:16 PM
- Moved by Shanks ZenMicrosoft Contingent Staff Thursday, April 19, 2012 2:51 AM Not VB issue (From:Visual Basic Express Edition)
All Replies
-
Monday, April 16, 2012 7:56 PM
First off, you decided to post a C# question in a Visual Basic forum? Learn to read... Even so, you'd have to decompile the .dll file which may be obfuscated so noob hackers like you can't easily decrypt and modify the programs.
Secondly, why do you assume we will help you with hacking tools? Nearly every program includes the phrase "tampering with the product is a federal offense." I'm not a lawyer, but I'm smart enough to realize that modifying a program externally without written consent from the manufacturing company is considered illegal.
EDIT: Please use at least decent grammar. You have no periods in any of your sentences which makes it almost impossible to even understand your question.
Jordan St. Godard | Microsoft® Community Contributor 2011
double twoCents = .02; Console.WriteLine("$" + twoCents.ToString());- Edited by Jordan St. Godard Monday, April 16, 2012 7:57 PM
-
Tuesday, April 17, 2012 5:01 PMI'd like to know what the motorway between Glasgow and Edinburgh (i.e. m8) has to do with this? Or is that txt spk. LOL.
Regards David R
---------------------------------------------------------------
The great thing about Object Oriented code is that it can make small, simple problems look like large, complex ones.
Object-oriented programming offers a sustainable way to write spaghetti code. - Paul Graham.
Every program eventually becomes rococo, and then rubble. - Alan Perlis
The only valid measurement of code quality: WTFs/minute. -
Thursday, April 19, 2012 2:51 AM
Hi Elfenliedtopfan,
Welcome to the MSDN forum.
I’ll move your thread to C# forum since this topic is related to c#. Thank you for your understanding!
Best regards,
Shanks Zen
MSDN Community Support | Feedback to us
-
Thursday, April 19, 2012 3:01 AMModerator
Hi elfenliedtopfan5,
I could provide the way provided by C# language. You can use GetType().Assembly.GetManifestResourceStream() to get the picture resource,Here is the detailed implementation:
public class mydll{ public mydll() { this.GetType().Assembly.GetManifestResourceStream( "yourDllName.yourImage.JPG" ); } public System.IO.Stream ReturnStream() { return this.GetType().Assembly.GetManifestResourceStream( "yourDllName.yourImage.JPG" ); } }First you need to define the myDll class and compile it to dll file. Notes that you may change the "Build Action " selection as "Embeded Resource",otherwise you cann't make GetManifestResourceStream method effect.Next you just use the following snippet of code to implement obtaining this image file.
private void Form1_Load(object sender, System.EventArgs e){ yourDllName.mydll yy= new mydll(); pictureBox1.Image = Image.FromStream( yy.ReturnStream() ); }Hope it helps you.
Sincerely,
Jason Wang
Jason Wang [MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Jason Dot WangMicrosoft Contingent Staff, Moderator Monday, May 07, 2012 9:53 AM

