Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. values of language,computer name and user name

values of language,computer name and user name

Scheduled Pinned Locked Moved C / C++ / MFC
windows-admin
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    neha agarwal27
    wrote on last edited by
    #1

    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

    W H 2 Replies Last reply
    0
    • N neha agarwal27

      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

      W Offline
      W Offline
      wootski
      wrote on last edited by
      #2

      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

      L 1 Reply Last reply
      0
      • W wootski

        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

        L Offline
        L Offline
        Le rner
        wrote on last edited by
        #3

        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);

        1 Reply Last reply
        0
        • N neha agarwal27

          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

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #4

          You need to this link for your answer System Information Functions[^].

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups