🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #8932

Re: Odd LoadLibrary Failure

#8932
From: Bob Gonder
Date: Wed, 18 Aug 2004 01:11
18 lines
1586 bytes
Bob Gonder wrote:

>Remy Lebeau (TeamB) wrote:
>
>>> HMODULE Dll = LoadLibrary("SHELL32.DLL");
>>
>>You should never use LoadLibrary() to load SHELL32.DLL or KERNEL32.DLL.
>>They are already loaded automatically at program startup, so use
>>GetModuleHandle() instead.
>
>Shouldn't hurt any. But your way might be a tad faster.

Hmmm I can confirm Michael's claim that GetModuleHandle("shell32")
doesn't work.  At least not in a console app. It does, however return
a handle in a WinMain app.

I guess console apps aren't supposed to need the fancy stuff in
shell32.
Technical Details
Message-ID: <8na5i0liuibdkg0lishkqi60c1748j45qe@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <41228167$1@newsgroups.borland.com> <412289f4$1@newsgroups.borland.com> <lq85i05semfghu5opjgd34ceb5qbfu34k3@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,8d61921d2e5eb0c4
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Odd LoadLibrary Failure
Date: Tue, 17 Aug 2004 18:11:06 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <8na5i0liuibdkg0lishkqi60c1748j45qe@4ax.com>
References: <41228167$1@newsgroups.borland.com> <412289f4$1@newsgroups.borland.com> <lq85i05semfghu5opjgd34ceb5qbfu34k3@4ax.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 65.40.254.192
X-Trace: newsgroups.borland.com 1092791464 65.40.254.192 (17 Aug 2004 18:11:04 -0700)
Lines: 20
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail