SfGetObjectName这个方法在哪个偷文件下?

bdcwq110 2007-05-29 03:54:30
如题目.我照别人写的驱动程序搬都出错,请问谁知道SfGetObjectName()这个方法在哪个头文件下
...全文
205 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
yzzm521 2007-07-17
  • 打赏
  • 举报
回复
这个函数是SFilter.c中自带的,你可以搜索一下,它的实现部分如下:
VOID
SfGetObjectName (
IN PVOID Object,
IN OUT PUNICODE_STRING Name
)
/*++

Routine Description:

This routine will return the name of the given object.
If a name can not be found an empty string will be returned.

Arguments:

Object - The object whose name we want

Name - A unicode string that is already initialized with a buffer that
receives the name of the object.

Return Value:

None

--*/
{
NTSTATUS status;
CHAR nibuf[512]; //buffer that receives NAME information and name
POBJECT_NAME_INFORMATION nameInfo = (POBJECT_NAME_INFORMATION)nibuf;
ULONG retLength;

status = ObQueryNameString( Object, nameInfo, sizeof(nibuf), &retLength);

Name->Length = 0;
if (NT_SUCCESS( status )) {

RtlCopyUnicodeString( Name, &nameInfo->Name );
}
}
bdcwq110 2007-05-29
  • 打赏
  • 举报
回复
自己顶下

21,600

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