Improve company productivity with a Business Account.Sign Up

x
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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