本文整理汇总了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);
}
示例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);
}
示例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
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}