C++ Builder 参考手册 ➙ TComponent ➙ QueryInterface
头文件:#include <System.Classes.hpp>
命名空间:System::Classes
类:TComponent
访问权限:protected:
函数原型:
virtual HRESULT __stdcall QueryInterface(const GUID &IID, /* out */ void *Obj);
System::Classes::TComponent::QueryInterface 是 System::Classes::TComponent 的成员函数,返回当前组件所支持的 COM 接口的引用。
参数:
IID:接口类型的 GUID;
Obj:返回当前组件所支持的 COM 接口的引用到 Obj;
返回值:
S_OK:成功获取当前组件所支持的 COM 接口的引用到 Obj;
如果不支持,Obj 返回 NULL,函数返回值为 S_FALSE, E_NOINTERFACE, E_UNEXPECTED, 或 E_NOTIMPL 等。
参考:
- System::Classes::TComponent::IsImplementorOf
- System::Classes::TComponent::ReferenceInterface
- System::Classes::TComponent::GetTypeInfo
- System::Classes::TComponent::GetTypeInfoCount
- System::Classes::TComponent::GetIDsOfNames
- System::Classes::TComponent::Invoke
- System::Classes::TComponent
- System::Classes::TPersistent
- System::TObject::GetInterface
- System::TObject
- VCL 类继承关系
C++ Builder 参考手册 ➙ TComponent ➙ QueryInterface