EldoS
 Table of Contents >  Mounting Points
Navigation
Web site
Support
Table Of Contents
Send comments on this topic

Mounting Points and Authentication IDs

Mounting points

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.

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:".

Alternatively 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 (remember that CBFS methods omit the "\\.\" part), for example "\\.\MySecretDisk".

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. If you want to delete the name "\\.\CBFS_Volume1", call DeleteMountingPoint() method and pass "CBFS_Volume1" as the name.

Mounting points can be global (i.e. visible in all user sessions) or local (visible only in some specific user session). You can add, delete and enumerate local mounting points using *MountingPointEx() methods and GetMountingPointEx property. Methods that don't have *Ex suffix operate with global mounting points. To operate with local mounting points you need to obtain and use Authentication IDs as described below.

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).

Network mounting points

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

  • Windows Explorer doesn't read thumbnails from the files located on remote devices
  • Some applications are more tolerant to timeouts and delays when working with remote devices.
So if your virtual file system works with some slow storage or across network, you need to employ a network mounting point. Network mounting points are added using AddNetworkMountingPoint method. When you use network mounting point, you need to install Network Redirector helper DLL (described here).

Authentication IDs

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.

Contact Us | Terms of Use | Trademarks | Privacy Statement
Copyright (c) 1998-2008, EldoS Corporation