# Registering CFXs

To use a CFX tag in your ColdFusion applications, first register it in the Extensions, CFX Tags page in the ColdFusion Administrator.

| To register the tag in the CF Administrator:

1. In the CF Administrator, open the Extensions > CFX Tags page.
2. Enter `CFX_MyNewTag` in the Tag name and, optionally, a description.
3. Select the type of tag (either C++ or Java).
4. Click Add to open the New CFX Tag page.

| To register a C++ CFX:

1. In the CF Administrator, open the Extensions > CFX Tags page.
2. Enter `CFX_MyNewTag` in the Tag name and, optionally, a description.
3. Select the type of tag (either C++ or Java).
4. Click Add to open the New CFX Tag page.
5. If the Server library (DLL) field is empty, enter the file path.
6. Accept the default Procedure entry.
7. Un-check the Keep library loaded box while developing the tag. When the tag is ready for production use, you can check this option to keep the DLL in memory for improved performance.
8. Click Add.

You can now call the tag from a ColdFusion template.

| To register a Java CFX:

1. In the CF Administrator, open the Extensions > CFX Tags page.
2. Enter `CFX_MyNewTag` in the Tag name and, optionally, a description.
3. Select the type of tag (either C++ or Java).
4. Click Add to open the New CFX Tag page.
5. Enter the Class name.
6. Click Add.

You can now call the tag from a ColdFusion template.

| To change a CFX tag:

1. Click the tag you want to change in the Registered CFX Tags list.
2. Make changes as needed on the Edit CFX Tag page.
3. Click Apply to save the changes.

| To delete a CFX tag:

1. Click the tag you want to delete in the Registered CFX Tags list.
2. Click Delete on the Edit CFX Tag page. The tag is removed from the list but is not deleted from the system.

On Windows NT only, the Visual C++ Custom Tag Wizard automatically registers custom tags so that they can be tested and debugged.

## Distribution

If you are distributing a custom tag, you may want to automatically register the custom tag during the setup process by writing the registration entries directly into the Registry. The location, key, and value names to write are as follows:

Registration Entries for C++ CFXs
Entry | Value
--- | ---
    Hive
| `HKEY_LOCAL_MACHINE`
    Key
| `SOFTWARE\Allaire\ColdFusion\CurrentVersion\CustomTags\`TagName
    LibraryPath
| The full path to the DLL (Windows NT) or shared object (Solaris) that implements the custom tag.
    ProcedureName
| The name of the procedure to call for processing tag requests.
    Description
| A description of the tag's functionality for browsing by end users.
    CacheLibrary
| Indicates whether to keep the DLL or shared object loaded in RAM (1 or 0).

Registration Entries for Java CFXs
Entry | Value
--- | ---
    Hive
| `HKEY_LOCAL_MACHINE`
    Key
| `SOFTWARE\Allaire\ColdFusion\CurrentVersion\CustomTags\`TagName
    ClassName
| The name of the Class to call.
    Description
| A description of the tag's functionality for browsing by end users.

You can create a file containing this information by using the Regedit utility to export the registry entry from a machine on which the custom tag is already installed.

On Windows NT, use Regedit to import custom tags to the registry. The ColdFusion regedit utility (in the bin) performs the same function on UNIX.

| To import a C++ custom tag:

1. Export the custom tag's registry entry by using the Regedit utility. This creates a file similar to the following:

       REGEDIT4

       [HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\
       CustomTags\CFX_TEST]
       "LibraryPath"="C:\\cfusion\\cfx\\CFX_TEST\\test.dll"
       "ProcedureName"="ProcessTagRequest"
       "Description"="Sample CFX tag."
       "CacheLibrary"="1"

2. In the install script, import the registry entry by including the following command in the install script:

       regedit importfilename

| To import a Java custom tag:

1. Export the custom tag's registry entry by using the Regedit utility. This creates a file similar to the following:

       REGEDIT4

       [HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\
       CustomTags\CFX_TEST]
       "ClassName"="ProcessTagRequest"
       "Description"="Sample CFX tag."

2. In the install script, import the registry entry by including the following command in the install script:

       regedit importfilename