Additional Information About GetTypeByName

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

SUMMARY

GetTypeByName takes a service name in string format and returns a global unique identifier (GUID) for it. GetTypeByName is documented in the Win32 SDK. This article is an addendum to the documentation.

MORE INFORMATION

The purpose of GetTypeByName is to retrieve a GUID of a service. It does this first by examining the registry, looking for a local service. If the key does not exist, the function conducts a search of well-known TCP and UDP service types. If the service GUID is still unknown, a final comparison is made against a hard-coded list. See Srvguid.h for a list of most of the known GUIDs.

All comparisons made by GetTypeByName are case-sensitive.

GetTypeByName is exported from Wsock32.dll. To use it for anything other than registry information retrieval, call WSAStartup first. If WSAStartup is not called prior to calling GetTypeByName, the function fails, and GetLastError returns ERROR_SERVICE_DOES_NOT_EXIST, not WSANOTINITIALIZED.

REFERENCES

"Win32 Software Development Kit Programmer's Reference," version 3.51.


Additional reference words: 4.00 GetTypeByName Windows 95
KBCategory: kbnetwork kbprg
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.