[−][src]Macro comedy::com_call
Call a COM method, returning a Result
.
An error is returned if the call fails. The error is augmented with the name of the interface and method, and the file name and line number of the macro usage.
QueryInterface
is not used, the receiving interface must already be the given type.
Example
fn cancel_job(job: &ComRef<IBackgroundCopyJob>) -> Result<(), HResult> { unsafe { com_call!(job, IBackgroundCopyJob::Cancel())?; } Ok(()) }