Article View: borland.public.cppbuilder.nativeapi
Article #14027Re: In Hell (LoadLibrary)
From: Bob Gonder
Date: Fri, 05 Sep 2003 16:46
Date: Fri, 05 Sep 2003 16:46
20 lines
1653 bytes
1653 bytes
David wrote:
> if (!dllWrapC.loadDll(gAppPath + "\\" + "GraphicStuff.dll", debug)) {
Don't like that method. What happens when gAppPath has a trailing
slash?
>bool DLL_Wrap::loadDll(std::string const & str, DebugOut & debug) {
> debug.textOutEnd("Attempting to load DLL.");
Would be better if you added str to that message so you could see
actual path.
> libHandleC = LoadLibrary(str.c_str());
> if (!libHandleC) { //LIBRARY FAILED TO LOAD
How about throwing in an if(FileExists(str.c_str())) and debug notice
of result?
If you can't load it, it might be because it isn't where the app
thinks it should be.
Technical Details
Message-ID:
<kpehlvcbkmohuqlahahql668h0hdkagjhd@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3F58A195.5000802@anonymous_one.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,4ba25b2fed50d3aa X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-05 09:52:57 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: In Hell (LoadLibrary) Date: Fri, 05 Sep 2003 09:46:18 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <kpehlvcbkmohuqlahahql668h0hdkagjhd@4ax.com> References: <3F58A195.5000802@anonymous_one.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.165.205 X-Trace: newsgroups.borland.com 1062780377 67.31.165.205 (5 Sep 2003 09:46:17 -0700) Lines: 22 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-05!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail