Bir programın sürüm bilgisini almak

procedure versionbul(const AppName: string;
var V1, V2, V3, V4: Word);
var
VerInfoSize,
VerValueSize,
Dummy : DWORD;
VerInfox : Pointer;
VerVal : PVSFixedFileInfo;
begin
VerInfoSize := GetFileVersionInfoSize(PChar(AppName), Dummy);
GetMem(VerInfox , VerInfoSize);
GetFileVersionInfo(PChar(AppName), 0, VerInfoSize, VerInfox);
VerQueryValue(VerInfox, ‘\’, Pointer(VerVal), VerValueSize);
with VerVal^ do
begin
V1 := dwFileVersionMS shr 16;
V2 := dwFileVersionMS and $FFFF;
V3 := dwFileVersionLS shr 16;
V4 := dwFileVersionLS and $FFFF;
end;
FreeMem(VerInfox, VerInfoSize);
end;

procedure verbul.Button2Click(Sender: TObject);
var v1, v2, v3, v4: word;
begin
GetBuildInfo(‘C:\windows\notepad.exe’, v1, v2, v3, v4);
edit1.text:= Format(‘%d.%d.%d.%d’, [V1, V2, V3, V4]);
end;

One thought on “Bir programın sürüm bilgisini almak

  1. Sorry for my bad english. Thank you so much for your good post. Your post helped me in my college assignment, If you can provide me more details please email me.

Bir cevap yazın