Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure contains information about a network service or a network service type.

Syntax

typedef struct _SERVICE_INFO { 
  LPGUID 
lpServiceType; 
  LPTSTR 
lpServiceName; 
  LPTSTR 
lpComment; 
  LPTSTR 
lpLocale; 
  DWORD 
dwDisplayHint; 
  DWORD 
dwVersion; 
  DWORD 
dwTime; 
  LPTSTR 
lpMachineName; 
  LPSERVICE_ADDRESSES 
lpServiceAddress; 
  BLOB 
ServiceSpecificInfo; 
} SERVICE_INFO; 

Members

lpServiceType

Pointer to a GUID that is the type of the network service.

lpServiceName

Pointer to a zero-terminated string that is the name of the network service.

lpComment

Pointer to a zero-terminated string that is a comment or description for the network service, for example, Used for development upgrades.

lpLocale

Pointer to a zero-terminated string that contains locale information.

dwDisplayHint

Specifies a hint as to how to display the network service in a network browsing user interface. The following table shows the possible values.

Value Description

RESOURCEDISPLAYTYPE_DOMAIN

Displays the network service as a domain.

RESOURCEDISPLAYTYPE_FILE

Displays the network service as a file.

RESOURCEDISPLAYTYPE_GENERIC

The method used to display the object does not matter.

RESOURCEDISPLAYTYPE_GROUP

Displays the network service as a group.

RESOURCEDISPLAYTYPE_SERVER

Displays the network service as a server.

RESOURCEDISPLAYTYPE_SHARE

Displays the network service as a sharepoint.

RESOURCEDISPLAYTYPE_TREE

Displays the network service as a tree.

dwVersion

Version information for the network service. The high word of this value specifies a major version number. The low word of this value specifies a minor version number.

dwTime

Reserved for future use. This must be set to zero.

lpMachineName

Pointer to a zero-terminated string that is the name of the computer on which the network service is running.

lpServiceAddress

Pointer to a SERVICE_ADDRESSESstructure that contains an array of SERVICE_ADDRESSstructures. Each SERVICE_ADDRESSstructure contains information about a network service address.

A network service can call the getsockname (Windows Sockets)function to determine the local address of the system.

ServiceSpecificInfo

A BLOB (Windows Sockets)structure that specifies service-defined information.

Note:
In general, the data pointed to by the BLOBstructure's pBlobDatamember must not contain any pointers. That is because only the network service knows the format of the data; copying the data without such knowledge would lead to pointer invalidation. If the data pointed to by pBlobDatacontains variable-sized elements, offsets from pBlobDatacan be used to indicate the location of those elements. The exception to this general rule occurs when pBlobDatapoints to a SERVICE_TYPE_INFO_ABSstructure. This is possible because both the SERVICE_TYPE_INFO_ABSstructure, and any SERVICE_TYPE_VALUE_ABSstructures it contains are predefined, and thus their formats are known to the operating system.

Requirements

Header winsock2.h
Windows Embedded CE Windows CE .NET 4.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also