| 3316 | } |
| 3317 | |
| 3318 | BFP_EXPORT int64 BFP_CALLTYPE BfpFile_Seek(BfpFile* file, int64 offset, BfpFileSeekKind seekKind) |
| 3319 | { |
| 3320 | DWORD moveMethod; |
| 3321 | if (seekKind == BfpFileSeekKind_Absolute) |
| 3322 | moveMethod = FILE_BEGIN; |
| 3323 | else if (seekKind == BfpFileSeekKind_Relative) |
| 3324 | moveMethod = FILE_CURRENT; |
| 3325 | else |
| 3326 | moveMethod = FILE_END; |
| 3327 | |
| 3328 | LARGE_INTEGER liOffset; |
| 3329 | liOffset.QuadPart = offset; |
| 3330 | LARGE_INTEGER newPos; |
| 3331 | newPos.QuadPart = 0; |
| 3332 | ::SetFilePointerEx(file->mHandle, liOffset, &newPos, moveMethod); |
| 3333 | return newPos.QuadPart; |
| 3334 | } |
| 3335 | |
| 3336 | BFP_EXPORT void BFP_CALLTYPE BfpFile_Truncate(BfpFile* file, BfpFileResult* outResult) |
| 3337 | { |