When trying to dispose the crypt handle I get from the call Crypt32.CryptAcquireCertificatePrivateKey I get the following exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.EntryPointNotFoundException: Unable to find an entry point named 'CryptReleaseContext' in DLL 'api-ms-win-service-management-l1-1-0.dll'.
at PInvoke.AdvApi32.CryptReleaseContext(IntPtr hProv, UInt32 dwFlags)
at PInvoke.AdvApi32.SafeCryptographicProviderHandle.ReleaseHandle()
at System.Runtime.InteropServices.SafeHandle.InternalDispose()
at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing)
at System.Runtime.InteropServices.SafeHandle.Dispose()
Any idea why this is happening ? Can I work around it ?
Hi,
When trying to dispose the crypt handle I get from the call Crypt32.CryptAcquireCertificatePrivateKey I get the following exception:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.EntryPointNotFoundException: Unable to find an entry point named 'CryptReleaseContext' in DLL 'api-ms-win-service-management-l1-1-0.dll'. at PInvoke.AdvApi32.CryptReleaseContext(IntPtr hProv, UInt32 dwFlags) at PInvoke.AdvApi32.SafeCryptographicProviderHandle.ReleaseHandle() at System.Runtime.InteropServices.SafeHandle.InternalDispose() at System.Runtime.InteropServices.SafeHandle.Dispose(Boolean disposing) at System.Runtime.InteropServices.SafeHandle.Dispose()
Any idea why this is happening ? Can I work around it ?
Thanks