EnumEnabledLayoutOrTip function

Enumerates all enabled keyboard layouts or text services of the specified user setting.

Syntax


UINT EnumEnabledLayoutOrTip(
  _In_opt_  LPCWSTR pszUserReg,
  _In_opt_  LPCWSTR pszSystemReg,
  _In_opt_  LPCWSTR pszSoftwareReg,
  _Out_     LAYOUTORTIPPROFILE *pLayoutOrTipProfile,
  _In_      UINT uBufLength
);

Parameters

pszUserReg [in, optional]

The registry path of the user. If this parameter is NULL, HKEY_CURRENT_USER is used.

pszSystemReg [in, optional]

The registry path of the system. If this parameter is NULL, HKEY_LOCAL_MACHINE\System is used.

pszSoftwareReg [in, optional]

The registry path of the software. If this parameter is NULL, HKEY_LOCAL_MACHINE\Software is used.

pLayoutOrTipProfile [out]

Pointer to the buffer that receives the LAYOUTORTIPPROFILE array.

uBufLength [in]

The length of the buffer pointed to by pLayoutOrTipProfile.

Return value

If pLayoutOrTipProfile is NULL, the number of keyboard items that are enabled in the user setting; otherwise, the number of keyboard items that are copied into pLayoutOrTipProfile.

For Input Method Editor (IME) languages, all IMEs are returned, even when only one IME is enabled. For example, if a user has the CHT New Quick IME enabled, the EnumEnabledLayoutOrTip function returns all 5 CHT IMEs.

Remarks

There is no import library available that defines this function, so it is necessary to obtain a pointer to this function using LoadLibrary and GetProcAddress.

Note  Using LoadLibrary incorrectly can compromise the security of your application by loading the wrong DLL. Refer to Dynamic-Link Library Search Order for information on how to correctly load DLLs with different versions of Microsoft Windows.

The definition of LAYOUTORTIPPROFILE is:


typedef struct tagLAYOUTORTIPPROFILE {
    DWORD  dwProfileType;       // InputProcessor or HKL 
#define LOTP_INPUTPROCESSOR 1
#define LOTP_KEYBOARDLAYOUT 2
    LANGID langid;              // language id 
    CLSID  clsid;               // CLSID of tip 
    GUID   guidProfile;         // profile description 
    GUID   catid;               // category of tip 
    DWORD  dwSubstituteLayout;  // substitute hkl 
    DWORD  dwFlags;             // Flags 
    WCHAR  szId[MAX_PATH];      // KLID or TIP profile for string 
} LAYOUTORTIPPROFILE;

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

DLL

Input.dll

 

 

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.