CryptAcquireContext Fails in Windows 98

From: Agnihotri (anonymous_at_discussions.microsoft.com)
Date: 05/27/04


Date: Thu, 27 May 2004 04:46:03 -0700

Hi,
I have made the ATL COM component which uses CriptoAPI. The component is developed in Windows 2000 and is functional.
When i use the same component in Windows 98 the CriptoAPI function "CryptAcquireContext" fails???
I have used the function is following way

if(!CryptAcquireContext(&hCryptProv,NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, 0))
{
         if(!CryptAcquireContext(&hCryptProv,NULL, MS_ENHANCED_PROV, PROV_RSA_FULL, CRYPT_NEWKEYSET))
         {
               return E_FAIL;
          }
}

Please help me out.....
Thank You



Relevant Pages

  • Re: Vb to c++ code conversion (SHDocVw)
    ... going to be the case with the shell though - IIRC the shell ... I'd say forgoing ATL is a minor ... Microsoft MVP, MCSD ... called evrytim a shell windows was created ...
    (microsoft.public.vc.language)
  • Re: Vb to c++ code conversion (SHDocVw)
    ... I'm not familiar with the shell - that's why I advised you to ... As for ATL - you don't need it to ... 'callback function that gets winShell events - this function should be ... called evrytim a shell windows was created ...
    (microsoft.public.vc.language)
  • Re: Vb to c++ code conversion (SHDocVw)
    ... ask in the shell group. ... As for ATL - you don't need it to ... 'callback function that gets winShell events - this function should ... called evrytim a shell windows was created ...
    (microsoft.public.vc.language)
  • Re: Vb to c++ code conversion (SHDocVw)
    ... The ATL group is: ... 'callback function that gets winShell events - this function should be ... called evrytim a shell windows was created ... I could not find any code that does it without MFC or COM. ...
    (microsoft.public.vc.language)
  • Re: Vb to c++ code conversion (SHDocVw)
    ... Consider posting in the shell group: ... The ATL group is: ... 'callback function that gets winShell events - this function should be ... called evrytim a shell windows was created ...
    (microsoft.public.vc.language)