用于打开Durable或Persistent Handles的Windows API。 [英] Windows API for opening Durable or Persistent Handles.

查看:94
本文介绍了用于打开Durable或Persistent Handles的Windows API。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


来自2009年的未答复问题
: 

" ...应该使用什么API在应用程序中创建/打开一个持久的句柄?原生API,如NtCreateFile()?还是其他什么?如何将持久性布尔值传递给API调用?"

"...what API should be used in an application in to create/open a durable handle? A native API such as NtCreateFile()? Or anything else? How to pass the durability Boolean to the API call?"

来自Edgar的回复通过SMB2 CREATE消息深入探讨了SMB2协议层传递的参数,但是这并没有回答提出的实际问题。 在文档中( [MS-SMB2;
3.2.4.3.5]
) ,该文本指出"应用程序提供了一个布尔值,表明是否要求持久性。" 我找不到有关应用程序如何提供该布尔值的任何信息。 我可以想象它会在传递给CreateFile()的其中一个参数中设置
标志,但我找不到对任何此类标志的引用。

The reply, from Edgar, goes into depth about the parameters passed at the SMB2 protocol layer, via the SMB2 CREATE message, but that does not answer the actual question that was posed.  In the documentation ([MS-SMB2; 3.2.4.3.5]), the text states that "the application provides a Boolean indicating whether durability is requested."  I cannot find any information on how the application would provide that boolean.  I would imagine that it would be a flag set somewhere in one of the parameters passed to CreateFile(), but I cannot find a reference to any such flag.

我认为还有另外两种方法可以处理:

There are two other ways that I imagine that this could be handled:


  1. 应用程序创建某种形式的上下文,通过API调用。 创建上下文后,较低层使用某种未暴露的API传递神秘布尔值。 然后,应用程序打开的所有文件都以
    布尔设置打开。

  2. 重定向器知道哪种方言和哪些功能已经协商,自动格式化所需的创建上下文并且应用程序实际上从未涉及请求持久或持久(或弹性)句柄的决定。

我希望您能为我澄清这一点。 应用程序是否需要显式请求持久或持久句柄,或者Windows重定向器是否从应用程序中隐藏此详细信息。

I hope you can clarify this for me.  Does the application need to explicitly request a durable or persistent handle, or does the Windows Redirector hide this detail from the applications.

这很重要,因为如果应用程序需要显式请求持久/通过设置标志来持久化句柄,那么尚未更新的旧Windows应用程序将永远不会请求持久/持久句柄。



我期待您的回复。

This matters, because if an application needs to explicitly request a durable/persistent handle by setting a flag, then older Windows applications that have not been updated will never request durable/persistent handles.

I look forward to your response.

推荐答案

Chris Chris,

Hi Chris,

您的良好聆听。 谢谢你的提问。 我可以帮助研究:应用程序是否/如何显式请求持久/持久句柄。 你能在dochelp(at)Microsoft(dot)com给我发邮件吗?

Good hearing from you.  Thank you for your question.  I can help research: if/how an application can explicitly request a durable/persistent handle.  Can you send me mail at dochelp (at) Microsoft (dot) com?

Bryan

这篇关于用于打开Durable或Persistent Handles的Windows API。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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