Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: Nousiainen To: cygwin AT cygwin DOT com Date: Thu, 06 Jun 2002 16:36:52 +0300 X-Priority: 3 (Normal) Reply-To: am DOT nousiainen AT pp DOT inet DOT fi Message-Id: Subject: LoadLibrary("pdh.dll") in WinXP causes segmentation fault MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" So, my problem is that when I try to load pdh.dll using LoadLibrary function (using the newest 1.3.10 cygwin) it causes a segmentation fault (not when running the function, but a bit later, which is also weird). When debugging the program, which loads the dll, with gdb, gdb crashes with an error message when executing LoadLibrary. (exact error message: Lowest section in /cygdrive/c/WINDOWS/ System32/odbcint.dll is .rsrc at 1f851000) I've been able to produce this error only by loading pdh.dll (loading any other dll has succeeded so far). For those who don't know, pdh.dll provides some nice monitoring (cpu usage, disk access, network, etc.) functions. What am I doing wrong, or is there a bug in cygwin dlls? Has that odbcint.dll something to do with this? The code, that produces the fault: ... int main(int iArgCount, char *lpszArgument[]) { HINSTANCE hpdhLib; hpdhLib = LoadLibrary("pdh.dll"); // gdb stops and crashes here... every single time if (hpdhLib == NULL) return 0; printf("Err: %d\n", GetLastError()); ... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/