#include <windows.h>
int WINAPI WinMain ( HINSTANCE, HINSTANCE, LPSTR, int )
{
char ComputerName [MAX_COMPUTERNAME_LENGTH + 1];
DWORD cbComputerName = sizeof ( ComputerName );
if ( GetComputerName ( ComputerName, &cbComputerName ))
{ MessageBox ( NULL, ComputerName, "Name of this computer:",
MB_OK | MB_ICONINFORMATION ); } }