public static extern ReturnCode DsmWinNew( [In, Out] TWIdentity origin, [In, Out] TWIdentity destination, DataGroups dg, DataArgumentType dat, Message msg, [In, Out] TWEntryPoint data);
public static ReturnCode DsmEntry( TWIdentity origin, Message msg, TWEntryPoint data) { if (PlatformInfo.Current.IsWindows) { if (PlatformInfo.Current.UseNewWinDSM) { return(NativeMethods.DsmWinNew(origin, null, DataGroups.Control, DataArgumentType.EntryPoint, msg, data)); } else { return(NativeMethods.DsmWinOld(origin, null, DataGroups.Control, DataArgumentType.EntryPoint, msg, data)); } } else if (PlatformInfo.Current.IsLinux) { return(NativeMethods.DsmLinux(origin, null, DataGroups.Control, DataArgumentType.EntryPoint, msg, data)); } throw new PlatformNotSupportedException(); }
/// <summary> /// Gets the function entry points for twain 2.0 or higher. /// </summary> /// <param name="entryPoint">The entry point.</param> /// <returns></returns> public ReturnCode Get(out TWEntryPoint entryPoint) { Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.EntryPoint, Message.Get); entryPoint = new TWEntryPoint(); return(Dsm.DsmEntry(Session.AppId, Message.Get, entryPoint)); }