Skip to content

Replace 'api-ms-win-core-file-l1-2-2.dll' with 'Kernell32.dll' - #10680

Merged
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:masterfrom
iSazonov:fix-unable-load-dll-api-ms-win-core-2
Oct 4, 2019
Merged

Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:masterfrom
iSazonov:fix-unable-load-dll-api-ms-win-core-2

Conversation

@iSazonov

Copy link
Copy Markdown
Collaborator

PR Summary

Fix #9144

For reference #10417

PR Context

PR Checklist

@iSazonov Ilya (iSazonov) added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Oct 2, 2019
@iSazonov Ilya (iSazonov) added this to the 7.0.0-preview.5 milestone Oct 2, 2019
int dwFlagsAndAttributes, IntPtr hTemplateFile);

[DllImport(PinvokeDllNames.FindFirstStreamDllName, ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)]
[DllImport("kernel32.dll", ExactSpelling = true, CharSet = CharSet.Unicode, SetLastError = true)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to change FindFirstStreamDllName to point to kernel32.dll?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we could preserve these constants (as reminder) if we want revert the change after Windows 8 (and 7) EOL.

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 70a74fb into PowerShell:master Oct 4, 2019
@iSazonov
Ilya (iSazonov) deleted the fix-unable-load-dll-api-ms-win-core-2 branch October 4, 2019 02:58
@ghost

Copy link
Copy Markdown

🎉v7.0.0-preview.5 has been released which incorporates this pull request.:tada:

Handy links:

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
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.

Get-Item with stream: Unable to load DLL 'api-ms-win-core-file-l1-2-2.dll'

3 participants