You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
767 B
34 lines
767 B
#include "windows.h"
|
|
|
|
#define INVALID_SET_FILE_POINTER ((DWORD)-1)
|
|
|
|
#if defined(__cplusplus)
|
|
extern "C"
|
|
{
|
|
#endif
|
|
|
|
BOOL
|
|
WINAPI
|
|
FusionpSetFilePointerEx(
|
|
HANDLE File,
|
|
LARGE_INTEGER DistanceToMove,
|
|
PLARGE_INTEGER NewFilePointer,
|
|
DWORD MoveMethod
|
|
)
|
|
{
|
|
DWORD NewPositionLow = SetFilePointer(File, (LONG)DistanceToMove.LowPart, &DistanceToMove.HighPart, MoveMethod);
|
|
|
|
if (NewPositionLow == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR)
|
|
return FALSE;
|
|
|
|
if (NewFilePointer != NULL)
|
|
{
|
|
NewFilePointer->LowPart = NewPositionLow;
|
|
NewFilePointer->HighPart = DistanceToMove.HighPart;
|
|
}
|
|
return TRUE;
|
|
}
|
|
|
|
#if defined(__cplusplus)
|
|
} /* extern "C" */
|
|
#endif
|