Article View: borland.public.cppbuilder.nativeapi
Article #9236Re: LoadLibrary() weird behaviour
From: Miguel Gimenez
Date: Mon, 19 Jul 2004 19:30
Date: Mon, 19 Jul 2004 19:30
28 lines
2167 bytes
2167 bytes
"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> escribi� en el
mensaje news:40fc175d$1@newsgroups.borland.com...
>
> What were your EXACT steps to make the DLL? Did you static link any
> dependancies the DLL may have internally? My guess would be that you did
> not, and LoadLibrary() is failing because the DLL is itself failing to
find
> another file that it needs.
The original DLL called SetWindowsHookEx, the maping functions for shared
memory and others. The DLL worked OK under the IDE, failed when the calling
program was executed outside the IDE. The program was compiled without
packages.
Then I created a new DLL using File->New->DLL, then in the wizard I selected
C language, Multithreaded, No VCL. The IDE created a DLL template with
DLLEntryPoint() returning 1 and the usual switch(reason). I replaced the
problematic DLL with this and the LoadLibrary() gave the same problems.
I tried again with C++, No multithreaded and other combinations. By the way,
please, tell me which is the most appropiate configuration for a system-wide
hook, as it only catched calling-program events.
The path is absolute, LoadLibrary("c:\\test.dll"). I also tried copying it
to c:\windows\system.
Best regards
Miguel Gim�nez
Technical Details
Message-ID:
<40fc2132@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40fc066a@newsgroups.borland.com> <40fc175d$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,c17dfc2eb3c7fd7b X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII From: "Miguel Gimenez" <nospam@solener.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <40fc066a@newsgroups.borland.com> <40fc175d$1@newsgroups.borland.com> Subject: Re: LoadLibrary() weird behaviour Date: Mon, 19 Jul 2004 21:30:44 +0200 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 80.26.84.238 Message-ID: <40fc2132@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1090265394 80.26.84.238 (19 Jul 2004 12:29:54 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail