diff options
author | Atsushi Kanamori <AtsushiKan@users.noreply.github.com> | 2017-07-10 17:31:47 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-10 17:31:47 +0300 |
commit | 169b2a516bfcbef6db6a12433ebfe9f2d5a1a91e (patch) | |
tree | df5ef92e1d97950dbb2af6f5aefc6d9a2df8bdd3 /src/System.Private.StackTraceGenerator | |
parent | 3c1b98d0838ef5b4a36cc506de30a0cee4d5eab5 (diff) |
Whack the WACK's in PN CoreLib. (#4122)
Fixes 460497 Delete/modify WACK violations in PN corelib
Diffstat (limited to 'src/System.Private.StackTraceGenerator')
-rw-r--r-- | src/System.Private.StackTraceGenerator/src/Internal/StackTraceGenerator/StackTraceGenerator.Windows.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/System.Private.StackTraceGenerator/src/Internal/StackTraceGenerator/StackTraceGenerator.Windows.cs b/src/System.Private.StackTraceGenerator/src/Internal/StackTraceGenerator/StackTraceGenerator.Windows.cs index 06f810c7e..0e7110707 100644 --- a/src/System.Private.StackTraceGenerator/src/Internal/StackTraceGenerator/StackTraceGenerator.Windows.cs +++ b/src/System.Private.StackTraceGenerator/src/Internal/StackTraceGenerator/StackTraceGenerator.Windows.cs @@ -602,7 +602,11 @@ namespace Internal.StackTraceGenerator // CoCreateInstance is not in WindowsApp_Downlevel.lib and ExactSpelling = true is required // to force MCG to resolve it. - [DllImport("api-ms-win-core-com-l1-1-0.dll", ExactSpelling =true)] + // + // This api is a WACK violation but it cannot be changed to CoCreateInstanceApp() without breaking the stack generator altogether. + // The toolchain will not include this library in the dependency closure as long as (1) the program is being compiled as a store app and not a console .exe + // and (2) the /buildType switch passed to ILC is set to the "ret". + [DllImport("api-ms-win-core-com-l1-1-0.dll", ExactSpelling = true)] private static extern unsafe int CoCreateInstance(byte* rclsid, IntPtr pUnkOuter, int dwClsContext, byte* riid, out IntPtr ppv); private const int S_OK = 0; |