---
name: "ACE_Predefined_Naming_Contexts"
section: "3"
platform: "linux"
package: "libace-doc"
version: "5.0.7-4"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/ACE_Predefined_Naming_Contexts"
---

# ACE\_Predefined\_Naming\_Contexts(3)

A factory for predefined registries, which exist by default on Win32 platforms

## NAME

ACE\_Predefined\_Naming\_Contexts -  A factory for predefined registries, which exist by default on Win32 platforms

## SYNOPSIS

```
#include <ace/Registry.h>
class ACE_Predefined_Naming_Contexts
{
  public:
    static int connect (
        ACE_Registry::Naming_Context &naming_context,
        HKEY predefined = HKEY_LOCAL_MACHINE,
        LPCTSTR machine_name = 0
        );
  private:
    static int is_local_host (LPCTSTR machine_name);
};
```

## DESCRIPTION

This factory can connect to both local and remote predefined registries.

## PUBLIC MEMBERS

```
static int connect (
    ACE_Registry::Naming_Context &naming_context,
    HKEY predefined = HKEY_LOCAL_MACHINE,
    LPCTSTR machine_name = 0
    );
```

Factory method for connecting to predefined registries.  This method works for both remote and local machines.  However, for remote machines, HKEY\_CLASSES\_ROOT and HKEY\_CURRENT\_USER types are not allowed

## PRIVATE MEMBERS

```
static int is_local_host (LPCTSTR machine_name);
```

Check if machine\_name is the local host

## AUTHOR

Irfan Pyarali (irfan@cs.wustl.edu)

## LIBRARY

ace
