IProfileService::DeleteProfileByKey
Use this method to delete the ProfileObject object specified by a key member name/value pair and schema type. All properties associated with the profile are purged from the system.
Definition
HRESULT IProfileService::DeleteProfileByKey(BSTRbstrKeyMemberName,VARIANTsValue,BSTRbstrType);
Parameters
bstrKeyMemberName
[in] A BSTR that contains the key member name.
sValue
[in] A VARIANT that contains the key value.
bstrType
[in] A BSTR that contains the profile schema type.
Return Values
This method returns an HRESULT indicating whether it completed successfully. See the Error Values section for more details.
Error Values
The Errors property stores the collection of errors encountered in the last Profiles resource operation. For more information, see IProfileService::get_Errors.
Remarks
Use the DeleteProfile method to delete a profile by specifying a primary key value and schema type.
Call the Initialize method before you use this ProfileService method.
Caution
- Care must be taken when deleting ProfileObject objects due to possible expression dependencies. See the ExpressionStore and ExpressionEval objects for details on expressions.
For more information about memory ownership issues related to COM property and method parameters, see Managing COM Parameter Memory.
See Also
IProfileService::CreateProfile