mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2025-01-19 10:02:31 +00:00
-[NSFleHandle_win32 offsetInFile] implemented
This commit is contained in:
parent
a00972020f
commit
58b02671b7
@ -98,8 +98,16 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
}
|
||||
|
||||
-(unsigned long long)offsetInFile {
|
||||
NSUnimplementedMethod();
|
||||
return 0;
|
||||
LARGE_INTEGER li;
|
||||
|
||||
li.QuadPart=0;
|
||||
|
||||
li.LowPart=SetFilePointer(_handle,li.LowPart,&li.HighPart,FILE_CURRENT);
|
||||
|
||||
if(li.LowPart==INVALID_SET_FILE_POINTER && GetLastError()!=NO_ERROR)
|
||||
[NSException raise:NSInvalidArgumentException format:@"GetLastError()=%d",GetLastError()];
|
||||
|
||||
return li.QuadPart;
|
||||
}
|
||||
|
||||
-(void)seekToFileOffset:(unsigned long long)offset {
|
||||
|
Loading…
x
Reference in New Issue
Block a user