Page 1 of 1

Starting the system functions external program timer

Posted: Mon Nov 10, 2014 11:25 pm
by Eugene Lutsenko
I would like to be able to run an external program or another function of the system performance, asking him to appeal to a certain database.

I organized a function call timer, just as it was done with backgrounds. In the called function is an appeal to the database if it is closed. How to check Roger suggested earlier. The database records the external program call to the function of the system, exactly the same as I use myself in the system. There is an array of all possible system function calls. If the array has the same treatment as in the database, the function is called, the value of the variable. How to do it showed Tom. But so far it has not been done since when accessing the database from the function called on the timer, an error handling of the external function and this function takes this as an empty database, although it is not exactly so. Maybe as usual prompt, how to do it.

After the execution of the functions, refer to that specified in the database, the database is cleared and closed and the external program can set it with new features.

Re: Starting the system functions external program timer

Posted: Mon Jan 05, 2015 3:42 am
by Eugene Lutsenko
I want to make to the two programs communicate through a common database. First, the program checks is empty and closed base or not. If not, then run to the specified function in the database for execution. After the execution of the function base should be cleaned and closed. Second, the program checks the base is closed or not, and if closed, would open it and recorded it to any function, and then closes.

Re: Starting the system functions external program timer

Posted: Mon Jan 05, 2015 8:37 am
by rdonnay
If you need to synchronize database operations between 2 executables you could use an architecture similar to DC_X2Clip().

I wrote this when I first wrote eXpress++ to synchronize a Clipper program with an Xbase++ program.

Re: Starting the system functions external program timer

Posted: Mon Jan 05, 2015 9:43 am
by Eugene Lutsenko
No, the idea was that the other program can take advantage of the system that I'm developing. External program to run my system as it could make the user. I wanted to change the system so that it was possible. So that it reads commands from an external database, which would put these commands external program. Like even almost happened, but for some reason in this mode, the system sees my own database, as empty.

Re: Starting the system functions external program timer

Posted: Mon Jan 05, 2015 10:35 am
by rdonnay
but for some reason in this mode, the system sees my own database, as empty.
This should be a very simple problem to troubleshoot.
Possibly you are opening the wrong database.
Are you sure that you are not trying to open exclusive?

Press Alt-D to go to the dot-prompt.
It will show you the workarea and database name that is opened.

Re: Starting the system functions external program timer

Posted: Mon Jan 05, 2015 12:53 pm
by Auge_Ohr
Eugene Lutsenko wrote:Like even almost happened, but for some reason in this mode, the system sees my own database, as empty.
what OS() ?
if Win7/8/10 you might need Alaska SMB2 Hotfix ... your Database might be still in "Cache"

Re: Starting the system functions external program timer

Posted: Mon Jan 05, 2015 1:03 pm
by rdonnay
your Database might be still in "Cache"
If this is true, then a dbCommitAll() should solve it.

Re: Starting the system functions external program timer

Posted: Mon Jan 05, 2015 1:41 pm
by Auge_Ohr
rdonnay wrote:
your Database might be still in "Cache"
If this is true, then a dbCommitAll() should solve it.
i mean these 3 Registry "Hotfix"

Code: Select all

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Lanmanworkstation\Parameters

DirectoryCacheLifetime
FileInfoCacheLifetime
FileNotFoundCacheLifetime
set on Win7/8/10 Workstation to 0 (Zero) with Xbase++
... or "Share" Local Directory on Network

Re: Starting the system functions external program timer

Posted: Mon Jan 05, 2015 1:58 pm
by Eugene Lutsenko
Thank U. Be sure to try, as I get to a computer!