public void GetPageInfo(ref PROPPAGEINFO info) { info.cb = (UInt32)Marshal.SizeOf(typeof(PROPPAGEINFO)); info.size.Width = Width; info.size.Height = Height; info.szDocString = IntPtr.Zero; info.szHelpFile = IntPtr.Zero; // Caller frees this pointer info.szTitle = (Text.Length == 0) ? IntPtr.Zero : Marshal.StringToCoTaskMemUni(Text); }