SERVICE_INFOW structure (nspapi.h)
The SERVICE_INFO structure contains information about a network service or a network service type.
Syntax
typedef struct _SERVICE_INFOW {
LPGUID lpServiceType;
LPWSTR lpServiceName;
LPWSTR lpComment;
LPWSTR lpLocale;
DWORD dwDisplayHint;
DWORD dwVersion;
DWORD dwTime;
LPWSTR lpMachineName;
LPSERVICE_ADDRESSES lpServiceAddress;
BLOB ServiceSpecificInfo;
} SERVICE_INFOW, *PSERVICE_INFOW, *LPSERVICE_INFOW;
Members
lpServiceType
Type: LPGUID
A pointer to a GUID that is the type of the network service.
lpServiceName
Type: LPTSTR
A pointer to a NULL-terminated string that is the name of the network service.
If you are calling the SetService function with the dwNameSpace parameter set to NS_DEFAULT, the network service name must be a common name. A common name is what the network service is commonly known as. An example of a common name for a network service is "My SQL Server".
If you are calling the SetService function with the dwNameSpace parameter set to a specific service name, the network service name can be a common name or a distinguished name. A distinguished name distinguishes the service to a unique location with a directory service. An example of a distinguished name for a network service is "MS\SYS\NT\DEV\My SQL Server".
lpComment
Type: LPTSTR
A pointer to a NULL-terminated string that is a comment or description for the network service. For example, "Used for development upgrades."
lpLocale
Type: LPTSTR
A pointer to a NULL-terminated string that contains locale information.
dwDisplayHint
Type: DWORD
A hint as to how to display the network service in a network browsing user interface. This can be one of the following values.
dwVersion
Type: DWORD
The version 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
Type: DWORD
Reserved for future use. Must be zero.
lpMachineName
Type: LPTSTR
A pointer to a NULL-terminated string that is the name of the computer on which the network service is running.
lpServiceAddress
Type: LPSERVICE_ADDRESSES
A pointer to a SERVICE_ADDRESSES structure that contains an array of SERVICE_ADDRESS structures. Each SERVICE_ADDRESS structure contains information about a network service address.
A network service can call the getsockname function to determine the local address of the system.
ServiceSpecificInfo
Type: BLOB
A BLOB structure that specifies service-defined information.
Remarks
Note
The nspapi.h header defines SERVICE_INFO as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Header | nspapi.h |