Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "EnumSystemCodePages" in [All]

kernel32

.
Summary
.

static extern bool EnumSystemCodePages(EnumCodePagesProcDlgt lpCodePageEnumProc,

.

I needed to enumerate the installed code pages on a Windows machine, and wanted to present the possible encoding interpretations to a user via a ComboBox. By using the Win32 API ::EnumSystemCodePages() via PInvoke, and the System.Text.Encoding.GetEncoding() static method, I could get the mapping from the code page to an Encoding instance which returns "pretty" names like 'Japanese (Shift-JIS)'.

.

      if (!EnumSystemCodePages(dlgt, CP_INSTALLED))

.

    Debug.WriteLine(string.Format("EnumSystemCodePages failed with errno = {0}", errno));

.

    private static extern bool EnumSystemCodePages(EnumCodePagesProcDlgt lpCodePageEnumProc, uint dwFlags);

.
Documentation
[EnumSystemCodePages] on MSDN

 
Access PInvoke.net directly from VS: