LDicomDS::SetPresStateInfo

#include "Ltdic.h"

L_UINT16 LDicomDS::SetPresStateInfo(pPresState)

Sets the attributes of the "Presentation State Module".

Parameters

pDICOMPRESSTATEINFO pPresState

Pointer to a "Presentation State Module" attributes structure.

Returns

Value Meaning
0 SUCCESS
>0 An error occurred. Refer to Return Codes.

Comments

Before calling this function, initialize pPresState->uStructSize to be sizeof(DICOMPRESSTATEINFO) and initialize all the members of the structure.

Required DLLs and Libraries

Platforms

Win32, x64

See Also

Functions

Topics

Example

L_INT LDicomDS_SetPresStateInfoExample(LDicomDS& PresStateDS) 
 
{ 
   L_INT                nRet; 
   VALUEDATE            Date = {0}; 
   VALUETIME            Time = {0}; 
   DICOMPRESSTATEINFO   PresState = {0}; 
   SYSTEMTIME           SysTime = {0}; 
 
   GetSystemTime(&SysTime);  
 
   Date.nYear = SysTime.wYear;  
   Date.nMonth = SysTime.wMonth;  
   Date.nDay = SysTime.wDay;  
 
   Time.nHours = SysTime.wHour;  
   Time.nMinutes = SysTime.wMinute;  
   Time.nSeconds = SysTime.wSecond;  
 
   PresState.nInstanceNumber = 1;  
   PresState.pszPresLabel = TEXT("LABEL"); 
   PresState.pszPresDescription = TEXT("Description"); 
   PresState.pszPresCreator = TEXT("Creator"); 
   PresState.pPresCreationDate = &Date;  
   PresState.pPresCreationTime = &Time;  
   PresState.uStructSize = sizeof(DICOMPRESSTATEINFO);  
 
   nRet  = PresStateDS.SetPresStateInfo(&PresState);  
 
   if (nRet == DICOM_SUCCESS)  
   { 
      MessageBox( NULL,  
                  TEXT("Presentation state has been successfully updated"),  
                  TEXT("Error"),  
                  MB_OK);  
   } 
   return nRet; 
} 
Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS DICOM C++ Class Library Help