Article View: borland.public.cppbuilder.internationalization
Article #95Re: Resurce DLLs in a subfolder
From: Peter
Date: Tue, 15 Nov 2005 12:57
Date: Tue, 15 Nov 2005 12:57
66 lines
3608 bytes
3608 bytes
Well ..
That's not how I do it.
In fact I didn't even know it could be done this automated.
I have the user select a language (or have the code do it for him based on
installer for instance)
My language dlls *are* in a different directory.
I simply load the dll of my choice and pass the handle to my own LoadString
function, yet I believe you can just as easily use this function then :
int LoadString(
HINSTANCE hInstance, // handle of module containing string resource
UINT uID, // resource identifier
LPTSTR lpBuffer, // address of buffer for resource
int nBufferMax // size of buffer
);
Peter
-------------------------------------------------------
"Alan Bellingham" <alanb@episys.com> wrote in message
news:bfjhn15ljo4kp5bc63fg5g8h2mg01vf9pm@4ax.com...
> 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:
<4379db02@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.superfeed.net!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> <bfjhn15ljo4kp5bc63fg5g8h2mg01vf9pm@4ax.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10297d,85baf43614268ac1 X-Google-Attributes: gid10297d,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Peter" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net> From: "Peter" <Will_Bounce_So_Use_My_First_Name@Smart-Projects.net> Newsgroups: borland.public.cppbuilder.internationalization References: <437780fe@newsgroups.borland.com> <43789416$1@newsgroups.borland.com> <4378c0f0@newsgroups.borland.com> <4378c3fa$1@newsgroups.borland.com> <bfjhn15ljo4kp5bc63fg5g8h2mg01vf9pm@4ax.com> Subject: Re: Resurce DLLs in a subfolder Date: Tue, 15 Nov 2005 13:57:21 +0100 Lines: 68 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 x-mimeole: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 81.82.41.210 Message-ID: <4379db02@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1132059394 81.82.41.210 (15 Nov 2005 04:56:34 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.superfeed.net!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail