Skip to content

Commit

Permalink
Merge pull request #1396 from microsoft/renovate/microsoft.windows.cs…
Browse files Browse the repository at this point in the history
…win32-0.x

Update dependency Microsoft.Windows.CsWin32 to 0.3.162
  • Loading branch information
AArnott authored Feb 6, 2025
2 parents 0b7ee6f + 15cfcdb commit 25e0405
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<PackageVersion Include="Microsoft.VisualStudio.Shell.Framework" Version="17.4.33103.184" />
<PackageVersion Include="Microsoft.VisualStudio.Validation" Version="17.8.8" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.106" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.3.162" />
<PackageVersion Include="Nullable" Version="1.3.1" />
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.Memory" Version="4.6.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static SynchronizationContext Default
/// <returns>
/// The array index of the object that satisfied the wait.
/// </returns>
public override int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
public override unsafe int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
{
Requires.NotNull(waitHandles, nameof(waitHandles));

Expand All @@ -61,7 +61,10 @@ public override int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTim
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
#endif
{
return (int)PInvoke.WaitForMultipleObjects(MemoryMarshal.Cast<IntPtr, HANDLE>(waitHandles), waitAll, (uint)millisecondsTimeout);
fixed (IntPtr* pHandles = waitHandles)
{
return (int)PInvoke.WaitForMultipleObjects((uint)waitHandles.Length, (HANDLE*)pHandles, waitAll, (uint)millisecondsTimeout);
}
}
else
{
Expand Down

0 comments on commit 25e0405

Please sign in to comment.