soukoku / ntwain

A TWAIN lib for dotnet.
MIT License
117 stars 47 forks source link

Doesn't show configuration dialog in modal mode #16

Open knowis1972 opened 3 years ago

knowis1972 commented 3 years ago

Hello! I'm exploring NTwain project, WPF sample. There is the call DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); where data is [StructLayout(LayoutKind.Sequential, Pack = 2)] partial class TWUserInterface { TW_BOOL _showUI; TW_BOOL _modalUI; TW_HANDLE _hParent; }

and TW_BOOL = System.UInt16; and _showUI = 1 and _modalUI = 1 and _hParent is actual window handle

and DsmWinNew defined as [DllImport("twaindsm.dll", EntryPoint = "DSM_Entry")] public static extern ReturnCode DsmWinNew( [In, Out]TWIdentity origin, [In, Out]TWIdentity destination, DataGroups dg, DataArgumentType dat, Message msg, [In, Out]TWCieColor data);

Unfortunately dialog doesn't shows in modal mode