Separates an SIDF media header into its various components.
#include <smsutapi.h> CCODE NWSMGetMediaHeaderInfo ( BUFFERPTR headerBuffer, UINT32 headerBufferSize, NWSM_MEDIA_INFO *mediaInfo);
(IN) Points to the beginning of the buffer containing an SIDF media header.
(IN) Specifies the size of the media header in bytes.
(OUT) Points to the unformatted media header information.
The following table lists the return values associated with the function.
/* example using SMS DI */ #define MY_BUFFER_SIZE 1024 /* arbitrary size */ NWSM_MEDIA_INFO mediaInfo; NWSMSD_CONTROL_BLOCK controlBlock; /* SMS DI structure */ NWSMSD_HEADER_BUFFER *headerBuffer; NWSMSD_MEDIA_HANDLE mediaHandle; NWBOOLEAN32 verifyHeader; NWSMSD_HEADER_BUFFER *mediaHeader; CCODE ccode, completionStatus; /* Allocate memory for headerBuffer. maxTransferBufferSize is set by NWSMSDSessionOpenForReading */ headerBuffer=(NWSMSD_HEADER_BUFFERÂ *)malloc(sizeof(NWSMSD_HEADER_BUFFER) + maxTransferBufferSize - 1); headerBuffer->bufferSize = maxTransferBufferSize; /* Set up the media header buffer information */ mediaHeader = (NWSMSD_HEADER_BUFFERÂ *) malloc(sizeof(NWSMSD_HEADER_BUFFER) +MY_BUFFER_SIZE - 1); mediaHeader->bufferSize = MY_BUFFER_SIZE; verifyHeader = TRUE; ccode = NWSMSDMediaHeaderReturn(sdiConnection, mediaHandle, verifyHeader, mediaHeader, 0, &completionStatus); if (ccode) { /* handle error here */ return ccode; } /* Wait for the function to complete its task. The engine can do other things while waiting. */ while (completionStatus == NWSMSD_WAIT_PENDING) MyDelay(); if (completionStatus == 0) NWSMGetMediaHeaderInfo((BUFFERPTR)headerBuffer->headerBuffer, headerBuffer->headerSize, &mediaInfo);