Skip to content

Bump Microsoft.Windows.CsWin32 from 0.1.319-beta to 0.3.269#17

Open
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/nuget/Microsoft.Windows.CsWin32-0.3.269
Open

Bump Microsoft.Windows.CsWin32 from 0.1.319-beta to 0.3.269#17
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/nuget/Microsoft.Windows.CsWin32-0.3.269

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jan 19, 2026

Updated Microsoft.Windows.CsWin32 from 0.1.319-beta to 0.3.269.

Release notes

Sourced from Microsoft.Windows.CsWin32's releases.

0.3.269

Changes:

  • #​1613: Use Marshal.InitHandle API to avoid memory leak when OOM happens
  • #​1614: Update to latest win32metadata
  • #​1603: Generate SafeHandle when freeing method accepts additional reserved parameters
  • #​1597: Add more examples to the docs

This list of changes was auto generated.

0.3.264

Changes:

  • #​1593: Fix IDispatch property returns with built-in COM
  • #​1591: Update README.md & add sample snippets
  • #​1589: Add [Optional] on optional params

This list of changes was auto generated.

0.3.259

Changes:

  • #​1545: Generate struct wrapper around function pointer to make a native delegate typedef
  • #​1578: Update win32metadata to latest (68.0.4-preview)

This list of changes was auto generated.

0.3.257

Changes:

  • #​1575: Fix bug when multiple Span-params share a CountParamIndex and one param is null
  • #​1567: Fix mis-handling of parameters that are arrays of HANDLE
  • #​1565: Switch CsWin32RunAsBuildTask to EmitSingleFile by default (for VS incremental scenario)
  • #​1562: Move to .NET 10 SDK, add test coverage for net10 TFM

This list of changes was auto generated.

0.3.253

Changes:

  • #​1557: Improve intellisense experience with CsWin32RunAsBuildTask mode

This list of changes was auto generated.

0.3.252

Changes:

  • #​1550: Support $(ProjectName).NativeMethods.txt pattern for single-file-app projects
  • #​1555: Downgrade dependencies so the source analyzer works with .NET 8 SDK again

This list of changes was auto generated.

0.3.250

Changes:

  • #​1554: Translate VARIANT to ComVariant when using COM source generators
  • #​1548: Add common Win32 message parameter extraction macros

This list of changes was auto generated.

0.3.248

Changes:

  • #​1544: Improve optional out interface arguments (e.g. IWbemServices.GetObject) and other minor tweaks
  • #​1547: Add test for cross-winmd IInspectable derivation and fix a tiny bug
  • #​1541: Don't emit friendly overload of Span param for flexible array structs
  • #​1536: Handle struct returns for COM interface methods across all marshalling modes
  • #​1534: Preserve pointer return types
  • #​1533: Fix out ** pointer parameters

This list of changes was auto generated.

0.3.242

Changes:

  • #​1524: Add an option to FriendlyOverloads to request previous pointer overloads
  • #​1526: Generate real IDispatch when requested
  • #​1522: [Retained] parameters need to project as pointer
  • #​1521: Add implicit IntPtr casts to void* typedefs

This list of changes was auto generated.

0.3.238

Changes:

  • #​1520: Don't make void* params Span in friendly methods
  • #​1517: CsWin32Generator should allow newer language versions

This list of changes was auto generated.

0.3.236

NOTE: This changes the signature of methods with optional parameters. This change is also documented at https://microsoft.github.io/CsWin32/docs/getting-started.html:

Optional out/ref parameters

Some parameters in win32 are [optional, out] or [optional, in, out]. C# does not have an idiomatic way to represent this concept, so for any method that has such parameters, CsWin32 will generate two versions: one with all ref or out parameters included, and one with all such parameters omitted. For example:

// Omitting the optional parameter:
IsTextUnicode(buffer);

// Passing ref for optional parameter:
IS_TEXT_UNICODE_RESULT result = default;
IsTextUnicode(buffer, ref result);

Working with Span-typed and MemorySize-d parameters

In the Win32 APIs there are many functions where one parameter is a buffer (void* or byte*) and another parameter is the size of that buffer. When generating for a target framework that supports Spans, there will be overloads of these functions that take a Span<byte> which represents both of these parameters, since a Span refers to a chunk of memory and a length. For example, an API like IsTextUnicode has a void* parameter whose length is described by the iSize parameter in the native signature. The CsWin32 projection of this method will be:

BOOL IsTextUnicode(ReadOnlySpan<byte> lpv, ref IS_TEXT_UNICODE_RESULT lpiResult)

Instead of passing the buffer and length separately, in this projection you pass just one parameter. Span is a flexible type with many things that can be converted to it safely. You will also see Span parameters for things that may look like a struct but are variable sized. For example, InitializeAcl looks like it returns an ACL struct but the parameter is annotated with a [MemorySize] attribute in the metadata, indicating it is variable-sized based on another parameter. Thus, the cswin32 projection of this method will project this parameter as a Span<byte> since the size of the parameter is variable:

// The cswin32 signature:
static BOOL InitializeAcl(Span<byte> pAcl, ACE_REVISION dwAclRevision) { ... }

And you would call this by creating a buffer to receive the ACL. Then, after the call you can reinterpret the buffer as an ACL:

// Make a buffer
Span<byte> buffer = new byte[CalculateAclSize(...)];
InitializeAcl(buffer, ACE_REVISION.ACL_REVISION);

