IDVBCMBatchEdit/Info::getlockinformation

Method Signatures

 

C\C++

HRESULT GetLockInformation(

VARIANT_BOOL *bIsLockedForEdit,

BSTR *bstrEditOwner,

long *lEditLockCount,

VARIANT_BOOL *bIsLockedForControl,

BSTR *bstrControlOwner,

long *lCtrlLockCount,

long lWait)

VB

Public Sub GetLockInformation(

ByRef bIsLockedForEdit As Boolean,

ByRef bstrEditOwner As String,

ByRef lEditLockCount As Long,

ByRef bIsLockedForControl As Boolean,

ByRef bstrControlOwner As String,

ByRef lCtrlLockCount As Long,

ByVal lWait As Long)

Returns the lock information about a given batch.

Return Values

S_OK - success

else - failed

Memory Allocation

none

Visual Basic Usage Example

Private Sub Button1_Click()
    Dim objBatchEdit As DVBCMBatchEdit
    Dim bIsLockedForEdit As Boolean
    Dim bIsLockedForControl As Boolean
    Dim strEditOwner As String
    Dim strControlOwner As String
    Dim lEditLockCount As Long
    Dim lCtrlLockCount As Long
    Call GetBatchEditObject(objBatchEdit)
    Call objBatchEdit.GetLockInformation(bIsLockedForEdit, _
            bstrEditOwner, lEditLockCount, bIsLockedForControl, _
            bstrControlOwner, lCtrlLockCount)
End Sub

Parameter Name

Purpose

bIsLockedForEdit

Returns whether the batch is currently locked for editing.

bstrEditOwner

Username of the current edit owner of the batch (empty if none)

lEditLockCount

How many times the edit owner of the batch has called "LockEdit( )"

bIsLockedForControl

Returns whether the batch is currently locked for control.

bstrControlOwner

Username of the current control owner of the batch (empty if none)

lEditControlCount

How many time the control owner of the batch has called "LockControl( )"

lWait

Optional. Default = 30000. Time to wait for a server resource in milliseconds.