www.gusucode.com > VC++三子棋游戏源码(类似五子棋)-源码程序 > VC++三子棋游戏源码(类似五子棋)-源码程序\code\Client\Global.cpp

    //Download by http://www.NewXing.com
#include "stdafx.h"
#include "Global.h"

void GetCurrentPath(char szPathName[MAX_PATH])
{
	memset(szPathName, 0, sizeof(char) * MAX_PATH);
	::GetModuleFileName(NULL,szPathName, MAX_PATH);	

	for (int i = strlen(szPathName) - 1; i >= 0; i--)
	{
		if (szPathName[i] == '\\' || szPathName[i] == ':')
		{
			szPathName[i+1] = 0;

			break;
		}
	}
}

BOOL IsWindows9x(void)
{
	DWORD	dwVersion	=::GetVersion();
	if (dwVersion < 0x80000000)              // Windows NT/2000, Whistler
		return FALSE;
	else
		return TRUE;
}