It is returning a 0 because the call to DSDetachJob() is successful. You will need to use the result of DSRunJob() for the return code.
Also, instead of the IF-THEN construct, you can do a simple
Code: Select all
JobHandle = DSPrepareJob(JobHandle)
Moderators: chulett, rschirm, roy
Code: Select all
JobHandle = DSPrepareJob(JobHandle)