Microsoft KB Archive/138039

From BetaArchive Wiki

BUG: GetService Gives Only Local Service Names

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.

Keywords : kbnetwork kbAPI kbOSWinNT351bug kbSDKPlatform kbOSWin95bug kbWinsock kbGrpDSNet
Issue type : kbbug
Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch kbWin32SDK400 kbWin32SDK351


Last Reviewed: March 7, 1999
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.