@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The HeapCreate API Creates a private heap object that can be used by the calling process. The function reserves space in the virtual address space of the process and allocates physical storage for a specified initial portion of this block. !!!!C# Signature: /// <summary> /// HeapCreate - Creates a private heap object that can be used by the calling process. /// The function reserves space in the virtual address space of the process and allocates /// physical storage for a specified initial portion of this block. /// Ref: https://learn.microsoft.com/en-us/windows/win32/api/heapapi/nf-heapapi-heapcreate /// </summary> /// <param name="flOptions"></param> /// <param name="dwInitialSize"></param> /// <param name="dwMaximumSize"></param> /// <returns></returns> [DllImport("kernel32.dll", SetLastError = true)] static extern IntPtr HeapCreate(UInt32 flOptions, UIntPtr dwInitialSize, UIntPtr dwMaximumSize); !!!!User-Defined Types: flOptions - https://pinvoke.net/default.aspx/Enums/flOptions.html !!!!Notes: Conversion of Int/Unit32/long/UIntPtr/IntPtr - much debate, this code could be checked properly. !!!!Tips & Tricks: Please add some! !!!!Sample Code: /// <summary> /// HeapCreateMemory - Creates a private heap object that can be used by the /// calling process. The function reserves space in the virtual address space /// of the process and allocates physical storage for a specified initial portion of this block. /// </summary> /// <param name="optionType"></param> /// <param name="initialbyteSize"></param> /// <param name="MaxByteSize"></param> /// <returns></returns> public static IntPtr HeapCreateMemory(FLOptionType optionType, int initialbyteSize, int MaxByteSize) { try { return HeapCreate((UInt32)optionType, (UIntPtr)initialbyteSize, (UIntPtr)MaxByteSize); } catch (Exception e) { throw e; } } !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: HeapCreate@msdn on MSDN
Edit kernel32.heapcreate
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.