Sky Software Homepage LogicNP Software Knowledge Base And FAQ

 
Contact Product Support    SearchSearch      Subscribe to the RSS feed for this forum

Develop a property sheet extension for an Active Directory object

 
Subscribe to the RSS feed for this forum  Forum Index -> EZNamespaceExtensionsMFC
View previous topic :: View next topic  
Author Message
Support



Joined: 18 Jul 2005
Posts: 731

Posted: Thu Mar 26, 2009 6:36 am    Post subject: Develop a property sheet extension for an Active Directory object

To develop a property sheet extension for an Active Directory object:

  • Create a new property sheet extension using the 'New Project' wizard to create a new project or the 'Add New Item...' wizard to add a new property sheet extension to an existing project.
  • Since the property sheet extension is not targeted at any file extension or ProgID, remove all code from the GetExtensionTargetInfo virtual overridden method of extension class (which is derived from the CPropertySheetExtension class).
  • Register the extension on the system using the regsvr32.exe utility.

  • Now, you need to register the extension with Active Directory. To do so, start ADSIEdit.msc and navigate to the following path:CN=user-Display,CN=409,CN=DisplaySpecifiers,CN=Configuration,DC=ssware,DC=com
    In the above path, replace ssware.com with your own domain and substitute 'user-Display' with whatever type of object you want to register the extension for.
    Double-click on 'CN=user-Display' entry in the right-hand listview to bring up its 'Properties' dialog.
  • In the 'Attributes' list box, select the 'adminPropertyPages' or the 'shellPropertyPages' entry and click the 'Edit' button to bring up the 'String Editor' dialog
  • In the 'String Editor' dialog, add the following line:
    "4,{GUID OF YOUR CONTEXT MENU EXTENSION CLASS}"
    Example : "4,{B084EEB5-C144-4006-A7C3-8DB4ED46C54B}"
    The GUID of your context menu extension class is the same GUID that is applied to your class using the IMPLEMENT_OLECREATE_EX macro.
    If there is already an entry with position of '4', then you can specify the highest position not yet specified.
  • Now your property sheet extension is registered with Active Directory. You can now test this by using the 'Active Directory Users and Computers' and browsing to a user and right-clicking on a user and clicking on 'Properties'. You will see your property page in the 'Properties' sheet for the object.

  • To determine the objects (users/computers/etc) that the property page is being showed for, you can override the OnInitialize method and use the CUtils::GetDSOBJECTFromDataObject and CUtils::GetDSDISPLAYSPECOPTIONSFromDataObject method.
Back to top
Display posts from previous:   
Forum Index -> EZNamespaceExtensionsMFC All times are GMT
Page 1 of 1

 
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group