Prerequisites
Steps to reproduce
I'm wondering what the purpose of https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/utils/PInvokeDllNames.cs, specifically
- Why is there a counter for each entry as a comment
- Why is there a constant for each extern name rather than just the DLL itself
- Why do some things use these constants while others do not
|
[DllImport("crypt32.dll", SetLastError = true, CharSet = CharSet.Unicode)] |
|
internal static extern |
|
IntPtr CryptFindLocalizedName(string pwszCryptName); |
uses crypt32.dll
|
[DllImport(PinvokeDllNames.CryptAcquireContextDllName, SetLastError = true, CharSet = CharSet.Unicode)] |
|
internal static extern |
|
bool CryptAcquireContext(ref IntPtr hProv, |
|
string strContainerName, |
|
string strProviderName, |
|
int nProviderType, |
|
uint uiProviderFlags); |
uses the onecore constant in PInvokeDllNames.cs
- Further to the above, why do these use the one core dll names where others do not
Expected behavior
Actual behavior
Error details
Environment data
Visuals
No response
Prerequisites
Steps to reproduce
I'm wondering what the purpose of https://github.com/PowerShell/PowerShell/blob/master/src/System.Management.Automation/utils/PInvokeDllNames.cs, specifically
PowerShell/src/System.Management.Automation/security/nativeMethods.cs
Lines 491 to 493 in 2db0fe7
crypt32.dllPowerShell/src/System.Management.Automation/security/nativeMethods.cs
Lines 495 to 501 in 2db0fe7
PInvokeDllNames.csExpected behavior
N/AActual behavior
N/AError details
N/AEnvironment data
N/AVisuals
No response