| |

VerySource

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

File read and write sharing issues

[Copy link]

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-2-4 13:00:01
| Show all posts |Read mode
When the program saves data, the com component will get a save file event notification. When I get this notification, I get the save path of the file, and then use this path to open the file with CFile. The file needs to be modified, but this time If the modification fails, it may be because the file is still open and cannot be modified at the same time. Is there any way to modify the file after it has been saved, or when can I modify it during my program?
Reply

Use magic Report

0

Threads

17

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-23 16:30:01
| Show all posts
Write driver ~~~
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-3-24 11:00:02
| Show all posts
Is there any simpler and more direct way besides write driver?
Reply

Use magic Report

0

Threads

17

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-3-28 18:30:01
| Show all posts
Then open a thread in the COM component to wait for the end of the file saving process, and then modify it.
But this may not be stable
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-3-29 09:00:01
| Show all posts
How to judge the end of the file saving process, can it be operated after it is over, will there be no sharing conflicts?
Reply

Use magic Report

0

Threads

3

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-7-21 12:15:01
| Show all posts
It shouldn't.
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