Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

dwFlags (kernel32)
 
.
Summary
TODO - a short description

C# Signature:

[DllImport("kernel32.dll", SetLastError=true)]
static extern TODO dwFlags(TODO);

VB Signature:

Declare Function dwFlags Lib "kernel32.dll" (TODO) As TODO

User-Defined Types:

  /// <summary>
  /// dwFlags - The heap allocation options. Specifying any of these
  /// values will override the corresponding value specified when the heap was created
  /// with HeapCreate. This parameter can be one or more of the following values.
  /// Ref: https://learn.microsoft.com/en-us/windows/win32/api/heapapi/nf-heapapi-heapalloc
  /// </summary>
  [Flags]
  public enum dwFlags
  {
    /// <summary>
    /// The system will raise an exception to indicate a function failure,
    /// such as an out-of-memory condition, instead of returning NULL.
    /// To ensure that exceptions are generated for all calls to this function,
    /// specify HEAP_GENERATE_EXCEPTIONS in the call to HeapCreate. In this case,
    /// it is not necessary to additionally specify HEAP_GENERATE_EXCEPTIONS in this function call.
    /// </summary>
    HEAP_GENERATE_EXCEPTIONS = 0x00040000,

    /// <summary>
    /// Serialized access will not be used for this allocation.
    /// For more information, see Remarks.
    /// To ensure that serialized access is disabled for all calls to this function,
    /// specify HEAP_NO_SERIALIZE in the call to HeapCreate. In this case, it is not
    /// necessary to additionally specify HEAP_NO_SERIALIZE in this function call.
    /// This value should not be specified when accessing the process's default heap.
    /// The system may create additional threads within the application's process, such
    /// as a CTRL+C handler, that simultaneously access the process's default heap.
    /// </summary>
    HEAP_NO_SERIALIZE = 0x00000001,

    /// <summary>
    /// The allocated memory will be initialized to zero. Otherwise,
    /// the memory is not initialized to zero.
    /// </summary>
    HEAP_ZERO_MEMORY = 0x00000008
  }

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Documentation
dwFlags on MSDN

Please edit this page!

Do you have...

  • helpful tips or sample code to share for using this API in managed code?
  • corrections to the existing content?
  • variations of the signature you want to share?
  • additional languages you want to include?

Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).

 
Access PInvoke.net directly from VS:
Terms of Use
Edit This Page
Find References
Show Printable Version
Revisions