View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
You can load DLLs in fw_enter.prg.  Even though this program is executed before each request, you can check whether the DLL has already been loaded before loading it.
 
If you are referring to a COM DLL then you can use something like this:
 
IF TYPE('oMyObject') = 'U'
PUBLIC oMyObject
oMyObject = CREATEOBJECT('MyClass')
ENDIF
 
If you are referring to an old style (non-COM) DLL, you can use something like the following:
 
IF TYPE('HasDeclared') = 'U'
PUBLIC HasDeclared
HasDeclared = .T.
DECLARE INTEGER MyFunction IN MyDLL STRING, STRING
ENDIF

Both examples above declare variables as PUBLIC, so that they are remembered between requests.  Please note that all variables and DLL declarations are cleared after a script error, so in such cases the DLL will get reloaded.

FoxWeb Support Team
support@foxweb.com email

Sent by Curtis Hertwig on 04/23/2003 11:10:13 AM:
I have a DLL that must be loaded, but it takes several seconds to load. Is there somewhere that I could load it each time a channel starts so it wouldn't impact the script running time so much?

-cjh