views:

430

answers:

1

Hi,

I have a Windows service running in a specified user account with write permission on a shared drive on another computer. The service is logging on that shared drive.

I allow the user to enter mapped path or network path (e.g. z:\MyRemoteFolder or \RemoteComputer\MyRemoteFolder) as the log destination.

As I am in an unstable network environment, I sometime see the error "Windows - Delayed Write Failed".

I know you can disable caching in a per drive basis (including mapped drive), but is there a way to disable caching for any direct access network (\RemoteComputer\MyRemoteFolder)?

Thanks a lot,

Nic

A: 

Using "FILE_FLAG_WRITE_THROUGH" and "FILE_FLAG_NO_BUFFERING" in create file worked for me.

Nicolas