Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

SafeArrayGetVartype function

Gets the VARTYPE stored in the specified safe array.

Syntax


HRESULT SafeArrayGetVartype(
  _In_  SAFEARRAY *psa,
  _Out_ VARTYPE   *pvt
);

Parameters

psa [in]

An array descriptor created by SafeArrayCreate.

pvt [out]

The VARTYPE.

Return value

This function can return one of these values.

Return codeDescription
S_OK

Success.

E_INVALIDARG

One of the arguments is not valid.

 

Remarks

If FADF_HAVEVARTYPE is set, SafeArrayGetVartype returns the VARTYPE stored in the array descriptor. If FADF_RECORD is set, it returns VT_RECORD; if FADF_DISPATCH is set, it returns VT_DISPATCH; and if FADF_UNKNOWN is set, it returns VT_UNKNOWN.

SafeArrayGetVartype can fail to return VT_UNKNOWN for SAFEARRAY types that are based on IUnknown. Callers should additionally check whether the SAFEARRAY type's fFeatures field has the FADF_UNKNOWN flag set.

Requirements

Header

OleAuto.h

Library

OleAut32.lib

DLL

OleAut32.dll

See also

SAFEARRAY Data Type

 

 

Show:
© 2018 Microsoft