0x80070422在hobocopy时碰到的错误

0x80070422 means ERROR_SERVICE_DISABLED. It seems the Volume
Shadow Copy service is disabled on your machine. This might explain
why you get these shadow copy failures in NTBackup - so it is not
necesarily to turn them off.

Please make sure that the following services are enabled on your
machine:
- Volume Shadow Copy (VSS)
- Microsoft Software Shadow Copy Provider (SWPRV)
- Remote Procedure Call (RPCSS) - should be enabled as "Automatic"
- COM+ Event System (eventsystem)
- System Event Notification Service (sens) - should be enabled as
"Automatic"

 

如果上面这些服务你都启动了的后,再出错,看eventlog里,出得什么错,

如果是

卷影复制服务错误: 卷影复制写入程序 ContentIndexingService 调用例程 RegQueryValueExW 失败,状况 0x80070002 (已转换为 0x800423f4)。

 

那么可能是因为注册表里HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/ContentIndex/Catalogs

下面的项中Location的位置错误。

注意每个项里都要有Location。

我自己的错误是System项里没有Location。自己添加个Location REG_SZ C:/System Volume Information

这样就好了。

 

hobocopy,windows下面不错的可以增量备份的小工具,很不错。

此外在用hobocopy的时候碰到目录中带中文的时候就出错,发现出错,因为他在WideCharToMultiByte时,计算长度时出错误了。

他原来的用法是,

int result = ::WideCharToMultiByte(CP_OEMCP, 0, s2, s2.GetLength(), mbBuffer, s2.GetLength(), NULL, NULL); 
这个有错误,应该改为,

int len = WideCharToMultiByte(CP_OEMCP, 0, s2, s2.GetLength(), NULL, 0, NULL, NULL); 
LPSTR mbBuffer = new CHAR[len + 1]; 
int result = ::WideCharToMultiByte(CP_OEMCP, 0, s2, s2.GetLength() + 1, mbBuffer, len + 1, NULL, NULL); 
这样重新编译过就好了~ ~


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值