Language Translation Interface.  
 More...
#include <STranslator-i.h>
|  | 
| long | AddRef () PURE | 
|  | Increments the reference count. 
 | 
|  | 
| long | Release () PURE | 
|  | Decrements the reference count. 
 | 
|  | 
| void | OnFinalRelease () PURE | 
|  | Finalizes the release of the object. 
 | 
|  | 
| BOOL | Load (LPVOID pData, UINT uType) PURE | 
|  | Loads language translation data from a resource. 
 | 
|  | 
| void | GetName (wchar_t szBuf[TR_MAX_NAME_LEN]) SCONST PURE | 
|  | Retrieves the name of the translation resource. 
 | 
|  | 
| void | GetNameA (IStringA *str) SCONST PURE | 
|  | Retrieves the name of the translation resource. 
 | 
|  | 
| BOOL | NameEqual (LPCWSTR pszName) SCONST PURE | 
|  | Compares the translation resource name. 
 | 
|  | 
| BOOL | NameEqualA (const IStringA *str) SCONST PURE | 
|  | Compares the translation resource name. 
 | 
|  | 
| GUID | guid () SCONST PURE | 
|  | Retrieves the GUID of the translation resource. 
 | 
|  | 
| int | tr (const IStringW *strSrc, const IStringW *strCtx, wchar_t *pszOut, int nLen) SCONST PURE | 
|  | Translates a string. 
 | 
|  | 
| void | getFontInfo (IStringW *strFont) SCONST PURE | 
|  | Retrieves the default font information for translation. 
 | 
|  | 
| long | AddRef () PURE | 
|  | Increases the reference count. 
 | 
|  | 
| long | Release () PURE | 
|  | Decreases the reference count. 
 | 
|  | 
| void | OnFinalRelease () PURE | 
|  | Called when the reference count reaches zero and the object is about to be released. 
 | 
|  | 
Language Translation Interface. 
This interface defines the methods for language translation. 
Definition at line 22 of file STranslator-i.h.
◆ AddRef()
      
        
          | long ITranslator::AddRef | ( |  | ) |  | 
      
 
Increments the reference count. 
- Returns
- The new reference count. 
 
 
◆ getFontInfo()
      
        
          | void ITranslator::getFontInfo | ( | IStringW * | strFont | ) |  | 
      
 
Retrieves the default font information for translation. 
- Parameters
- 
  
    | strFont | Pointer to the IStringW object to receive the font information. |  
 
- Returns
- void 
 
 
◆ GetName()
      
        
          | void ITranslator::GetName | ( | wchar_t | szBuf[TR_MAX_NAME_LEN] | ) |  | 
      
 
Retrieves the name of the translation resource. 
- Parameters
- 
  
    | szBuf | Buffer to receive the translation resource name. |  
 
- Returns
- void 
 
 
◆ GetNameA()
      
        
          | void ITranslator::GetNameA | ( | IStringA * | str | ) |  | 
      
 
Retrieves the name of the translation resource. 
- Parameters
- 
  
    | str | Pointer to the IStringA object to receive the translation resource name. |  
 
- Returns
- void 
 
 
◆ guid()
      
        
          | GUID ITranslator::guid | ( |  | ) |  | 
      
 
Retrieves the GUID of the translation resource. 
- Returns
- GUID of the translation resource. 
 
 
◆ Load()
      
        
          | BOOL ITranslator::Load | ( | LPVOID | pData, | 
        
          |  |  | UINT | uType ) | 
      
 
Loads language translation data from a resource. 
- Parameters
- 
  
    | pData | Pointer to the resource data, interpretation depends on the implementation. |  | uType | Type of the resource, interpretation depends on the implementation. |  
 
- Returns
- TRUE if loading is successful, FALSE otherwise. 
 
 
◆ NameEqual()
      
        
          | BOOL ITranslator::NameEqual | ( | LPCWSTR | pszName | ) |  | 
      
 
Compares the translation resource name. 
- Parameters
- 
  
    | pszName | Translation resource name to compare. |  
 
- Returns
- TRUE if the names are the same, FALSE otherwise. 
 
 
◆ NameEqualA()
      
        
          | BOOL ITranslator::NameEqualA | ( | const IStringA * | str | ) |  | 
      
 
Compares the translation resource name. 
- Parameters
- 
  
    | str | Pointer to the IStringA object containing the translation resource name to compare. |  
 
- Returns
- TRUE if the names are the same, FALSE otherwise. 
 
 
◆ OnFinalRelease()
      
        
          | void ITranslator::OnFinalRelease | ( |  | ) |  | 
      
 
Finalizes the release of the object. 
- Returns
- void 
 
 
◆ Release()
      
        
          | long ITranslator::Release | ( |  | ) |  | 
      
 
Decrements the reference count. 
- Returns
- The new reference count. 
 
 
◆ tr()
      
        
          | int ITranslator::tr | ( | const IStringW * | strSrc, | 
        
          |  |  | const IStringW * | strCtx, | 
        
          |  |  | wchar_t * | pszOut, | 
        
          |  |  | int | nLen ) | 
      
 
Translates a string. 
- Parameters
- 
  
    | strSrc | Pointer to the IStringW object containing the source string. |  | strCtx | Pointer to the IStringW object containing the translation context. |  | pszOut | Buffer to receive the translated string. |  | nLen | Length of the buffer. |  
 
- Returns
- Length of the translated string, 0 if no translation, -1 if buffer size is not enough. 
 
 
The documentation for this struct was generated from the following file: