mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
36 lines
667 B
C#
36 lines
667 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
|
|
namespace NTwain.Internals
|
|
{
|
|
class LinuxMemoryManager : IMemoryManager
|
|
{
|
|
#region IMemoryManager Members
|
|
|
|
public IntPtr Allocate(uint size)
|
|
{
|
|
return Marshal.AllocHGlobal((int)size);
|
|
}
|
|
|
|
public void Free(IntPtr handle)
|
|
{
|
|
Marshal.FreeHGlobal(handle);
|
|
}
|
|
|
|
public IntPtr Lock(IntPtr handle)
|
|
{
|
|
return handle;
|
|
}
|
|
|
|
public void Unlock(IntPtr handle)
|
|
{
|
|
// no op
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|