Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Wolfgang Riedmann" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: IsMethod() for use in functions Date: Wed, 6 Jul 2016 14:55:13 +0200 Lines: 65 Message-ID: References: X-Trace: individual.net EKfMIhBp9xE5z4N3uoMflgRiPTdUVso/3wmRn8R5jziySgOck= Cancel-Lock: sha1:fYKKwrVc/fTOPdOLkbRgdSCH6OU= User-Agent: XanaNews/1.18.1.6 Xref: csiph.com comp.lang.clipper.visual-objects:9513 Hi Dick, I use this function very often, and it works everytime. But: > Then I moved the called function to another (included) AEF. if you don't reference the function anywhere it is simply not present in the exe - not linked in.... Try to use a request myfunction anywhere in the library or exe, then it should be linked in. But for customer dependent functionality I would use a completely different approach: put your functionality in a method of a class. Then you can load the DLL with the required functionality at runtime, instantiate the object with CreateInstance() and execute the method with Send(). When loading a VO DLL, you need to execute a function after the loadlibrary() call to make the runtime load the classes and methods in the DLL. This is how I load such DLLs: function LoadCPPlusDLL( oWindow as Window ) as logic pascal local lRetCode as logic local hDLL as ptr local hProc as ptr local cDLLName as string local cVOVersion as string if IsClass( #ZipClass ) lRetCode := true else cDLLName := "CPPlus28.DLL" hDLL := _VOLoadLibrary( cDLLName ) if hDLL == null_PTR ErrBox( oWindow, "error loading the DLL" ) return false else hProc := GetProcAddress( hDLL, String2Psz( "CPPlusInitDLL" ) ) if hProc == null_ptr ErrBox( oWindow, "error initializing" ) return false endif PCall( hProc ) if IsClass( #ZipClass ) lRetCode := true else ErrBox( oWindow, "error initializing" ) return false endif endif endif return lRetCode Wolfgang --