CLlmClient::GetProviderName Method  
 
INT GetProviderName(
  DWORD dwProviderId,  
  LPTSTR lpszProviderName,  
  INT nMaxLength  
);
INT GetProviderName(
  DWORD dwProviderId,  
  CString &strProviderName  
);

The GetProviderName method returns the display name of the specified provider.

Parameters

dwProviderId
Specifies the service provider. This parameter must be one of the LLM_PROVIDER constants. Refer to the providers page for a list of supported providers and their default models.
lpszProviderName
A pointer to a string buffer which will contain the display name for the specified provider when the method returns. This parameter cannot be NULL and must be large enough to contain the display name, including the terminating null character. If the buffer is not large enough to contain the entire name, it will be truncated. An alternate version of this method accepts a CString object which will contain the provider name when the method returns.
nMaxLength
An integer value which specifies the maximum number of characters which can be copied into the string buffer, including the terminating null character. This parameter cannot be zero and the method will fail if an invalid size is provided by the caller.

Return Value

If the method succeeds, the return value is the number of characters copied into the string buffer, not including the terminating null character. If the method fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The GetProviderName method returns the display name associated with the specified provider. This is a human-readable string which can be used for logging, status messages or user interface display.

This method is a convenience wrapper which returns the provider display name without requiring the caller to retrieve the full provider information structure using GetProviderInfo.

If the buffer specified by lpszProviderName is not large enough to contain the entire provider name, the string will be truncated. The value returned by the method indicates the number of characters copied to the buffer, not including the terminating null character.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csllmv12.lib
Unicode: Implemented as Unicode and ANSI versions

See Also