Formats the session header information into an SIDF compliant session header.
#include <smsdefns.h> #include <smsutapi.h> CCODE NWSMSetSessionHeaderInfo ( NWSM_SESSION_INFO *sessionInfo, BUFFERPTR buffer, UINT32 bufferSize, UINT32 *headerSize);
(IN) Points to the session header information to be formatted.
(OUT) Points to the buffer to receive the formatted session information.
(IN) Specifies the size of buffer.
(OUT) Points to the size of the formatted header.
The following table lists the return values associated with the function.
If you are using SMS DI, call NWSMSDOpenSessionForWriting to write the header out to the medium.
To get the SMDR name, call NWSMListSMDRs.
#include <smstsapi.h> #include <smsutapi.h> #include <smsdefns.h> NWSM_SESSION_INFO sessionInfo; NWSMSD_HEADER_BUFFER *sessionHeaderInfo; UINT32 sessionDateTime; /* Setup the session header buffer information. maxTransferBufferSize is set by NWSMSDSessionOpenForWriting */ sessionHeaderInfo = (NWSMSD_HEADER_BUFFER *) malloc(sizeof(NWSMSD_HEADER_BUFFER) + maxTransferBufferSize - 1); sessionHeaderInfo->bufferSize = maxTransferBufferSize; /* Setup the session header information. */ sessionDateTime = NWSMGetCurrentDateAndTime(); NWSMDOSTimeToECMA(sessionDateTime, &(sessionInfo.timeStamp)); strcpy(sessionInfo.description, “Backup file server”); strcpy(sessionInfo.softwareName, “SBackup”); strcpy(sessionInfo.softwareType, “SMS”); strcpy(sessionInfo.softwareVersion, “Ver 4.x”); sessionInof.serviceName = name from NWSMTSListTargetServices or NWSMTSScanTargetServices; NWSMTSGetTargetServiceType(connection, (STRING)sessionInfo.sourceName, (STRING)sessionInfo.sourceType, (STRING)sessionInfo.sourceVersion); /* Format the session information according to SIDF, and put the resulting data into the session header buffer. */ NWSMSetSessionHeaderInfo(&sessionInfo, sessionHeaderInfo->headerBuffer, sessionHeaderInfo->bufferSize, &sessionHeaderInfo->headerSize);