Uno/Cpp/Snippet/Managing an Object

From Apache OpenOffice Wiki
< Uno‎ | Cpp
Revision as of 17:39, 23 February 2008 by SergeMoutou (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
#include <uno/environment.hxx>
...
{
  uno::Environment env(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("c++:unsafe")));
 
  void * pObject = ...
 
  // Acquire pObject.
  env.get()->pExtEnv->acquireInterface(env.get()->pExtEnv, pObject);
 
  // Release pObject.
  env.get()->pExtEnv->releaseInterface(env.get()->pExtEnv, pObject);
 
  ...
}
Personal tools