是不是采用了兼容的模式运行的。 1、修改了运行环境的兼容模式 比如采用了windows xp模式之类的。 这种情况下 有些函数在内部识别了WINDOWS版本。这样就会导致一些函数失去功能,或者函数值发生改变类似下文#ifndef WINVER // Specifies that the minimum required platform is Windows Vista. #define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. #define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. #endif#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98. #define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later. #endif#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0. #define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE. #endif2、权限问题导致。操作系统为了安全期间。没有使用administrator的功能,导致权限问题出了问题。从而引发问题不正确
1、修改了运行环境的兼容模式 比如采用了windows xp模式之类的。
这种情况下 有些函数在内部识别了WINDOWS版本。这样就会导致一些函数失去功能,或者函数值发生改变类似下文#ifndef WINVER // Specifies that the minimum required platform is Windows Vista.
#define WINVER 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista.
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows.
#endif#ifndef _WIN32_WINDOWS // Specifies that the minimum required platform is Windows 98.
#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
#endif#ifndef _WIN32_IE // Specifies that the minimum required platform is Internet Explorer 7.0.
#define _WIN32_IE 0x0700 // Change this to the appropriate value to target other versions of IE.
#endif2、权限问题导致。操作系统为了安全期间。没有使用administrator的功能,导致权限问题出了问题。从而引发问题不正确
如果在vs2008中运行, 不会有这个提示问题是,单独运行的是release 程序,然后点了以推荐的方式运行...
问题就出了,不管是在vs2008中,还是单独执行程序..debug 模式与 release 模式 GetVersionEx
得到的 dwBuildNumber参数值不一样....郁闷了啊...
debug 得到的是正确,但是release 得到的是错误的我的是win7系统 debug得到的是 7601 但是 release 得到的是 6000 整了一天了多了,找不出原因
也许吧,我整个一个服务程序,在win7下面可以正常安装
但是在xp下面安装就程序报错...我晕死,我全是用的c++的代码写的服务,居然也这样,后来发现安装上.net 3.5 就正常了很不解的问题..烦死了
哎呀,找到原因了,我的程序编译出来,在win7系统下面,他的属性里面多了一个兼容模式,我点了推荐的时候,推荐的是vista32....我汗死...