本帖最后由 dwj0 于 2015-9-28 12:04 编辑
由于这个版块看的最多了, 就发这个版块了, 如果发错版块, 请版主移位...
首先感谢 wdluo, 使我可以上google网站, 从而找到这个方法.
最后感谢研究出这个方法的朋友
今天用谷歌搜索了一下关键词 "File not recognized", 发现一个国外网站的帖子:
http://www.diyaudio.com/forums/p ... -protel-99-a-3.html
其中提到了win7下发生错误的原因和解决方法:
The library dialog tries to concatenate the filename and path of the selected library file to obtain a full path to the library file that you want to add. But, a call to the windows function SHGetPathFromIDListA corrupts the memory where the filename is stored (it puts a zero where the string starts, which, in the null-terminated string world, means that the string is now suddenly empty). The dialog gets confused and doesn't succeed in opening the file.
The call to SHGetPathFromIDListA does not do anything noteworthy, so I replaced all instructions related to that call with NOP instructions. This solved the problem.
So: get yourself a hex editor (I use "HxD", it's free) and edit the "Client99SE.exe" file. Change all bytes from offset 2690E to 26917 (= a total of 10 bytes that need to be changed) to 90.
A NOP instruction is 90 in hexadecimal, hence the change.
用谷歌翻译后的意思是:
该库对话框试图来连接所选库文件的文件名和路径,以获得一个完整路径,您要添加的库文件。但是,调用Windows函数SHGetPathFromIDListA破坏那里的文件名存储在内存中(它把一个零点所在的字符串开始,其中,在空值终止字符串的世界,意味着该字符串是现在突然空)。该对话框会很困惑,并在打开文件不会成功。
以SHGetPathFromIDListA调用不会做任何事情值得一提,所以我换成涉及与NOP指令调用的所有指令。这解决了这个问题。
所以:让自己的十六进制编辑器(我用“HXD”,它是免费的),并编辑了“Client99SE.exe”文件。改变从偏移2690E所有字节到26917(=共10个字节,其需要改变)到90。
NOP指令是十六进制的90,因此改变。
以上是解决PCB中的添加库, 原理图添加库是在下一楼中提到的:
Patch offset 0x25f78 to 0x25f81 inclusive with 0x90 (original bytes were: 50 8b 45 ec 50 e8 7e c1 fd ff ) in Client99SE.exe
我修改后, 实际测试, 发现问题依旧, 于是继续看帖子的后面部分, 终于在帖子的34楼找到方法:
Hi, except applying the patch with values 90 in 2 places as mentioned earlier, there is another step which also must be done in order to be able to load libraries. This is related to default mechanism used in Vista and Win7 that "well known" extensions of files are not shown in the folder. Please note that in Protel you see only the name of library when trying to add it and not full file name with extension, for example it is shown Liteon but must be shown Liteon.ddb in order to correctly load it.
OK, how to solve it........
Option 1:
Update registry for 2 types of extensions *.lib and *.ddb by adding the string AlwaysShowExt for 2 Keys coresponding to them. Save text below to protel.reg file and load it to registry by double click on it.
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT.ddb]
@="ProtelDesignFile"
[HKEY_CLASSES_ROOT.lib]
@="ProtelLibraryFile"
[HKEY_CLASSES_ROOTProtelDesignFile]
"AlwaysShowExt"=""
[HKEY_CLASSES_ROOTProtelLibraryFile]
"AlwaysShowExt"=""
意思是系统默认是不显示扩展名的, 要将扩展名显示出来才行. 或者将上面一段代码导入注册表可解决这个问题.
经过以上更改, Protel99SE 添加PCB库和SCH库正常
上传修改过的 Client99SE.exe和注册表文件:
Client99SE.rar
(217.14 KB, 下载次数: 311)
2015-9-28 11:41 上传
点击文件名下载附件
晚上回去99se卸载后,将windows下99se配置文件全删除掉,再安装试试看
那些配置文件?
一周热门 更多>