Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #9513
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
| 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 | <du4ddjFjtmkU1@mid.individual.net> (permalink) |
| References | <aopnnb109gjouifhggg7qntmlhv2aca0ri@4ax.com> <du2fsnF62hoU2@mid.individual.net> <dvkpnbtaoduc0jdg09kfc60v3hdur1ivia@4ax.com> |
| 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 |
Show key headers only | View raw
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
--
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
IsMethod() for use in functions D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-07-05 19:01 +0200
Re: IsMethod() for use in functions "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-07-05 20:06 +0200
Re: IsMethod() for use in functions D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-07-05 21:11 +0200
Re: IsMethod() for use in functions "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-07-06 08:26 +0200
Re: IsMethod() for use in functions "Karl-Heinz" <invalid@invalid.invalid> - 2016-07-05 21:19 +0200
Re: IsMethod() for use in functions D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2016-07-06 12:00 +0200
Re: IsMethod() for use in functions "Wolfgang Riedmann" <wriedmann@gmail.com> - 2016-07-06 14:55 +0200
Re: IsMethod() for use in functions "Karl-Heinz" <invalid@invalid.invalid> - 2016-07-06 21:05 +0200
Re: IsMethod() for use in functions "Karl-Heinz" <invalid@invalid.invalid> - 2016-07-07 08:18 +0200
csiph-web