private UnsafeNativeMethods.IEnumTfRanges GetPropertyUpdate( UnsafeNativeMethods.ITfEditRecord editRecord) { UnsafeNativeMethods.IEnumTfRanges ranges; unsafe { fixed(Guid *pguid = &_guid) { // // // Temporarily, we use "ref IntPtr". // // How to express Guid**? The retail build (optimization?) // does not allow the following code. // // Guid guid = _guid; // Guid *pguid = (Guid*)guid; // // Under the debug build, &pguid can point to pguid points // valid GUID. But pguid is not assigned under the retail // build. It seems "guid = _guid" is not compiled. // IntPtr p = (IntPtr)pguid; editRecord.GetTextAndPropertyUpdates(0, ref p, 1, out ranges); } } return(ranges); }
private unsafe UnsafeNativeMethods.IEnumTfRanges GetPropertyUpdate(UnsafeNativeMethods.ITfEditRecord editRecord) { UnsafeNativeMethods.IEnumTfRanges result; fixed(Guid *ptr = &this._guid) { IntPtr intPtr = (IntPtr)((void *)ptr); editRecord.GetTextAndPropertyUpdates(0, ref intPtr, 1, out result); } return(result); }
private UnsafeNativeMethods.IEnumTfRanges GetPropertyUpdate( UnsafeNativeMethods.ITfEditRecord editRecord) { UnsafeNativeMethods.IEnumTfRanges ranges; unsafe { fixed(Guid *pguid = &_guid) { // // IntPtr p = (IntPtr)pguid; editRecord.GetTextAndPropertyUpdates(0, ref p, 1, out ranges); } } return(ranges); }