// The beginning of the buffer is an ACL, so cast it to a ref:
ref ACL acl = ref MemoryMarshal.AsRef<ACL>(buffer);

// Or treat it as a Span:
Span<ACL> aclSpan = MemoryMarshal.Cast<byte, ACL>(buffer);

CsWin32 will also generate a struct-typed parameter for convenience but this overload will pass sizeof(T) for the length parameter to the underlying Win32 API, so this only makes sense in some overloads such as SHGetFileInfo where the parameter has an annotation indicating it's variable-sized, but the size is only ever sizeof(SHFILEINFOW):

// Span<byte> overload:
static nuint SHGetFileInfo(string pszPath, FILE_FLAGS_AND_ATTRIBUTES dwFileAttributes, Span<byte> psfi, SHGFI_FLAGS uFlags)
// ref SHGETFILEINFOW overload:
static nuint SHGetFileInfo(string pszPath, FILE_FLAGS_AND_ATTRIBUTES dwFileAttributes, ref SHFILEINFOW psfi, SHGFI_FLAGS uFlags)
 ... (truncated)

## 0.3.235

## What's Changed
* Handle CoCreateable classes in ComSourceGenerators mode by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1502
* Simplify decimal conversions by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1512
* Prevent SafeHandle from being re-generated in downstream assembly by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1514
* Fix ArithmeticOverflow in HANDLE types and other helpers when CheckForOverflowUnderflow is enabled by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1513

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.228...v0.3.235

## 0.3.228

## What's Changed
* BuildTask mode should not generate types from InternalsVisibleTo referenced assemblies by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1492
* CsWin32 build task fixes for NET8/CSharp12 by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1498
* Fix platform case sensitivity issue with CsWin32Generator tool by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1499
* Update documentation for CsWin32RunAsBuildTask mode by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1497
* ArrayPool can be larger than requested resulting in freeing uninitialized GCHandles by @​jlaanstra in https://github.com/microsoft/CsWin32/pull/1405
* Fix analyzer test break in devdiv AzDO account by @​AArnott in https://github.com/microsoft/CsWin32/pull/1504

## New Contributors
* @​jlaanstra made their first contribution in https://github.com/microsoft/CsWin32/pull/1405

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.217...v0.3.228

https://www.nuget.org/packages/Microsoft.Windows.CsWin32/0.3.228

## 0.3.217

## What's Changed
* Add cswin32 mode to generate [GeneratedComInterface] and [LibraryImport] code by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1474
* Handle UnauthorizedAccessException in new ComTests by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1486
* Project byte* parameters as Span<byte> by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1488
* Fix nuspec to refer to only signed files and drop apphost.exe from the nuget by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1489


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.213...v0.3.217

## 0.3.213

## What's Changed
* Retarget to roslyn for VS 2022 Update 14 by @​AArnott in https://github.com/microsoft/CsWin32/pull/1466
* .NET targeting projects should reference `Microsoft.Windows.SDK.NET.Ref` instead by @​AArnott in https://github.com/microsoft/CsWin32/pull/1471
* Update win32metadata version to 65.0.8-preview by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1469
* Update dependency Microsoft.Build.NoTargets to 3.7.134 by @​renovate[bot] in https://github.com/microsoft/CsWin32/pull/1461


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.205...v0.3.213

## 0.3.205

## What's Changed
* Add msbuild item to opt 3rd party libraries into app-local deployments by @​AArnott in https://github.com/microsoft/CsWin32/pull/1381
* Fix NRE thrown from friendly overloads with optional pointer parameters by @​AArnott in https://github.com/microsoft/CsWin32/pull/1385
* Update getting-started.md by @​LWChris in https://github.com/microsoft/CsWin32/pull/1388
* Remove test workaround by @​DoctorKrolic in https://github.com/microsoft/CsWin32/pull/1447
* Add custom DebuggerDisplay for HRESULT by @​misaz in https://github.com/microsoft/CsWin32/pull/1445
* Update documentation links from `docs.microsoft.com` to `learn.microsoft.com` by @​xtqqczze in https://github.com/microsoft/CsWin32/pull/1454
* Merge latest Library.Template by @​AArnott in https://github.com/microsoft/CsWin32/pull/1458
* Support for derived IInspectable COM interfaces in custom winmds by @​jevansaks in https://github.com/microsoft/CsWin32/pull/1459

## New Contributors
* @​LWChris made their first contribution in https://github.com/microsoft/CsWin32/pull/1388
* @​DoctorKrolic made their first contribution in https://github.com/microsoft/CsWin32/pull/1447
* @​misaz made their first contribution in https://github.com/microsoft/CsWin32/pull/1445
* @​xtqqczze made their first contribution in https://github.com/microsoft/CsWin32/pull/1454

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.183...v0.3.205

## 0.3.183

## Fixes

* Generate `WinRTCustomMarshaler` when referenced from extern methods by @​AArnott in https://github.com/microsoft/CsWin32/pull/1335
* Fix build break when friendly methods are turned off and IUnknown is generated by @​AArnott in https://github.com/microsoft/CsWin32/pull/1337

## Enhancements

* Use C# 13 overload resolution attribute to improve friendly overloads by @​AArnott in https://github.com/microsoft/CsWin32/pull/1336
* Improve `[Out] PWSTR` parameters in friendly overloads by @​AArnott in https://github.com/microsoft/CsWin32/pull/1341
* Friendly overloads replace `PCWSTR*` parameters with `ReadOnlySpan<string>` by @​AArnott in https://github.com/microsoft/CsWin32/pull/1346
* Implement LOWORD and HIWORD Macros for Extracting Low-Order and High-Order Words from a 32-Bit Value by @​vitkuz573 in https://github.com/microsoft/CsWin32/pull/1300

