Reputation: 37500
I have a C++ windows application which opens a file (and keeps it open) as follows:
FILE* fp = NULL;
errno_t result = _wfopen_s(&fp, L"MyRawData.dat", L"wb");
This works fine but when I try and serve that file up via filezilla it denies access to the file when I try and download it (despite ticking the 'Allow downloading of files which are open for writing by another process' option).
Is this something I've done wrong in my software or a limitation of Filezilla / general windows issue?
Upvotes: 0
Views: 725
Reputation: 4287
From the documentation of said function:
Files opened by
fopen_s
and_wfopen_s
are not sharable. If you require that a file be sharable, use_fsopen
,_wfsopen
with the appropriate sharing mode constant (for example,_SH_DENYNO
for read/write sharing).
Upvotes: 1