CryptImportKey gives error NTE_BAD_VER

Posted on 2007-12-06
Last Modified: 2013-12-27
When I call CryptImportKey() to import a public key which is exported  from another key store, it gives error NTE_BAD_VER. Any idea what went wrong ?
Question by:walterwkh
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 86

Expert Comment

ID: 20425249
At first glance, I'd tend to say that the CSP's versions don't match. As with ("CryptImportKey"):

The version number of the key BLOB does not match the CSP version. This usually indicates that the CSP needs to be upgraded.

Author Comment

ID: 20426186
yes, I've already gone through the page when i get the error, but how to fix it ?
LVL 86

Expert Comment

ID: 20429232
Check the version of the CSPs involved and update accordingly...

Author Comment

ID: 20439299
sorry jkr, just discovered that it's because I am managing wrongly with the pointer to the keyblob, that's caused this error.

Thanks a lot anyway

Accepted Solution

ee_auto earned 0 total points
ID: 25502877
Question PAQ'd, 500 points refunded, and stored in the solution database.

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question