lcid

[uuid, lcid(localeID)[, optional-attribute-list]] library { }

 function-name([parameter-attribute-list, lcid] long  ParamName,. . .);

localeID
Specifies the 32-bit locale identifier used in Win32 National Language Support. Typically the locale identifier is given in hexadecimal.

Examples

[  uuid(. . .),lcid(0x09),version(1.0)] 
library MyLibrary
{. . .};

interface IMyFace : IDispatch
{
[propget] HRESULT MyFunc([in, lcid] long LocaleID,
                         [out, retval] BSTR * ReturnVal);
. . .
}

Remarks

The lcid syntax has two different forms; the effect of the attribute depends on which syntax you use—either the library statement syntax or the parameter syntax.

When applied to the library statement, along with a localeID argument, as shown in the first example, the lcid attribute identifies the locale for a type library or for a function argument and lets you use international characters inside the library block.

Effective with version 3.01.75 of the MIDL compiler, the locale ID supplied by this attribute not only decorates the resulting type library, but actually changes the behavior of the compiler. Within a library statement, from the point where the lcid attribute is used, MIDL will accept input localized according to the specified locale. In particular, full support for Far Eastern languages such as Japanese, Chinese and Korean (full DBCS support) is available. Features supported by the localization are: comments, strings, helpstrings and identifiers. For a complete list of locale identifiers, see the National Language Support Reference in the Windows Base Services online documentation.

Use the /lcid compiler switch to have this localization support available to the entire input file, including filename and directory path, rather than just inside the library block.

When applied to a parameter, the lcid attribute lets you pass a locale identifier to a function, as shown in the second example. The following restrictions apply to lcid parameters:

See Also

library, ODL File Syntax, ODL File Example, Generating a Type Library With MIDL, /lcid