template TargetType* interface_cast(iBaseObject* sourceObject) { if (!sourceObject) return NULL; return reinterpret_cast
( sourceObject->SearchInterface(__uuidof(TargetType)) ); };