delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
From: | Klemen Zagar <klemen DOT zagar AT ijs DOT si> |
Date: | Wed, 21 Jun 2000 08:42:28 GMT |
Message-ID: | <20000621.8422849@mis.configured.host> |
Subject: | DLL initialization problem |
To: | cygwin AT sourceware DOT cygnus DOT com |
X-Mailer: | Mozilla/3.0 (compatible; StarOffice/5.1; Win32) |
X-Priority: | 3 (Normal) |
MIME-Version: | 1.0 |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id EAA31945 |
I am trying to build a DLL with cygwin gcc that would work with non-cygwin executables (e.g., those built with Inprise Delphi). I presume that I have to somehow initialize the cygwin DLL before using memory allocation and I/O functions from my DLL, but I do not know how to do that. Here's what I've tried so far: - With May 2000 version of cygwin1.dll, I've put a call to cygwin_crt0(main function = NULL) in the DLL's entry point. Everything blocked when the DLL was loaded. - With May 2000 version of cygwin1.dll, I've put a call to cygwin_attach_dll(handle, main = NULL) in DLL's entry point. Malloc crashed anyway as if I hadn't done that. - With June 2000 version of cygwin1.dll I've put a call to cygwin_dll_init() in DLL's entry point. Everything blocked when the DLL was loaded. Here is how the last DLL entry point looks like: __attribute__((stdcall)) int dll_entry(int handle, int reason, void *ptr) { if(reason == DLL_PROCESS_ATTACH) { cygwin_dll_init(); // ...doesn't return... } return 1; } So... what is the right way to initialize the cygwin DLL (before I try out all its functions) :-) Regards and thank you in advance, Klemen. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |