Jaa


IPuP::Delete

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

If your custom resource is a site resource, and you want to perform custom clean up of resource data, you must implement this method.

Commerce Server Manager calls this method when it is removing a site resource from a computer. This provides an opportunity for clean up that is specific to this custom resource to be performed. After this method returns, Commerce Server Manager will continue by removing references to the custom resource, and any corresponding configuration data, from the Administration database.

HRESULT Delete(
    BSTR szSiteName,
    BSTR szResourceName,
    BOOL bKeepData,
    BOOL bSilent
);

Parameters

  • szSiteName
    [in] A BSTR that contains the name of the site.

  • szResourceName
    [in] A BSTR that contains the name of the custom resource.

  • bKeepData
    [in] A BOOLEAN value used to indicate whether site resource data should be deleted or not. A value of TRUE indicates that the data should be retained, and a value of FALSE indicates that the data should be deleted.

  • bSilent
    [in] A BOOLEAN value used to indicate whether any user interaction is allowed. A value of TRUE suppresses user interaction, allowing for unattended operation.

Return Value

This method must return an HRESULT indicating whether it completed successfully. See the Error Values section for more details.

Error Values

This method must return S_OK (0x00000000) to indicate success and a COM HRESULT error value to indicate failure. For more information about the standard COM error values that can be used, see Standard COM Errors. Additional information may be made available using the global Err object, which can be accessed by the caller using the API function GetErrorInfo. In particular, the GetDescription method of the IErrorInfo interface can be called to retrieve a text description of the error, which you can supply.

Remarks

If this method is designed to allow user interaction, the user interface used to accomplish this interaction must be capable of being suppressed. The bSilent parameter is used to indicate whether such suppression should occur. If the bSilent parameter is set to TRUE the user interface must be suppressed. If the bSilent parameter is set to FALSE, it is permissible to display the user interface and seek user interaction. This aspect of the method invocation allows for unattended operation.

The system administrator should be able to indicate whether resource data should be retained or deleted through the user interface. The bKeepData parameter is set to TRUE or FALSE, in accordance with user input.

This method could be called from a custom script to clean up the data associated with a custom site resource.

See Also

Other Resources

Site Packager Interface

IPuP::DeleteGroupResource