## New Contributors
* @​vitkuz573 made their first contribution in https://github.com/microsoft/CsWin32/pull/1300

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.162...v0.3.183

## 0.3.162

## What's Changed
* Bump metadata to v61.0.15-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/1223
* Improve input error reporting by @​AArnott in https://github.com/microsoft/CsWin32/pull/1177
* Assume null for invalid handles where invalid values are not specified by @​AArnott in https://github.com/microsoft/CsWin32/pull/1182
* Allow generation of all functions in modules that appear in more than one metadata input by @​AArnott in https://github.com/microsoft/CsWin32/pull/1202
* Avoid `Unsafe.SkipInit` API when it isn't available by @​AArnott in https://github.com/microsoft/CsWin32/pull/1208
* Add missing `DefaultDllImportSearchPaths` attribute to local functions by @​AArnott in https://github.com/microsoft/CsWin32/pull/1215
* Apply `[MarshalAs(FunctionPtr)]` to function pointer parameters by @​AArnott in https://github.com/microsoft/CsWin32/pull/1274
* Disable attempts to generate SEH functions by @​AArnott in https://github.com/microsoft/CsWin32/pull/1279
* Use `ReadOnlySpan<T>` instead of `Span<T>` in more places by @​AArnott in https://github.com/microsoft/CsWin32/pull/1280
* Fix bad code block in README by @​colejohnson66 in https://github.com/microsoft/CsWin32/pull/1284
* Avoid using `UnscopedRefAttribute` on downlevel *compilers* by @​AArnott in https://github.com/microsoft/CsWin32/pull/1288
* Add `QueryInterface<T>` helper method by @​AArnott in https://github.com/microsoft/CsWin32/pull/1290
* Fixes marshaling of structs with variable length arrays of `char` by @​AArnott in https://github.com/microsoft/CsWin32/pull/1292
* Allow deletion of the metadata files while the compiler process is running by @​AArnott in https://github.com/microsoft/CsWin32/pull/1329

## New Contributors
* @​colejohnson66 made their first contribution in https://github.com/microsoft/CsWin32/pull/1284

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.106...v0.3.162

## 0.3.106

## What's Changed

### High level enhancements
* Bump metadata versions: SDK: 60.0.34, WDK: 0.11.4 by @​AArnott in https://github.com/microsoft/CsWin32/pull/1148
* Build stable package version by @​AArnott in https://github.com/microsoft/CsWin32/pull/1175

### Fixes or enhancements
* Fix NullReferenceException in friendly overloads of COM methods with optional pointer parameters by @​AArnott in https://github.com/microsoft/CsWin32/pull/1109
* Emit `DllImportAttribute.EntryPoint` when metadata sets it to a custom value by @​AArnott in https://github.com/microsoft/CsWin32/pull/1110
* Offer SafeHandle overloads of methods with HGDIOBJ parameters by @​AArnott in https://github.com/microsoft/CsWin32/pull/1111
* Include "associated constants" in enum declarations by @​AArnott in https://github.com/microsoft/CsWin32/pull/1112
* Declare accessor properties for bitfields by @​AArnott in https://github.com/microsoft/CsWin32/pull/1113
* Allow `ComHelpers` class to be non-partially declared by compilation by @​AArnott in https://github.com/microsoft/CsWin32/pull/1114
* Allow disabling of friendly overload generation by @​AArnott in https://github.com/microsoft/CsWin32/pull/1117
* Define constant members of structs as constants by @​AArnott in https://github.com/microsoft/CsWin32/pull/1122
* Fix handling of signed bit fields by @​AArnott in https://github.com/microsoft/CsWin32/pull/1126
* Always use pointers when referencing structs with variable-length inline arrays by @​AArnott in https://github.com/microsoft/CsWin32/pull/1127
* Add helper APIs for variable-length inline arrays by @​AArnott in https://github.com/microsoft/CsWin32/pull/1130
* Reference and ship the same version of System.Text.Encodings.Web by @​AArnott in https://github.com/microsoft/CsWin32/pull/1173
* Drop the implicit `System.Memory` reference from the package by @​AArnott in https://github.com/microsoft/CsWin32/pull/1172


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.49-beta...v0.3.106

## 0.3.49-beta

## What's Changed
* Bump win32metadata to 55.0.45 by @​AArnott in https://github.com/microsoft/CsWin32/pull/1063


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.46-beta...v0.3.49-beta

## 0.3.46-beta

