示例#1
0
        private void pvStart()
        {
            FuserMountFinishStatus mountReturnCode = FuserMountFinishStatus.General_Unknown_Error;

            try {
                int dllstatus = 0;

                dllstatus = FuserLinkLibraryCall.DeviceMount(this.FuserMountParam, this.FuserMountDevice);

                switch (dllstatus)
                {
                case FuserDefinition.FUSER_DEVICEMOUNT_SUCCESS: mountReturnCode = FuserMountFinishStatus.Success; break;

                case FuserDefinition.FUSER_DEVICEMOUNT_VERSION_ERROR: mountReturnCode = FuserMountFinishStatus.Version_Error; break;

                case FuserDefinition.FUSER_DEVICEMOUNT_EVENT_LOAD_ERROR: mountReturnCode = FuserMountFinishStatus.Event_Load_Error; break;

                case FuserDefinition.FUSER_DEVICEMOUNT_BAD_MOUNT_POINT_ERROR: mountReturnCode = FuserMountFinishStatus.Bad_Mountpoint_Error; break;

                case FuserDefinition.FUSER_DEVICEMOUNT_DRIVER_INSTALL_ERROR: mountReturnCode = FuserMountFinishStatus.Driver_Install_Error; break;

                case FuserDefinition.FUSER_DEVICEMOUNT_DRIVER_START_ERROR: mountReturnCode = FuserMountFinishStatus.Driver_Start_Error; break;

                case FuserDefinition.FUSER_DEVICEMOUNT_MOUNT_ERROR: mountReturnCode = FuserMountFinishStatus.Mount_Error; break;

                default: mountReturnCode = FuserMountFinishStatus.General_Unknown_Error; break;
                }
            }catch (DllNotFoundException de) {
                de.ToString();
                mountReturnCode = FuserMountFinishStatus.Driver_Not_Found_Error;
            } catch (Exception e) {
                e.ToString();
                mountReturnCode = FuserMountFinishStatus.General_Unknown_Error;
            }

            try {
                this.drive.Unmounted(mountReturnCode);
            }
            catch {
            }

            lock (this) {
                this.isMounted = false;
            }
        }
 public void Unmounted(FuserMountFinishStatus returncode)
 {
     Console.WriteLine("Beendet: " + returncode);
 }