clear memory from dll after call-out perform on c/c++ dll
Author: kevin.cams@uza.be (Kevin)
Hi everyone, is here someone who can tell me, how you can free your memory after accessing an external C/C++ DLL using the perform call-out function in Uniface? my functions are using the XEXPORT macro from the umsw3gl.h file. A little overview of the program flow: * perfom BANCONTACTVIC in uniface calls a self-made C/C++ DLL called "CZAMVICCL" * in the self-made DLL are multiple functions which one calls other functions in a purchased DLL called "VICEMV" - this VICEMV opens a serial connection to a Point-Of-Sale(POS) system - normally the VICEMW closed the serial connection (but I don't know how to check it) Someone who know how to check active serialports?? * after the returncode from CZAMVICCL to uniface, the DLL reference stay in memory (but this is not what i expect) The program I use for checking active DLL's in the running uniface instance called "Process Explorer"
3 Comments
Local Administrator
it's experience from all those years that uniface never frees memory. And after the uniface.exe has doen it's best tofind a dll and has build a reference to it: why should it not keep this after the fiest perform? You will need it again, so we are prepared.
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
The reason why i can't hold the DLL in memory is, there must be a release of the serial-port (COM3) How can i make a reference to a DLL in uniface? The DLL is already known in the ASN-file.
Author: Kevin (kevin.cams@uza.be)
Local Administrator
If you create a signature for the dll and use activate instead of perform, you can then use deleteinstance to dispose of that instance of the dll.
Author: Iain Sharp (i.sharp@pcisystems.co.uk)