## What's Changed
* Fix generation of APIs from ServiceFabric winmd by @​AArnott in https://github.com/microsoft/CsWin32/pull/1000
* Bump win32metadata to 54.0.44-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/1016
* Implement `SetLastError` ourselves on .NET when marshaling is not allowed by @​AArnott in https://github.com/microsoft/CsWin32/pull/1017
* Fix constant wildcard ambiguity warnings by @​AArnott in https://github.com/microsoft/CsWin32/pull/1019
* Add MAKELONG and related macros by @​AArnott in https://github.com/microsoft/CsWin32/pull/1018
* Add ToString() methods to ordinary typedef structs by @​AArnott in https://github.com/microsoft/CsWin32/pull/1020
* FailFast instead of throw from non-HRESULT returning CCW methods by @​AArnott in https://github.com/microsoft/CsWin32/pull/1021
* Share more boilerplate code in tests by @​AArnott in https://github.com/microsoft/CsWin32/pull/1035
* Fix CsWin32 api doc reading in newer C# compiler versions by @​AArnott in https://github.com/microsoft/CsWin32/pull/1037
* Emit `Unsafe.AsRef(in Value[0])` by @​AArnott in https://github.com/microsoft/CsWin32/pull/1039
* Fix NRE thrown from some COM extension methods by @​AArnott in https://github.com/microsoft/CsWin32/pull/1043
* Add package README specifically for nuget.org by @​AArnott in https://github.com/microsoft/CsWin32/pull/1045
* Prefer pointers over `out`/`ref` for optional parameters by @​AArnott in https://github.com/microsoft/CsWin32/pull/1046
* Decorate Dual COM interfaces properly by @​AArnott in https://github.com/microsoft/CsWin32/pull/1050
* Add implicit conversions between `bool` and `VARIANT_BOOL` by @​AArnott in https://github.com/microsoft/CsWin32/pull/1052


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.18-beta...v0.3.46-beta

## 0.3.18-beta

## What's Changed
* Use MSBuild computed full paths for input metadata by @​AArnott in https://github.com/microsoft/CsWin32/pull/970
* Fix user requests for special types by @​AArnott in https://github.com/microsoft/CsWin32/pull/974
* Remove unnecessary `fixed` statement in COM struct by @​AArnott in https://github.com/microsoft/CsWin32/pull/975
* Add `IVTable` interfaces to COM structs by @​AArnott in https://github.com/microsoft/CsWin32/pull/981


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.3.2-beta...v0.3.18-beta

## 0.3.2-beta

## What's Changed
* Prepare for multi-metadata input to source generator by @​AArnott in https://github.com/microsoft/CsWin32/pull/944
* Add the WDK as a default metadata input by @​AArnott in https://github.com/microsoft/CsWin32/pull/946


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.252-beta...v0.3.2-beta

## 0.2.252-beta

## What's Changed
* Leverage AlsoUsableForAttribute for more interoperable typedefs by @​mikebattista in https://github.com/microsoft/CsWin32/pull/930
* Bump win32metadata to 51.0.33-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/932
* Update metadata to 52.0.65-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/937
* Fix source generator in VS2019 by @​AArnott in https://github.com/microsoft/CsWin32/pull/938
* Add integration tests for VS and .NET SDK by @​AArnott in https://github.com/microsoft/CsWin32/pull/940
* Use proper SafeHandle types for specific APIs by @​AArnott in https://github.com/microsoft/CsWin32/pull/941
* Remove System.Drawing type references when the assembly isn't referenced by @​AArnott in https://github.com/microsoft/CsWin32/pull/943

## New Contributors
* @​mikebattista made their first contribution in https://github.com/microsoft/CsWin32/pull/930

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.229-beta...v0.2.252-beta

## 0.2.229-beta

## What's Changed
* Generate more friendly overloads on net35 by @​AArnott in https://github.com/microsoft/CsWin32/pull/892
* Simplify spell checker factory in sample by @​AArnott in https://github.com/microsoft/CsWin32/pull/905
* Rearrange version properties in an attempt to get Dependabot to update tests only by @​AArnott in https://github.com/microsoft/CsWin32/pull/906
* Do not use an array for a pointer field that doesn't actually refer to an array by @​AArnott in https://github.com/microsoft/CsWin32/pull/907
* Add System.Memory and Unsafe package references to net45 projects by @​AArnott in https://github.com/microsoft/CsWin32/pull/916
* Fix typo in ArchSpecificAPIs.md by @​HydroH in https://github.com/microsoft/CsWin32/pull/919
* Update metadata to 49.0.21-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/921
* Fix generated code compilation break due to redundant extension methods by @​AArnott in https://github.com/microsoft/CsWin32/pull/922
* Recognize `MemorySizeAttribute` in metadata to improve friendly overloads by @​AArnott in https://github.com/microsoft/CsWin32/pull/923

## New Contributors
* @​HydroH made their first contribution in https://github.com/microsoft/CsWin32/pull/919

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.206-beta...v0.2.229-beta

## 0.2.206-beta

## What's Changed
* Emit an explanatory warning when users request generation of `IDispatch` or `IUnknown` by @​AArnott in https://github.com/microsoft/CsWin32/pull/865
* Allow null arguments where null-terminated strings are required by @​AArnott in https://github.com/microsoft/CsWin32/pull/877
* Downgrade System.Memory to 4.5.4 by @​AArnott in https://github.com/microsoft/CsWin32/pull/876
* Fix for non-remotable COM interfaces by @​AArnott in https://github.com/microsoft/CsWin32/pull/878
* Bump metadata to 41.0.25-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/864
* Update metadata by @​AArnott in https://github.com/microsoft/CsWin32/pull/889


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.188-beta...v0.2.206-beta

## 0.2.188-beta

