$dll(filename.dll|$remove(filename.dll,.dll),function,data)
Loading a .dll with+without the .dll extension causes 2 references to same file to be loaded to the $dll(N) list, but memory data can be accessed from only 1 of them. Some of this issue can't be seen without creating a dll which has 1 function to stores a value into its own memory, then has another function to report that value.
When $dll(foobar,function,data) makes a dll call, if $1 does not contain .filetype, mIRC ignores the presence of filename "foobar" without a file extension and loads "foobar.dll".
If foobar.dll is called as both "foobar" and "foobar.dll", it gets loaded into the $dll(N) list twice, once under each load-name. However it's not possible to access/alter memory data of both instances. Regardless whether you use $dll(foobar,function,data) or $dll(foobar.dll,function,data), the same memory data is accessed, always reporting the last value stored into the dll memory, regardless which loaded-name is used to store it.
Assuming these are the only 2 .dll's loaded, you can only unload each instance by using the with/without filename shown in the $dll(1) or $dll(2) strings. No matter whether "foobar" or "foobar.dll" is unloaded from the $dll(N) list, the memory data accessed before the /dll -u is the same as the memory accessed after the unload.
After unloading 1 of the 2 references to the same dll diskfile, accessing the dll using the name-alias which had been unloaded from memory reloads that 2nd reference to the same diskfile, but returns data changed inside the dll prior to that 2nd reference-name being reloaded.
The auto-unload after 10 mins idle can cause the references-name called most recently to be unload from the $dll(N) later than the opposite reference name, but it doesn't seem possible to ever access the memory data of the 2nd reference to that same diskfile.