I'm trying to create a driver that gets the file name, I even got it with an example: DbgPrint("%ws", &FileNameInfo->Name.Buffer);
But how do I get the file name without "%ws"
? Only with a DbgPrint(&FileNameInfo->Name.Buffer);
?
When I try to call the function without "%ws"
, the minifilter returns "\"
, could someone help me please?
This is my code:
PFLT_FILE_NAME_INFORMATION FileNameInfo;
NTSTATUS Status;
Status = FltGetFileNameInformation(Data,
FLT_FILE_NAME_NORMALIZED | FLT_FILE_NAME_QUERY_DEFAULT,
&FileNameInfo);
if (NT_SUCCESS(Status))
{
Status = FltParseFileNameInformation(FileNameInfo);
if (NT_SUCCESS(Status))
{
DbgPrint(&FileNameInfo->Name.Buffer);
}
FltReleaseFileNameInformation(FileNameInfo);
}
return FLT_PREOP_SUCCESS_NO_CALLBACK;
I'm using google translator.