if (ObjectAttributes->RootDirectory)
{
Status = ObReferenceObjectByHandle(
ObjectAttributes->RootDirectory,
0,
NULL,
KernelMode,
&Object,
NULL);
if (!NT_SUCCESS(Status))
{。。。。。}
Status = ObQueryNameString(Object,NULL,0,&PathLength);
NameInfo2 = (POBJECT_NAME_INFORMATION)ExAllocatePool(PagedPool,PathLength);
if (NameInfo2 == NULL)
{。。。。。。}
Status = ObQueryNameString( Object,NameInfo2PathLength,&PathLength);
if (!NT_SUCCESS(Status))
{。。。。。。}
KdPrint(("[NewZwCreateFile]file to operate is: %S\n", NameInfo2->Name.Buffer));