www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/06/06/09:50:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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 <am DOT nousiainen AT pp DOT inet DOT fi>
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: <C9MG2V4YXUGBQPNIJHRMA0FYUQXVVU.3cff6574@turjake>
Subject: LoadLibrary("pdh.dll") in WinXP causes segmentation fault
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019