PDA

View Full Version : Clarion DLL call



harpsw
02-20-2013, 08:06 AM
Hi,

I have Developer Edition 8. I'm trying to create a new install for a Clarion app. Everything is working fine except for a Clarion dll. I have split the dll into 2 functions just to be sure the dll works. The first function opens and updates a tps file and returns to the installer successfully. The second function in the same dll is then called from the installer. It opens the same tps file (which contains the mssql driver string), opens a table on the sql server and counts the records. I display the record count from the dll so I know this works. I then close that table and try to return the record count. At this point, the install locks up. The display statement immediately following the dll call is never executed. The close of the sql table does not have an errorcode so it seems that succeeded. The statement in the dll following the close(table) is Return NbrRecs.

Any thoughts on what is wrong?

FYI - using Clarion 7

linder
02-20-2013, 08:22 AM
Hello,

Perhaps a threading issue in your Clarion DLL? If the statement after the "Call DLL" function is not displayed then the DLL did not return to the install (control is handled over from the install to the DLL until it returns). So it seems to me that the DLL never "returned". Or the DLL causes some kind of stack corruption.

Hope this helps a bit.

Friedrich

linder
02-20-2013, 09:02 AM
BTW, if you have "Progress Dialog: Display" active when you call into your Clarion DLL, I would suggest to close it before you call the function(s) in your DLL.

Friedrich

harpsw
02-20-2013, 09:33 AM
Thanks Friedrich. I displayed the thread nbr at the start & end of each function and it was 1 each time. The sql table is threaded and used an ODBC driver with a variable owner for the connection string. I believe your guess on the second function call not "returning" is correct but I have no idea on how to make it end. Since it's sole purpose is to execute a couple of sql commands, one of which is dependent upon the record count of a sql table, is there a way to have sqlcmd return the "Select Count()" from a table? If so, I could skip the second dll function call and use sqlcmd calls.

Bill