X Tutup
Skip to content

SetLastError as true for Symbolic and Hard Link native APIs#19566

Merged
daxian-dbw merged 1 commit intoPowerShell:masterfrom
adityapatwardhan:FixSetLastError
May 1, 2023
Merged

SetLastError as true for Symbolic and Hard Link native APIs#19566
daxian-dbw merged 1 commit intoPowerShell:masterfrom
adityapatwardhan:FixSetLastError

Conversation

@adityapatwardhan
Copy link
Copy Markdown
Member

@adityapatwardhan adityapatwardhan commented Apr 25, 2023

PR Summary

Ensure the native PInvoke call has SetLastError in the LibraryImport attribuute. We use the last error to determine the correct fully qualified error id.

PR Context

PR Checklist

@iSazonov
Copy link
Copy Markdown
Collaborator

Could you please point a code where we use the last error? I don't see using GetLastWin32Error/GetLastError.

@SeeminglyScience
Copy link
Copy Markdown
Contributor

Could you please point a code where we use the last error? I don't see using GetLastWin32Error/GetLastError.

Yeah it's called here

@daxian-dbw daxian-dbw merged commit 72c81b8 into PowerShell:master May 1, 2023
@daxian-dbw daxian-dbw added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label May 1, 2023
@ghost
Copy link
Copy Markdown

ghost commented Jun 29, 2023

🎉v7.4.0-preview.4 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

X Tutup