public void Start()
        {
            if (DeviceState != State.BeforeOperation)
            {
                throw new Exception("Device state invalid for this operation");
            }

            Callback = new GhostIncidentCallback(IncidentCreator);
            DeviceID = GhostMountDeviceWithID(GhostDeviceID, Callback, IntPtr.Zero, ImageFileName);
            if (DeviceID == -1)
            {
                int Error = GhostGetLastError();
                throw new Exception(GhostGetErrorDescription(Error));
            }

            DeviceState = State.Mounted;
            Mount       = DateTime.Now;
            OnUpdate();
        }
Exemple #2
0
        public void Start()
        {
            if (DeviceState != State.BeforeOperation)
            {
                throw new Exception("Device state invalid for this operation");
            }

            Callback = new GhostIncidentCallback(IncidentCreator);
            DeviceID = GhostMountDeviceWithID(GhostDeviceID, Callback, IntPtr.Zero, ImageFileName);
            if (DeviceID == -1)
            {
                int Error = GhostGetLastError();
                throw new Exception(GhostGetErrorDescription(Error));
            }

            DeviceState = State.Mounted;
            Mount = DateTime.Now;
            OnUpdate();
        }
Exemple #3
0
 private static extern int GhostMountDeviceWithID(int DeviceID, GhostIncidentCallback Callback, IntPtr Context, String ImageName);
 private static extern int GhostMountDeviceWithID(int DeviceID, GhostIncidentCallback Callback, IntPtr Context, String ImageName);