added PhQueryFullAttributesFileWin32

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@5282 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
wj32
2013-02-07 03:38:40 +00:00
parent af2413f452
commit c141c7741b
2 changed files with 43 additions and 0 deletions
+6
View File
@@ -1375,6 +1375,12 @@ NTSTATUS PhCreateFileWin32Ex(
__out_opt PULONG CreateStatus
);
PHLIBAPI
NTSTATUS PhQueryFullAttributesFileWin32(
__in PWSTR FileName,
__out PFILE_NETWORK_OPEN_INFORMATION FileInformation
);
PHLIBAPI
NTSTATUS PhDeleteFileWin32(
__in PWSTR FileName
+37
View File
@@ -189,6 +189,43 @@ NTSTATUS PhCreateFileWin32Ex(
return status;
}
/**
* Queries file attributes.
*
* \param FileName The Win32 file name.
* \param FileInformation A variable that receives the file information.
*/
NTSTATUS PhQueryFullAttributesFileWin32(
__in PWSTR FileName,
__out PFILE_NETWORK_OPEN_INFORMATION FileInformation
)
{
NTSTATUS status;
UNICODE_STRING fileName;
OBJECT_ATTRIBUTES oa;
if (!RtlDosPathNameToNtPathName_U(
FileName,
&fileName,
NULL,
NULL
))
return STATUS_OBJECT_NAME_NOT_FOUND;
InitializeObjectAttributes(
&oa,
&fileName,
OBJ_CASE_INSENSITIVE,
NULL,
NULL
);
status = NtQueryFullAttributesFile(&oa, FileInformation);
RtlFreeHeap(RtlProcessHeap(), 0, fileName.Buffer);
return status;
}
/**
* Deletes a file.
*