secur32.dll not present on winnt 4.0 sp 5

egor duda
Mon May 14 11:32:00 GMT 2001


Monday, 14 May, 2001 Corinna Vinschen wrote:

CV> On Mon, May 14, 2001 at 06:36:42PM +0400, egor duda wrote:
>> Monday, 14 May, 2001 Corinna Vinschen wrote:
>> CV> On Mon, May 14, 2001 at 05:41:43PM +0400, egor duda wrote:
>> >> for now, is it possible to conditionalize LSA stuff so that it has
>> >> been called only if secure32.dll is available?
>> CV> I have just checked in a patch. Could you please try if that
>> CV> works for you? It tests whether Secur32.dll could be loaded
>> CV> or not.
>> doesn't it fire api_fatal () in std_dll_init if LoadLibrary fails?

CV> No. The symbols are loaded with LoadDLLfuncEx(name, n, dllname, notimp)
CV> with notimp set to 1. That results in the call returning 0 and 
CV> GetLastError is set to ERROR_PROC_NOT_FOUND. I'm now checking for
CV> that and returning INVALID_HANDLE then.

no, the problem is not with LoadDllFuncEx(), but with LoadDllInit()

here's (a bit formatted) fragment from autoload.ii:

HANDLE __attribute__((section(".data_cygwin_nocopy"))) secur32_handle = __null ;
  LONG __attribute__((section(".data_cygwin_nocopy"))) secur32_here = -1L;
  int   secur32_init ()
  __asm__ ("secur32_init");
    return std_dll_init (  secur32_handle, "secur32.dll",   secur32_here) ;
__asm__ (".section .data_cygwin_nocopy,\"w\"");
__asm__ ("secur32_init_holder: .long secur32_init_and_load");
__asm__ (".text");
__asm__ ("secur32_init_and_load:");
__asm__ ("movl $cygwin_dll_func_load, secur32_init_holder");
__asm__ ("call secur32_init"); ;
__asm__ ("jmp cygwin_dll_func_load"); 

so, std_dll_init is being called and when it fails to find dll, it calls

the problem is not that some functions are not available from dll, but
dll itself is not available.

Egor.   ICQ 5165414 FidoNet 2:5020/496.19

More information about the Cygwin-developers mailing list