Categories

Thousands of experts bid on your personal project at ScriptLance.com

get the computer name

This example will get the computer name

#include <stdio.h>
#include <windows.h>
#include <conio.h>

void main(void)
{
char szBuffer[256];
DWORD dwNameSize=256;
//get the computer name
GetComputerName(szBuffer, &dwNameSize);
//print name
printf(“%s \n”,szBuffer);
getch();

}

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

You must be logged in to post a comment.