Article View: borland.public.cppbuilder.internationalization
Article #92Re: Resurce DLLs in a subfolder
From: Alan Bellingham
Date: Mon, 14 Nov 2005 17:59
Date: Mon, 14 Nov 2005 17:59
42 lines
2524 bytes
2524 bytes
Hans Galema <notused@notused.nl> wrote: >Why ? Please show the code where you load the DLL. The code is this: There. Seriously - to get the program to use a resource DLL, you create a DLL, you give it the relevant file extension (e.g. ENG for English GB, ENU for English US, etc.), and you place it in the same directory as the executable. You do not write any code (not in the loading executable, anyway - you may want a stub DLL entry point in the DLL). You do not change any settings. It just does it. The downside of this is that the Borland-supplied code does the following: a) Finds own name b) Removes file extension (OCX, DLL, EXE, whatever) c) Finds locale code (ENG, whatever) d) Appends locale code to base name and attempt to load DLL e) If failed, tries with shortened locale name (e.g. EN) f) If failed, uses resources internal to original executable. It's nicely automatic, but I know of no way to tell it to go look in a different directory - though why you would want to, I'm not sure. I can see ways to switch which resource DLL is used on the fly, but not where to go for them. Alan Bellingham Chief Software Developer -- Tel: +44 (0) 1763 248866 Fax: +44 (0) 1763 246000 Email: alanb@episys.com Web: www.episys.com UK Office: Episys Ltd, Newark Close, Royston, Hertfordshire, SG8 5HL, UK North America Office: Episys, 200 South Wacker Drive, Suite 3100, Chicago, IL 60606, USA
Technical Details
Message-ID:
<bfjhn15ljo4kp5bc63fg5g8h2mg01vf9pm@4ax.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<437780fe@newsgroups.borland.com> <43789416$1@newsgroups.borland.com> <4378c0f0@newsgroups.borland.com> <4378c3fa$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10297d,85baf43614268ac1 X-Google-Attributes: gid10297d,public X-Google-Language: ENGLISH,ASCII-7-bit From: Alan Bellingham <alanb@episys.com> Newsgroups: borland.public.cppbuilder.internationalization Subject: Re: Resurce DLLs in a subfolder Date: Mon, 14 Nov 2005 17:59:17 +0000 Reply-To: alanb@episys.com Message-ID: <bfjhn15ljo4kp5bc63fg5g8h2mg01vf9pm@4ax.com> References: <437780fe@newsgroups.borland.com> <43789416$1@newsgroups.borland.com> <4378c0f0@newsgroups.borland.com> <4378c3fa$1@newsgroups.borland.com> X-Newsreader: Forte Agent 3.1/32.783 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 193.129.251.253 X-Trace: newsgroups.borland.com 1131991114 193.129.251.253 (14 Nov 2005 09:58:34 -0700) Lines: 42 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail