PDA

View Full Version : Is there a way to get the exact AviSynth's version number installed on a system?


jonny
3rd October 2005, 16:30
Is there a way to get the exact AviSynth's version number installed on a system?
:confused:

unskinnyboy
3rd October 2005, 17:02
Version() (http://www.avisynth.org/Version)

jonny
3rd October 2005, 17:07
and after, implement an ocr to get the numbers ... :)
i mean with code

Amnon82
3rd October 2005, 18:14
You have to readout the versions number of C:\WINDOWS\System32\AviSynth.dll

jonny
3rd October 2005, 18:20
yep thanks, i've found the api functions:

GetFileVersionInfoSize
GetFileVersionInfo
VerQueryValue

(and probably LoadLibrary / GetModuleFileName to be sure of the AviSynth path)

so many calls to get a simple number! :devil:

Amnon82
5th October 2005, 13:28
Yes sometimes it is harder as you think.

esby
10th October 2005, 10:25
link directly to the avs api and use the getversion() method with a dummy clip.
(for c++, link directly, for delphi use asif.dll)


esby

jonny
10th October 2005, 10:45
The problem with GetVersion is that returns only AVISYNTH_INTERFACE_VERSION, not the exact version number (at least this seems to me, with a fast look at AviSynth's sources).
Am i wrong?

esby
10th October 2005, 11:30
That's right, it will only return 2. (or 3 sometimes ^^;)
Probably the windows api function you found out can solve what you described.

Or looking on the version() associated code

AVSValue __cdecl Create_Version(AVSValue args, void*, IScriptEnvironment* env) {
return Create_MessageClip(AVS_VERSTR
"\n\xA9 2000-2005 Ben Rudiak-Gould, et al.\n"
"http://www.avisynth.org",
-1, -1, VideoInfo::CS_BGR24, false, 0xECF2BF, 0, 0x404040, env);
}


Now I don't know if that variable/constant (AVS_VERSTR) can be accessed by an external plugin.

esby

jonny
10th October 2005, 11:43
yep i've already solved with GetFileVersionInfo, thank you anyway for the interest :)

Amnon82
11th October 2005, 19:00
Good to hear that you got it ;)