Example #1
0
        private void Enumerate()
        {
            cDriveManagerInterface driveManager;
            cDriveEnumeratorInterface driveEnumeratorAta;
            eErrorCode errorCode;
            ILoadRunTimeDll vtStorUnifiedDll = new cLoadRunTimeDll("vtStorUnified.dll");
            IRunTimeDll vtStorUnifiedModule = vtStorUnifiedDll.Load();

            // Create an instance for DriveManager
            driveManager = new cDriveManagerInterface(vtStorUnifiedModule);

            // Create an instance for DriveEnumeratorAta
            driveEnumeratorAta = new cDriveEnumeratorAta(vtStorUnifiedModule);

            // Register drive enumerator Ata
            driveManager.RegisterDriveEnumerator(driveEnumeratorAta);

            // Enumerate drives
            errorCode = driveManager.EnumerateDrives(eScanForHardwareChanges.Yes);
        }
Example #2
0
        private void Enumerate()
        {
            cDriveManagerInterface    driveManager;
            cDriveEnumeratorInterface driveEnumerator;
            eErrorCode      errorCode;
            ILoadRunTimeDll vtStorUnifiedDll    = new cLoadRunTimeDll("vtStorUnified.dll");
            IRunTimeDll     vtStorUnifiedModule = vtStorUnifiedDll.Load();

            // Create an instance for DriveManager
            driveManager = new cDriveManagerInterface(vtStorUnifiedModule);

            // Create an instance for DriveEnumeratorAta
            driveEnumerator = new cDriveEnumerator(vtStorUnifiedModule);
            driveEnumerator = new cDriveEnumeratorAta(vtStorUnifiedModule, driveEnumerator);

            // Register drive enumerator Ata
            driveManager.RegisterDriveEnumerator(driveEnumerator);

            // Enumerate drives
            errorCode = driveManager.EnumerateDrives(eScanForHardwareChanges.Yes);
        }