procedure OleCheck(Result: HResult);
Use OleCheck to wrap any IUnknown based COM methods you call, so that if that method fails, an exception will be raised.
Using COM Automation objects