IBDSecurity::Initialize Method [C++]
This method is used on the page Global.asa to initialize the global BDSecurity object referenced by the global variable g_MSCSBizDeskSecurity. If you create your own instance of the BDSecurity object, make sure that you call this method before calling any other methods (other than the backward-compatibility method CanUserAccess).
Definition
[C++]
HRESULT IBDSecurity::Initialize(BSTRbstrSiteName,
);
[Visual Basic]
Sub Initialize(bstrSiteName As String,
)
Parameters
- bstrSiteName[C++]
[in] A BSTR that contains the name of the site for which the BDSecurity object is being initialized. - bstrSiteName[Visual Basic]
A String that contains the name of the site for which the BDSecurity object is being initialized.
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 will not typically be called from any Commerce Server Business Desk modules. It is already called in the page Global.asa to initialize the global instance of the BDSecurity object that is referenced by the global variable g_MSCSBizDeskSecurity. Unless there is a good reason not to, all modules should use the global instance.
This method must be called for each particular instance of the BDSecurity object before any other methods (besides the backwards-compatibility method CanUserAccess) are called.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
[Visual Basic]
Example
' The following exmaple is from the page Global.asa.
g_MSCSBDSecurity.Initialize(Application("MSCSSiteName"))
See Also
[C++]BDSecurity Object
[Visual Basic]BDSecurity Object
Copyright © 2005 Microsoft Corporation.
All rights reserved.