## What's Changed
* Bring back Vtbl for IUnknown and IDispatch by @​AArnott in https://github.com/microsoft/CsWin32/pull/827
* Touch-up CCW generation by @​AArnott in https://github.com/microsoft/CsWin32/pull/828
* Many more CCW and other fixes by @​AArnott in https://github.com/microsoft/CsWin32/pull/829
* Fix friendly overload handling of reserved parameters by @​AArnott in https://github.com/microsoft/CsWin32/pull/841
* Update metadata version to 40.0.14-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/842
* Drop all dependencies that the compiler provides by @​AArnott in https://github.com/microsoft/CsWin32/pull/843
* Bring back the certain dependencies by @​AArnott in https://github.com/microsoft/CsWin32/pull/846
* Remove NativeMethods.json + NativeMethods.txt from the None build action by @​0xced in https://github.com/microsoft/CsWin32/pull/850
* Null-coalescing in friendly overload by @​davidegiacometti in https://github.com/microsoft/CsWin32/pull/848

## New Contributors
* @​0xced made their first contribution in https://github.com/microsoft/CsWin32/pull/850
* @​davidegiacometti made their first contribution in https://github.com/microsoft/CsWin32/pull/848

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.164-beta...v0.2.188-beta

## 0.2.164-beta

## What's Changed
* Emit CCW entrypoint functions and populate vtbl by @​AArnott in https://github.com/microsoft/CsWin32/pull/825


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.162-beta...v0.2.164-beta

## 0.2.162-beta

## What's Changed
* Prefer 0 handles to -1 by @​AArnott in https://github.com/microsoft/CsWin32/pull/811 to fix #​810

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.158-beta...v0.2.162-beta

## 0.2.158-beta

## What's Changed
* Structs that represent COM interfaces prefer non-PreserveSig by @​AArnott in https://github.com/microsoft/CsWin32/pull/793
* Allow PreserveSig to apply to all APIs by @​AArnott in https://github.com/microsoft/CsWin32/pull/794
* Determine language features support the same way the compiler does by @​AArnott in https://github.com/microsoft/CsWin32/pull/803
* c-string enhancements by @​AArnott in https://github.com/microsoft/CsWin32/pull/805
* Update API docs to 0.1.12-alpha by @​AArnott in https://github.com/microsoft/CsWin32/pull/808
* Update metadata to 39.0.18-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/809


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.138-beta...v0.2.158-beta

## 0.2.138-beta

## What's Changed
* Be careful about using internal attributes declared in other assemblies by @​AArnott in https://github.com/microsoft/CsWin32/pull/743
* Update metadata to 37.0.34-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/759
* Use documented invalid handles when SafeHandle is null by @​AArnott in https://github.com/microsoft/CsWin32/pull/760
* Observe `DangerousAddRef` result before proceeding. by @​AArnott in https://github.com/microsoft/CsWin32/pull/762
* Use Windows active code page instead of UTF8 for decoding narrow characters by @​AArnott in https://github.com/microsoft/CsWin32/pull/764
* Revert "Observe `DangerousAddRef` result before proceeding." by @​AArnott in https://github.com/microsoft/CsWin32/pull/765
* Add IComIID interface to COM structs by @​AArnott in https://github.com/microsoft/CsWin32/pull/766
* Emit a stable reference to the interface guid by @​AArnott in https://github.com/microsoft/CsWin32/pull/767
* Add IPicture test and fix the failure by @​AArnott in https://github.com/microsoft/CsWin32/pull/776
* Fix generation failure when emitting members as various C# keywords by @​AArnott in https://github.com/microsoft/CsWin32/pull/779
* Update metadata to 38.0.19-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/781
* Perf enhancements by @​AArnott in https://github.com/microsoft/CsWin32/pull/782
* Fix full generation tests by @​AArnott in https://github.com/microsoft/CsWin32/pull/777
* Delete verbatim tests by @​AArnott in https://github.com/microsoft/CsWin32/pull/784
* Distribute COM interface friendly overloads across many classes by @​AArnott in https://github.com/microsoft/CsWin32/pull/783
* Add visibility modifier to struct properties by @​AArnott in https://github.com/microsoft/CsWin32/pull/786


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.104-beta...v0.2.138-beta

## 0.2.104-beta

## What's Changed
* A bunch of inline array improvements by @​AArnott in https://github.com/microsoft/CsWin32/pull/699
* Unmarshaled COM 'interface' struct trimmability by @​AArnott in https://github.com/microsoft/CsWin32/pull/706
* Reuse inline array structs across all users by @​AArnott in https://github.com/microsoft/CsWin32/pull/707
* Declare COM structs with `partial` modifier by @​AArnott in https://github.com/microsoft/CsWin32/pull/713
* Add a `static readonly Guid` field to COM structs by @​AArnott in https://github.com/microsoft/CsWin32/pull/712
* Declare COM interface within the COM struct when allowMarshaling is false by @​AArnott in https://github.com/microsoft/CsWin32/pull/714
* Fix BSTR.ToString() to not throw when the pointer is null by @​AArnott in https://github.com/microsoft/CsWin32/pull/725
* Declare methods on COM interfaces-as-structs as `public` by @​AArnott in https://github.com/microsoft/CsWin32/pull/726
* Generate decimal/DECIMAL converters by @​AArnott in https://github.com/microsoft/CsWin32/pull/727
* Add BSTR.Length property by @​AArnott in https://github.com/microsoft/CsWin32/pull/728
* Declare ZZ-family of string types by @​AArnott in https://github.com/microsoft/CsWin32/pull/730
* Add `CharSet = Unicode` to `extern` methods with `char` parameters by @​AArnott in https://github.com/microsoft/CsWin32/pull/735
* Update metadata to 36.0.9-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/737
* Update NuGet.Protocol to 5.8.0 in test project by @​AArnott in https://github.com/microsoft/CsWin32/pull/740
* Emit COM interfaces with properties where possible by @​AArnott in https://github.com/microsoft/CsWin32/pull/739


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.63-beta...v0.2.104-beta

