LDicomDS::SetPreamble

#include "Ltdic.h"

L_VOID LDicomDS::SetPreamble(pPreamble, nLength)

Sets the contents of the preamble.

Parameters

L_UCHAR * pPreamble

Character string that contains the preamble to set.

L_UINT16 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 LDicomDS::GetPreamble.

Required DLLs and Libraries

Platforms

Win32, x64

See Also

Functions

Topics

Example

This example sets the preamble.

L_INT LDicomDS_SetPreambleExample() 
{ 
   LDicomDS*   pDS; 
   L_UCHAR     szPreamble[DS_PREAMBLE_LENGTH]; 
 
   pDS = new LDicomDS(NULL); 
 
   memset(szPreamble, 0xFF, sizeof(szPreamble)); 
   pDS->SetPreamble(szPreamble, sizeof(szPreamble)); 
 
   delete pDS; 
 
   return DICOM_SUCCESS; 
} 

Help Version 21.0.2021.3.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C++ Class Library Help