Pascal Scripting: OleCheck

Prototype:

procedure OleCheck(Result: HResult);

Description:

Use OleCheck to wrap any IUnknown based COM methods you call, so that if that method fails, an exception will be raised. Also see the Using COM Automation objects topic.