Positioning in file
-
Before now I used: h=open(....- command and seek/tell for positioning inside file Now I use: hFile=CreateFile(..... command. How to position inside file? Will seek/tell work ?
Monin D. wrote:
How to position inside file? Will seek/tell work ?
No. fopen returns a FILE pointer. CreateFile returns a file HANDLE. Passing a HANDLE to any of the FILE operations will fail. You can find a list of all the methods you can use with the file HANDLE you get from CreateFile here.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac
-
Before now I used: h=open(....- command and seek/tell for positioning inside file Now I use: hFile=CreateFile(..... command. How to position inside file? Will seek/tell work ?
Call
SetFilePointer()
-
Call
SetFilePointer()
-
Before now I used: h=open(....- command and seek/tell for positioning inside file Now I use: hFile=CreateFile(..... command. How to position inside file? Will seek/tell work ?
after use CreateFile that return hFile you can declare
CFile m_fFile(hFile)
& then use m_fFile.Seek.... if you wanna work with in text mode you should useCStdioFile
instead ofCFile
.