User guide

104 RealCT Direct API Developer Guide
Chapter 4: E1 Networking
Example 5. RHT_LOAD_PROTOCOL Sample Code
(Continued)
memset (&Protocol, 0, sizeof (Protocol));
Protocol.Length = FileSize;
Protocol.Protocol = pProtocolBuffer;
Protocol.Trunk = M_TRUNK0; /* Trunk 0 */
IoctlResult = BrktDeviceIoControl (
BoardHandle,
RHT_LOAD_PROTOCOL,
&Protocol, /* Buffer to driver */
sizeof(Protocol), /* Length */
NULL, /* Buffer from driver */
0, /* Length */
&BytesReturned,
NULL); /* Wait till I/O complete */
if (!IoctlResult)
printf ("LOADPR failed: BrktGetLastError = %d\n",
BrktGetLastError (BoardHandle));
else
printf ("LOADPR done \n");
BrktCloseDevice(BoardHandle);
return(0);
}