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 |
자세한 내용은 특성 컨텍스트를 참조하세요.
참고 항목
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기