How To: Find GUIDs for different types of layer interfaces


Instructions provided describe how to obtain the GUID for specific layer types to work with IMap::Layers property.

In the ArcGIS Developer Help for IMap::Layers property, there is a list of GUIDs for six different types of layers:

{6CA416B1-E160-11D2-9F4E-00C04F6BC78E} IDataLayer
{E156D7E5-22AF-11D3-9F99-00C04F6BC78E} IGeoFeatureLayer
{34B2EF81-F4AC-11D1-A245-080009B6F22B} IGraphicsLayer
{5CEAE408-4C0A-437F-9DB3-054D83919850} IFDOGraphicsLayer
{0C22A4C7-DAFD-11D2-9F46-00C04F6BC78E} ICoverageAnnotationLayer
{EDAD6644-1810-11D1-86AE-0000F8751720} IGroupLayer


Each interface in ArcObjects has a unique associated GUID value.
To obtain GUIDs for layer type interfaces that are not listed, such as IGroupLayer, IRasterLayer, ITinLayer and IEventLayer, follow the steps below.

The following instructions do not involve modifying Registry values; do not modify anything in your Registry.  It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult with a qualified computer systems professional, if necessary. 
ESRI cannot guarantee results from incorrect modifications while following these instructions. Therefore, use caution and proceed at your own risk.  
  1. Open the Windows Registry Editor: click Start > Run. Type regedit.
  2. In the Registry Editor, browse to the location:
    My Computer\HKEY_CLASSES_ROOT\Interface
  3. Go to Edit > Find.
  4. Type the name of the layer interface. Click Find Next. It may be necessary to click Edit > Find Next if the correct interface is not returned.
  5. When there is a match, it shows the GUID at the bottom of the Registry Editor window, for example :My Computer\HKEY_CLASSES_ROOT\Interface\<GUID_value>.