[erlang-questions] [erlang-bugs] Erlang on Windows NT4

Edwin Fine erlang-questions_efine@REDACTED
Thu Jul 17 17:57:43 CEST 2008

Couldn't you create a new "compatibility" DLL, that implements or stubs
"GetLongPathNameW"? Then if you link in that DLL to the Erlang NT4 build,
the call will resolve at run time. This is much less dirty, and if Erlang
adds it in as an NT4 compatibility patch, everyone will be happy.

On Thu, Jul 17, 2008 at 9:21 AM, Sebastian Egner <s.egner@REDACTED> wrote:

> Hello,
> Thank you for all the comments!
> For what it's worth, I found out that the NT4 compatibility issue is not
> related to Erlang/OTP specifically, but rather an general byproduct of
> Microsoft terminating support for NT4 in Visual C++ 8:
> http://forums.msdn.microsoft.com/en-US/vcgeneral/thread/2435c3ab-f732-467e-8224-5f4e3f12c10b/
> http://www.mombu.com/microsoft/windows-programmer-win32/t-vs2005-and-nt4-392831.html
> In short, when the system loads the VC8 runtime lib MSVCR80.DLL, it
> tries to resolve a reference to the function GetLongPathNameW in
> KERNEL32.DLL, which NT4 doesn't have. The beauty of it is that this
> reference seems to be the only reason for most VC8 application not to
> run on NT4! People have reported successfully running non-unicode  VC8
> applications by using custom-compiled versions of MSVCR80.DLL without
> the call to GetLongPathNameW.
> This means, short of ERTS being ported back to VC 6.0, there is no hope
> of an 'official' version of ERTS supporting NT4, because Microsoft's
> licence will prevent Ericsson to include a patched runtime lib in the
> redistributable VC package. (Unless I am mistaken and there is a legal
> way of supporting NT with VC8.)
> Experimentally trying out R12B-3 with a patched version of MSVCR80.DLL
> (<dirty mode="don't try this at home">Start emacs, load MSVCR80.DLL,
> replace "GetLongPathNameW" by "GetModuleHandleA" (= 16 chars and
> linkable), save.</dirty>), and creating a proper 'erl.ini' (which the
> installer could not do due to an acute lack of working VMs at the time),
> I am informed by the VM:
>    C:\Program Files\erl5.6.3\erts-5.6.3\bin>erl
>    Windows version not supported (min required: winnt 5.0)
> So this clarifies the bug-report of my first email:
> Yes, Erlang/OTP R12B-3 does check the OS version and refuses to run on
> NT4. However, the check is executed in an Erlang VM, which won't start
> in the first place, throwing an error message that takes an expert to
> interpret.
> You could consider checking the OS version in the NSIS installer itself,
> e.g. using the function GetWindowsVersion:
>    http://nsis.sourceforge.net/Get_Windows_version
> and deactivate the check from the VM (erts\emulator\sys\win32\sys.c:
> check_supported_os_version()).
> Kind regards,
> Sebastian
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-bugs

The great enemy of the truth is very often not the lie -- deliberate,
contrived and dishonest, but the myth, persistent, persuasive, and
unrealistic. Belief in myths allows the comfort of opinion without the
discomfort of thought.
John F. Kennedy 35th president of US 1961-1963 (1917 - 1963)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080717/1ebba4b8/attachment.htm>

More information about the erlang-questions mailing list