Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Error during CryptAquireContext() - using wincrypt.h

Error during CryptAquireContext() - using wincrypt.h

Scheduled Pinned Locked Moved C / C++ / MFC
beta-testinghelpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    esapp420
    wrote on last edited by
    #1

    Hello, I am getting an error during a call to CryptAquireContext. Here is the code: // Get handle to the default provider. if(!CryptAcquireContext(&hCryptProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, 0)) { HandleError("Error during CryptAcquireContext."); return -4; } This routine works fine on my Win2000 machine as well as another Win98 machine in the office, but our Beta users all get the same error. Is it something I am not registering/not including in the install??? If anybody has any experience with this your input would be appreciated! Thanks Football season starts this weekend!

    L 1 Reply Last reply
    0
    • E esapp420

      Hello, I am getting an error during a call to CryptAquireContext. Here is the code: // Get handle to the default provider. if(!CryptAcquireContext(&hCryptProv, NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, 0)) { HandleError("Error during CryptAcquireContext."); return -4; } This routine works fine on my Win2000 machine as well as another Win98 machine in the office, but our Beta users all get the same error. Is it something I am not registering/not including in the install??? If anybody has any experience with this your input would be appreciated! Thanks Football season starts this weekend!

      L Offline
      L Offline
      Le centriste
      wrote on last edited by
      #2

      What about calling GetLastError()? also, It be because the beta machines don't have the high encryption pack installed. Michel It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
      - TreeBeard

      E 1 Reply Last reply
      0
      • L Le centriste

        What about calling GetLastError()? also, It be because the beta machines don't have the high encryption pack installed. Michel It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
        - TreeBeard

        E Offline
        E Offline
        esapp420
        wrote on last edited by
        #3

        I am calling GetLastError() like this: void CFPCommonFunctions::HandleError(CString strFunction) { CString strMsg; strMsg.Format("CFPCommonFunctions::EncryptTransFile() - %s: %u.", strFunction, GetLastError()); AfxMessageBox(strMsg, MB_OK | MB_ICONEXCLAMATION); } This returns 80090019, but there is no corresponding code in the Windows error table. I think I am not formating this message correctly. Also, what do you mean by "don't have the high encryption pack installed"? The documentation on MSDN says that it is compatible with Win95 OSR2 and up. It relies on advapi32.dll, which these users have installed and registered... Is there something I am missing??? 9 Days till kickoff...

        L 1 Reply Last reply
        0
        • E esapp420

          I am calling GetLastError() like this: void CFPCommonFunctions::HandleError(CString strFunction) { CString strMsg; strMsg.Format("CFPCommonFunctions::EncryptTransFile() - %s: %u.", strFunction, GetLastError()); AfxMessageBox(strMsg, MB_OK | MB_ICONEXCLAMATION); } This returns 80090019, but there is no corresponding code in the Windows error table. I think I am not formating this message correctly. Also, what do you mean by "don't have the high encryption pack installed"? The documentation on MSDN says that it is compatible with Win95 OSR2 and up. It relies on advapi32.dll, which these users have installed and registered... Is there something I am missing??? 9 Days till kickoff...

          L Offline
          L Offline
          Le centriste
          wrote on last edited by
          #4

          In the project I work for, every time we have problems with the Crypto API is because the host don't have the high encryption pack installed (since we are using high encryption). Michel It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
          - TreeBeard

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups