🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

get dll path

#1795
From: Fabi�n
Date: Thu, 08 Jul 2004 17:36
23 lines
1663 bytes
hi!

I' have a little problem.
I have made a isapi that returns wap pages.  Tis application reads a ini
file that is usually allocated in c:\winnt.
I have to add a new function to the application so it has to write in that
ini file,  but the usser of the internet information server don't have the
rights to write in that folder.  So I decided to put the ini file in the
same path of the dll, but I can't figure the way to get the path of the dll.
All I get is the path of  dllhost.exe.  (Application->ExeName)

I found an example in delphi, but i can't translate it to C++ Builder
because I don't know what is "hInstance"

var
  szFileName: array[0..MAX_PATH] of Char;
  DirStr : string;
begin
  GetModuleFileName(hInstance, szFileName, MAX_PATH);
  DirStr := ExtractFilePath(szFileName);


Ca you help me?
Technical Details
Message-ID: <40ed8609$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,319a966748b9038a,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Reply-To: "Fabi�n" <fabianfierro@hotmail.com>
From: "Fabi�n" <fabianfierro@hotmail.com>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: get dll path
Date: Thu, 8 Jul 2004 14:36:57 -0300
Lines: 25
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: <40ed8609$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1089308169 200.68.64.9 (8 Jul 2004 10:36:09 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail