MCPcopy Create free account
hub / github.com/Scobalula/Greyhound / CascSetFilePointer

Function CascSetFilePointer

src/External/CascLib/src/CascReadFile.cpp:1188–1204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1186}
1187
1188DWORD WINAPI CascSetFilePointer(HANDLE hFile, LONG lFilePos, LONG * PtrFilePosHigh, DWORD dwMoveMethod)
1189{
1190 ULONGLONG NewPos = 0;
1191 LONGLONG DistanceToMove;
1192
1193 // Assemble the 64-bit distance to move
1194 DistanceToMove = (PtrFilePosHigh != NULL) ? MAKE_OFFSET64(PtrFilePosHigh[0], lFilePos) : (LONGLONG)(LONG)lFilePos;
1195
1196 // Set the file offset
1197 if(!CascSetFilePointer64(hFile, DistanceToMove, &NewPos, dwMoveMethod))
1198 return CASC_INVALID_POS;
1199
1200 // Give the result to the caller
1201 if(PtrFilePosHigh != NULL)
1202 PtrFilePosHigh[0] = (LONG)(NewPos >> 32);
1203 return (DWORD)(NewPos);
1204}
1205
1206bool WINAPI CascReadFile(HANDLE hFile, void * pvBuffer, DWORD dwBytesToRead, PDWORD PtrBytesRead)
1207{

Callers 1

CascDumpFileFunction · 0.85

Calls 1

CascSetFilePointer64Function · 0.85

Tested by

no test coverage detected