BUG: GetService Gives Only Local Service Names

ID: Q138039


The information in this article applies to:


SYMPTOMS

An application's attempt to use name registration and the resolution API GetService is unsuccessful. Service names, other than those on the local computer, cannot be found.


CAUSE

GetService does not work for both Windows NT build 1057 and Windows 95 build 950.6. GetService is designed to enumerate through all name space providers to query a service. However, none of the providers currently implement GetService helper functions.


WORKAROUND

Use GetAddressByName. Alternately, for NetWare services, send SAP packets manually using WinSock. Use gethostbyname for TCP/IP services.

The best workaround is to call GetAddressByName, which can obtain addresses for TCP/IP services, NetWare services and NetBIOS names. GetAddressByName takes service names and global unique identifiers (GUID) just as GetService does, and it returns the associated address for that service.

Another workaround is to query each name space independently. For example, you might send out a SAP query to NetWare services for services registered in the Bindery or NDS for a NetWare server. To learn more about SAP queries, refer to the IPX router specification provided by Novell.

To find the IP address of a TCP/IP service, you can use gethostbyname in the WinSock API. Your service must be registered in the DNS database.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Keywords          : kbnetwork kbAPI kbNTOS351bug kbSDKPlatform kbWinOS95bug kbWinsock kbGrpNet 
Version           : 
Platform          : 
Issue type        : kbbug 

Last Reviewed: March 5, 1999