Hello everybody,
I noticed that in H5system.c, there is a function “Wgetlogin”. This function calls “GetUserName”, however, if UNICODE is enabled, this function is redirected to “GetUserNameW” which expects a wchar_t.
So instead of calling “GetUserName”, the function should call “GetUserNameA” to avoid this.
Also changing the type of “bufferCount” to DWORD avoids a compiler warning.
In addition, “Wlogin_buffer” is not inside H5_HAVE_WINSOCK2_H which is probably removed by the linker anyway, but IMHO it would be cleaner to get rid of the static variable completely, if H5_HAVE_WINSOCK2_H is not set.
Thanks,
Daniel