Article View: borland.public.cppbuilder.nativeapi
Article #3744Re: GetFileVersionInfoSize for DLL
From: Ed Mulroy
Date: Wed, 03 May 2006 22:26
Date: Wed, 03 May 2006 22:26
25 lines
1694 bytes
1694 bytes
You might try this to get the DLL's file name and use the result for the parameter in the GetFileVersionInfoSize call. extern HINSTANCE _hInstance; char module_name[MAX_PATH + 1]; ::GetModuleFileName(_hInstance, module_name, sizeof(module_name)); . Ed > poojo hackma wrote in message > news:44592306$1@newsgroups.borland.com... > How do I get the DLL version information from within my DLL? > > I want to create a property that others can read to tell what version it > is. > > I tried > ::GetFileVersionInfoSize(ParamStr(0).c_str(), &dwHandle); > > and > > ::GetFileVersionInfoSize(Application->ExeName.c_str(), &dwHandle); > > Both give me the parent executable, not my DLL.
Technical Details
Message-ID:
<44592e21$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news.glorb.com!ecngs!feeder.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44592306$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,440901ce027e115d X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Ed Mulroy" <dont_email_me@bitbuc.ket> Newsgroups: borland.public.cppbuilder.nativeapi References: <44592306$1@newsgroups.borland.com> Subject: Re: GetFileVersionInfoSize for DLL Date: Wed, 3 May 2006 18:26:37 -0400 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 66.57.117.102 Message-ID: <44592e21$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1146695201 66.57.117.102 (3 May 2006 15:26:41 -0700) X-Authenticated-User: edmulroy Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!news.glorb.com!ecngs!feeder.ecngs.de!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail