IBDSecurity::GetAccounts Method [C++]

This method is used by the Permissions module and dialog box to retrieve a list of all accounts currently in the Security Definitions Tables (SDT).

Definition

[C++]

HRESULT IBDSecurity::GetAccounts(_Recordset**ppRSAccounts);

[Visual Basic]

Function GetAccounts() As _Recordset

Parameters

  • ppRSAccounts [C++]
    [out, retval] The address of a pointer to an ADO _Recordset object used to return information about all accounts that are currently present in the Security Definition Table (SDT). See the Remarks for section for more details.

Return Values

[C++] This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

[Visual Basic] If this method completes successfully, it returns an ADO _Recordset object used to return information about all accounts. See the Remarks section for more details.

Error Values

[C++] This method returns S_OK (0x00000000) to indicate success and standard COM HRESULT error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object, which can be accessed using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface may return a text description of the error.

[Visual Basic] This method sets the Number property of the global Err object to S_OK (&H00000000) to indicate success and to standard COM error values to indicate failure. For more information about standard COM errors, see Standard COM Errors. Additional information may be available using the global Err object. In particular, the Description property may contain a text description of the error.

Remarks

This method will not typically be called from any Commerce Server Business Desk modules other than the Permissions module and dialog box.

The returned record set contains one record per account in the SDT and includes the fields: SID (security identifier), AccountName, and IsGroup.

[C++] The ppRSAccounts parameter contains valid data only if the method returns successfully.

For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.

[Visual Basic]

Example

' rsAccounts is a Variant to which an ADO _Recordset object 
' will be assigned.
' g_MSCSBDSecurityis the global BD security object 
' created in the page Global.asa.

rsAccounts = g_MSCSBDSecurity.GetAccounts

See Also

[C++]BDSecurity Object

[Visual Basic]BDSecurity Object

Security

Copyright © 2005 Microsoft Corporation.
All rights reserved.