IVsFileChangeEx和.vcxproj.filters文件 [英] IVsFileChangeEx and .vcxproj.filters files

查看:75
本文介绍了IVsFileChangeEx和.vcxproj.filters文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个 IVsQueryEditQuerySave2. QuerySaveFiles 这个钩子可以捕获试图写入源代码控制文件的企图.如果我们允许覆盖,我们将为文件发布一个notifyFileChange钩子.修改文件后,该钩子将用于更新内部状态.场景 用于在允许半乐观模式的悲观源代码控制提供程序下向C ++项目添加新文件,例如,本地只读文件可以被覆盖. .vcxproj都调用QEQS.QuerySaveFiles 文件和.vcxproj.filters文件.设置FileChange挂钩,并在实际写入文件时调用它.我们寻找时间或大小的变化(添加新文件会将其添加到.vcxproj.filters文件中,从而进行更改 但是,在VS2012中,调用了相同的QEQS.QuerySave挂钩,我们设置了FileChangeEx挂钩.永远不会调用.vcxproj.filters文件的FiilesChanged挂钩,并且我们的内部状态不会更新. VS2010和vs2012之间的行为变化是否有任何原因?    

We have  an  IVsQueryEditQuerySave2.QuerySaveFiles hook that traps attempts to write to source controlled files.  If we allow an overwrite, we post a adviseFileChange hook for the files.   This hook is used to update internal status once the files have been modified.   The scenario is for adding a new file to a C++ project under a pessimistic source control provider where a semi-optimistic mode is allowed e.g local read only files can be overwritten.   In VS2010  QEQS.QuerySaveFiles  is called for both the .vcxproj file and the .vcxproj.filters files.   The FileChange hook is set up and is called when the files are actually written.   We look for change in time or size ( adding a new file will add it to the .vcxproj.filters file thus changing its size ). However, in VS2012, the same QEQS.QuerySave hooks are called and we set up the FileChangeEx hooks.  The FiilesChanged hook for the .vcxproj.filters file is never called and our internal status is not updated.     Is there any reason for the change in behaviour between VS2010 and vs2012 ?    

推荐答案

嗨bs1958,

Hi bs1958,


这篇关于IVsFileChangeEx和.vcxproj.filters文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