File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -662,7 +662,7 @@ NTSTATUS
662
662
NTAPI
663
663
PhSetFilePosition (
664
664
_In_ HANDLE FileHandle ,
665
- _In_ PLARGE_INTEGER Position
665
+ _In_opt_ PLARGE_INTEGER Position
666
666
);
667
667
668
668
PHLIBAPI
Original file line number Diff line number Diff line change @@ -3109,13 +3109,16 @@ NTSTATUS PhGetFilePosition(
3109
3109
3110
3110
NTSTATUS PhSetFilePosition (
3111
3111
_In_ HANDLE FileHandle ,
3112
- _In_ PLARGE_INTEGER Position
3112
+ _In_opt_ PLARGE_INTEGER Position
3113
3113
)
3114
3114
{
3115
3115
FILE_POSITION_INFORMATION positionInfo ;
3116
3116
IO_STATUS_BLOCK isb ;
3117
3117
3118
- positionInfo .CurrentByteOffset = * Position ;
3118
+ if (Position )
3119
+ positionInfo .CurrentByteOffset = * Position ;
3120
+ else
3121
+ positionInfo .CurrentByteOffset .QuadPart = 0 ;
3119
3122
3120
3123
return NtSetInformationFile (
3121
3124
FileHandle ,
You can’t perform that action at this time.
0 commit comments