forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Unload VDS DLLs to avoid limit

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Knowledge Base
View previous topic :: View next topic  
Author Message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Feb 26, 2004 2:48 am    Post subject: Unload VDS DLLs to avoid limit Reply with quote

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. Wink
___________________________________________________________________________
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 Smile

_________________
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
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Knowledge Base All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group