After the code is decompiled using the filegenerator plug-in of the recycltor

Source: Internet
Author: User

Believe that most. netProgramPersonnel have experience in using reconfigurator. For whatever purpose, after a Host Program is decompiled with a recycltorCodeTo modify it, the list in this article may be a useful reference.

 

After decompiling the code using the filegenerator plug-in of recycltor, you can obtainSource codeBut there are various problems in the code, and it is generally not possible to pass the compilation at a time. The following will discuss these issues in detail:

Enumeration problems

 

For code readability, it may take some time to check metadata to modify the int value back to the enumerated value. In particular, if you want to use the Form Designer, vs2008 may not understand the int value.

Attribute Problems

 

For example, after a property called names is decompiled, it may be restored to the set_names (names) and get_names () methods, which may be slow to replace one by one. You can replace it with a regular expression.
The set_xxx (XXX) method can be replaced.
Set _ {[A-Z] *} \ (
Is
\ 1 = (
The get_xxx () method can be replaced.
Get _ {[A-Z] *} \ (\)
Is
\ 1
Then, fix the incorrect methods.

Delegation and callback Functions

 

It is generally restored to the add_xxx (methodsname) method, and needs to be changed to + = methodsname

Resource problems

 

Use the resgen.exe tool under the. NET Framework SDK to decompile and embed the *. Resources file into the *. resx file,
Syntax: resgen.exe *. resources *. resx, and then set *. if resx is included in the project, it will automatically file with the same name as the form file *. CS Association. If there is no association, You can first exclude it and then add the big method.

Namespace Problems

 

If you want to switch to the IDE Form Designer without errors, you also need to add a namespace prefix such as system. Windows. Forms in *. CS.

Form Designer RecognitionProblem

 

The following code is required:
Componentresourcemanager manager = new componentresourcemanager (typeof (classname ));
Replace
System. componentmodel. componentresourcemanager resources = new system. componentmodel. componentresourcemanager (typeof (classname ));
The Form Designer can be recognized normally.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.