Page 2 of 3

Re: 'Bad license' message appeared suddenly

Posted: Thu Jun 28, 2018 9:58 am
by DmitryKz
Don, you will not believe, but after installing this test library I received such a message in VirtualDub
Image
I copied license.txt into this path and voila — it's all OK, script is loaded successfully.

Re: 'Bad license' message appeared suddenly

Posted: Thu Jun 28, 2018 10:13 am
by admin
I believe it because when everything else has been eliminated...

Is there a copy of DGDecodeNV.dll in that path? If not, we need to investigate further.

Re: 'Bad license' message appeared suddenly

Posted: Thu Jun 28, 2018 10:39 am
by DmitryKz
Don, you're right.
In my operating system a couple of years ago the path to the folder with the AviSynth plug-ins was registered. In this folder with plug-ins was also the old library DGDecodeNV.dll with the modification date from 2013.
Now I deleted this library and the current DGDecodeNV.dll from June 27 of this year works correctly with dgi-file in my avs-script and VirtualDub, MeGui etc.
It seemed a little strange to me that when the direct path to DGDecodeNV.dll was specified with LoadPlugin(), the license file was searched in a completely different path. What, apparently, was not in version 2052, which, as I mentioned, the script was loaded right away.
In any case, thank you very much for your quick response and quick help. Without your test library, I would never have found the reason for why my avs-scripts is not working.

Re: 'Bad license' message appeared suddenly

Posted: Thu Jun 28, 2018 10:42 am
by admin
DmitryKz wrote:
Thu Jun 28, 2018 10:39 am
It seemed a little strange to me that when the direct path to DGDecodeNV.dll was specified with LoadPlugin(), the license file was searched in a completely different path. What, apparently, was not in version 2052, which, as I mentioned, the script was loaded right away.
Glad to be helpful, but still I like to get to the root of the problem. An explicit load should not result in a different DLL being loaded. I will test if that happens for me and report back shortly.

Re: 'Bad license' message appeared suddenly

Posted: Thu Jun 28, 2018 11:07 am
by DmitryKz
Hmm, I do not understand... I deleted from the system variable the path to the folder C:\Program Files (x86)\AviSynth\plugins\, restarted OS. But if I place on the specified above path DGDecodeNV.dll - I get a green screen. If I remove DGDecodeNV.dll from there — everything is fine and everything works.
Don, the plugins folder of VirtualDub do not have to do this, but Avisynth plugins folder. For some reason it is looking for a license file.
Don, excuse me for my English — maybe I do not understand quite what I need to do and what to check?

Re: 'Bad license' message appeared suddenly

Posted: Thu Jun 28, 2018 11:15 am
by admin
Yes, I edited out my confusion thinking you were talking about VirtualDub plugins directory.

Avisynth+ uses a path from the registry for the autoload directory, not a system variable.

I think the issue is whether Avisynth+ overrides an explicit loadplugin call with a full path to a specific DLL not contained in the autoload directory. I can't believe it would. I can't find online anything specifying the behavior. I could try to test it but I really do not want to have autoloading on my system at all.

Re: 'Bad license' message appeared suddenly

Posted: Thu Jun 28, 2018 11:24 am
by admin
OK, I ran an experiment. Avisynth+ does in fact use the autoload path even if the loadplugin() path is a full path to a different DLL! This is shocking to me but at least it explains everything. I may leave that path popup in the next slipstream to make things easier to detect this problem, but maybe not as I don't like giving crackers nice places to locate my licensing checks.

Anyway, good to hear you are going again and good luck with your projects, Dmitry.

Re: [RESOLVED] 'Bad license' message appeared suddenly

Posted: Thu Jun 28, 2018 11:42 am
by DmitryKz
Don, thank you for the kind words — I was also glad for our cooperation. All the best to you)

Re: [RESOLVED] 'Bad license' message appeared suddenly

Posted: Thu Jun 28, 2018 11:45 am
by admin
My pleasure too. Onward and upward!

Re: 'Bad license' message appeared suddenly

Posted: Sun Aug 26, 2018 8:06 pm
by MeteorRain
admin wrote:
Thu Jun 28, 2018 11:24 am
OK, I ran an experiment. Avisynth+ does in fact use the autoload path even if the loadplugin() path is a full path to a different DLL! This is shocking to me but at least it explains everything.
That was actually my first thought when reading the first page. Avisynth+ will load all DLLs inside autoload directory, before any further loadplugin()s. So in OP's case Avisynth simply loaded both DLLs, with the first being autoloaded, the second being loadplugin()ed.

If, luckily, they are named different, then you can use dllname_function() like dgdecodenv2053_dgsource() to call a specific version. Otherwise it's gonna be a random one pick by Avisynth+. (Being the first or the last, depending on the implementation.)