Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Feb 26, 2004 2:48 am Post subject: Unload VDS DLLs to avoid limit |
|
|
VDS versions earlier than VDS 5 have a limit on the number
of external DLLs that may be used.
You can use VDSug.dll to unload these external DLLs
when no longer needed, and re-load other DLLs (or the
same ones) as you want - just use the VDS EXTERNAL
command again.
This is a code example, not a working program.
___________________________________________________________________________
Code: |
rem -- load VDSug.dll --
EXTERNAL @path(%0)VDSug.dll
rem -- load kernel32 and init the needed functions --
UG DLLLOAD, 1, kernel32.dll
UG DLLINITFUNC, 1, 1, GetModuleHandleA
UG DLLINITFUNC, 1, 2, FreeLibrary
rem -- load your DLL --
%%dll_name = [dll name goes here - no path]
EXTERNAL @path(%0)%%dll_name, [key if needed]
rem -- get the dll module handle --
OPTION ERRORTRAP, t1
%%dll_handle = @ug(DLLFUNC, GetModuleHandleA, int, str:%%dll_name)
:t1
INFO dll_handle= %%dll_handle
rem -- release the dll --
OPTION ERRORTRAP, t2
%%result = @ug(DLLFUNC, FreeLibrary, int, handle:%%dll_handle)
:t2
INFO "result (non-zero if success) = "%%result
rem -- release errortrap --
OPTION ERRORTRAP
rem -- re-load the DLL (if/when needed again) --
EXTERNAL @path(%0)%%dll_name, [key if needed]
|
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|