values of language,computer name and user name
-
Hi all, i want to find out values of language,computer name and user name through coding.... I am unable to find it in registry. How could i find them Thanks in advance
-
Hi all, i want to find out values of language,computer name and user name through coding.... I am unable to find it in registry. How could i find them Thanks in advance
char RemoteFileName[60]; TCHAR chrComputerName[MAX_COMPUTERNAME_LENGTH + 1]; DWORD dwBufferSize = MAX_COMPUTERNAME_LENGTH + 1; if(GetComputerName(chrComputerName,&dwBufferSize)) { // We got the name, set the return value. strcpy(RemoteFileName,chrComputerName); you may need to #include
-
char RemoteFileName[60]; TCHAR chrComputerName[MAX_COMPUTERNAME_LENGTH + 1]; DWORD dwBufferSize = MAX_COMPUTERNAME_LENGTH + 1; if(GetComputerName(chrComputerName,&dwBufferSize)) { // We got the name, set the return value. strcpy(RemoteFileName,chrComputerName); you may need to #include
try this, TCHAR tszComputerName[MAX_COMPUTERNAME_LENGTH + 1]; DWORD dwBufLen = sizeof(tszComputerName); DWORD nSize; GetComputerName(tszComputerName, &dwBufLen); AfxMessageBox(tszComputerName); GetSystemDirectory(tszComputerName,MAX_PATH); AfxMessageBox(tszComputerName); tszComputerName[0] = TEXT('\0'); nSize = sizeof(tszComputerName) / sizeof(TCHAR); GetUserName(tszComputerName, &nSize); AfxMessageBox(tszComputerName);
-
Hi all, i want to find out values of language,computer name and user name through coding.... I am unable to find it in registry. How could i find them Thanks in advance
You need to this link for your answer System Information Functions[^].