Leaked source code of windows server 2003
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

  1. #include "windows.h"
  2. #define INVALID_SET_FILE_POINTER ((DWORD)-1)
  3. #if defined(__cplusplus)
  4. extern "C"
  5. {
  6. #endif
  7. BOOL
  8. WINAPI
  9. FusionpSetFilePointerEx(
  10. HANDLE File,
  11. LARGE_INTEGER DistanceToMove,
  12. PLARGE_INTEGER NewFilePointer,
  13. DWORD MoveMethod
  14. )
  15. {
  16. DWORD NewPositionLow = SetFilePointer(File, (LONG)DistanceToMove.LowPart, &DistanceToMove.HighPart, MoveMethod);
  17. if (NewPositionLow == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR)
  18. return FALSE;
  19. if (NewFilePointer != NULL)
  20. {
  21. NewFilePointer->LowPart = NewPositionLow;
  22. NewFilePointer->HighPart = DistanceToMove.HighPart;
  23. }
  24. return TRUE;
  25. }
  26. #if defined(__cplusplus)
  27. } /* extern "C" */
  28. #endif