Re: CryptAcquireContext returns ERROR_FILE_NOT_FOUND

From: tlviewer (tlviewerSHRUB_at_yahoo.CHENEY.com)
Date: 04/02/04


Date: Fri, 2 Apr 2004 11:46:58 -0800


"Jean Erasmus" <anonymous@discussions.microsoft.com> wrote in message news:3B597B3C-E9AD-49DF-9428-CB26B230E2FB@microsoft.com...
> Hi Ryan,
>
> Thanks for the advice. Do you maybe have source code for Visual Basic 6 for LoadUserProfile ?

In this group the language of choice is that of the SDK: VC.
Only rarely will you get support for using VB. Nevertheless I prefer to
use VB for most of my Crypto code.

For a good source of VB declares, including LoadUserProfile, see
http://www.activevb.de/rubriken/apiviewer/index-apiviewereng.html

hth,
tlviewer
>
> Regards,
>
> Jean Erasmus
>
> ----- Ryan Menezes [MSFT] wrote: -----
>
> As long as the profile is loaded it should work, alternately you can try
> creating keys using CRYPT_MACHINECONTEXT so that they are available even
> when profile is not loaded. As John suggested if you use LogonUser then do
> an explicit LoadUserProfile
>
> --
> Thanks,
> Ryan Menezes [MS]
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
> "Jean Erasmus" <anonymous@discussions.microsoft.com> wrote in message
> news:7BCEF0AE-1E3D-455A-BA9C-6C769FDE5CF5@microsoft.com...
> > Hi John,
> >> I wasn't aware that my code needed to do a logon. I created a COM+
> application under COM+ services called Crypto. On the idenity tab I set the
> account under which the application will run to Administrator. The
> activation is set to a server application. Now surely this should work?
> >> Regards,
> >> Jean Erasmus
> >> ----- John Banes [MS] wrote: -----
> >> This error code typically means that the user profile has not been
> loaded.
> > Is your code doing a logon of the Administrator account and
> impersonating,
> > but forgetting to load the profile?
> >> Regards,
> > John Banes
> > [Microsoft Security Developer]
> >> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> > Please do not send email directly to this alias. This alias is for
> newsgroup
> > purposes only.
> >> "Jean Erasmus" <anonymous@discussions.microsoft.com> wrote in message
> > news:736F1B07-5C08-4D0C-AB70-FD3E55B045CE@microsoft.com...
> >> Hi There,
> >>> I have a VB6 COM object that calls the CryptoAPI. When I call
> > CryptAcquireContext I get an ERROR_FILE_NOT_FOUND. The COM
> application runs
> > as Administrator.
> >>> Can anybody help?
> >>> Regards,
> >> Jean Erasmus
> >>>



Relevant Pages

  • Re: "Classic logon" screen in XP does not remeber the user name
    ... Could John have just copied the Administrator Desktop.ini ... file and pasted it in the new admin account? ... that you can access them fine in the profile you want to use them in. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: "Classic logon" screen in XP does not remeber the user name
    ... John N ... I can't help you much with PCAnyhwhere though I would suggest that you post ... that you can access them fine in the profile you want to use them in. ... my built-in Administrator account. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: "Classic logon" screen in XP does not remeber the user name
    ... trying access as a regular user account or administrator, ... John N ... that you can access them fine in the profile you want to use them in. ... my built-in Administrator account. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: "Classic logon" screen in XP does not remeber the user name
    ... John N ... that you can access them fine in the profile you want to use them in. ... just temporarily] another user account that is also an administrator ... and log onto a workstation, that workstation immediately goes to a ...
    (microsoft.public.windowsxp.security_admin)
  • Re: SBS.RWW Fatal Error
    ... Corrupted administrator user profile on SBS ... Recreate a new profile for administrator on SBS: ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)