Mounting Points and Authentication IDs
When the file system driver mounts a volume, the volume must be accessible via certain mounting point. This is the name which will be used by the system to access this volume. Each volume must have at least one mounting point, and it can have several mounting points if necessary.
Mounting points can be global (i.e. visible in all user sessions) or local (visible only in some specific user session). Note that if the program is run with elevated rights ("run as administrator") and it creates a local mounting point, this local mounting point is local for elevated session and consequently is not visible to other applications including Explorer.
When the mounting point is added or removed, Callback File System API broadcasts a system message (WM_DEVICECHANGE) which tells Windows Explorer to refresh the list of disks available in the system. The problem comes when you add or remove the mounting point from the service application. The messages can't go across different user sessions, and Explorer won't receive the notifications. To work around this problem Callback File System 2.0 inlcudes Explorer Notification helper DLL (described here).
You can add mounting points that will be visible to the user by specifying the "disk name" as a mounting point. The disk name consists of a single character in range A to Z followed by a colon, for example "Z:".
You can create mounting points that will be only visible when you call them using their names. Such points start with "\\.\" followed by point name.
The functions, which work with mounting volumes, accept point names with "\\.\" part omited.
To add a new hidden mounting point call AddMountingPoint() and pass "CBFS_Volume1" as the name, eg. AddMountingPoint("CBFS_Volume1"). If you want to delete the name "\\.\CBFS_Volume1", call DeleteMountingPoint() method and pass "CBFS_Volume1" as the name, eg. DeleteMountingPoint("CBFS_Volume1").
Network mounting points appeared in Callback File System 2.0. They are not much different from the regular mounting points, but they are seen by the OS as if they were remote devices. Such specifics is useful because
In Callback File System 2.5 network mounting points were extended to provide additional functionality. You can share the network mounting point, i.e. make it visible for other computers, as if it were created as a network share from the real disk.
When you create a network mounint point (by setting a corresponding flag in the Flags parameter of AddMountingPoint method), special form of the mounting point name is used.
The mounting point has the following form:
<Local Mounting Point>;<Server name>;<Share Name>
You can add a mounting point, which will be visible as a virtual folder within NTFS file system on existing disk. MountingPoint parameter can be set to eg. ("Z:") for a drive letter or eg. "C:\Existing\Folder\MyMountingPoint". To do this use CBFS_SYMLINK_MOUNT_MANAGER flag in AddMountingPoint method. Such mounting points are visible to all users in the system, and creation of such points requires administrative rights.
If you create a plug-n-play device (StorageType property is set to stDiskPnP) which is not removable (scRemovableMedia flag is not set in StorageCharacteristics property), you may call AddMountingPoint() method only after successful call to MountMedia() method, otherwise you will get an error.
An Authentication ID is the locally unique identifier, or LUID, that is assigned to the logon session that the access token represents. Authentication ID is obtained from the access token as follows: call GetTokenInformation() Windows API function and pass it "TokenGroupsAndPrivileges" or "TokenStatistics" in TokenInformation parameter. The resulting value will be a reference to the structure (refer to MSDN for details), which contains the needed Authentication ID.
To enumerate logon sessions and retrieve the Authentication ID for specific logon session use LsaEnumerateLogonSessions function from Windows API, which returns the list of existing logon session IDs (which you are looking for). To obtain information about some session (for example to find out if this is a session that you are looking for), use LsaGetLogonSessionData function from Windows API. LsaGetLogonSessionData will return the structure, that contains all information about the session. Read the article on CodeProject about how to enumerate logon sessions.