PDA

View Full Version : More troubleshooting info to Version() ?


Fizick
26th November 2006, 07:57
A have a suggestion to add more troubleshooting info to Version() function:

1. Full path of plugins folder
2. Full pathname of active avisynth.dll

(Notes: they may be very long string, non-english, user may have restricted access, etc)

So we may not ask user to use registry editor, search harddrive for all avisynth.dll (from various packages, etc).

IMO it may be done in Avisynth v2.5.7 for easy comparing with next releases.

sh0dan
27th November 2006, 15:32
Couldn't it be exposed as a variable (or is it already?) - so that users can use MessageClip(_PluginDirectory_) or something similar.

Fizick
27th November 2006, 19:15
Thanks for info.
I never used messageclip (and did not know about it )!
MessageClip(versionstring) works OK.
So, it is quite equivalent option.
(I do not see any other string function besides Versionstring() in doc.)

But IMHO Version() is much more simple for novice user :)
And for us who will try help him.

buzzqw
27th November 2006, 19:49
@Fizick

i agree

BHH

Fizick
30th November 2006, 16:20
But how internally to get full pathname of active avisynth.dll ?

Richard Berg
1st December 2006, 09:20
http://msdn.microsoft.com/msdnmag/issues/02/06/debug/

vcmohan
2nd December 2006, 04:06
There is supposed to be a safe area wherein a plugin if needed can write in some info and that area will last till the life of the filter. Will it be possible for the info to display whats in that safe area?

Fizick
4th December 2006, 20:51
seems works:

AVSValue __cdecl Create_Version(AVSValue args, void*, IScriptEnvironment* env) {
char versionFull[2048];
strcat(versionFull, AVS_VERSTR
"\n\xA9 2000-2006 Ben Rudiak-Gould, et al.\n"
"http://www.avisynth.org");
strcat(versionFull, "\nPathName: ");
char dllpathname[512];
if(GetModuleFileName(GetModuleHandle("avisynth.dll"), dllpathname, 511))
strcat(versionFull, dllpathname);

strcat(versionFull, "\nPluginDir: ");
char * pluginDir;
try {
pluginDir = (char*)env->GetVar("$PluginDir$").AsString();
}
catch (...)
{
pluginDir = 0;
}
if (pluginDir)
strcat(versionFull, pluginDir);
return Create_MessageClip(versionFull,
// return Create_MessageClip(AVS_VERSTR
// "\n\xA9 2000-2006 Ben Rudiak-Gould, et al.\n"
// "http://www.avisynth.org",
-1, -1, VideoInfo::CS_BGR24, false, 0xECF2BF, 0, 0x404040, env);
}


but may be to add parameter?

Version(full=true)