SendCStoreRequest Example for Visual Basic
Dim nRet As Integer
Dim hPDU As Long
Dim nID As Long
Dim szClassUID As String
Dim szInstanceUID As String
'send a store request to the server
hPDU = LEADDICOMNet1.GetAssociate (LEADDICOMNet1.hNet)
'pick the data set to send
nRet = LEADDICOM1.LoadDS ("e:\images\dicom16.dic", 0)
If (nRet <> 0) Then
MsgBox "Error Loading Data Set!", , "Error"
Screen.MousePointer = vbDefault
Exit Sub
End If
LEADDICOM1.FindFirstElement TAG_SOP_INSTANCE_UID, False
LEADDICOM1.GetStringValue 0, 1
szInstanceUID = LEADDICOM1.StringValues (0)
LEADDICOM1.MoveFirstElement False
LEADDICOM1.FindFirstElement TAG_SOP_CLASS_UID, False
LEADDICOM1.GetStringValue 0, 1
szClassUID = LEADDICOM1.StringValues (0)
'send the command set
nID = LEADDICOMNet1.FindPresentationAbstract (hPDU, szClassUID)
If (nID = 0) Then
nRet = LEADDICOM1.FindUID(szClassUID)
If (nRet = 0) Then
MsgBox "Abstract Syntax, " & LEADDICOM1.CurrentUID.Name & ", Not Supported by Association!"
Else
MsgBox "Abstract Syntax, " & szClassUID & ", Not Supported by Association!"
End If
Screen.MousePointer = vbDefault
Exit Sub
End If
LEADDICOMNet1.SendCStoreRequest LEADDICOMNet1.hNet, nID, 999, szClassUID, szInstanceUID, COMMAND_PRIORITY_MEDIUM, "", 0, LEADDICOM1.hDicomDS
Screen.MousePointer = vbDefault