ADsBuildVarArrayInt function

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

lpdwObjectTypes [in]

Type: LPDWORD

Array of DWORD values.

dwObjectTypes [in]

Type: DWORD

Number of DWORD entries in the given array.

pVar [out]

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.

Return codeDescription
S_OK

The array was built successfully.

E_FAIL

The array cannot be created.

 

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Adshlp.h

Library

Activeds.lib

DLL

Activeds.dll

See also

ADSI Error Codes
ADSI Functions
ADsBuildVarArrayStr

 

 

Show:
© 2014 Microsoft