## 0.2.63-beta

## What's Changed
* Fix C# 11 warning on inline arrays by @​AArnott in https://github.com/microsoft/CsWin32/pull/660
* Add DateTime operators to SYSTEMTIME by @​elachlan in https://github.com/microsoft/CsWin32/pull/672
* Improvements to HRESULT by @​elachlan in https://github.com/microsoft/CsWin32/pull/666
* Allow certain debug-related libraries to load from the app directory by @​AArnott in https://github.com/microsoft/CsWin32/pull/685
* Prefer System.IO.SeekOrigin over STREAM_SEEK by @​AArnott in https://github.com/microsoft/CsWin32/pull/686
* Update metadata to 33.0.18-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/696


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.46-beta...v0.2.63-beta

## 0.2.46-beta

## What's Changed
* Trim Zero White Space by @​elachlan in https://github.com/microsoft/CsWin32/pull/609
* Perf improvements to repeated generations by @​AArnott in https://github.com/microsoft/CsWin32/pull/613
* Add drawing types templates by @​elachlan in https://github.com/microsoft/CsWin32/pull/628
* Add Null static field to handles by @​elachlan in https://github.com/microsoft/CsWin32/pull/640
* Avoid overflow exceptions when converting `BOOL` to `bool` by @​AArnott in https://github.com/microsoft/CsWin32/pull/645
* Add GeneratedCodeAttribute to Generated code by @​elachlan in https://github.com/microsoft/CsWin32/pull/621
* Add option to avoid SafeHandle friendly overloads by @​AArnott in https://github.com/microsoft/CsWin32/pull/653
* Fix formatting issues around for loops by @​elachlan in https://github.com/microsoft/CsWin32/pull/656
* Honour DoNotRelease on SafeHandles by @​elachlan in https://github.com/microsoft/CsWin32/pull/654
* Update metadata to 31.0.4-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/679
* Merge latest Library.Template by @​AArnott in https://github.com/microsoft/CsWin32/pull/684

## New Contributors
* @​elachlan made their first contribution in https://github.com/microsoft/CsWin32/pull/609

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.2.10-beta...v0.2.46-beta

## 0.2.10-beta



## Changes:


### Fixes:


* #​597: Broken struct definition for `MODULEENTRY32`
* #​312: Handle structs incorrectly using `nint` field instead of IntPtr

### Enhancements:


* #​328: Add option to generate `out IntPtr` for COM output pointer parameters
* #​586: Add interop helpers to BOOLEAN
* #​585: Foundation BOOLEAN

### Others:


* #​599: Fix inline arrays when marshaling is off
* #​587: Add option to generate out IntPtr for COM output pointer parameters
<details><summary><b>See More</b></summary>

* #​588: Give HWND an IntPtr field type

