# xxxSetTraceLevel

Called to set the trace mask for a specific client (context).

#### Prototype

DWORD xxxSetTraceLevel (CTAHD ctahd, void *mgrcontext, unsigned svcid, unsigned tracemask)

Argument | Description
ctahd | Context handle.
mgrcontext | Pointer to data structure returned by xxxOpenServiceManager.
svcid | ID of the service.
tracemask | Trace mask to be used by the service.

#### Return values

SUCCESS

#### Details

The dispatcher invokes xxxSetTraceLevel when the application calls ctaSetTraceLevel on a given context. The service responds to this call by storing the tracemask in its internal context structure (mgrcontext). When deciding whether to log trace messages to the Natural Access trace log, the service looks at both the global trace pointer and this context-specific trace mask. The trace mask contains bits for use by the dispatcher as well as service-specific bits for exclusive use of services.

For more information about this function, refer to Runtime binding functions.

#### See also

xxxFormatMessage, xxxFormatTraceBuffer, xxxGetText