//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// CommonHelpers satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.Runtime.InteropServices;

namespace CommonHelpers {

//**************************************************************************************************
static partial class Win32_PAccess {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

public const uint
   HEAP_ZERO_MEMORY  = 0x00000008;

//==================================================================================================

[DllImport("Kernel32.dll",CharSet=CharSet.Unicode,SetLastError=true)]
public static extern IntPtr GetModuleHandle(IntPtr ipModuleName);

[DllImport("Kernel32.dll",ExactSpelling=true,SetLastError=true)]
public static extern IntPtr GetProcessHeap();

[DllImport("Kernel32.dll",ExactSpelling=true,SetLastError=true)]
public static extern IntPtr HeapAlloc(IntPtr hHeap,uint uFlags,UIntPtr uBytes);

[DllImport("Kernel32.dll",ExactSpelling=true,SetLastError=true)]
public static extern IntPtr HeapReAlloc(IntPtr hHeap,uint uFlags,IntPtr ipMem,UIntPtr uBytes);

[DllImport("Kernel32.dll",ExactSpelling=true,SetLastError=true)]
public static extern UIntPtr HeapSize(IntPtr hHeap,uint uFlags,IntPtr ipMem);

[DllImport("Kernel32.dll",ExactSpelling=true,SetLastError=true)]
public static extern bool HeapFree(IntPtr hHeap,uint uFlags,IntPtr ipMem);

[DllImport("Kernel32.dll",ExactSpelling=true,SetLastError=true)]
public static extern bool CloseHandle(IntPtr hObject);

//--------------------------------------------------------------------------------------------------

[DllImport("Ole32.dll",ExactSpelling=true)]
public static extern void CoTaskMemFree(IntPtr pTaskMemory);

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // Win32_PAccess
//**************************************************************************************************

} // CommonHelpers
