Article View: borland.public.cppbuilder.internet.web
Article #1806Re: get dll path
From: Fabi�n
Date: Mon, 12 Jul 2004 13:04
Date: Mon, 12 Jul 2004 13:04
38 lines
1863 bytes
1863 bytes
Thanks a lot !!!!
=)
"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> escribi� en el
mensaje news:40edb36b@newsgroups.borland.com...
>
> "Fabi�n" <fabianfierro@hotmail.com> wrote in message
> news:40ed9170$1@newsgroups.borland.com...
>
> > That works.... but I don't know how to pass
> > that information to the Unit2.cpp
>
> One way it to simply declare dllpath as 'extern' in Unit2, ie:
>
> --- MyDll.cpp ---
>
> char dllpath[MAX_PATH+1];
>
> int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void*)
> {
> if( reason == DLL_PROCESS_ATTACH ) {
> GetModuleFileName(hinst, dllpath, MAX_PATH);
> //...
> }
> }
>
>
> --- Unit2.cpp ---
>
> extern char dllpath[];
>
> // use dllpath as needed...
>
>
> Gambit
>
>
Technical Details
Message-ID:
<40f28bf6@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<40ed8609$1@newsgroups.borland.com> <40ed8f41$1@newsgroups.borland.com> <40ed9170$1@newsgroups.borland.com> <40edb36b@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,319a966748b9038a X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII Reply-To: "Fabi�n" <fabianfierro@hotmail.com> From: "Fabi�n" <fabianfierro@hotmail.com> Newsgroups: borland.public.cppbuilder.internet.web References: <40ed8609$1@newsgroups.borland.com> <40ed8f41$1@newsgroups.borland.com> <40ed9170$1@newsgroups.borland.com> <40edb36b@newsgroups.borland.com> Subject: Re: get dll path Date: Mon, 12 Jul 2004 10:04:09 -0300 Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 200.68.64.9 Message-ID: <40f28bf6@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1089637366 200.68.64.9 (12 Jul 2004 06:02:46 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail