Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

BrianH

SetFilePointer - does not work!

This topic is 6417 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can anyone give me a clue as to why my use of SetFilePointer() (VC6, win98) does not work??????? //create the file HANDLE icm = CreateFile(filename,GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL); //calculate some stuff //set the file pointer SetFilePointer(icm,bytes_to_skip,NULL,FILE_CURRENT); I looked through the help and the only thing that it said was that your file needed to be opened with the GENERIC_READ flag, which i do. The SetFilePointer() function always returns 0xFFFFFFFF indicating a failure. I have checked the bytes_to_skip variable and it is valid. I am going insane. thanks, BrianH

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Does the file you specified to read exist actually?

First, you had better make sure that the filename you specified is valid and the handle you received from CreateFile() does not have INVALID_HANDLE_VALUE. Hope this helps.

Kwanji

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!