BUG: GetService Gives Only Local Service Names

Last reviewed: October 11, 1995
Article ID: Q138039
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) versions 3.51, 4.0

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.


Additional reference words: 4.00
KBCategory: kbnetwork kbprg kbbuglist
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 11, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.