How to get a file version of an exe

If I right click on a file and select properties, I get a
window with a version tag that shows me the version of the
file.  How can I get that with code?  I have been looking at
the following window api call:

BOOL GetFileVersionInfo(LPCSTR lptstrFilename,
    DWORD dwHandle,
    DWORD dwLen,
    LPVOID lpData
);

Does anyone have some sample code that does this?  I always
get confused when trying to match arguments with windows api
and I'm not sure how to use this if this is even the right
way.

Thanks
0
Janice
9/18/2006 5:53:10 PM
sybase.powerbuilder.general 62418 articles. 19 followers. Follow

1 Replies
661 Views

Similar Articles

[PageSpeed] 36
Get it on Google Play
Get it on Apple App Store

> If I right click on a file and select properties, I get a
> window with a version tag that shows me the version of the
> file.  How can I get that with code?  I have been looking
> at the following window api call:
>
> BOOL GetFileVersionInfo(LPCSTR lptstrFilename,
>     DWORD dwHandle,
>     DWORD dwLen,
>     LPVOID lpData
> );
>
> Does anyone have some sample code that does this?  I
> always get confused when trying to match arguments with
> windows api and I'm not sure how to use this if this is
> even the right way.
>
> Thanks

I actually found and article on the sybase website
explaining it after I posted this.  Thanks Anyway!
0
Janice
9/18/2006 5:54:34 PM
Reply:

Similar Artilces:

Help on how to get Product Version and File Version on exe file
Hi All, Is there a way of getting the Product and File version of my pb application during runtime? Is there a pb function I can use or do I have to use an API function to do this? Currently using PB 9.0.1 Build 7171 Regards and Thanks, Willie ...

Get File Version from EXE File
hi folks how can i get the file version from a exe file. i need that information for a setup download website. best regards Philipp Use System.Diagnostics.FileVersionInfo.GetVersionInfo(path) to get the version info of a file.Hope this helps!Paul yes, thanks a lot :)...

How to get Product Version from .exe file properties?
We have been using .ini files to record the current version, but I would like to start using the properties on the .exe file, that can be set in the Project painter when I build. PB Help says this: "Version Specify your own values for the Description, Copyright, Company Name, Product Name, and Product Version fields associated with the executable file and with machine-code DLLs. These values display on the Version tab page of the Properties sheet for the file in Windows Explorer. You cannot change the File Version and Internal Name fields, which are used to identify the...

How can I call an exe file in web page (c#), and send
In a web page, (c#) How can I call an exe file ,and send - recive parameters from exe file client-side? that would be a massive security risk, so no. Signed ActiveX can do it, but it's expensive and not parrticularly trusted by the general populace RTFM - straight talk for web developers. Unmoderated, uncensored, occasionally unreadableJason Brown - MVP, IIS This may help YouCreate a console application using System; using System.Collections.Generic; using System.Text; namespace simpleadd { class Program { static void Main(string[] args) { ...

How i get the version info from any resource file (dll or exe)
Hello: How i get the version info from any resource file (dll or exe). The info is: File Description, Product Version, Company Name, Internal Name, Original Filename, Private Build, Special Build, Legal Copyright, Legal Trademarks, Language, Comments and OS. Thanks Diego Alvarez In article <u4Uo2mfk$GA.285@forums.sybase.com>, dlalvarez@altavista.net says... > Hello: > > How i get the version info from any resource file (dll or exe). The info is: > File Description, Product Version, Company Name, Internal Name, Original > Filename, Private Build,...

Help getting the EXE's copyright and product/file version
basically I want to get the values set in the project painter for the executable out. CopyRight product version file version How? I've done the following but that gets the PB version ContextInformation ci integer li_fixver, li_majver, li_minver string ls_vername, ls_name iapp_object.GetContextService ("ContextInformation", ci) if isnull(ci.getfixesversion( li_fixver)) then li_fixver = 0 if isnull(ci.getmajorversion( li_majver)) then li_majver = 0 if isnull(ci.getminorversion( li_minver)) then li_minver = 0 if isnull(ci.getversionname( ls_vername)) then ls_v...

superreview granted: [Bug 283628] Firefox .exe file reports incorrect version info : [Attachment 175585] Bump internal file versions for browser and mail
Brian Ryner (IBM) <bryner@brianryner.com> has granted Chase Phillips <cmp@mozilla.org>'s request for superreview: Bug 283628: Firefox .exe file reports incorrect version info https://bugzilla.mozilla.org/show_bug.cgi?id=283628 Attachment 175585: Bump internal file versions for browser and mail https://bugzilla.mozilla.org/attachment.cgi?id=175585&action=edit ...

superreview requested: [Bug 283628] Firefox .exe file reports incorrect version info : [Attachment 175585] Bump internal file versions for browser and mail
Chase Phillips <cmp@mozilla.org> has asked Brian Ryner (IBM) <bryner@brianryner.com> for superreview: Bug 283628: Firefox .exe file reports incorrect version info https://bugzilla.mozilla.org/show_bug.cgi?id=283628 Attachment 175585: Bump internal file versions for browser and mail https://bugzilla.mozilla.org/attachment.cgi?id=175585&action=edit ------- Additional Comments from Chase Phillips <cmp@mozilla.org> Still need to find where 1.7.5 / 2004110711 is coming from. Not sure yet. ...

File version of exe-file generated by PB
Is it possible to hardcode the File version (as seen under Properties of the exe-file) of the a generated exe-file? I.e. we do not want the PowerBuilder version number displayed, but our own. We are using version 7.0 of PowerBuilder. Regards, Vegard. No, you need a third party tool. The version field on the application compiler window is wrongly titled. It's actually the exe file's product version, not the file version. Someone mentioned they fixed this in PB9. "vegard" <vegard@timerecorderdata.no> wrote in message news:ebacQV3IDHA.187@forums...

Urgent: unable to get version information from powerbuilder 8 generated dll files
begin 644 getversioninfo.txt M=6QO;F<)9'=(86YD;&4-"G5L;VYG"61W3&5N9W1H#0IS=')I;F<);'-?=F5R M<VEO;FME>7-;,3)=(#T@>R`B4')O9'5C=$YA;64B+"`B4')O9'5C=%9E<G-I M;VXB+"`F#0H)"0DB3W)I9VEN86Q&:6QE;F%M92(L(")&:6QE1&5S8W)I<'1I M;VXB+"`B1FEL959E<G-I;VXB+"`F#0H)"0DB0V]M<&%N>4YA;64B+"`B3&5G M86Q#;W!Y<FEG:'0B+"`B3&5G86Q4<F%D96UA<FMS(BP@)@T*"0D)(DEN=&5R M;F%L3F%M92(L(")0<FEV871E0G5I;&0B+"`B4W!E8VEA;$)U:6QD(BP@(D-O M;...

