All,

I have an application which takes around 10 hours of processing time on the network.

as a workaround, I am developing an application which copies the backend databases from the network,
This opens the LIVE database excusively.
Then launches the application and connects to the LOCAL BACKEND with a parmeter passed on to app as a command line macro to update the backend paths in one of the tables.

Once this application has been closed, need to copy the database back to live area on the network.

I am using an API call to the kernel32 via waitforsingleobject .


Dim retval As Long
Dim proc As PROCESS_INFORMATION
Dim StartInf As STARTUPINFO
StartInf.cb = Len(StartInf)

'Execute the given path
retval = CreateProcessA(0&, RunProg, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, StartInf, proc)

'Disable this app until the shelled one is done
Call WaitForSingleObject(proc.hProcess, INFINITE)
Call CloseHandle(proc.hThread)
Call CloseHandle(proc.hProcess)


Problem is that the WaitForSingleObject API Call is not returning the closure to the calling application............

TIA,
xzone