当前位置: 首页>>代码示例>>C++>>正文


C++ ACE_REGISTRY_CALL_RETURN函数代码示例

本文整理汇总了C++中ACE_REGISTRY_CALL_RETURN函数的典型用法代码示例。如果您正苦于以下问题:C++ ACE_REGISTRY_CALL_RETURN函数的具体用法?C++ ACE_REGISTRY_CALL_RETURN怎么用?C++ ACE_REGISTRY_CALL_RETURN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ACE_REGISTRY_CALL_RETURN函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ACE_TEXT_RegCreateKeyEx

// Insert or update <naming_context> with <name> relative to <this> context
// (String version)
int
ACE_Registry::Naming_Context::bind_context (const ACE_TString &name,
                                            /* const */ Naming_Context &naming_context,
                                            u_long persistence,
                                            u_long security_access,
                                            LPSECURITY_ATTRIBUTES security_attributes)
{
  u_long reason;

  long result = ACE_TEXT_RegCreateKeyEx (this->key_,
                                         name.c_str (),
                                         0,
                                         0,
                                         persistence,
                                         security_access,
                                         security_attributes,
                                         &naming_context.key_,
                                         &reason);
  if (result == ERROR_SUCCESS)
    {
      // Set the correct parent
      naming_context.parent (this->key_);
      // Set the correct name
      naming_context.name (name);
    }

  ACE_REGISTRY_CALL_RETURN (result);
}
开发者ID:16898500,项目名称:SkyFireEMU,代码行数:30,代码来源:Registry.cpp

示例2: ACE_TEXT_RegQueryValueEx

// Find <object> with <name> in <this> context
// (String version)
int
ACE_Registry::Naming_Context::resolve (const ACE_TString &name,
                                       Object &object)
{
  // Get object state
  u_long type;
  void *data = object.data ();
  u_long size = object.size ();

  long result = ACE_TEXT_RegQueryValueEx (this->key_,
                                          name.c_str (),
                                          0,
                                          &type,
                                          (BYTE *)data,
                                          &size);
  if (result == ERROR_SUCCESS)
    {
      // Reset object state
      // No need to set object.data()
      object.type (type);
      object.size (size);
    }

  ACE_REGISTRY_CALL_RETURN (result);
}
开发者ID:16898500,项目名称:SkyFireEMU,代码行数:27,代码来源:Registry.cpp

示例3: defined

/* static */
int
ACE_Predefined_Naming_Contexts::connect (ACE_Registry::Naming_Context &naming_context,
                                         HKEY predefined,
                                         const ACE_TCHAR *machine_name)
{
#if defined (ACE_HAS_WINCE)
  return -1;
#else
  long result = -1;

  if (machine_name != 0 && ACE_OS::strcmp (ACE_TEXT ("localhost"), machine_name) == 0)
    machine_name = 0;

  if (predefined == HKEY_LOCAL_MACHINE || predefined == HKEY_USERS)
    result =
      ACE_TEXT_RegConnectRegistry (const_cast<ACE_TCHAR *> (machine_name),
                                   predefined,
                                   &naming_context.key_);
  if (predefined == HKEY_CURRENT_USER || predefined == HKEY_CLASSES_ROOT)
    // Make sure that for these types, the machine is local
    if (machine_name == 0 ||
        ACE_Predefined_Naming_Contexts::is_local_host (machine_name))
      {
        naming_context.key_ = predefined;
        result = 0;
      }
    else
      result = -1;

  ACE_REGISTRY_CALL_RETURN (result);
#endif  // ACE_HAS_WINCE
}
开发者ID:Elevim,项目名称:RG-332,代码行数:33,代码来源:Registry.cpp

示例4: ACE_TEXT_RegDeleteKey

// Remove naming_context with <name> from <this> context
// (String version)
int
ACE_Registry::Naming_Context::unbind_context (const ACE_TString &name)
{
  long result = ACE_TEXT_RegDeleteKey (this->key_,
                                                       name.c_str ());

  ACE_REGISTRY_CALL_RETURN (result);
}
开发者ID:16898500,项目名称:SkyFireEMU,代码行数:10,代码来源:Registry.cpp

示例5: ACE_TEXT_RegSetValueEx

// Insert or update <object> with <name> into <this> context
// (String version)
int
ACE_Registry::Naming_Context::bind (const ACE_TString &name,
                                    const Object &object)
{
  long result = ACE_TEXT_RegSetValueEx (this->key_,
                                        name.c_str (),
                                        0,
                                        object.type (),
                                        (const BYTE *) object.data (),
                                        object.size ());
  ACE_REGISTRY_CALL_RETURN (result);
}
开发者ID:16898500,项目名称:SkyFireEMU,代码行数:14,代码来源:Registry.cpp

示例6: ACE_TEXT_RegOpenKeyEx

// Find <naming_context> with <name> in <this> context
// (String version)
int
ACE_Registry::Naming_Context::resolve_context (const ACE_TString &name,
                                               Naming_Context &naming_context,
                                               u_long security_access)
{
  long result = ACE_TEXT_RegOpenKeyEx (this->key_,
                                       name.c_str (),
                                       0,
                                       security_access,
                                       &naming_context.key_);
  if (result == ERROR_SUCCESS)
    {
      // set the correct parent
      naming_context.parent (this->key_);
      // set the correct name
      naming_context.name (name);
    }

  ACE_REGISTRY_CALL_RETURN (result);
}
开发者ID:16898500,项目名称:SkyFireEMU,代码行数:22,代码来源:Registry.cpp

示例7: ACE_REGISTRY_CALL_RETURN

// Close the handle of the context
int
ACE_Registry::Naming_Context::close (void)
{
  long result = this->key_ ? ::RegCloseKey (this->key_) : ERROR_SUCCESS;
  ACE_REGISTRY_CALL_RETURN (result);
}
开发者ID:16898500,项目名称:SkyFireEMU,代码行数:7,代码来源:Registry.cpp


注:本文中的ACE_REGISTRY_CALL_RETURN函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。