惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

PCI Perspectives
PCI Perspectives
C
CERT Recently Published Vulnerability Notes
Project Zero
Project Zero
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threatpost
NISL@THU
NISL@THU
H
Help Net Security
G
Google Developers Blog
S
Securelist
Recorded Future
Recorded Future
云风的 BLOG
云风的 BLOG
MyScale Blog
MyScale Blog
V
Vulnerabilities – Threatpost
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
T
Tenable Blog
M
MIT News - Artificial intelligence
罗磊的独立博客
WordPress大学
WordPress大学
I
Intezer
V2EX - 技术
V2EX - 技术
Schneier on Security
Schneier on Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Application and Cybersecurity Blog
Application and Cybersecurity Blog
S
Secure Thoughts
C
Cybersecurity and Infrastructure Security Agency CISA
Recent Announcements
Recent Announcements
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
C
Cisco Blogs
大猫的无限游戏
大猫的无限游戏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
L
Lohrmann on Cybersecurity
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
宝玉的分享
宝玉的分享
腾讯CDC
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
美团技术团队
H
Heimdal Security Blog
Hugging Face - Blog
Hugging Face - Blog
The Last Watchdog
The Last Watchdog
L
LINUX DO - 热门话题
Spread Privacy
Spread Privacy
博客园 - 司徒正美
博客园 - Franky
W
WeLiveSecurity

博客园 - newr2006

Android adb.exe 开发模试安装 HttpWebRequest 模拟浏览器访问网站 jquery check box Fiddler Post Debug ALTER TABLE unable to add host to SCVMM 2008R2 Cannot generate SSPI context ASP.NET代码对页面输出进行清理 - newr2006 - 博客园 提前两天发邮件 线程 Thread 传参数 好的博客 Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. 解决办法 - newr2006 Hashtable(HashSet),ListDictionary,HybridDictionary 和 NameValueCollection Pocket pc 与 Smartphone 开发的区别 XMl 文件属性的读取 USA 的网站终于把中国的名字排上去了. Menu 控件弹出窗口(popupwindow) 删除一些难删除的程序 Page_ClientValidate 用法
symbol MC 3090 upgrade to symbol MC 3190
newr2006 · 2012-03-20 · via 博客园 - newr2006

客户最近反应3090停产了,需要我们把以前在 symbol mc 3090 上运行的程序升级到 3190 上来,开始以为是一个很简单的活,想不到越做越麻烦,原因是源程序N年前就没有了..没办法我只能走另一条路了.想了想需要做这些事情:

1.wince 5.0 升级到 wince 6.0

2.sqlce 2.0 升级到 sqlce 3.5

3.symbol 一引起dll 的升级.

4.源程序的升级.

还好兄弟水平还可以,都给搞定了..

这是经验:

Reverse Compiling Windows Forms
Today I had a fun task: the source code for an existing executable had been lost, and I got the job of getting it back. The good news is that Red Gate's Reflector (formerly Lutz Roeder's Reflector) is a standard tool for any serious .NET programmer, and it does quite a decent job of decompiling (nonobfuscated) .NET code. The bad news is that I had to also reverse-engineer the GUI.

After finding nothing on Google, and a bit of trial and error, I discovered the following procedure worked adequately, at least for my (simple) executable on Visual Studio 2008:

1.First, export the source from Reflector, create a solution, and ensure it builds.
2.Convert the ".resources" files into ".resx" files. Reflector just dumps out the binary .NET resources, but VS prefers them as XML. Fire up your VS command prompt and run this command: "resgen My.Long.Resource.Name.resources Name.resx".
3.Move the resulting ".resx" files into their appropriate directories (e.g., "My\Long\Resource"). The rest of these steps must be done for each ".resx" file.
4.Add the ".resx" files to your solution (they should be inserted under the matching ".cs" file), remove the old ".resources" file from the solution, and rebuild.
5.Add a new empty C# code file named "Name.Designer.cs" file in the same directory, and paste in the following code:
?namespace My.Long.Resource {     partial class Name     {         /// <summary>         /// Required designer variable.         /// </summary>         private System.ComponentModel.IContainer components = null;           /// <summary>         /// Clean up any resources being used.         /// </summary>         protected override void Dispose(bool disposing)         {             if (disposing && (components != null))             {                 components.Dispose();             }             base.Dispose(disposing);         }           #region Windows Form Designer generated code         /// <summary>         /// Required method for Designer support - do not modify         /// the contents of this method with the code editor.         /// </summary>           #endregion       } }

6.Open up the parent "Name.cs" file (right-click -> View Code) and add the "partial" attribute to its class declaration.
7.Delete the member variable "components".
8.Move all GUI member variables from "Name.cs" to the end of "Name.Designer.cs" (placing them after the "#endregion"). GUI member variables are anything that is added from the Toolbox, so that would include System.Windows.Forms.Timer components, etc.
9.Delete the "Name.Dispose" method from the "Name.cs" file.
10.Move "Name.InitializeComponent" from the "Name.cs" file into the "Name.Designer.cs" file, placing it before the "#endregion".
11.For each unrecognized type in the member variables and InitializeComponent, either fully qualify it or add a using declaration. Fully qualifying each type is more time consuming, but matches exactly what the designer expects. After this step, the solution should build.
12.If InitializeComponent contains a line assigning the member variable "this.components = new Container();", then it must be changed to be "this.components = new System.ComponentModel.Container();" and moved to the top of the method.
13.If InitializeComponent contains a line creating a resource manager, e.g., "ComponentResourceManager manager = new ComponentResourceManager(typeof(Name));", the local variable "manager" must be renamed to "resources" (and update references to the renamed object).
14.Repeat attempting to load it in the designer, fully qualifying any types that it complains about (this step is necessary because the designer's code parser is not as smart as the C# compiler):
◦"The designer cannot process the code..." - Any enum member variables that have the same name as their type need to have their value fully qualified, e.g., "base.AutoScaleMode = AutoScaleMode.Font;" needs to be "base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;").
◦"The variable ... is either undeclared or was never assigned" - Many types seem to require fully qualified type names when declared (e.g., "private OpenFileDialog openFileDialog;" needs to be "private System.Windows.Forms.OpenFileDialog openFileDialog;").
After following the (rather tedious) procedure above, you should have a form that can be opened in the VS designer. If I had more time, I'd wrap it up as a Reflector add-in, but time seems to be a fleeting resource these days.