#include <windows.h>

void main()

{
	LPTSTR Buf[MAX_COMPUTERNAME_LENGTH+1];
	LPDWORD length;

	SYSTEM_INFO sys_inf;
	DWORD winver;

	CHAR *dirbuf[MAX_PATH];


	if(SetComputerName("pharlap") == TRUE)
		printf("main call to SetComputerName worked\n");
	else
		printf("main call to SetComputerName failed\n");
	
	*length = (DWORD)sizeof(Buf);
	if (GetComputerName((char *)Buf, length) == TRUE)
		printf("main: call to GetComputerName worked\n");
	else
		printf("main: call to SetComputerName failed\n");

	GetSystemInfo(&sys_inf);
	printf("the minimum application adress is %d\n",
                sys_inf.lpMinimumApplicationAddress); 
	if (sys_inf.dwProcessorType != PROCESSOR_INTEL_486)
		printf("wrong processor type returned\n");

	winver = GetVersion();
	if (LOWORD(winver))
		printf("system is running Windows %d.%d\n",
			LOBYTE(LOWORD(winver)), HIBYTE(LOWORD(winver)));

	if (GetWindowsDirectory((char *)dirbuf, MAX_PATH) !=0)
		printf("the windows directory is %s\n",dirbuf);

	if (GetSystemDirectory((char *)dirbuf, MAX_PATH) !=0)
		printf("the windows system directory is %s\n",dirbuf);

}
