X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fbase%2Fapplications%2Fmstsc%2Fwin32.c;h=1bc1a7617dce463116be98637ce67783e61e52ae;hp=91cb4a8c116ee31c7a0e1b81eca0a97cf50c3546;hb=988b6396aa94e182da81ef922f0f90bb5920c76e;hpb=4ed5e28c51525b26965471d3018e1b379e9702bc diff --git a/reactos/base/applications/mstsc/win32.c b/reactos/base/applications/mstsc/win32.c index 91cb4a8c116..1bc1a7617dc 100644 --- a/reactos/base/applications/mstsc/win32.c +++ b/reactos/base/applications/mstsc/win32.c @@ -1125,6 +1125,7 @@ wWinMain(HINSTANCE hInstance, pRdpSettings)) { char szValue[MAXVALUE]; + DWORD dwSize = MAXVALUE; uni_to_str(szValue, GetStringFromSettings(pRdpSettings, L"full address")); @@ -1134,7 +1135,10 @@ wWinMain(HINSTANCE hInstance, uni_to_str(szValue, GetStringFromSettings(pRdpSettings, L"username")); SetDomainAndUsername(szValue); strcpy(g_password, ""); - strcpy(g_hostname, tcp_get_address()); + if (GetComputerNameA(szValue, &dwSize)) + strcpy(g_hostname, szValue); + else + strcpy(g_hostname, tcp_get_address()); g_server_depth = GetIntegerFromSettings(pRdpSettings, L"session bpp"); g_screen_width = GetSystemMetrics(SM_CXSCREEN); g_screen_height = GetSystemMetrics(SM_CYSCREEN);