This list of changes was [auto generated](https://microsoft.visualstudio.com/Dart/_build/results?buildId=52372875&view=logs).</details>

## 0.2.1-beta



## Changes:


### Fixes:


* #​578: `[Optional, In]` parameter shouldn't use `in` modifier in extern method for managed structs
* #​565: Generated code fails to consider extern aliases
* #​292: Could not load type "that is incorrectly aligned or overlapped by a non-object field"
* #​574: Suppress CS8981 in generated code

### Enhancements:


* #​579: Make `[In, Optional]` managed struct parameters actually optional in friendly overloads
* #​562: Unify the `IDataObject` interface with the one in the BCL
* #​561: Avoid allocating large string for generated text
* #​577: Add ambiguity handling when reusing symbols from multiple metadata references
* #​564: Add support for multiple NativeMethods.txt files in a project



## 0.1.691-beta


## What's Changed
* Fix thread-safety bug in MetadataIndex by @​AArnott in https://github.com/microsoft/CsWin32/pull/559


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.1.689-beta...v0.1.691-beta

## 0.1.689-beta

## What's Changed
* Update metadata to 23.0.2-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/538
* README: Fix Newer metadata section commandline by @​Thog in https://github.com/microsoft/CsWin32/pull/540
* Make it easier to test CPU architectures in multiple tests by @​AArnott in https://github.com/microsoft/CsWin32/pull/495
* Automatically apply PreserveSig behavior where metadata sets the flag by @​AArnott in https://github.com/microsoft/CsWin32/pull/542
* Propagate `[Obsolete]` attribute on fields from the metadata by @​AArnott in https://github.com/microsoft/CsWin32/pull/543
* Add support for generating many constants based on wildcard by @​AArnott in https://github.com/microsoft/CsWin32/pull/544
* Reuse .NET `NativeOverlapped` struct instead of generating our own by @​AArnott in https://github.com/microsoft/CsWin32/pull/546
* Detect and report suspicious characters in NativeMethods.txt by @​AArnott in https://github.com/microsoft/CsWin32/pull/548
* Generate constants into their typedef structs wherever possible by @​AArnott in https://github.com/microsoft/CsWin32/pull/550
* Produce friendly overloads for in/out PWSTR parameters by @​AArnott in https://github.com/microsoft/CsWin32/pull/551
* Add SizeParamIndex or CountConst as required to extern methods by @​AArnott in https://github.com/microsoft/CsWin32/pull/552
* Emit assembly attribute with CsWin32 version stamp by @​AArnott in https://github.com/microsoft/CsWin32/pull/555
* Recognize documented invalid values for handles by @​AArnott in https://github.com/microsoft/CsWin32/pull/557
* Share MetadataIndex instances across multiple generators by @​AArnott in https://github.com/microsoft/CsWin32/pull/558

## New Contributors
* @​Thog made their first contribution in https://github.com/microsoft/CsWin32/pull/540

**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.1.647-beta...v0.1.689-beta

## 0.1.647-beta

## What's Changed
* Allow memory-mapped file to open for shared reading by @​AArnott in https://github.com/microsoft/CsWin32/pull/536


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.1.646-beta...v0.1.647-beta

## 0.1.646-beta

## What's Changed

* Avoid mapping the metadata file more than once by @​AArnott in https://github.com/microsoft/CsWin32/pull/529


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.1.635-beta...v0.1.646-beta

## 0.1.635-beta

## What's Changed
* Generate cocreatable types as classes with `[ComImport]` by @​AArnott in https://github.com/microsoft/CsWin32/pull/454
* Check whether Span<T> exists before using it by @​jnm2 in https://github.com/microsoft/CsWin32/pull/450
* Promote visibility of members in all templates by @​AArnott in https://github.com/microsoft/CsWin32/pull/458
* Re-apply System.Text.Encodings.Web update by @​AArnott in https://github.com/microsoft/CsWin32/pull/459
* Update metadata to 17.0.2-preview by @​AArnott in https://github.com/microsoft/CsWin32/pull/489


**Full Changelog**: https://github.com/microsoft/CsWin32/compare/v0.1.619-beta...v0.1.635-beta

## 0.1.619-beta



## Changes:


### Fixes:


* #​429: Can't emit interface in 2nd winmd that inherits from interface in 1st winmd
* #​430: Can't emit items from 2nd winmd if its namespace doesn't start with Windows.Win32
* #​431: IEnumMoniker returns null-elements in marshaling environment
* #​370: Toggling allowMarshaling breaks the IDE experience till reload
* #​419: Regression in 0.1.560-beta CS0436/CS0103 due to type conflict
* #​422: Fix schema descriptions
* #​446: Fix cross-winmd type references
* #​418: Fix generation of interop types from multiple winmd's
* #​421: Fix source generation break when NativeMethods.json does not parse

### Enhancements:

* #​433: Apply [Out] to marshalled arrays where [Out] is in the metadata
* #​442: Reuse `SafeRegistryHandle` instead of generating `RegCloseKeySafeHandle`
* #​447: Update win32metadata to 15.0.1-preview
* #​415: Enable APIs using synthesized types to be used on net35
* #​444: Consolidate extern method and constants into the same class

This list of changes was [auto generated](https://microsoft.visualstudio.com/Dart/_build/results?buildId=41583299&view=logs).

## 0.1.588-beta



## Changes:


### Fixes:


* #​369: VS editor constantly warns about inconsistent line endings
* #​389: Struct getting created with ANSI instead of Unicode string fields, leading to wrong Marshal.SizeOf result

### Others:


* #​412: Generate code with consistent line endings
* #​410: Apply `[StructLayout(CharSet.Unicode)]` to structs that contain the `char` type

This list of changes was [auto generated](https://microsoft.visualstudio.com/Dart/_build/results?buildId=39263259&view=logs).

## 0.1.584-beta



## Changes:


### Fixes:


* #​396: FARPROC, PROC should be expressed as typedef structs with `IntPtr` field instead of a delegate

### Enhancements:


* #​406: A variety of enhancements for fixed length inline arrays
* #​301: Generate ToString methods on fixed-length char arrays 
* #​391: Offer friendly overloads for ANSI-only methods
* #​395: Allow fixed char array field initialization with string
* #​385: Fixed length inline arrays are difficult to initialize

### Others:

* #​407: Suppress CS0436 in generated files

This list of changes was [auto generated](https://microsoft.visualstudio.com/Dart/_build/results?buildId=39218551&view=logs).

## 0.1.560-beta



## Changes:


### Fixes:

* #​362: GetMessage returns a bool when it should return a BOOL
* #​316: Microsoft.Windows.SDK.Win32Docs.dll appears in build and publish output
* #​375: Fix detection of SupportedOSPlatformAttribute
* #​357: Fix marshaling of NativeArrayInfo parameters
* #​325: Suppress Win32Docs showing up as a runtime dependency downstream
* #​331: Fix SA1629 "... should end with a period" in generated xml docs

### Enhancements:

* #​386: Enable creating C# projections based on multiple input winmd's and docs
* #​388: Update win32metadata to 10.2.163-preview

This list of changes was [auto generated](https://microsoft.visualstudio.com/Dart/_build/results?buildId=38799941&view=logs).</details>

## 0.1.506-beta



## Changes:


### Fixes:


* #​229: Friendly overloads are missing SupportedOSPlatform
* #​198: COM interfaces should have attributed with [ComImport]

### Enhancements:


* #​309: Consume API docs from win32metadata
* #​302: Perf work
* #​307: Fix startup perf (YAML to messagepack)
* #​303: Replace NormalizeWhitespace with manually generated whitespace
* #​293: HANDLE typedefs should overload the == operator
* #​299: Update metadata version to 10.2.84-preview
* #​294: Downgrade System.Text.Json version
* #​208: Please skip emitting DefaultDllImportSearchPaths on targets < net45
* #​40: Filter generated output based on target WinSDK version
* #​196: Emit suggestions when requested API does not exist
* #​103: Generate generic method overloads where `out void*` appears for one parameter
* #​182: LPARAM should declare an implicit conversion from `nint`
* #​212: Attribute COM interfaces with [ComImport]
* #​210: Omit `DefaultDllImportSearchPathsAttribute` generation on older TFMs
* #​204: Add `SupportedOSPlatformAttribute` to generated code
* #​203: Suggest APIs for NativeMethods.txt when no match is found in the metadata
* #​201: Add `CoCreateInstance` generic friendly overload
* #​200: Offer implicit conversion from nint/nuint to LPARAM/WPARAM

### Others:

* #​305: Fix memory leak in testing
* #​300: Generate whole namespaces on-demand
* #​295: Include the period in the full-sentence link in XML docs
* #​272: Print helpful errors/warnings on generation failures
* #​221: Generator may fail with "Could not load file or assembly 'YamlDotNet..."
* #​265: Add dependencies to package.
* #​258: Add IsNull property on pointer-sized structs
* #​260: Add NOTICE.txt file to package
* #​241: Add `[SupportedOSPlatform]` to friendly overloads
* #​236: Bump Microsoft.CodeAnalysis.CSharp.Workspaces from 3.8.0 to 3.9.0

This list of changes was [auto generated](https://microsoft.visualstudio.com/Dart/_build/results?buildId=36124588&view=logs).</details>

## 0.1.422-beta



## Changes:


### Fixes:


* #​49: Missing docs for IMAGE_NT_HEADERS32

### Enhancements:


* #​186: BOOL.Value should be typed as int
* #​102: When an enum value is requested in NativeMethods.txt, emit an error that mentions the name of the containing enum
* #​41: Generated methods should have DefaultDllImportSearchPathsAttribute 
* #​22: Add documentation for constants
* #​152: Add extension methods to help index into inline arrays on downlevel TFMs
* #​185: Update metadata to 10.0.19041.5-preview.68
* #​194: Generate COM interfaces, delegates, and managed structures
* #​177: Emit enums based on value names, and emit warning
* #​172: Add Length property to inline arrays
* #​173: Add ability to generate enum declarations from docs
* #​159: Add doc comments to "unsafe" `AsSpan()` and indexer members
* #​157: Add extension methods so more runtimes can index into inline arrays
* #​140: New codegen for inline array fields

### Others:


<details><summary><b>See More</b></summary>

* #​175: Fix doc collection for structs ending in 32 or 64
* #​176: Add `DefaultDllImportSearchPathsAttribute` to each extern method
* #​174: Always use BOOL instead of `bool` in native function pointers

This list of changes was [auto generated](https://microsoft.visualstudio.com/Dart/_build/results?buildId=32472246&view=logs).</details>

## 0.1.378-beta



## Changes:


### Fixes:


* #​64: `[In, Out] char*` parameter MUST NOT generate `string` as a friendly overload
* #​126: GetIconInfo throws "Pointers cannot reference marshaled structures. Use ByRef instead."
* #​62: Source Generator not installed for packages.config projects
* #​43: Types are not generated when referenced project already defines them, even though they are inaccessible
* #​75: Add `global::` in front of all `using` directives
* #​68: Source is not generated for .NET Framework 3.5
* #​72: FreeLibrarySafeHandle.Null uses the wrong pointer value
* #​48: Tolerate leading/trailing whitespace in NativeMethods.txt

### Enhancements:


<details><summary><b>See More</b></summary>

* #​119: Enhance HRESULT and NTStatus with helper functions
* #​129: Make optional `SafeHandle` parameters accept null
* #​121: Update to metadata that fixes the char* as ushort* problem
* #​74: Unify CloseHandleSafeHandle with SafeFileHandle
* #​9: Produce SafeHandle-derived types and accept SafeHandle base type
* #​99: Map LARGE_INTEGER structs to 64-bit int types on .NET
* #​98: Add support for packages.config-based projects
* #​97: Add HRESULT struct members: Succeeded and Failed
* #​78: Add “partial” modifier to generated members
* #​53: A single pragma disabling multiple warnings can be used

### Others:


* #​145: Declare HRESULT.ThrowOnFailure() method
* #​143: Make SafeHandle parameters accept null
* #​139: Generate partials when the project already defines partials
* #​133: Structs are not generated when partials intended to add to them exist in the project
* #​136: Update to metadata v10.0.19041.5-preview.20
* #​54: README animated gif should demo default internal visibility
* #​128: Prefix Guid with `global::`
* #​124: Incompatiblity with WinUI Preview 4 (using daily)
* #​59: Can't work in WinUI 3 project
* #​127: Avoid generating `bool` as struct field
* #​123: Add SpellChecker sample
* #​104: Prefer `bool` over `BOOL` in method signatures
* #​100: Reuse `SafeFileHandle` from BCL instead of creating `CloseHandleSafeHandle`
* #​101: Return specific `SafeHandle` types and accept base types
 ... (truncated)

Commits viewable in [compare view](https://github.com/microsoft/CsWin32/compare/v0.1.319-beta...v0.3.269).
</details>

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Microsoft.Windows.CsWin32&package-manager=nuget&previous-version=0.1.319-beta&new-version=0.3.269)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

---
updated-dependencies:
- dependency-name: Microsoft.Windows.CsWin32
  dependency-version: 0.3.269
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added .NET Pull requests that update .NET code dependencies Pull requests that update a dependency file labels Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file .NET Pull requests that update .NET code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants