Besides registering service names, the DdeNameService function makes it possible for a server to turn its service-name filter on or off. When a server turns off its service-name filter, the DDEML sends the XTYP_CONNECT transaction to the server's DDE callback function whenever any client calls the DdeConnect function, regardless of the service name specified in the function. When a server turns on its service-name filter, the DDEML sends the XTYP_CONNECT transaction to the server only when the DdeConnect function specifies a service name that the server has specified in a call to the DdeNameService function.
By default, the service-name filter is on when an application calls DdeInitialize. This prevents the DDEML from sending the XTYP_CONNECT transaction to a server before the server has created the string handles that it needs. A server can turn off its service-name filter by specifying the DNS_FILTEROFF flag in a call to the DdeNameService function. The DNS_FILTERON flag turns on the filter.