"Hans Leidekker" hans@it.vu.nl wrote:
+BOOL WINAPI DnsHostnameToComputerNameA(LPCSTR hostname,
- LPSTR computername, LPDWORD size)
- for (i = 0; i <= len; i++)
computername[i] = toupper(hostname[i]);
You can't use toupper() from glibc on a name in a Windows encoding. Why not just call a W version to do the job?
"Dmitry Timoshkov" dmitry@baikal.ru writes:
"Hans Leidekker" hans@it.vu.nl wrote:
+BOOL WINAPI DnsHostnameToComputerNameA(LPCSTR hostname,
- LPSTR computername, LPDWORD size)
- for (i = 0; i <= len; i++)
computername[i] = toupper(hostname[i]);
You can't use toupper() from glibc on a name in a Windows encoding. Why not just call a W version to do the job?
Actually, why do you want to convert to uppercase at all? Is there really an app that breaks if computer name contains lowercase chars?