BaseFunction.cpp
资源名称:1731.rar [点击查看]
上传用户:swkcbjrc
上传日期:2016-04-02
资源大小:45277k
文件大小:1k
源码类别:
游戏
开发平台:
Visual C++
- #include "stdafx.h"
- #include "basefunction.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;
- }