mirror of
https://github.com/soukoku/ntwain.git
synced 2025-04-05 14:30:41 +08:00
Added non-ref IntPtr dsm entry call.
This commit is contained in:
parent
2fb153fa59
commit
b43939726a
@ -10,29 +10,28 @@ namespace NTwain.Triplets.Audio
|
|||||||
|
|
||||||
public ReturnCode Get()
|
public ReturnCode Get()
|
||||||
{
|
{
|
||||||
IntPtr zero = IntPtr.Zero;
|
|
||||||
if (Is32Bit)
|
if (Is32Bit)
|
||||||
{
|
{
|
||||||
if (IsWin)
|
if (IsWin)
|
||||||
return NativeMethods.DsmWin32(Session.Config.App32, Session.CurrentSource.Identity32,
|
return NativeMethods.DsmWin32(Session.Config.App32, Session.CurrentSource.Identity32,
|
||||||
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, ref zero);
|
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, IntPtr.Zero);
|
||||||
if (IsLinux)
|
if (IsLinux)
|
||||||
return NativeMethods.DsmLinux32(Session.Config.App32, Session.CurrentSource.Identity32,
|
return NativeMethods.DsmLinux32(Session.Config.App32, Session.CurrentSource.Identity32,
|
||||||
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, ref zero);
|
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, IntPtr.Zero);
|
||||||
if (IsMac)
|
if (IsMac)
|
||||||
return NativeMethods.DsmMac32(Session.Config.App32, Session.CurrentSource.Identity32,
|
return NativeMethods.DsmMac32(Session.Config.App32, Session.CurrentSource.Identity32,
|
||||||
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, ref zero);
|
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, IntPtr.Zero);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsWin)
|
if (IsWin)
|
||||||
return NativeMethods.DsmWin64(Session.Config.App32, Session.CurrentSource.Identity32,
|
return NativeMethods.DsmWin64(Session.Config.App32, Session.CurrentSource.Identity32,
|
||||||
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, ref zero);
|
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, IntPtr.Zero);
|
||||||
if (IsLinux)
|
if (IsLinux)
|
||||||
return NativeMethods.DsmLinux64(Session.Config.App32, Session.CurrentSource.Identity32,
|
return NativeMethods.DsmLinux64(Session.Config.App32, Session.CurrentSource.Identity32,
|
||||||
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, ref zero);
|
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, IntPtr.Zero);
|
||||||
if (IsMac)
|
if (IsMac)
|
||||||
return NativeMethods.DsmMac64(Session.Config.App32, Session.CurrentSource.Identity32,
|
return NativeMethods.DsmMac64(Session.Config.App32, Session.CurrentSource.Identity32,
|
||||||
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, ref zero);
|
DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, IntPtr.Zero);
|
||||||
|
|
||||||
return ReturnCode.Failure;
|
return ReturnCode.Failure;
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,9 @@ namespace NTwain.Triplets
|
|||||||
/// Whether platform is Linux.
|
/// Whether platform is Linux.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected readonly bool IsLinux;
|
protected readonly bool IsLinux;
|
||||||
|
/// <summary>
|
||||||
/// Whether platform is MacOS.
|
/// Whether platform is MacOS.
|
||||||
|
/// </summary>
|
||||||
protected readonly bool IsMac;
|
protected readonly bool IsMac;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -18,6 +18,15 @@ namespace NTwain.Triplets
|
|||||||
Message msg,
|
Message msg,
|
||||||
ref IntPtr data);
|
ref IntPtr data);
|
||||||
|
|
||||||
|
[DllImport(LinuxDll, EntryPoint = EntryName)]
|
||||||
|
public static extern ReturnCode DsmLinux32(
|
||||||
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
[In, Out]TW_IDENTITY destination,
|
||||||
|
DataGroups dg,
|
||||||
|
DataArgumentType dat,
|
||||||
|
Message msg,
|
||||||
|
IntPtr data);
|
||||||
|
|
||||||
[DllImport(LinuxDll, EntryPoint = EntryName)]
|
[DllImport(LinuxDll, EntryPoint = EntryName)]
|
||||||
public static extern ReturnCode DsmLinux32(
|
public static extern ReturnCode DsmLinux32(
|
||||||
[In, Out]TW_IDENTITY origin,
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
@ -18,6 +18,15 @@ namespace NTwain.Triplets
|
|||||||
Message msg,
|
Message msg,
|
||||||
ref IntPtr data);
|
ref IntPtr data);
|
||||||
|
|
||||||
|
[DllImport(LinuxDll, EntryPoint = EntryName)]
|
||||||
|
public static extern ReturnCode DsmLinux64(
|
||||||
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
[In, Out]TW_IDENTITY destination,
|
||||||
|
DataGroups dg,
|
||||||
|
DataArgumentType dat,
|
||||||
|
Message msg,
|
||||||
|
IntPtr data);
|
||||||
|
|
||||||
[DllImport(LinuxDll, EntryPoint = EntryName)]
|
[DllImport(LinuxDll, EntryPoint = EntryName)]
|
||||||
public static extern ReturnCode DsmLinux64(
|
public static extern ReturnCode DsmLinux64(
|
||||||
[In, Out]TW_IDENTITY origin,
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
@ -18,6 +18,15 @@ namespace NTwain.Triplets
|
|||||||
Message msg,
|
Message msg,
|
||||||
ref IntPtr data);
|
ref IntPtr data);
|
||||||
|
|
||||||
|
[DllImport(Mac32Dll, EntryPoint = EntryName)]
|
||||||
|
public static extern ReturnCode DsmMac32(
|
||||||
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
[In, Out]TW_IDENTITY destination,
|
||||||
|
DataGroups dg,
|
||||||
|
DataArgumentType dat,
|
||||||
|
Message msg,
|
||||||
|
IntPtr data);
|
||||||
|
|
||||||
[DllImport(Mac32Dll, EntryPoint = EntryName)]
|
[DllImport(Mac32Dll, EntryPoint = EntryName)]
|
||||||
public static extern ReturnCode DsmMac32(
|
public static extern ReturnCode DsmMac32(
|
||||||
[In, Out]TW_IDENTITY origin,
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
@ -18,6 +18,15 @@ namespace NTwain.Triplets
|
|||||||
Message msg,
|
Message msg,
|
||||||
ref IntPtr data);
|
ref IntPtr data);
|
||||||
|
|
||||||
|
[DllImport(Mac64Dll, EntryPoint = EntryName)]
|
||||||
|
public static extern ReturnCode DsmMac64(
|
||||||
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
[In, Out]TW_IDENTITY destination,
|
||||||
|
DataGroups dg,
|
||||||
|
DataArgumentType dat,
|
||||||
|
Message msg,
|
||||||
|
IntPtr data);
|
||||||
|
|
||||||
[DllImport(Mac64Dll, EntryPoint = EntryName)]
|
[DllImport(Mac64Dll, EntryPoint = EntryName)]
|
||||||
public static extern ReturnCode DsmMac64(
|
public static extern ReturnCode DsmMac64(
|
||||||
[In, Out]TW_IDENTITY origin,
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
@ -18,6 +18,15 @@ namespace NTwain.Triplets
|
|||||||
Message msg,
|
Message msg,
|
||||||
ref IntPtr data);
|
ref IntPtr data);
|
||||||
|
|
||||||
|
[DllImport(WinDll, EntryPoint = EntryName)]
|
||||||
|
public static extern ReturnCode DsmWin32(
|
||||||
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
[In, Out]TW_IDENTITY destination,
|
||||||
|
DataGroups dg,
|
||||||
|
DataArgumentType dat,
|
||||||
|
Message msg,
|
||||||
|
IntPtr data);
|
||||||
|
|
||||||
[DllImport(WinDll, EntryPoint = EntryName)]
|
[DllImport(WinDll, EntryPoint = EntryName)]
|
||||||
public static extern ReturnCode DsmWin32(
|
public static extern ReturnCode DsmWin32(
|
||||||
[In, Out]TW_IDENTITY origin,
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
@ -18,6 +18,15 @@ namespace NTwain.Triplets
|
|||||||
Message msg,
|
Message msg,
|
||||||
ref IntPtr data);
|
ref IntPtr data);
|
||||||
|
|
||||||
|
[DllImport(WinDll, EntryPoint = EntryName)]
|
||||||
|
public static extern ReturnCode DsmWin64(
|
||||||
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
[In, Out]TW_IDENTITY destination,
|
||||||
|
DataGroups dg,
|
||||||
|
DataArgumentType dat,
|
||||||
|
Message msg,
|
||||||
|
IntPtr data);
|
||||||
|
|
||||||
[DllImport(WinDll, EntryPoint = EntryName)]
|
[DllImport(WinDll, EntryPoint = EntryName)]
|
||||||
public static extern ReturnCode DsmWin64(
|
public static extern ReturnCode DsmWin64(
|
||||||
[In, Out]TW_IDENTITY origin,
|
[In, Out]TW_IDENTITY origin,
|
||||||
|
Loading…
Reference in New Issue
Block a user