JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
Is there a better way to Retrieve the "FileVersion" of my application in VB.Net other than using the WinAPI Call:
GetFileVersionInfo()
If not, how would I "Allocate" the Buffer to receive the data from that API DLL call.
Pascal Version would be done something like this:
From there I could use the VerQueryValue() or other such complicated API calls to retrieve the data, but in VB it is not so easy to manually allocate memory buffers for API calls.
I would definitely prefer a VB solution, and in all intents and purposes there should be a way for me to retrieve this information in VB.Net. I mean, in the Project Properties Page, under the Assembly Information, You can set the "File Version", so by all logical reasoning there should be a way to Get the same "File Version" when the EXE is running.
PS - Just so people know, this is NOT the information found in:
My.Application.Info.Version
that is the "Assembly Version", not the "File Version".
Thanks
GetFileVersionInfo()
If not, how would I "Allocate" the Buffer to receive the data from that API DLL call.
Pascal Version would be done something like this:
VB.NET:
var Size: Integer;
var P: Pointer;
begin
Size:=GetFileVersionInfoSize();
P:=AllocMem(Size)
GetFileVersionInfo(FileName, 0, Size, P^);
end;
I would definitely prefer a VB solution, and in all intents and purposes there should be a way for me to retrieve this information in VB.Net. I mean, in the Project Properties Page, under the Assembly Information, You can set the "File Version", so by all logical reasoning there should be a way to Get the same "File Version" when the EXE is running.
PS - Just so people know, this is NOT the information found in:
My.Application.Info.Version
that is the "Assembly Version", not the "File Version".
Thanks