dual

.idl 파일에 인터페이스를 이중 인터페이스로 배치합니다.

구문

[dual]

설명

이중 C++ 특성이 인터페이스 앞에 있으면 생성된 .idl 파일의 라이브러리 블록 내에 인터페이스가 배치됩니다.

예시

다음 코드는 인터페이스 정의 전에 이중을 사용하는 특성 블록입니다.

// cpp_attr_ref_dual.cpp
// compile with: /LD
#include <windows.h>
[module(name="MyLibrary")];

[uuid("2F5F63F1-16DA-11d2-9E7B-00C04FB926DA"), dual]

__interface IStatic : IDispatch
{
   HRESULT Func1(int i);
   [   propget,    id(1),    bindable,    displaybind,    defaultbind,    requestedit
   ]
   HRESULT P1([out, retval] long *nSize);
   [   propput,    id(1),    bindable,    displaybind,    defaultbind,    requestedit
   ]
   HRESULT P1([in] long nSize);
};

[cpp_quote("#include file.h")];

요구 사항

특성 컨텍스트
적용 대상: interface
반복 가능 아니요
필수 특성 없음
잘못된 특성 dispinterface

자세한 내용은 특성 컨텍스트를 참조하세요.

참고 항목

IDL 특성
용도별 특성
custom
dispinterface
object
__interface