Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Registers a callback that receives libHttpClient trace messages. After you register a callback, libHttpClient can call it until trace cleanup removes it.
Syntax
bool HCTraceSetClientCallback(
HCTraceCallback* callback
)
Parameters
callback _In_opt_
Type: HCTraceCallback*
Trace callback to register.
Return value
Type: bool
For a non-null callback, returns true if the callback was registered, or false if all 10 callback slots are occupied. In that case, the callback isn't registered and doesn't receive trace messages.
Passing nullptr registers no callback and removes none. It returns true if an empty slot is available, or false if all slots are occupied.
Remarks
You can register up to 10 client callbacks. Register each callback only once. Registering the same callback again uses another slot, and the callback then receives each message once per registration.
Passing nullptr doesn't remove a registered callback. Each direct call to HCTraceCleanup removes all client callbacks. Final library teardown with HCCleanupAsync also reaches trace cleanup and removes them. Removing the registrations doesn't wait for a callback that's already running. Register your callback again after you reinitialize libHttpClient.
For threading rules and parameter details, see HCTraceCallback.
Requirements
Header: trace.h
Library: libHttpClient.lib
Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles
See also
trace
HCTraceCallback
HCSettingsSetTraceLevel
HCTraceCleanup