Urgent: unable to get version information from powerbuilder 8 generated dll files
Hi, Wins2K/PB8 Version 8.0.1 Build 9056 After I built machine codes (DLLs) for my application, my codes (in attachment) could not get version information of those files. It failed after calling VerQueryValueA API. By the way, my local external functions are declared as followed: FUNCTION ulong GetFileVersionInfoSizeA( REF string lpFilename, REF ulong lpdwHandle ) LIBRARY "version.dll" FUNCTION boolean GetFileVersionInfoA( REF string lpFilename, REF ulong lpdwHandle, ulong dwLen, REF string lpData ) LIBRARY "version.dll" FUNCTION boolean VerQueryValueA(...

How to get the load address of the .net executable file(exe file) ?
hello: I am reading an article about .net(Rewrite MSIL Code on the Fly with the .NET Framework Profiling API)from msdn, http://msdn.microsoft.com/msdnmag/issues/03/09/NETProfilingAPI/ ,but i have some trouble about it . it said : If you added the method's RVA to the load address (the address where the executable file for the "Hello World!" assembly was loaded), you would see a memory dump layout similar to the one shown in Figure 3. On my machine, the load address was 0x06EA1000, I want to know : how can i get the load address of the exe file on my machine?is there s...

How to get file version?
I read in a <filename> but I don't know how get the file version out of the file. It seems Perl stat() doesn't work this way. Anybody knows what Perl function or module will work? Thanks, HL Ha Le wrote: > I read in a <filename> but I don't know how get the file version out of > the file. It seems Perl stat() doesn't work this way. Anybody knows what > Perl function or module will work? > what file version do you refer to? david Could you be more specific about what you mean by "version"? You mean for an executable...

Getting file version
I want to get the version of a file Here's what I have in the Global External Functions Function long GetFileVersionInfoSize (string lptstrFilename, long lpdwHandle) Library "version.dll" Alias for "GetFileVersionInfoSizeA" and here's what I have in a button in an empty window long ll_dummy = 0, ll_size = 0 string ls_file = "C:\MyFile.EXE" ll_size = GetFileVersionInfoSize (ls_file, ll_dummy) messagebox(string(ll_size), "") ll_size always = 0 no matter what. When I try the same code in Microsoft Access, it works perfect...

Web resources about - How to get a file version of an exe - sybase.powerbuilder.general

Authorized King James Version - Wikipedia, the free encyclopedia
The title page to the 1611 first edition of the Authorized Version Bible by Cornelis Boel shows the Apostles Peter and Paul seated centrally ...

Clive Palmer isn't singing the blues, it's a pretty ragged version of Jingle Bells
Clive Palmer might have needed a little Christmas cheer after a week that has left his corporate reputation in tatters. We have just the tonic: ...

Review: Can the BrydgeMini keyboard for the iPad mini live up to the full size version?
... end, becoming my daily driver for my iPad Air 2. Brydge has two models for the smaller iPad, one for the iPad mini 1/2/3 and a second version ...

Apple seeds the first beta version of iOS 9.2.1 to registered developers
A little more than a week after introducing iOS 9.2 to the general public , Apple has just seeded the first beta version of iOS 9.2.1. to registered ...

2017 Mercedes-Benz SLC features AMG version with turbo V6
Filed under: Mercedes-Benz , Convertible , Luxury As part of the revamp of the entire Mercedes-Benz lineup, a heavily revised 2017 Mercedes-Benz ...

Most Android devices run an outdated OS version
More than 80 percent of Android devices are running an outdated version of the operating system. Those are the results of an inquiry among users ...

‘Doom’ creators made a PC version of Super Mario Bros. 3 in 1990, here’s what it looked like
Though the original Super Mario Bros. is arguably the most iconic video game ever released, Super Mario Bros. 3 remains a classic in its own ...

Titus Andronicus announce tour with Craig Finn, release "Grandma-friendly" version of "Fired Up" for ...
photo: Patrick Stickles at Webster Hall earlier this month (more by Amanda Hatfield) Titus Andronicus have announced a 2016 tour in continued ...

Microsoft is making a custom version of Windows 10 for the Chinese government
Microsoft is working with the Chinese government to make a custom version of Windows 10, according to a blog post . The software will be used ...

Pepsi Is Planning To Launch An Organic Version Of Gatorade Next Year
... But Pepsi wants to change how customers view Gatorade with a flying leap onto the healthy trend bandwagon, by introducing an organic version ...

Resources last updated: 12/18/2015 8:37:59 PM