---
title: "vanara.pinvoke.gdi32 5.0.0 Breaking Changes on NuGet"
description: "What each vanara.pinvoke.gdi32 release removed, renamed or changed: 47 breaking changes in 1 version on NuGet, each with its source."
canonical_url: https://since.dev/packages/nuget/vanara.pinvoke.gdi32
last_updated: 2026-12-04
---

# vanara.pinvoke.gdi32 breaking changes

vanara.pinvoke.gdi32 5.0.0 (January 12, 2026) is its newest release with breaking changes, 47 of them. The first: Removed ShellItem.Dispose. Every breaking API change we have recorded in vanara.pinvoke.gdi32 on NuGet: 47 breaking changes in 1 version. Below, its one version with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `5.0.8`, released October 24, 2026. [Source repository](https://github.com/dahall/vanara)

Packages on NuGet run on .NET. [.NET end of life dates](https://since.dev/calendar/dotnet.md).

## vanara.pinvoke.gdi32 5.0.0 breaking changes

vanara.pinvoke.gdi32 5.0.0, released January 12, 2026: 47 breaking changes.

- **Removed** `ShellItem.Dispose`  

ShellItem.Dispose() was hidden in favor of the new Dispose(bool) method; code calling the parameterless Dispose must switch to Dispose(bool). [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Removed** `Vanara.PInvoke.Gdi32.RGNDATA.Size`  

Vanara.PInvoke.Gdi32.RGNDATA.Size was removed in Vanara.PInvoke.Gdi32 5.0.0 [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Removed** `Vanara.PInvoke.SizeFieldName`  

Vanara.PInvoke.SizeFieldName was removed; use SafeDefAttribute instead. [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Behavior changed**  

On .NET 8 and later, binary serialized values supporting ISerialize are no longer automatically marshaled due to security concerns; other builds still work. [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Behavior changed** `Clipboard`  

Clipboard functions now throw an error if used from an MTA thread, so callers must run them on an STA thread. [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Behavior changed** `IContextMenu.GetCommandString`  

The declaration of IContextMenu.GetCommandString was changed, which may affect callers. [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Behavior changed** `IPropertyDescription.FormatForDisplay`  

IPropertyDescription.FormatForDisplay now exposes an HRESULT return value, which callers may need to handle. [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Behavior changed** `MoveFileEx`  

The lpNewFileName parameter may now be null when used with MOVEFILE_DELAY_UNTIL_REBOOT; MoveFileEx and MoveFileWithProgress were made nullable. [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Behavior changed** `ShellFileOperations`  

The disposal pattern for ShellFileOperations was fixed, which may change how callers dispose of it. [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Behavior changed** `ShellItem`  

Shell object wrappers now dispose COM objects using the Dispose pattern and hard-release interfaces, which changes disposal behavior for callers. [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Signature changed** `IShellItem.BindToHandler`  

The IShellItem.BindToHandler signature and its docs were changed, so callers must update their calls. [github.com](https://github.com/dahall/Vanara/releases/tag/v5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.CheckColorsInGamut`  

Was static bool CheckColorsInGamut(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.Gdi32.RGBTRIPLE\[\] lpRGBTriple, nint dlpBuffer, uint nCount); now static bool CheckColorsInGamut(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.Gdi32.RGBTRIPLE\[\] lpRGBTriple... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.CreatePolygonRgn`  

Was static Vanara.PInvoke.Gdi32.SafeHRGN CreatePolygonRgn(Vanara.PInvoke.POINT pptl, int cPoint, Vanara.PInvoke.Gdi32.RGN_FILLMODE iMode); now static Vanara.PInvoke.Gdi32.SafeHRGN CreatePolygonRgn(Vanara.PInvoke.POINT\[\] pptl... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.DIBSECTION.dshSection`  

Was nint dshSection; now Vanara.PInvoke.Gdi32.HSECTION dshSection. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.DISPLAYCONFIG_PATH_INFO.flags`  

Was uint flags; now Vanara.PInvoke.Gdi32.DISPLAYCONFIG_PATH flags. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.DrawEscape`  

Was static int DrawEscape(Vanara.PInvoke.HDC hdc, int iEscape, int cjIn, string lpIn); now static int DrawEscape(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.Gdi32.EscapeFunction iEscape, int cjIn, string lpIn). [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.EnhMetaFileProc.BeginInvoke`  

Was virtual System.IAsyncResult BeginInvoke(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.HGDIOBJ\[\] lpht, nint lpmr, int nHandles, nint data, System.AsyncCallback callback, object object); now virtual System.IAsyncResult... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.EnhMetaFileProc.Invoke`  

Was virtual int Invoke(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.HGDIOBJ\[\] lpht, nint lpmr, int nHandles, nint data); now virtual int Invoke(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.HGDIOBJ\[\] lpht, Vanara.PInvoke.Gdi32.ENHMETARECORD lpmr, int... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.EnumFontFamProc.BeginInvoke`  

Was virtual System.IAsyncResult BeginInvoke(ref Vanara.PInvoke.Gdi32.ENUMLOGFONT lpelf, ref Vanara.PInvoke.Gdi32.NEWTEXTMETRIC lpntm, uint FontType, nint lParam, System.AsyncCallback callback, object object); now virtual... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.EnumFontFamProc.Invoke`  

Was virtual int Invoke(ref Vanara.PInvoke.Gdi32.ENUMLOGFONT lpelf, ref Vanara.PInvoke.Gdi32.NEWTEXTMETRIC lpntm, uint FontType, nint lParam); now virtual int Invoke(ref Vanara.PInvoke.Gdi32.ENUMLOGFONT lpelf, ref... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.EnumFontsProc.BeginInvoke`  

Was virtual System.IAsyncResult BeginInvoke(ref Vanara.PInvoke.LOGFONT lplf, ref Vanara.PInvoke.TEXTMETRIC lptm, uint dwType, nint lpData, System.AsyncCallback callback, object object); now virtual System.IAsyncResult BeginInvoke(ref... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.EnumFontsProc.Invoke`  

Was virtual int Invoke(ref Vanara.PInvoke.LOGFONT lplf, ref Vanara.PInvoke.TEXTMETRIC lptm, uint dwType, nint lpData); now virtual int Invoke(ref Vanara.PInvoke.LOGFONT lplf, ref Vanara.PInvoke.TEXTMETRIC lptm... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.EnumMetaFileProc.BeginInvoke`  

Was virtual System.IAsyncResult BeginInvoke(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.HGDIOBJ\[\] lpht, nint lpMR, int nObj, nint param, System.AsyncCallback callback, object object); now virtual System.IAsyncResult... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.EnumMetaFileProc.EndInvoke`  

Was virtual int EndInvoke(System.IAsyncResult result); now virtual int EndInvoke(ref Vanara.PInvoke.Gdi32.METARECORD lpMFR, System.IAsyncResult result). [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.EnumMetaFileProc.Invoke`  

Was virtual int Invoke(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.HGDIOBJ\[\] lpht, nint lpMR, int nObj, nint param); now virtual int Invoke(Vanara.PInvoke.HDC hDC, Vanara.PInvoke.HGDIOBJ\[\] lpHTable, ref Vanara.PInvoke.Gdi32.METARECORD lpMFR... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.ExtCreateRegion`  

Was static Vanara.PInvoke.Gdi32.SafeHRGN ExtCreateRegion(nint lpx, uint nCount, Vanara.PInvoke.Gdi32.RGNDATA lpData) static Vanara.PInvoke.Gdi32.SafeHRGN ExtCreateRegion(ref Vanara.PInvoke.Gdi32.XFORM lpx, uint nCount... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GCP_RESULTS.Default`  

Was static Vanara.PInvoke.Gdi32.GCP_RESULTS Default; now static readonly Vanara.PInvoke.Gdi32.GCP_RESULTS Default. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GCP_RESULTS.lpCaretPos`  

Was nint lpCaretPos; now Vanara.PInvoke.ArrayPointer\<int> lpCaretPos. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GCP_RESULTS.lpClass`  

Was nint lpClass; now Vanara.PInvoke.ArrayPointer\<Vanara.PInvoke.Gdi32.GCPCLASS> lpClass. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GCP_RESULTS.lpDx`  

Was nint lpDx; now Vanara.PInvoke.ArrayPointer\<int> lpDx. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GCP_RESULTS.lpGlyphs`  

Was nint lpGlyphs; now Vanara.PInvoke.ArrayPointer\<ushort> lpGlyphs. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GCP_RESULTS.lpOrder`  

Was nint lpOrder; now Vanara.PInvoke.ArrayPointer\<uint> lpOrder. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GCP_RESULTS.lpOutString`  

Was string lpOutString; now Vanara.InteropServices.StrPtrAuto lpOutString. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GdiGetDevmodeForPage`  

Was static bool GdiGetDevmodeForPage(Vanara.PInvoke.Gdi32.HSPOOLFILE SpoolFileHandle, uint dwPageNumber, ref nint pCurrDM, ref nint pLastDM); now static bool GdiGetDevmodeForPage(Vanara.PInvoke.Gdi32.HSPOOLFILE SpoolFileHandle, uint... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GdiGetPageHandle`  

Was static Vanara.PInvoke.HANDLE GdiGetPageHandle(Vanara.PInvoke.Gdi32.HSPOOLFILE SpoolFileHandle, uint Page, ref uint pdwPageType); now static Vanara.PInvoke.HANDLE GdiGetPageHandle(Vanara.PInvoke.Gdi32.HSPOOLFILE SpoolFileHandle, uint... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GdiGradientFill`  

Was static bool GdiGradientFill(Vanara.PInvoke.HDC hdc, ref Vanara.PInvoke.Gdi32.TRIVERTEX pVertex, uint nVertex, Vanara.PInvoke.Gdi32.GRADIENT_RECT\[\] pMesh, uint nCount, Vanara.PInvoke.Gdi32.GradientFillMode ulMode) static bool... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GetCharacterPlacement`  

Was static uint GetCharacterPlacement(Vanara.PInvoke.HDC hdc, string lpString, int nCount, int nMexExtent, ref Vanara.PInvoke.Gdi32.GCP_RESULTS lpResults, Vanara.PInvoke.Gdi32.GCP dwFlags); now static uint... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GetDeviceGammaRamp`  

Was static bool GetDeviceGammaRamp(Vanara.PInvoke.HDC hdc, nint lpRamp); now static bool GetDeviceGammaRamp(Vanara.PInvoke.HDC hdc, ref ushort\[\] lpRamp). [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GetEnhMetaFileBits`  

Was static uint GetEnhMetaFileBits(Vanara.PInvoke.HENHMETAFILE hEMF, uint nSize, byte\[\] lpData); now static uint GetEnhMetaFileBits(Vanara.PInvoke.HENHMETAFILE hEMF, ref byte\[\] lpData) static uint... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GetFontData`  

Was static uint GetFontData(Vanara.PInvoke.HDC hdc, uint dwTable, uint dwOffset, nint pvBuffer, uint cjBuffer); now static uint GetFontData(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.FOURCC dwTable, uint dwOffset, nint pvBuffer, uint cjBuffer)... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GetFontUnicodeRanges`  

Was static uint GetFontUnicodeRanges(Vanara.PInvoke.HDC hdc, nint lpgs); now static uint GetFontUnicodeRanges(Vanara.PInvoke.HDC hdc, Vanara.PInvoke.ManagedStructPointer\<Vanara.PInvoke.Gdi32.GLYPHSET> lpgs). [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GetOutlineTextMetrics`  

Was static uint GetOutlineTextMetrics(Vanara.PInvoke.HDC hdc, uint cjCopy, nint potm); now static uint GetOutlineTextMetrics(Vanara.PInvoke.HDC hdc, ref Vanara.InteropServices.SafeCoTaskMemStruct\<Vanara.PInvoke.Gdi32.OUTLINETEXTMETRIC>... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.GetRegionData`  

Was static uint GetRegionData(Vanara.PInvoke.HRGN hrgn, uint nCount, Vanara.PInvoke.Gdi32.RGNDATA lpRgnData); now static Vanara.PInvoke.Gdi32.RGNDATA GetRegionData(Vanara.PInvoke.HRGN hrgn). [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.POLYTEXT.pdx`  

Was nint pdx; now Vanara.PInvoke.ArrayPointer\<int> pdx. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.RGNDATA.Buffer`  

Was Vanara.PInvoke.RECT\[\] Buffer {get; set;}; now System.Collections.Generic.List\<Vanara.PInvoke.RECT> Buffer. [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.SetBoundsRect`  

Was static Vanara.PInvoke.Gdi32.DCB SetBoundsRect(Vanara.PInvoke.HDC hdc, nint lprect, Vanara.PInvoke.Gdi32.DCB flags) static Vanara.PInvoke.Gdi32.DCB SetBoundsRect(Vanara.PInvoke.HDC hdc, ref Vanara.PInvoke.RECT lprect... [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)
- **Signature changed** `Vanara.PInvoke.Gdi32.SetDeviceGammaRamp`  

Was static bool SetDeviceGammaRamp(Vanara.PInvoke.HDC hdc, nint lpRamp); now static bool SetDeviceGammaRamp(Vanara.PInvoke.HDC hdc, ushort\[\] lpRamp). [nuget.org](https://www.nuget.org/packages/Vanara.PInvoke.Gdi32/5.0.0)

## Related packages

- [vanara.pinvoke.user32](https://since.dev/packages/nuget/vanara.pinvoke.user32.md)
- [vanara.pinvoke.coreaudio](https://since.dev/packages/nuget/vanara.pinvoke.coreaudio.md)
- [vanara.pinvoke.shcore](https://since.dev/packages/nuget/vanara.pinvoke.shcore.md)
- [vanara.windows.extensions](https://since.dev/packages/nuget/vanara.windows.extensions.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
