• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

Finding A Computer's Name

I need a way for my program to find out the name of the computer that is running my program.  Every computer has a computer name which is located in the control panel.  By clicking on network and then the identification tab of your computer you will find the name I am referring to.  Thanks for the help.
0
jamoville
Asked:
jamoville
1 Solution
 
Tommy HuiEngineerCommented:
Use GetComputerName(). From the documentation:

BOOL GetComputerName(LPTSTR lpBuffer,  // address of name buffer
  LPDWORD nSize     // address of size of name buffer);


0
 
jamovilleAuthor Commented:
I was a little quick in putting this question on the board.  I figured out how to do it myself and because your answer is the solution I used you should get the points.
thanks
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now