void _initNativeStruct() { if (_ptrSciTextRange == IntPtr.Zero) _ptrSciTextRange = Marshal.AllocHGlobal(Marshal.SizeOf(_sciTextRange)); Marshal.StructureToPtr(_sciTextRange, _ptrSciTextRange, false); }