如何解决wdf windows 示例中的首选 PSM 是什么?
我一直在研究来自 WDF Windows 的回声位示例。
server.c 中有一个函数 BthEchoSrvRegisterPSM
用于注册 PSM。
看起来是这样的:
_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 不是定义为特定服务吗?如何为远程设备设置它?它来自哪里?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。