0

我试图安装 Windows 卷影复制 SDK,但是当我看到这个链接时它只支持 Windows 2003 和 xp http://www.microsoft.com/en-us/download/details.aspx?id=23490

我试图强制安装以查看会发生什么,我用 msvc 2010 开发它,它给我错误,每当我放

#include "vswriter.h"

它给了我很多错误

1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(117): error 

C2504: 'IUnknown' : base class undefined
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(120): error C2061: syntax error : identifier 'GetPath'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(120): error C2061: syntax error : identifier 'OUT'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(120): error C2091: function returns function
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(120): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(120): warning C4183: 'STDMETHOD': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(123): error C2061: syntax error : identifier 'GetFilespec'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(123): error C2061: syntax error : identifier 'OUT'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(123): error C2091: function returns function
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(123): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(123): error C2535: 'int (__cdecl *IVssWMFiledesc::STDMETHOD(void))(void)' : member function already defined or declared
1>          c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(120) : see declaration of 'IVssWMFiledesc::STDMETHOD'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(123): warning C4183: 'STDMETHOD': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(126): error C2061: syntax error : identifier 'GetRecursive'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(126): error C2061: syntax error : identifier 'OUT'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(126): error C2091: function returns function
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(126): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(126): error C2535: 'int (__cdecl *IVssWMFiledesc::STDMETHOD(void))(void)' : member function already defined or declared
1>          c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(120) : see declaration of 'IVssWMFiledesc::STDMETHOD'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(126): warning C4183: 'STDMETHOD': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(129): error C2061: syntax error : identifier 'GetAlternateLocation'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(129): error C2061: syntax error : identifier 'OUT'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(129): error C2091: function returns function
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(129): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(129): error C2535: 'int (__cdecl *IVssWMFiledesc::STDMETHOD(void))(void)' : member function already defined or declared
1>          c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(120) : see declaration of 'IVssWMFiledesc::STDMETHOD'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(129): warning C4183: 'STDMETHOD': missing return type; assumed to be a member function returning 'int'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(120): error C2253: 'IVssWMFiledesc::STDMETHOD' : pure specifier or abstract override specifier only allowed on virtual function
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(135): error C2504: 'IUnknown' : base class undefined
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(138): error C2061: syntax error : identifier 'GetLogicalPath'
1>c:\program files (x86)\microsoft\vsssdk72\inc\winxp\vswriter.h(138): error C2061: syntax error : identifier 'OUT'
1>c:\pr

这是否意味着 win8 不支持 vshadow SDK?还是停产了?还是我安装错了?

4

1 回答 1

0

适用于 8/8.1 的 Windows SDK 包括 VSS:https ://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx

使用此 SDK 编译的相应“vshadow”代码示例位于:https ://msdn.microsoft.com/en-us/windows/desktop/hh852363.aspx (您无需单独安装 VSS SDK)

AFAIK,您不能使用 Visual Studio 的快速版本编译 ATL/COM 项目(在示例页面上也提到过):

警告 此示例需要 Microsoft Visual Studio 2013,并且无法在 Microsoft Visual Studio Express 2013 for Windows 中编译。

您将需要 Visual Studio 2013 或更高版本的专业/企业版。

于 2015-07-29T05:53:02.420 回答