private void TestBitmapInfoHeader() { BitmapInfoHeader w1 = new BitmapInfoHeader(); FillBMI(w1, 0); IntPtr ip = w1.GetPtr(); BitmapInfoHeader w2 = BitmapInfoHeader.PtrToBMI(ip); Marshal.FreeCoTaskMem(ip); }
public IntPtr MarshalManagedToNative(object managedObj) { m_bmi = managedObj as BitmapInfoHeader; IntPtr ip = m_bmi.GetPtr(); return ip; }