T_U32 Fwl_FileLongSeek(T_hFILE hFile, T_U32 offset, T_U16 origin) { T_U32 ret; switch (origin) { case FS_SEEK_SET: if(0x7FFFFFFF >= offset) { return File_SetFilePtr(hFile , (T_S32)offset , FS_SEEK_SET); } else { ret = File_SetFilePtr(hFile , (T_S32)0x7FFFFFFF , FS_SEEK_SET); ret += File_SetFilePtr(hFile , (T_S32)(offset - 0x7FFFFFFF), FS_SEEK_CUR); return ret; } break; case FS_SEEK_CUR: return File_SetFilePtr(hFile , (T_S32)offset, FS_SEEK_CUR); break; case FS_SEEK_END: return File_SetFilePtr(hFile , (T_S32)offset , FS_SEEK_END); break; default: return (T_U32)(-1); break; } }
//偏移 T_U32 Fwl_FileSeek(T_hFILE hFile, T_S32 offset, T_U16 origin) { //判断句柄是否有效 if (hFile == FS_INVALID_HANDLE ) { return FS_INVALID_SEEK; } return File_SetFilePtr((T_hFILE)hFile, offset, origin); }
T_U32 Fwl_FileSeek(T_hFILE hFile, T_S32 offset, T_U16 origin) { return File_SetFilePtr(hFile, offset, origin); }