Define All Required Names
You must define two required names for your property page snap-in extension:
Note
In the following sections, snap-in extension refers to what had been called "plug-in" in earlier versions of the documentation. In some sections of the code comments you may still find references to "plug-in" to mean the same as "snap-in extension".
The application name displayed in the user interface as a context menu selection and as the title of the properties dialog box.
The application name is defined in the full code example in the Registry.cpp file when registering and unregistering the snap-in.
This code example shows how to define the application name for the required registry key that identifies the snap-in display name.
Note
Any comment in the following code example that starts with "TODO:" refers to an action that you must perform when modifying the code for a new extension to the property sheets for the Applications snap-in. Comments that do not start with "TODO:" describe an action that the subsequent code will perform.
// TODO: Replace "<<APPLICATION_NAME>>" with appropriate text: const TCHAR szKeyPath[] = _T( "SOFTWARE\\Microsoft" ) _T( "\\Plugins\\Applications\\<<APPLICATION_NAME>>" );
In the full code example in the Appext.cpp file when creating the application element in the XML DOM document.
The following code example shows how to create the name element, representing the snap-in name, when it does not exist in the XML DOM document.
Note
Any comment in the following code example that starts with "TODO:" refers to an action that you must perform when modifying the code for a new extension to the property sheets for the Applications snap-in. Comments that do not start with "TODO:" describe an action that the subsequent code will perform.
// TODO: Replace "<<APPLICATION_NAME>>" with appropriate text // "name" attribute not found, create: SetAttribute( pThis->m_pXmlDom, pElmApp, _T( "name" ), _T( "<<APPLICATION_NAME>>" ) );
The property sheet snap-in extension (or plug-in) name used internally for registration purposes. The plug-in name is defined in the full code example in the Registry.cpp file when defining the extensible nodes.
This code example shows how to add the property sheet snap-in extension (or plug-in) name to the registry setting listing extensible nodes.
Note
Any comment in the following code example that starts with "TODO:" refers to an action that you must perform when modifying the code for a new extension to the property sheets for the Applications snap-in. Comments that do not start with "TODO:" describe an action that the subsequent code will perform.
// List all extended nodes. // Application Result Node {C8535E2E-148D-494D-8E9A-71FC46649B5E} EXTENDER_NODE _NodeExtensions[] = { { PropertySheetExtension, // GUID of node that this plug-in extends (application node): { 0xC8535E2E, 0x148d, 0x494d, { 0x8e, 0x9a, 0x71, 0xfc, 0x46, 0x64, 0x9b, 0x5e } }, // The plug-in GUID (also defined in Guids.h, line 31): { 0xA2E38A7B, 0xD9B2, 0x4DFC, { 0x85, 0x69, 0x1F, 0x53, 0x83, 0x06, 0x15, 0x90 } }, // The plug-in UID name: _T( "<<PLUGIN_NAME>>" ) }, { DummyExtension, NULL, NULL, NULL } };
The following code example shows how to add the property sheet snap-in extension (or plug-in) name to the node extension registration.
Note
Any comment in the following code example that starts with "TODO:" refers to an action that you must perform when modifying the code for a new extension to the property sheets for the Applications snap-in. Comments that do not start with "TODO:" describe an action that the subsequent code will perform.
// TODO: Replace "<<PLUGIN_NAME>>" with appropriate text: const TCHAR szPluginName[] = _T( "<<PLUGIN_NAME>>" ); lr = RegSetValueEx( hKey, _T( "" ), 0, REG_SZ, (BYTE*)szPluginName, (DWORD)( _tcslen( szPluginName ) + 1 ) * sizeof( TCHAR ) );