Platform SDK: Active Directory, ADSI, and Directory Services |
The attributes of the serviceConnectionPoint class are sufficient for the needs of most services. Active Directory does not define how the attributes are to be used, so the clients of your service must be able to interpret and use the information in your service's SCPs. Services that need to publish additional information about themselves can extend the Active Directory schema by creating a subclass of the serviceConnectionPoint class, giving the subclass a distinct name that makes it easily recognizable. For more information about schema extensions, see Extending the Schema.
The most important attributes of an SCP are keywords, serviceDNSName, serviceDNSNameType, serviceClassName, and serviceBindingInformation. Client applications search the directory for keywords values to locate your SCP. Having found your SCP, clients read the other attributes to retrieve information about your service.
The exact keywords you should include in your SCP depend on how clients will search for your service. The best keywords to use are GUID strings because GUIDs are guaranteed to be unique in a forest. Use the GUID string format returned by the UuidToString function in the RPC library. You can also include human-readable names, if clients may use them to search for your service. The keywords in an SCP should include GUID strings and/or names that identify the following information about your service:
The serviceDNSName value is typically the DNS name of the service's host computer. Your service installation program can call the GetComputerNameEx function to get the DNS name of the local computer.
For services that have DNS SRV records, serviceDNSName can be the name of the SRV record. A client application uses the DNS APIs to retrieve all the SRV records that match this name. The client then retrieves the DNS host name from one of the SRV records. This technique is useful for replicated services because SRV records also include information that enables the client to select the best replica.
The content of serviceBindingInformation is specific to the service that published the SCP; clients must know how to interpret the binding information. In the simplest and most common case, the binding information consists of a port number on the service's host computer.