Freigeben über


dual

Platziert eine Schnittstelle in der IDL-Datei als duale Schnittstelle.

Syntax

[dual]

Hinweise

Wenn dem dualen C++-Attribut eine Schnittstelle vorausgeht, wird die Schnittstelle innerhalb des Bibliotheksblocks in der generierten IDL-Datei platziert.

Beispiel

Der folgende Code ist ein Attributblock, der vor einer Schnittstellendefinition dual verwendet:

// 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")];

Anforderungen

Attributkontext Wert
Gilt für interface
Wiederholbar Nein
Erforderliche Attribute None
Ungültige Attribute dispinterface

Weitere Informationen finden Sie unter Attributkontexte.

Siehe auch

IDL-Attribute
Attribute nach Verwendung
custom
dispinterface
object
__interface