Re: CryptAcquireContext _sometimes_ fails with NTE_PROVIDER_DLL_FA

From: Stephan Keil (Stephan.Keil_at_gmx.de)
Date: 11/24/05


Date: Thu, 24 Nov 2005 21:58:26 +0100


> Are you saying that just the Windows API function LoadLibrary("rsaenh.dll")
> fails in your target application but succeeds in other (simpler) applications
> (on your Windows Server 2003 system)?

Exactly. And, it also succeeds if I connect a remote debugger to the
application.

> That sounds quite strange...

Yes, indeed :-o
Currently I have no idea how to further elaborate on that problem.
I checked with the SysInternals tools filemon (file accesses), regmon
(registry accesses) and processexplorer (loaded dlls and handles)
and compared the accesses of a succeeding run (with debugger or
simple application) and a failing run. I see no anomalities.

Where I could need a hint is
- As it works in debugger: what does the debugger do with the
   debugged process? (e.g. does it change the security context?
   or some other things of the process environment?)
- Why does it work in a simpler application? I checked e.g. (with
   processexplorer) that the favourite base address of the DLL
   and all its (static) dependencies are still available right
   before the LoadLibary call!

And I am worried about the Microsoft article, because it raises
the probability that the problem is inside the operating
system (although the hot fix didn't help).

- Stephan



Relevant Pages

  • Re: Read a file in driver
    ... the data isn't present in the buffer or something? ... bytes from the file (which probably always succeeds :-). ... debugger and a reletively hard thing to find via code inspection. ...
    (microsoft.public.development.device.drivers)
  • Re: HeapSetInformation always fails
    ... It is also failing when I launch outside the debugger. ... I have my app pop a ... message box to report if it ever succeeds, ...
    (microsoft.public.win32.programmer.kernel)
  • Re: How to make my own symbol file for VS.NET debugger?
    ... I tried ProcessExplorer, but it showed the loaded pdbs in devenv process ... My remote machine is a VmWare XP ... hosted by my machine which runs the VS.NET debugger. ...
    (microsoft.public.vc.debugger)
  • Re: Disable Ad-Hoc connections via the command line
    ... Any case wzc*.dll loaded not by svchost, ... wireless cpl, the functions are MSFT proprietary and not documented but ... Debugger will help to see what it is *doing*. ... ProcessExplorer is more than enough. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Disable Ad-Hoc connections via the command line
    ... I referring to cases when it's usefull to set breakpoint on ... use debugger or disassembler, not ProcessExplorer. ... Debugger will help to see what it is *doing*. ... ProcessExplorer is more than enough. ...
    (microsoft.public.win32.programmer.networks)