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.
OleCheck is called automatically when the method declaration specifies the safecall calling convention.