Directory Services |
The ADsBuildVarArrayInt function builds a variant array of integers from an array of DWORD values.
HRESULT ADsBuildVarArrayInt( LPDWORD lpdwObjectTypes, DWORD dwObjectTypes, VARIANT* pVar );
This method supports standard return values.
For more information about other return values, see ADSI Error Codes.
Return Code | Description |
---|---|
S_OK | The array was built successfully. |
E_FAIL | The array cannot be created. |
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. . . .
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Adshlp.h.
Library: Use ActiveDS.lib.