DllImport : DllImport : Windows C# Examples


C# Examples » Windows » DllImport »

 

DllImport









    
using  System;
using  System.Runtime.InteropServices;

public  sealed  class  MainClass
{
        [DllImport("kernel32.dll")]
        static  extern  IntPtr  HeapCreate(uint  flOptions,  UIntPtr  dwInitialSize,UIntPtr  dwMaximumSize);

        [DllImport("kernel32.dll")]
        static  extern  bool  HeapDestroy(IntPtr  hHeap);

        public  static  void  Main()  {
                IntPtr  theHeap  =  HeapCreate(  0,  (UIntPtr)  4096,  UIntPtr.Zero  );
                HeapDestroy(  theHeap  );
                theHeap  =  IntPtr.Zero;
        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Windows
» DllImport