Usually I leave doc issues alone but this one is highly misleading and can lead to some rather serious (GPF) / very-hard-to-debug / very-hard-to-find bugs in dlls given that it's not obvious at all:
the UnloadDll function documents that mTimeout can take on only two values, quote:
The mTimeout value can be:
0 UnloadDll() is being called due to a DLL being unloaded when mIRC exits, or unloaded with /dll -u.
1 UnloadDll() is being called due to a DLL not being used for ten minutes. The UnloadDll() routine can return 0 to keep the DLL loaded, or 1 to allow it to be unloaded.
This is not true. It should read:
The mTimeout value can be:
0 UnloadDll() is being called due to a DLL being unloaded with /dll -u.
1 UnloadDll() is being called due to a DLL not being used for ten minutes. The UnloadDll() routine can return 0 to keep the DLL loaded, or 1 to allow it to be unloaded.
2 UnloadDll() is being called to to a DLL being unloaded when mIRC exits.
Note that the return value of 2 is completely omitted, which can cause developers to mishandle their cleanup routines. Not unhooking mIRC windows before exiting mIRC, for instance, can cause mIRC to crash when exiting, and this will easily be missed if the programmer handles exit as mTimeout=0 and not the true value of mTimeout=2.