7030249: Eliminate use of LoadLibrary and other clean-ups
Alan.Bateman at oracle.com
Tue Mar 29 15:49:50 UTC 2011
Dmytro Sheyko wrote:
> Why we obtain HMODULE for kernel32 this way:
> // get handle to kernel32
> if (GetModuleHandleExW((GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
> (LPCWSTR)&CreateFileW, &h) != 0)
> instead of
> handle = GetModuleHandle("kernel32");
GetModuleHandleExW allows you to provide the address of a function in
the library that you need the handle for and so you avoid issues when
multiple libraries with the same name are loaded.
> Also according to MSDN GetModuleHandleEx requires at minimum "Windows
> XP" or "Windows Server 2003". It means that we do not support "Windows
> 2000", right?
I don't think it's been possible to install or run jdk7 on Windows 2000
for some time.
More information about the core-libs-dev