🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Does a DLL know its own path?

#17266
From: Remy Lebeau (TeamB)
Date: Tue, 01 Apr 2003 18:46
13 lines
1366 bytes
"nicolasr" <nicolasrNOSPAMATSIGNgmx.net> wrote in message
news:3e89a8e5$1@newsgroups.borland.com...

> I'm writing a pure WinAPI DLL. Is there a way from
> within the DLL to get at the path of the DLL ?

Look at the GetModuleFileName() and related functions.  You will have to
retreive the DLL's own module handle, don't use NULL as that will return the
calling application's filename instead.


Gambit
Technical Details
Message-ID: <3e89de70$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3e89a8e5$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,9b751bad45db0bc8
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-04-01 10:54:49 PST
From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3e89a8e5$1@newsgroups.borland.com>
Subject: Re: Does a DLL know its own path?
Date: Tue, 1 Apr 2003 10:46:08 -0800
Lines: 16
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 207.175.226.26
Message-ID: <3e89de70$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1049222768 207.175.226.26 (1 Apr 2003 10:46:08 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news-out.visi.com!petbe.visi.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail