Share via


IBDSecurity::RemoveSecurityDefinitions Method [C++]

Use this method to remove all records associated with the specified combination of entity, element, and right from the Security Definitions Tables (SDT).

Definition

[C++]

HRESULT IBDSecurity::RemoveSecurityDefinitions(BSTRbstrEntity,
  VARIANTvarElementVARIANTvarRight);

[Visual Basic]

Sub RemoveSecurityDefinitions(bstrEntity As String,
  OptionalvarElement As Variant,
  OptionalvarRight As Variant,
)

Parameters

  • bstrEntity[C++]
    [in] A BSTR that contains the name of the entity for which security definitions should be removed.
  • bstrEntity[Visual Basic]
    A String that contains the name of the entity for which security definitions should be removed.
  • varElement[C++]
    [in, optional] An optional VARIANT that contains a string specifying the name of the element for which security definitions should be removed.
  • varElement[Visual Basic]
    An optional Variant that contains a string specifying the name of the element for which security definitions should be removed.
  • varRight[C++]
    [in, optional] An optional VARIANT that contains a string specifying the name of the right for which security definitions should be removed.
  • varRight[Visual Basic]
    An optional Variant that contains a string specifying the name of the right for which security definitions should be removed.

Return Values

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

[Visual Basic] None.

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 should be used in Business Desk module code when the module uses dynamic entities, elements, and/or rights, and one of them is removed. Calling this method will clean up the SDT by removing the records associated with that entity, element, or right.

If either of the optional parameters (varElement and/or varRight), is not provided, they are treated as wildcards. In other words, records will be removed regardless of their element and/or right values.

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

[Visual Basic]

Example

' g_MSCSBizDeskSecurityis the global BD security object created in the page Global.asa.

' Will remove all records for the "Shoes" catalog category from the SDT,
' regardless of the rights associated with those records.

g_MSCSBizDeskSecurity.RemoveSecurityDefinitions("catalog_category", _
                                                "Shoes")

See Also

[C++]BDSecurity Object

[Visual Basic]BDSecurity Object

Security

Copyright © 2005 Microsoft Corporation.
All rights reserved.