CallbackDisk

Create and manage virtual disk drives from your Windows applications

CBDisk.AddMountingPoint method

Filter:

Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET   

CBDisk     See also    

Overview

Adds a mounting point for the storage.

Declaration

[Pascal]
    procedure AddMountingPoint(MountingPoint: TCBString);
    procedure AddMountingPoint( MountingPoint: TCBString; Flags : LongWord; AuthenticationID : PLUID );

    type TCBString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[C++ (Lib)]
    void AddMountingPoint(const unsigned short *mountingPoint);
    void AddMountingPoint( const unsigned short *mountingPoint, DWORD Flags, PLUID AuthenticationID);

[C++ (VCL)]
    void __fastcall AddMountingPoint(WideString MountingPoint);
    void __fastcall AddMountingPoint( WideString MountingPoint, DWORD Flags, PLUID AuthenticationID);

[C++ (.NET)]
    void AddMountingPoint(String ^MountingPoint);
    void AddMountingPoint( String ^MountingPoint, UInt32 Flags, Object^ AuthenticationID );

[C#]
    void AddMountingPoint(String MountingPoint);
    void AddMountingPoint( String MountingPoint, UInt32 Flags, Object AuthenticationID );

[VB.NET]
    Sub AddMountingPoint(ByVal MountingPoint As String)
    Sub AddMountingPoint( ByVal MountingPoint As String, ByVal Flags As UInt32, ByVal AuthenticationID As Object)

Parameters

  • MountingPoint - The path of the mounting point (see About Mounting Points topic)
  • Flags - Zero or more flags that specify parameters of mounting point creation (see details below).
    Several flags are joined using bitwise-OR in C++, C# and VB.NET.
  • AuthenticationId - Authentication ID of the session.
    This parameter can be NULL/null/Nothing/nil if CBDISK_SYMLINK_LOCAL flag is not set or if the mounting point is added for the "current" session.

Values of Flags

Description

Use this method to add a mounting point for mounted volume. Use DeleteMountingPoint to delete the mounting point.

Short form of the method (the one that accepts only MountingPoint parameter) creates a globally accessible mounting point.

Long form of the method can be used to create all types of mounting points as defined by combination of Flags method.

Read more About Mounting Points.

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 CBDISK_SYMLINK_NETWORK_READ_NETWORK_ACCESS or CBDISK_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. CBDISK_SYMLINK_NETWORK_READ_NETWORK_ACCESS or CBDISK_SYMLINK_NETWORK_WRITE_NETWORK_ACCESS flag must be the only flag set in Flags parameter.

NOTE: Network mounting points won't work with NTFS disks.

Call from...

This method may be called only from outside of callback / event handlers.

See also

StorageCharacteristics     StorageType     DeleteMountingPoint     GetMountingPoint     GetMountingPointCount     MountMedia    

Back to top