Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.31 KB

satype.md

File metadata and controls

58 lines (44 loc) · 1.31 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: satype
satype (C++ COM Attribute)
10/02/2018
vc-attr.satype
satype attribute
1716590b-6bcb-4aba-b1bc-82f7335f02c3

satype

Specifies the data type of the SAFEARRAY structure.

Syntax

[ satype(data_type) ]

Parameters

data_type
The data type for the SAFEARRAY data structure that is being passed as a parameter to an interface method.

Requirements

Attribute context Value
Applies to Interface parameter, interface method
Repeatable No
Required attributes None
Invalid attributes None

Remarks

The satype C++ attribute specifies the data type of the SAFEARRAY.

Note

A level of indirection is dropped from the SAFEARRAY pointer in the generated .idl file from how it is declared in the .cpp file.

Example

// cpp_attr_ref_satype.cpp
// compile with: /LD
#include "unknwn.h"
[module(name="MyModule")];
[dispinterface, uuid("00000000-0000-0000-0000-000000000001")]
__interface A {
   [id(1)] HRESULT MyMethod ([in, satype("BSTR")] SAFEARRAY **p);
};

See also

Compiler Attributes
Parameter Attributes
Method Attributes
id