LDicomNet::OnReceivedISCLPacket

#include "ltdic.h"

virtual L_VOID LDicomNet::OnReceivedISCLPacket(nError, pBuffer, nLength)

L_INT nError;

/* error code */

L_UCHAR *pBuffer;

/* pointer to a buffer */

L_UINT32 nLength;

/* length of data received */

This low-level function is called after data is received in ISCL mode. This function is available in the PACS Imaging toolkits.

Parameter

Description

nError

Error code. Refer to Return Codes.

pBuffer

Pointer to a buffer that contains the data that was received from the ISCL process

nLength

The length of the received data, in bytes.

Returns

None.

Comments

This function is called when data is received using ISCL security. If nError is not DICOM_SUCCESS, then pBuffer is NULL.  If nError is DICOM_SUCCESS, then pBuffer points to a valid buffer whose length is nLength. The data from pBuffer will be freed after this callback function returns.

Required DLLs and Libraries

LTDIC

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

Platforms

Win32, x64

See Also

Functions:

LDicomNet::OnNonSecureSendISCL, Class Members

Topics:

Sending and Receiving Messages

 

General Integrated Secure Communication Layer (ISCL) Information

Example

This example displays information about the received ISCL packet.

L_VOID LMyDicomNet::OnReceivedISCLPacket(L_INT nError, L_UCHAR *pBuffer, L_UINT32 nLength)
{
   CString str, total;
   if(nError != 0)
   {
      str.Format(TEXT("OnReceivedISCLPacket Error: %d\n"), nError);
      OutputDebugString(str);
      return;
   }
   str.Format(TEXT("Received ISCL packet\n\tmsg id: 0x%X\n\t"), *((L_UINT32 *)&(pBuffer[4])));
   total += str;
   str.Format(TEXT("data length: %d\n\t"), *((L_UINT32 *)&(pBuffer[8])));
   total += str;
   str.Format(TEXT("option: %d"), *((L_UINT32 *)&(pBuffer[12])));
   total += str;
   OutputDebugString(total);
   LDicomNet::OnReceivedISCLPacket(nError, pBuffer, nLength);
}