Compartilhar via


DECLARE_REGISTRY_RESOURCE

 

Gets the named resource containing the registry file and runs the script to either enter objects into the system registry or remove them from the system registry.

Syntax

      DECLARE_REGISTRY_RESOURCE( 
   x  
)

Parameters

  • x
    [in] String identifier of your resource.

Remarks

When you create an object or control using the ATL Project Wizard, the wizard will automatically implement script-based registry support and add the DECLARE_REGISTRY_RESOURCEID macro, which is similar to DECLARE_REGISTRY_RESOURCE, to your files.

You can statically link with the ATL Registry Component (Registrar) for optimized registry access. To statically link to the Registrar code, add the following line to your stdafx.h file:

#define _ATL_STATIC_REGISTRY

If you want ATL to substitute replacement values at run time, do not specify the DECLARE_REGISTRY_RESOURCE or DECLARE_REGISTRY_RESOURCEID macro. Instead, create an array of _ATL_REGMAP_ENTRIES structures, where each entry contains a variable placeholder paired with a value to replace the placeholder at run time. Then call CAtlModule::UpdateRegistryFromResourceD or CAtlModule::UpdateRegistryFromResourceS, passing the array. This adds all of the replacement values in the _ATL_REGMAP_ENTRIES structures to the Registrar's replacement map.

For more information about replaceable parameters and scripting, see the article The ATL Registry Component (Registrar).

Requirements

Header: atlcom.h

See Also

Registry Macros
ATL Macros
DECLARE_REGISTRY
_ATL_STATIC_REGISTRY