[−][src]Macro comedy::com_call_taskmem_getter
Call a COM method, create a CoTaskMem
from an output
parameter.
An error is returned if the call fails or if the pointer is null. The error is augmented with the name of the interface and method, and the file name and line number of the macro usage.
Null
If the method succeeds but the resulting pointer is null, this will return an HResult
error with the successful return code.
Example
fn get_error_description(bcm: &ComRef<IBackgroundCopyManager>, lang_id: u32, hr: HRESULT) -> Result<CoTaskMem<u16>, HResult> { unsafe { com_call_taskmem_getter!( |desc| bcm, IBackgroundCopyManager::GetErrorDescription(hr, lang_id, desc) ) } }