Solid File System

Virtual file system enigne that can be embedded into your software.

SolFSStorage.InstallDrivers method (OS edition, Windows platform)

Filter:

Pascal    Plain C    C++ (DLL/Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET    Java 

SolFSStorage     See also    

Overview

OPERATING SYSTEM EDITION FOR WINDOWS
Installs the drivers into Windows

APPLICATION EDITION
Not applicable

Declaration

[Pascal]
    class procedure InstallDrivers( VirtualDiskDriverFileName : TSolFSString; FileSystemDriverFileName : TSolFSString; var RebootNeeded : boolean);
    class procedure InstallDrivers( VirtualDiskDriverFileName : TSolFSString; FileSystemDriverFileName : TSolFSString; var RebootNeeded : boolean; ProgramName : string);

[Plain C]
    long _stdcall StorageInstallDrivers(unsigned short* VirtualDiskDriverFileName, unsigned short* FileSystemDriverFileName, bool *RebootNeeded);

[C++ (DLL/Lib)]
    static void InstallDrivers( unsigned short* VirtualDiskDriverFileName, unsigned short* FileSystemDriverFileName, bool *RebootNeeded);
    static void InstallDrivers( unsigned short* VirtualDiskDriverFileName, unsigned short* FileSystemDriverFileName, bool *RebootNeeded, char* ProgramName);

[C++ (VCL)]
    static void __fastcall InstallDrivers( TSolFSString VirtualDiskDriverFileName, TSolFSString FileSystemDriverFileName, bool RebootNeeded);
    static void __fastcall InstallDrivers( TSolFSString VirtualDiskDriverFileName, TSolFSString FileSystemDriverFileName, bool RebootNeeded, AnsiString ProgramName);

[C++ (.NET)]
    static void InstallDrivers( String* VirtualDiskDriverFileName, String* FileSystemDriverFileName, bool &RebootNeeded);
    static void InstallDrivers( String* VirtualDiskDriverFileName, String* FileSystemDriverFileName, bool &RebootNeeded, String* ProgramName);

[C#]
    static void InstallDrivers( string VirtualDiskDriverFileName, string FileSystemDriverFileName, ref bool RebootNeeded);
    static void InstallDrivers( string VirtualDiskDriverFileName, string FileSystemDriverFileName, ref bool RebootNeeded, string ProgramName)

[VB.NET]
    Shared Sub InstallDrivers( ByVal VirtualDiskDriverFileName As String, ByVal FileSystemDriverFileName As String, ByRef RebootNeeded As Boolean)
    Shared Sub InstallDrivers( ByVal VirtualDiskDriverFileName As String, ByVal FileSystemDriverFileName As String, ByRef RebootNeeded As Boolean, ByVal ProgramName As String)

[Java]
    not applicable;

Parameters

  • VirtualDiskDriverFileName - the fully qualified name of the virtual block device driver (soldisk.sys).
  • FileSystemDriverFileName - the fully qualified name of the file system driver (solfs.sys).
  • RebootNeeded - On return this parameter specifies if system restart is necessary for driver installation to be successful.
  • ProgramName - the string that identifies installation of the driver by your application

[Plain C]  Return values

0 if the function succeeded or one of Error codes if the function failed.

Description

Use this function to install the drivers to the system. Once installed, the drivers are loaded during system startup. ProgramName is used to distinguish between installations of the driver made by different applications and to prevent the situation when the driver is installed by two applications and further deinstallation of one of them removes the driver.

Read more about installing and uninstalling the drivers.

Install the correct drivers:
On 64-bit systems you must install 64-bit drivers. 32-bit drivers won't work there. If your application is 32-bit, you need to determine what driver set to install. To do this you can use one of the listed methods:

  • Use IsWow64Process() WinAPI function. Note, that this function appeared only in Windows XP so you need to use GetProcAddress() WinAPI function to dynamically obtain the function pointer.
  • Check existence of %WINDIR%\SysWOW64 folder
  • Check ProgramW6432 environment variable

See also

GetDriversStatus     UninstallDrivers

Back to top