L_DicomSetPreamble

#include "Ltdic.h"

L_LTDIC_API L_VOID L_DicomSetPreamble(hDS, pPreamble, nLength)

HDICOMDS hDS;

/* a DICOM handle */

L_UCHAR * pPreamble;

/* character string */

L_UINT16 nLength;

/* length of pPreamble */

Sets the contents of the preamble.

Parameter

Description

hDS

A DICOM handle.

pPreamble

Character string that contains the preamble to set.

nLength

Length of pPreamble. The maximum length is DS_PREAMBLE_LENGTH, which is defined as 128.

Returns

None

Comments

The standard length of the Preamble is 128 bytes. You may use the constant DS_PREAMBLE_LENGTH, which is defined as 128, when setting nLength.

If the value specified in nLength is > DS_PREAMBLE_LENGTH, then the Preamble will be set with the first 128 bytes of pPreamble. If nLength is <= DS_PREAMBLE_LENGTH, then the Preamble will be set with the entire contents of pPreamble.

To retrieve the contents of the Preamble, call L_DicomGetPreamble.

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:

L_DicomGetPreamble

Topics:

Working with Data Sets

Example

This example sets the preamble

L_INT DicomSetPreambleExample(L_VOID)
{
   HDICOMDS hDS;
   L_UCHAR   szPreamble[DS_PREAMBLE_LENGTH];

   hDS = L_DicomCreateDS(NULL);

   memset(szPreamble, 0xFF, sizeof(szPreamble));
   L_DicomSetPreamble(hDS, szPreamble, sizeof(szPreamble));
   L_DicomFreeDS(hDS);
   return DICOM_SUCCESS;
}