sabre_chen Posted November 18, 2021 Posted November 18, 2021 (edited) Conclusion: Notepad++ 5.9.1 (ANSI) could run in Windows 95 but doesn't work well. Notepad++ 4.9 (ANSI) runs well without LightExplorer plugin. In the post Last Versions of Software for Windows 98SE, @Nash614 said On 1/28/2020 at 12:52 AM, Nash614 said: Doing a little research it seems Notepad++ 5.9.1 (ANSI) is the last version to support Windows 9x/ME as per user PeterJones on the Notepad++ community forum. you can find version 5.9.1 here be sure that you download the bin.zip or bin.7z version... the .exe installer only has the Unicode version which doesn't work on Win9x/ME. I've confirmed that Notepad++ 5.9.1 (ANSI) works fine in Windows 98 SE, but not in Windows 95 OSR2.5. Notepad++ 3.9 (ANSI) works fine in Windows 95 OSR2.5, but it is too old and lack of functionality. In this post, I will describe the method to use Notepad++ 5.9.1 (ANSI) in Windows 95 OSR2.5 without compiling Notepad++ yourself. When I write these words, I can run Notepad++ 5.9.1 (ANSI) in Windows OSR2.5 but the plugin LightExplorer is still lack of API functions. Edited November 19, 2021 by sabre_chen
sabre_chen Posted November 18, 2021 Author Posted November 18, 2021 (edited) What you need: npp.5.9.1.bin.7z from Notepad++ Repository. ( You'd better got npp.5.9.1.src.7z as well.) Dependency Walker to check the missing import functions. IDA or other disasmblers. WinHex or other hex editors. The Win32 API reference documentation. Edited November 18, 2021 by sabre_chen
sabre_chen Posted November 18, 2021 Author Posted November 18, 2021 (edited) Unpack the npp.5.9.1.bin.7z. Use the ANSI version. It could not run and prompt for missing import functions. It only said IsDebuggerPresent, which is common when compiling with new version of Visual C++. First, the simplest, is to replace IsDebuggerPresent. Please refer to https://msfn.org/board/topic/181040-mp4-player-for-windows-95/page/2/, @roytam1 wrote a tool to patch bin. (URL link is updated in quote). On 1/18/2020 at 11:56 AM, roytam1 said: you need to patch out IsDebuggerPresent to GetErrorMode in binaries(*.plg;*.dll;*.exe). binpatch: http://o.rthost.win/gpc/files1.rt/binpatch.zip for example: binpatch 4973446562756767657250726573656E74 4765744572726F724D6F64650000000000 common.dll Or you could do it using WinHex. You should do it for: Notepad++.exe, SciLexer.dll, plugins\ComparePlugin.dll, plugins\LightExplorer.dll, plugins\NppExec.dll, plugins\NppTextFXA.dll, plugins\PluginManager.dll (When I started to patch, I didn't patch the plugin files, then Notepad++ will complain about LoadLibrary error for these plugins.) Edited November 18, 2021 by sabre_chen
sabre_chen Posted November 18, 2021 Author Posted November 18, 2021 (edited) Then use Dependency Walker to check which import functions are missing. Missing functions in Notepad++.exe: MonitorFromWindow, GetMonitorInfoA, GetLongPathName After reading Notepad++ source code, there is a commented #ifdef related to MonitorFromWindow and GetMonitorInfoA. It shows that these two functions will not be used if it's not compiled for Windows NT series. Use IDA to find the block of code that would call MonitorFromWindow and GetMonitorInfoA, and remove them in WinHex. Remove these two import functions is as easy as IsDebuggerPresent. I replace them with MessageBoxA. As for GetLongPathName, GetLongPathName would only be called after GetFullPathName, and the same variable is used before and after this call. It's used to convert short path name to long path name. So it would be good to simply remove this call and use short path instead. Use IDA to find the block of code that would call GetLongPathName, and remove them in WinHex. Remove the import functions like IsDebuggerPresent. Edited November 18, 2021 by sabre_chen
sabre_chen Posted November 18, 2021 Author Posted November 18, 2021 (edited) Now check if you could run Notepad++. In my situation, Notepad++ runs without no complain words except for LightExplorer. But I when use Dependency Walker to check the functions, the plugin LightExplorer is still lack of IsProcessorFeaturePresent and InterlockedCompareExchange. I'm still working on it. Edited November 18, 2021 by sabre_chen
sabre_chen Posted November 18, 2021 Author Posted November 18, 2021 After reading the source code of the plugin LightExplorer, the two function are not directly used. So they are similar to IsDebuggerPresent, they are introduced in new version of Visual C++.
sabre_chen Posted November 18, 2021 Author Posted November 18, 2021 Use IDA to find the callee of IsDebuggerPresent, it is called with parameter value 0Ch. This is PF_NX_ENABLED flag to check the Data Execution Prevention which is not available in Windows 95. If the return value is not 0, which means the feature is supported, it will then jump to subroutines which call InterlockedCompareExchange too. Okay, then remove the jump code since we know it's not supported. Then remove these two functions from import list.
sabre_chen Posted November 18, 2021 Author Posted November 18, 2021 Unfortunately, Notepad++ would crash after remove IsDebuggerPresent and InterlockedCompareExchange in LightExplorer.dll. The two functions are among the codes of things that Visual C++ does, I will try to search for solution.
sabre_chen Posted November 18, 2021 Author Posted November 18, 2021 Indeed, the plugin manager doesn't work well. But as it was abandoned long before in favor of the Plugins Admin, it's meaningless for me.
sabre_chen Posted November 19, 2021 Author Posted November 19, 2021 The Open/Save dialog doesn't work, which makes this version of Notepad++ useless. I give up. This post is reserved for furthur update or for other applications.
sabre_chen Posted November 19, 2021 Author Posted November 19, 2021 (edited) I successfully patch Notepad++ 4.9 (ANSI) to work well without the LightExplorer plugin. The latest Explorer plugin version for Windows 95 is Explorer Plugin v1.5, use this version instead. Edited November 19, 2021 by sabre_chen
Goodmaneuver Posted November 19, 2021 Posted November 19, 2021 My Notepad++Portable.exe is version 1.6.8.0 but when the program is run the version reported is ++5.5 (ANSI). Plugins using are Compare, Light Explorer, NppExec, NppExport, TextFX Characters, Spell-Checker, Document Monitor, MIME Tools and NppNetNote. Notepad portable 1.6.8.0 should be OK.
sabre_chen Posted November 19, 2021 Author Posted November 19, 2021 49 minutes ago, Goodmaneuver said: My Notepad++Portable.exe is version 1.6.8.0 but when the program is run the version reported is ++5.5 (ANSI). Plugins using are Compare, Light Explorer, NppExec, NppExport, TextFX Characters, Spell-Checker, Document Monitor, MIME Tools and NppNetNote. Notepad portable 1.6.8.0 should be OK. Are you running Windows 95? I checked the Notepad++ Portable 5.5 from PortableApps.com, and it doesn't work. The portable app screen showed and then it quits without any messages.
Goodmaneuver Posted November 19, 2021 Posted November 19, 2021 Notepad++portable version 1.6.8 I would suggest to try and Internet Explorer 4 or above update will need to be installed for a version like 5.5. I am running WinME but looks OK as IsDebuggerPresent is not used and runs in Safe Mode.
sabre_chen Posted November 19, 2021 Author Posted November 19, 2021 1 hour ago, Goodmaneuver said: Notepad++portable version 1.6.8 I would suggest to try and Internet Explorer 4 or above update will need to be installed for a version like 5.5. I am running WinME but looks OK as IsDebuggerPresent is not used and runs in Safe Mode. I have IE5.5 installed. Although Dependency Walker says the Notepad++ Portable 5.5 has nothing missing, it simply doesn't run. No error message, no window.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now