I want to be able to share my mounting point (have a "Share" tab on a right click). I checked the CallbackFileSystem.AddMountingPoint method, and it says:

Quote

If you are creating the network mounting point, you can expose it as a network share which can be used by other computers (SMB share). This is done by specifying one of CBFS_SYMLINK_NETWORK_READ_NETWORK_ACCESS or CBFS_SYMLINK_NETWORK_WRITE_NETWORK_ACCESS flags in Flags parameter. If the share is to be created, the following conditions must be met:

1. The ServerName part of MountingPoint parameter must be either empty or equal to the value returned by GetComputerName() function of Windows API.
2. The process, which creates a network share, must have proper security rights that allow creation of network shares. If the rights are insufficient, the function fails.
3. CBFS_SYMLINK_NETWORK_READ_NETWORK_ACCESS or CBFS_SYMLINK_NETWORK_WRITE_NETWORK_ACCESS flag must be the only flag set in Flags parameter.

What do you mean by: CBFS_SYMLINK_NETWORK_READ_NETWORK_ACCESS or CBFS_SYMLINK_NETWORK_WRITE_NETWORK_ACCESS flag must be the only flag set in Flags parameter?

In the latest sample the implementation of CbFsSetFileSecurity comes with a comment:

Code

// Disable setting of new security for the backend file because
// these new security attributes can prohibit manipulation
// with the file from the callbacks (for example if read/write
// is not allowed for this process).

So is it okay to use this code? Will it cause problems to read and write files?

We use cookies to help provide you with the best possible online experience. By using this site, you agree that we may store and access cookies on your device. You can find out more about and set your own preferences here.