11 writes to hGlobal
System.Private.Windows.Core (11)
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (5)
78pmedium->hGlobal = PInvokeCore.GlobalAlloc(GLOBAL_ALLOC_FLAGS.GMEM_MOVEABLE | GLOBAL_ALLOC_FLAGS.GMEM_ZEROINIT, 1); 89pmedium->hGlobal = HGLOBAL.Null; 144pmedium->hGlobal = HGLOBAL.Null; 272=> SaveStreamToHGLOBAL(ref medium.hGlobal, dataStream), 288=> SaveObjectToHGLOBAL(ref medium.hGlobal, data, DataFormatNames.RestrictDeserializationToSafeTypes(format)),
System\Private\Windows\Ole\DragDropFormat.cs (4)
69mediumDestination.hGlobal = (HGLOBAL)(nint)PInvokeCore.OleDuplicateData( 85mediumDestination.hGlobal = mediumSource.hGlobal; 92mediumDestination.hGlobal = HGLOBAL.Null; 121_medium.hGlobal = HGLOBAL.Null;
System\Private\Windows\Ole\DragDropHelper.cs (2)
203hGlobal = PInvokeCore.GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, (nuint)sizeof(BOOL)) 361hGlobal = PInvokeCore.GlobalAlloc(GMEM_MOVEABLE | GMEM_ZEROINIT, (nuint)sizeof(DROPDESCRIPTION))
28 references to hGlobal
System.Private.Windows.Core (28)
System\Private\Windows\Ole\Composition.ManagedToNativeAdapter.cs (10)
80if (pmedium->hGlobal.IsNull) 88PInvokeCore.GlobalFree(pmedium->hGlobal); 141catch (Exception) when (!pmedium->hGlobal.IsNull) 143PInvokeCore.GlobalFree(pmedium->hGlobal); 274=> SaveStringToHGLOBAL(medium.hGlobal, data.ToString()!, unicode: false), 276=> SaveHtmlToHGLOBAL(medium.hGlobal, data.ToString()!), 278=> SaveStringToHGLOBAL(medium.hGlobal, data.ToString()!, unicode: true), 280=> SaveFileListToHGLOBAL(medium.hGlobal, (string[])data), 282=> SaveStringToHGLOBAL(medium.hGlobal, ((string[])data)[0], unicode: false), 284=> SaveStringToHGLOBAL(medium.hGlobal, ((string[])data)[0], unicode: true),
System\Private\Windows\Ole\Composition.NativeToManagedAdapter.cs (4)
319if (medium.tymed == Com.TYMED.TYMED_HGLOBAL && !medium.hGlobal.IsNull && hr != HRESULT.COR_E_SERIALIZATION) 321result = TryGetDataFromHGLOBAL(medium.hGlobal, in request, out data); 366if (medium.tymed != Com.TYMED.TYMED_ISTREAM || medium.hGlobal.IsNull) 371using ComScope<Com.IStream> pStream = new((Com.IStream*)medium.hGlobal);
System\Private\Windows\Ole\DragDropFormat.cs (4)
70(HANDLE)(nint)mediumSource.hGlobal, 75if (mediumDestination.hGlobal.IsNull) 85mediumDestination.hGlobal = mediumSource.hGlobal; 86Marshal.AddRef(mediumSource.hGlobal);
System\Private\Windows\Ole\DragDropHelper.cs (10)
134void* basePtr = PInvokeCore.GlobalLock(dragDropFormat.Medium.hGlobal); 139PInvokeCore.GlobalUnlock(dragDropFormat.Medium.hGlobal); 206if (medium.hGlobal.IsNull) 211void* basePtr = PInvokeCore.GlobalLock(medium.hGlobal); 214PInvokeCore.GlobalFree(medium.hGlobal); 219PInvokeCore.GlobalUnlock(medium.hGlobal); 364if (medium.hGlobal.IsNull) 369void* basePtr = PInvokeCore.GlobalLock(medium.hGlobal); 372PInvokeCore.GlobalFree(medium.hGlobal); 380PInvokeCore.GlobalUnlock(medium.hGlobal);