/// <summary> /// Stops the scanning process of a datasource /// </summary> /// <param name="applicationIdentity">Identity of the application</param> /// <param name="dataSourceIdentity">Identity of the datasource</param> /// <param name="userInterface"></param> /// <returns>Reply of the twaindriver</returns> internal static ReturnCodes DisableDataSource( Identity applicationIdentity, Identity dataSourceIdentity, UserInterface userInterface) { return DataSourceUserInterface ( applicationIdentity, dataSourceIdentity, DataGroups.Control, DataAttributeTypes.UserInterface, Messages.DisableDataSource, userInterface); }
private static extern ReturnCodes DataSourceUserInterface( [In, Out] Identity origin, [In, Out] Identity destination, DataGroups dataGroup, DataAttributeTypes dataAttributeType, Messages message, UserInterface userInterface);
/// <summary> /// Starts the scanning process /// </summary> /// <param name="parentWindowHandle">Parent window of the twain driver's userinterface</param> /// <returns>Resonse of the twain driver</returns> internal ReturnCodes Enable(IntPtr parentWindowHandle) { ReturnCodes result = ReturnCodes.Failure; if (IsOpen) { UserInterface guif = new UserInterface (); guif.ShowUserInterface = 1; guif.ModalUserInterface = 1; guif.ParentHandle = parentWindowHandle; result = Twain32.EnableDataSource (dataSourceManager.Identity, this.Identity, guif); } return result; }