ADsBuildVarArrayInt function (adshlp.h)

The ADsBuildVarArrayInt function builds a variant array of integers from an array of DWORD values.

Syntax

HRESULT ADsBuildVarArrayInt(
  [in]  LPDWORD lpdwObjectTypes,
  [in]  DWORD   dwObjectTypes,
  [out] VARIANT *pVar
);

Parameters

[in] lpdwObjectTypes

Type: LPDWORD

Array of DWORD values.

[in] dwObjectTypes

Type: DWORD

Number of DWORD entries in the given array.

[out] pVar

Type: VARIANT*

Pointer to the resulting variant array of integers.

Return value

Type: HRESULT

This method supports standard return values.

For more information about other return values, see ADSI Error Codes.

Remarks

Use the ADsBuildVarArrayInt function to convert the integer array into a variant array of the integers. The following code example shows how to do this.

DWORD dwArray[]={0,1,2,3,4};
long nLength = sizeof(dwArray)/sizeof(DWORD);
VARIANT varArray[nLength];
HRESULT hr = ADsBuildVarArrayInt(dwArray, nLength, varArray);
if (hr = E_FAIL) exit(1);
 
// Resume work with the data in varArray.
. . .

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header adshlp.h
Library Activeds.lib
DLL Activeds.dll

See also

ADSI Error Codes

ADSI Functions

ADsBuildVarArrayStr