Possible values for return-code are:
1 - unable to obtain mutex 2 - unable to attach to shared memory 3 - unable to map shared memory 9 - unexpected reason code 10 - threaded runtime mismatch 20 - unexpected error code