Esempio n. 1
0
 public SoundControlElementId(IntPtr ptr)
 {
     if (ptr == IntPtr.Zero)
     {
         SoundNativeMethods.SoundControlElementIdMalloc(out handle);
         if (handle == IntPtr.Zero)
         {
             throw new OutOfMemoryException();
         }
     }
     else
     {
         handle = ptr;
     }
 }