🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #1799

Re: get dll path

#1799
From: Remy Lebeau (TeamB)
Date: Thu, 08 Jul 2004 20:50
30 lines
1630 bytes
"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: <40edb36b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!news.cambrium.nl!news.cambrium.nl!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <40ed8609$1@newsgroups.borland.com> <40ed8f41$1@newsgroups.borland.com> <40ed9170$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,319a966748b9038a
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII
From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com>
Newsgroups: borland.public.cppbuilder.internet.web
References: <40ed8609$1@newsgroups.borland.com> <40ed8f41$1@newsgroups.borland.com> <40ed9170$1@newsgroups.borland.com>
Subject: Re: get dll path
Date: Thu, 8 Jul 2004 13:50:15 -0700
Lines: 32
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: 68.69.17.10
Message-ID: <40edb36b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089319787 68.69.17.10 (8 Jul 2004 13:49:47 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!news.cambrium.nl!news.cambrium.nl!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail