Skip to content

Replace 'api-ms-win-core-job-12-1-0.dll' with 'Kernell32.dll' - #10417

Merged
Aditya Patwardhan (adityapatwardhan) merged 2 commits into
PowerShell:masterfrom
iSazonov:fix-unable-load-dll-api-ms-win-core
Sep 3, 2019
Merged

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

Conversation

@iSazonov

@iSazonov Ilya (iSazonov) commented Aug 22, 2019 •

Copy link
Copy Markdown
Collaborator

PR Summary

Fix #6561

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 Aug 22, 2019
@iSazonov Ilya (iSazonov) added this to the 7.0.0-preview.4 milestone Aug 22, 2019
@adityapatwardhan

Copy link
Copy Markdown
Member

Ilya (@iSazonov) The same DLL is used by AssignProcessToJobObjectDllName and QueryInformationJobObjectDllName. Do these also not work on Win7?

If we are replacing them with kernel32.dll, have you verified the change on win7throughwin10`?

If replacing with kernel32.dll works, should we be removing the definitions from PInvokeDllNames.cs.

@iSazonov

Copy link
Copy Markdown
Collaborator Author

Aditya Patwardhan (@adityapatwardhan) I removed all links to api-ms-win-core-job-l2-1-0.dll and now it works for me on Windows 7.

should we be removing the definitions from PInvokeDllNames.cs

There is already some unused consts, the list is large and numerated, also we could want to use ApiSets again after Windows 7 EOL. I think we need to keep the consts.

@daxian-dbw

Copy link
Copy Markdown
Member

Do we know if things are still working properly on NanoServer and Windows IoT after changing to kernal32.dll?

@iSazonov

Ilya (iSazonov) commented Aug 30, 2019 •

Copy link
Copy Markdown
Collaborator Author

I can not test on Nano and IoT.
I saw that .Net Core team replaced ApiSets with direct dll names because of many such problems with ApiSets.
See:
dotnet/corefx@75e45da
More: https://github.com/dotnet/corefx/search?q=ApiSets&type=Commits

Also I found https://www.geoffchappell.com/studies/windows/win32/apisetschema/history/sets61.htm where we can see that there is sometimes automapping (for Windows 7).

@adityapatwardhan

Copy link
Copy Markdown
Member

I have verified that the change works on NanoServer 1903 image.

@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit bbd54c3 into PowerShell:master Sep 3, 2019
@iSazonov
Ilya (iSazonov) deleted the fix-unable-load-dll-api-ms-win-core branch September 4, 2019 03:12
Travis Plunk (TravisEz13) pushed a commit to TravisEz13/PowerShell that referenced this pull request Sep 14, 2019
@ghost

Copy link
Copy Markdown

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

Handy links:

@ForNeVeR

Copy link
Copy Markdown
Contributor

Hey, shouldn't we remove the corresponding constants from the PinvokeDllNames class since they are unused now?

@iSazonov

Copy link
Copy Markdown
Collaborator Author

Friedrich von Never (@ForNeVeR) We did not remove the constants because we will revert the change after Windows 7 EOL.

@ForNeVeR

Copy link
Copy Markdown
Contributor

Okay, thanks.

@ghost

Copy link
Copy Markdown

🎉v6.2.4 has been released which incorporates this pull request.:tada:

Handy links:

Travis Plunk (TravisEz13) pushed a commit to TravisEz13/PowerShell that referenced this pull request Feb 25, 2020
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.

Start-Process: Unable to load DLL 'api-ms-win-core-job-12-1-0.dll'

5 participants