| |

VerySource

 Forgot password?
 Register
Search
View: 721|Reply: 5

What is the API of CFile's seek method, is there any other than seek?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-26 19:20:01
| Show all posts |Read mode
I am used to using windows functions such as openfile, writefile. If I use seek, I can only use functions like fopen, so does the seek method of CFile have a windows version of the API?
Reply

Use magic Report

0

Threads

20

Posts

21.00

Credits

Newbie

Rank: 1

Credits
21.00

 China

Post time: 2020-2-17 23:30:02
| Show all posts
SeekToEnd () SeekToBegin () Seek ()
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-2-18 15:00:01
| Show all posts
SetFilePointer ()
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-3-5 23:00:02
| Show all posts
Passing by
Is fseek
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-3-18 01:00:01
| Show all posts
In fact, my problem is this. MFC uses CFile.seek, write, read to start reading and writing from any position in the file, so how to use the API to implement it, readfile, writefile can only start from the beginning of the file.
Reply

Use magic Report

0

Threads

11

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-31 14:30:01
| Show all posts
WINBASEAPI
DWORD
WINAPI
SetFilePointer (
    IN HANDLE hFile,
    IN LONG lDistanceToMove,
    IN PLONG lpDistanceToMoveHigh,
    IN DWORD dwMoveMethod
    );

You hit CFile :: Seek and right click to the definition, don't you see it?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list