`
Clarion in general: Loading clarion DLL and execute a procedure 2002-12-16 -- Andy Ireland Newsgroups: softvelocity.products.c55ee Incidently, you should ref count the loaded DLL and unload when nobody is using the class by implementing something like the IUnknown Interface on the class and calling AddRef / Release and when the ref count is zero, call FreeLibrary. LoadLibrary would be done in a Create method or the constructor as would the calls to GetProcAddress, then and only if initialised, allow a call to that method by maybe wrapping the call with a check to a method like.... fInited = self.IsInitialised() assert(fInited) if fInited return pProcToCall(....). return false i.e. a Debug and runtime check, but prevent a GPF. HTH Regards Andy Plugware Solutions.com Ltd, taking the puzzle out of I.T Tel : +44 1249 813335 Fax : +44 1249 813462 Printed November 21, 2024, 7:06 am This article has been viewed/printed 35241 times. Google search has resulted in 162 hits on this article since January 25, 2004. |