Problem with CTL32 and CLEAR ALL

Topics: Attention VFPX Admins, Bug Information
Oct 7, 2009 at 8:37 PM

When using the CTL32 classes in dev mode, I issue a CLEAR ALL to avoid the compile error: "clt32_structures.fxp is not closed". The next time I run my application I get the error: "File 'readint.prg' does not exists". To avoid this error, I have to issue a "SET LIBRARY TO".

This took a while to troubleshoot since there is no function ReadInt in the FLL functions or in the code. It appears there is _Execute code within the FLL that issues a "DECLARE DLL" on about 36 exported functions via the InitVFP2C32 FLL function, but only if the FLL is freshly loaded. I'm assuming there is an internal variable in the FLL that prevents the DECLARE DLLs from being called more than once.

Is there anyway:

A) Some logic could be included to trap for this situation (DECLARED functions being cleared with a CLEAR ALL) and reDECLARE the functions.

B) The DECLAREd functions could be converted to FLL functions to avoid the problems that can occur with DECLARE DLL functions being cleared with a CLEAR ALL

C) Can the source code for this project be made available so we can make our own changes


Oct 7, 2009 at 8:46 PM



I would advise you to post your questions also in the CTL-Forum. Carlos will surely give you a reply.




Oct 8, 2009 at 5:48 PM


I have run into something like this and determined you need to release the procedure files in a certain order.

* Release the procedure libraries



RELEASE PROCEDURE ctl32_structures

RELEASE PROCEDURE ctl32_functions


Not sure if this will help you, but worth a try.