(Page 29 of 32 in this chapter) Version
typedef void
(*NMS_V5_TRACE_CALLBACK_T)
(char *tracebuffer,
DWORD datasize);
|
Parameter
|
Description
|
|---|---|
|
tracebuffer
|
A pointer to the beginning of the trace information inside the application-allocated memory.
|
|
datasize
|
The size of the data returned in the tracebuffer.
|
void SetTrace( void )
{
NMS_V5_RESULT_T NmsResult;
NMS_V5_TRACEMASK_T TraceMask;
BYTE FileName[64];
DWORD TraceBufferSize;
char Selection;
printf("NMS_V5SetTrace:\n");
/* Set to print error mesages */
prompthex("Enter TraceMask", &TraceMask);
TraceBufferSize = NMS_V5_MIN_TRACE_BUF_SIZE;
/* Allocate buffer size not less than required minimum */
g_pTraceBuffer = calloc(TraceBufferSize, 1);
/* Log trace information to a file */
strcpy( FileName, "nms_v5.log" );
NmsResult = NMS_V5SetTrace(TraceMask,
NULL,
NULL,
TraceBufferSize,
FileName);
printf ("NMS_V5SetTrace: Result=%s\n",PRINT_RESULT(NmsResult));
}
(Page 29 of 32 in this chapter) Version