From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26586 invoked by alias); 23 Apr 2004 05:45:17 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 26577 invoked from network); 23 Apr 2004 05:45:15 -0000 Received: from unknown (HELO pmff.de) (217.160.223.88) by sources.redhat.com with SMTP; 23 Apr 2004 05:45:15 -0000 Received: from mabels.dyndns.org (p213.54.105.148.tisdip.tiscali.de [213.54.105.148]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by pmff.de (Postfix) with ESMTP id EF1448405C for ; Fri, 23 Apr 2004 07:45:14 +0200 (CEST) Received: from minimax.abels.adviser.com ([192.168.74.27] helo=adviser.com) by mabels.dyndns.org with esmtp (Exim 4.32; FreeBSD) id 1BGtUw-00091y-6L for pthreads-win32@sources.redhat.com; Fri, 23 Apr 2004 07:45:14 +0200 Message-ID: <4088AD69.2010508@adviser.com> Date: Fri, 23 Apr 2004 05:45:00 -0000 From: Meno Abels User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) MIME-Version: 1.0 To: pthreads-win32@sources.redhat.com Subject: pthread library static linking Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004/txt/msg00041.txt.bz2 hello, i'am new here so one question is allowed-:) I want to use pthread-win32 not as a dll. I want to link the pthread-win32 functionality static to my application just to make distribution of that application easier. So that is quite easy to get, but there are the DllMain. In DllMain you use the DLL_THREAD_ATTACH/DLL_THREAD_DETACH. These prevents to use your lib static linked. Not technical but functional. The DLL_PROCESS_ATTACH/DETACH is simple to simulate infact I will call it on startup and end of my application direct. The thread stuff is more complex i have to change the thread create and thread exit code of your library. My basic question is why you choose this solution with DllMain. The pthread library is a wrapper around the windows functions so it would be obvious to add the needed initialisation for the create and exit directly. Why is this done with DllMain? Thanks in advance meno