vbox的更動 62713 路徑 trunk/src/VBox/Runtime
- 時間撮記:
- 2016-7-29 下午09:31:16 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r3/win/rtFileNativeSetAttributes-win.cpp
r62592 r62713 29 29 * Header Files * 30 30 *********************************************************************************************************************************/ 31 /* APIs used here require DDK headers. */ 32 #pragma warning(disable: 4668) 33 #include <wdm.h> 34 #pragma warning(default: 4668) 31 #include <iprt/nt/nt.h> 32 #include <iprt/string.h> 35 33 36 /* Declare ntdll exports. */37 extern "C"38 {39 NTSYSAPI ULONG NTAPI RtlNtStatusToDosError (IN NTSTATUS Status);40 41 NTSYSAPI NTSTATUS NTAPI NtSetInformationFile(IN HANDLE FileHandle,42 OUT PIO_STATUS_BLOCK IoStatusBlock,43 IN PVOID FileInformation,44 IN ULONG Length,45 IN FILE_INFORMATION_CLASS FileInformationClass);46 }47 34 48 35 /** Windows/NT worker. … … 51 38 { 52 39 IO_STATUS_BLOCK IoStatusBlock; 53 memset(&IoStatusBlock, 0, sizeof(IoStatusBlock));40 RT_ZERO(IoStatusBlock); 54 41 55 42 /* … … 59 46 */ 60 47 FILE_BASIC_INFORMATION Info; 61 memset(&Info, 0, sizeof(Info));48 RT_ZERO(Info); 62 49 Info.FileAttributes = fAttributes; 63 50 64 51 /** @todo resolve dynamically to avoid dragging in NtDll? */ 65 NTSTATUS Status = NtSetInformationFile(hFile, 66 &IoStatusBlock, 67 &Info, 68 sizeof(Info), 69 FileBasicInformation); 70 71 return RtlNtStatusToDosError(Status); 52 NTSTATUS rcNt = NtSetInformationFile(hFile, 53 &IoStatusBlock, 54 &Info, 55 sizeof(Info), 56 FileBasicInformation); 57 return RtlNtStatusToDosError(rcNt); 72 58 } 73 59
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器