c++ - wdf windows 示例中的首选 PSM 是什么?
问题描述
我一直在研究 WDF Windows 的回声位样本。
server.c 中有一个注册 PSM 的函数BthEchoSrvRegisterPSM
。
它看起来像这样:
_IRQL_requires_max_(PASSIVE_LEVEL)
NTSTATUS
BthEchoSrvRegisterPSM(
_In_ PBTHECHOSAMPLE_SERVER_CONTEXT DevCtx
)
/*++
Description:
Registers server PSM.
Arguments:
DevCtx - Device context of the server
Return Value:
NTSTATUS Status code.
--*/
{
NTSTATUS status;
struct _BRB_PSM * brb;
DevCtx->Header.ProfileDrvInterface.BthReuseBrb(
&(DevCtx->RegisterUnregisterBrb),
BRB_REGISTER_PSM
);
brb = (struct _BRB_PSM *)
&(DevCtx->RegisterUnregisterBrb);
//
// Send in our preferred PSM
//
brb->Psm = DevCtx->Psm;
status = BthEchoSharedSendBrbSynchronously(
DevCtx->Header.IoTarget,
DevCtx->Header.Request,
(PBRB) brb,
sizeof(*brb)
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR, DBG_PNP,
"BRB_REGISTER_PSM failed, Status code %!STATUS!\n", status);
goto exit;
}
//
// Store PSM obtained
//
DevCtx->Psm = brb->Psm;
exit:
return status;
}
我的问题是什么是“我们首选的 PSM”?PSM 不是定义为特定服务吗?如何为远程设备设置它?它从何而来?
解决方案
推荐阅读
- octave - 有没有办法使用 TeX(希腊字母、下标、上标等)使 octave 解释 uicontrol 静态文本中的字符串?
- c# - ASP .Net Core 空数组查询参数绑定异常
- bash - 如何在期望脚本的 if 条件中使用变量?
- clang - 为什么隐式免费的声明在 llvm 中采用 vararg 参数
- java - 用java抓取网页并下载视频
- ios - 在 iOS 上执行 Unix/任意命令
- javascript - Blogspot 帖子内容:如何使用 javascript 获取第二张图片 src
- reactjs - 从 PC 浏览器访问 cloud9 上的 react 服务器
- vuex - Nuxtjs /Vuex 不适用于复杂对象
- python - Crispy_forms_tags 在我的更新视图中没有用实例填写表单