www.gusucode.com > VC++三子棋游戏源码(类似五子棋)-源码程序 > VC++三子棋游戏源码(类似五子棋)-源码程序\code\Global.cpp
//Download by http://www.NewXing.com #include "stdafx.h" #include "Global.h" void GetCurrentPath(char out_pathName[MAX_PATH]) { memset(out_pathName, 0, sizeof(char) * MAX_PATH); ::GetModuleFileName(NULL,out_pathName, MAX_PATH); for (int i = strlen(out_pathName) - 1; i >= 0; i--) { if (out_pathName[i] == '\\' || out_pathName[i] == ':') { out_pathName[i+1] = 0; break; } } } BOOL IsWin9x(void) { DWORD dwVersion =::GetVersion(); if (dwVersion < 0x80000000) // Windows NT/2000, Whistler return FALSE; else return TRUE; }