EnumLayoutOrTipForSetup function

Enumerates the installed keyboard layouts and text services of the setup UI or OOBE.

Syntax

UINT CALLBACK EnumLayoutOrTipForSetup(
  _In_  LANGID      langid,
  _Out_ LAYOUTORTIP *pLayoutOrTip,
  _In_  UINT        uBufLength,
  _In_  DWORD       dwFlags
);

Parameters

langid [in]

The language id of the item to be enumerated.

pLayoutOrTip [out]

Pointer to the buffer that receives the array of LAYOUTORTIP structures. This can be NULL to get the number of items.

uBufLength [in]

The length of the buffer pointed to by pLayoutOrTip. This is ignored if pLayoutOrTip is NULL.

dwFlags [in]

Not used. This must be zero.

Return value

If pLayoutOrTip is NULL, the number of keyboard items that are registered in System; otherwise, the number of keyboard items that are copied into pLayoutOrTip.

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 LAYOUTORTIP is:

typedef struct tagLAYOUTORTIP {
    DWORD dwFlags;
#define LOT_DEFAULT    0x0001 // If this is on, this is a default item. 
#define LOT_DISABLED   0x0002 // if this is on, this is not enabled. 
    WCHAR szId[MAX_PATH]; // Id of the keyboard item in the string format. 
    WCHAR szName[MAX_PATH]; // The description of the keyboard item. 
} LAYOUTORTIP;

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
DLL
Input.dll