tried this.

void main()
{
 DWORD Egfv;
 DWORD gfvHandle;
 DWORD gfvLen = GetFileVersionInfoSize("d:\\d\\setup.exe", &gfvHandle);
 LPVOID lpData = new char[gfvLen];
 Egfv=GetFileVersionInfo("d:\\d\\setup.exe", gfvHandle, gfvLen, lpData);
 cout << lpData;
}

however, im running some compilation errors.

1>main.obj : error LNK2019: unresolved external symbol _getfileversionin...@16 
referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol 
_getfileversioninfosi...@8 referenced in function _main
1>C:\Users\gus\Documents\Visual Studio 2008\Projects\808\Debug\808.exe : fatal 
error LNK1120: 2 unresolved externals

gus




________________________________
From: Thomas Hruska <[email protected]>
To: [email protected]
Sent: Wednesday, February 11, 2009 12:57:33
Subject: Re: [c-prog] file properties


Gus Vincent Dato wrote:
> hi,
> 
> whats the syntax for retrieving file properties? 
> if you right click on a file then properties then details.. you could see 
> File Vesion, File Size, etc.
> i wanted to get those information.
> 
> thanks.
> 
> 
> Get your new Email address!
> Grab the Email name you&#39;ve always wanted before someone else does!
> http://mail. promotions. yahoo.com/ newdomains/ aa/

Various APIs are required. Tyler already pointed out the majority of 
the information. Here's version information:

http://msdn. microsoft. com/en-us/ library/ms647003 .aspx

Version information is actually stored inside a special resource type in 
the DLL/EXE resource table, which requires walking the NE/PE file 
formats. GetFileVersionInfo( ) gets at that information by doing all the 
hard work for you. It does get a bit hairy when you have to start 
fiddling with LCIDs (Locale IDs) to get at the info.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task. Stay on task.

http://www.CubicleS oft.com/MyTaskFo cus/





      Get your new Email address!
Grab the Email name you&#39;ve always wanted before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/

[Non-text portions of this message have been removed]

Reply via email to