Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com Date: Mon, 14 May 2001 22:29:43 +0400 From: egor duda X-Mailer: The Bat! (v1.45) Personal Reply-To: egor duda Organization: deo X-Priority: 3 (Normal) Message-ID: <32565739.20010514222943@logos-m.ru> To: cygdev Subject: Re: secur32.dll not present on winnt 4.0 sp 5 In-reply-To: <20010514181527.U5386@cygbert.vinschen.de> References: <72348772478 DOT 20010514174143 AT logos-m DOT ru> <20010514161552 DOT B29465 AT cygbert DOT vinschen DOT de> <132352071682 DOT 20010514183642 AT logos-m DOT ru> <20010514181527 DOT U5386 AT cygbert DOT vinschen DOT de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! Monday, 14 May, 2001 Corinna Vinschen vinschen AT redhat DOT com wrote: CV> On Mon, May 14, 2001 at 06:36:42PM +0400, egor duda wrote: >> Monday, 14 May, 2001 Corinna Vinschen vinschen AT redhat DOT com 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 api_fatal(). the problem is not that some functions are not available from dll, but dll itself is not available. Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19