Jump to content
  • Advertisement


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


SetFilePointer - does not work!

This topic is 6586 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
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.


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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!