🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: GetModuleFileName problem

#14128
From: Yahia El-Qasem
Date: Thu, 28 Aug 2003 00:07
13 lines
1277 bytes
try

char buff[513];
memset ( buff,0x00, 513 );
GetModuleFileName ( HInstance, buff, 512 );

HInstance is a global variable representing the module handle of the app or
DLL your code is part of... should give you always the full path to the
really running file...

for it always worked !

Yahia
Technical Details
Message-ID: <3f4d484b@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3f4d1e9e@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,a9f30fdc93d98f91
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-08-27 17:11:51 PST
Reply-To: "Yahia El-Qasem" <Yahia.El-Qasemno.spam@mgh.metro-ag.de>
From: "Yahia El-Qasem" <Yahia.El-Qasem@mgh.metro-ag.de>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f4d1e9e@newsgroups.borland.com>
Subject: Re: GetModuleFileName problem
Date: Thu, 28 Aug 2003 02:07:50 +0200
Lines: 15
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 80.133.53.32
Message-ID: <3f4d484b@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1062029387 80.133.53.32 (27 Aug 2003 17:09:47 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail