ISAWHAppObject::DeleteItemsFromLabel
Description
Deletes multiple items from a label.
Syntax
long DeleteItemsFromLabel(
long
LabelIdLow,
long LabelIdHigh,
ISAWHDeleteItemFromLabelSet*
DeleteItemFromLabelSet,
VARIANT_BOOL* Cancelled,
BSTR* ResultDescription
);
Parameters
LabelIdLow
[in] Specifies the low-order 32 bits of the label ID.
LabelIdHigh
[in] Specifies the high-order 32 bits of the label ID.
Note: LabelIdLow and LabelIdHigh forms a single 64-bit label ID.
DeleteItemFromLabelSet
[in, out] Specifies the information set of items to be deleted from the label.
Cancelled
[out] If the method fails, returns whether the operation is cancelled.
ResultDescription
[out] Returns the description of the result. If the operation succeeds, returns
'Completed'. If the operation fails, returns the error information.
Return Value
If the method succeeds, returns 0. If the method fails, returns other error codes.
See Also
Sample
VB Sample:
Dim WithEvents sdkObject As SAWHSDKLib.SAWHAppObject Set sdkObject = New SAWHSDKLib.SAWHAppObject Private Sub DeleteItemFromLabel_Click() Dim Cancelled As Boolean Dim ResultDescription As String Dim DeleteItemFromLabelSet As New SAWHDeleteItemFromLabelSet Dim FileName As String FileName = "$/FileName.txt" 'At first should get the file labeled info Dim LabeledInfoSet As New SAWHLabeledInfoSet Dim ResultValue As Long ResultValue = sdkObject.GetFileLabeledInfo(FileName, LabeledInfoSet, Cancelled, ResultDescription) If ResultValue <> 0 Then MsgBox "Failed to get the file labeled info." Exit Sub End If Dim LabelInfo As New SAWHLabeledInfo LabeledInfoSet.Get 0, LabelInfo Dim DeleteItemFromLabel As New SAWHDeleteItemFromLabel DeleteItemFromLabel.HistoryIdLow = LabelInfo.HistoryIdLow DeleteItemFromLabel.HistoryIdHigh = LabelInfo.HistoryIdHigh DeleteItemFromLabelSet.Add DeleteItemFromLabel ResultValue = sdkObject.DeleteItemsFromLabel(LabelInfo.LabelIdLow, LabelInfo.LabelIdHigh, DeleteItemFromLabelSet, Cancelled, ResultDescription) If ResultValue <> 0 Then MsgBox ("Failed to delete the item(s) from label.") End If Dim Count As Long Count = DeleteItemFromLabelSet.GetCount Dim Index As Long For Index = 0 To Count DeleteItemFromLabelSet.Get Index, DeleteItemFromLabel Dim Description As String Description = DeleteItemFromLabel.Description Dim IsSuccessful As Boolean IsSuccessful = DeleteItemFromLabel.Successful Dim HistoryIdLow As Long HistoryIdLow = DeleteItemFromLabel.HistoryIdLow Dim HistoryIdHigh As Long HistoryIdHigh = DeleteItemFromLabel.HistoryIdHigh Next End Sub |