mirror of
https://github.com/soukoku/ntwain.git
synced 2026-01-02 04:17:08 +08:00
Fixed some CA violations.
This commit is contained in:
30
NTwain/NativeMethods.cs
Normal file
30
NTwain/NativeMethods.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace NTwain
|
||||
{
|
||||
static class NativeMethods
|
||||
{
|
||||
// should be unsafe native methods?
|
||||
|
||||
#region mem stuff for twain 1.x
|
||||
|
||||
[DllImport("kernel32", SetLastError = true, EntryPoint = "GlobalAlloc")]
|
||||
internal static extern IntPtr WinGlobalAlloc(uint uFlags, UIntPtr dwBytes);
|
||||
|
||||
[DllImport("kernel32", SetLastError = true, EntryPoint = "GlobalFree")]
|
||||
internal static extern IntPtr WinGlobalFree(IntPtr hMem);
|
||||
|
||||
[DllImport("kernel32", SetLastError = true, EntryPoint = "GlobalLock")]
|
||||
internal static extern IntPtr WinGlobalLock(IntPtr handle);
|
||||
|
||||
[DllImport("kernel32", SetLastError = true, EntryPoint = "GlobalUnlock")]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
internal static extern bool WinGlobalUnlock(IntPtr handle);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user