LibreOffice LibreOffice 26.2 SDK C/C++ API Reference

Loading...
Searching...
No Matches
current_context.h File Reference
`#include "cppu/cppudllapi.h"`
`#include "rtl/ustring.h"`

Go to the source code of this file.

## Functions
CPPU_DLLPUBLIC sal_Bool | uno_getCurrentContext (void **ppCurrentContext, rtl_uString *pEnvDcp, void *pEnvContext) SAL_THROW_EXTERN_C()
| Gets the current task's context.
CPPU_DLLPUBLIC sal_Bool | uno_setCurrentContext (void *pCurrentContext, rtl_uString *pEnvDcp, void *pEnvContext) SAL_THROW_EXTERN_C()
| Sets the current task's context.

## Function Documentation

## ◆ uno_getCurrentContext()

CPPU_DLLPUBLIC sal_Bool uno_getCurrentContext | ( | void ** | ppCurrentContext,
|  | rtl_uString * | pEnvDcp,
|  | void * | pEnvContext )

Gets the current task's context.

Attention
  Don't spread the returned interface around to other threads. Every thread has its own current context.

Parameters

  ppCurrentContext | inout param current context of type com.sun.star.uno.XCurrentContext
  pEnvDcp | descriptor of returned interface's environment
  pEnvContext | context of returned interface's environment (commonly 0)

Returns
  true, if context ref was transferred (even if null ref)

## ◆ uno_setCurrentContext()

CPPU_DLLPUBLIC sal_Bool uno_setCurrentContext | ( | void * | pCurrentContext,
|  | rtl_uString * | pEnvDcp,
|  | void * | pEnvContext )

Sets the current task's context.

Parameters

  pCurrentContext | in param current context of type com.sun.star.uno.XCurrentContext
  pEnvDcp | descriptor of interface's environment
  pEnvContext | context of interface's environment (commonly 0)

Returns
  true, if context ref was transferred (even if null ref)