AreFileApisANSI function
Applies to: desktop apps only
Determines whether the file I/O functions are using the ANSI or OEM character set code page. This function is useful for 8-bit console input and output operations.
Syntax
BOOL WINAPI AreFileApisANSI(void);
Parameters
This function has no parameters.
Return value
If the set of file I/O functions is using the ANSI code page, the return value is nonzero.
If the set of file I/O functions is using the OEM code page, the return value is zero.
Remarks
The SetFileApisToOEM function causes a set of file I/O functions to use the OEM code page. The SetFileApisToANSI function causes the same set of file I/O functions to use the ANSI code page. Use the AreFileApisANSI function to determine which code page the set of file I/O functions is currently using. For a discussion of these functions' usage, please see the Remarks sections of SetFileApisToOEM and SetFileApisToANSI.
The file I/O functions whose code page is ascertained by AreFileApisANSI are those functions exported by KERNEL32.DLL that accept or return a file name.
The functions SetFileApisToOEM and SetFileApisToANSI set the code page for a process, so AreFileApisANSI returns a value indicating the code page of an entire process.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Header |
|
|
Library |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 4/17/2012
/// Determines whether the file I/O functions are using the ANSI or OEM character set code page. This function is useful for 8-bit console input and output operations.
/// </summary>
/// <returns>
/// If the set of file I/O functions is using the ANSI code page, the return value is nonzero.
/// If the set of file I/O functions is using the OEM code page, the return value is zero.
/// </returns>
/// <remarks>
/// The SetFileApisToOEM function causes a set of file I/O functions to use the OEM code page. The SetFileApisToANSI function causes the same set of file I/O functions to use the ANSI code page. Use the AreFileApisANSI function to determine which code page the set of file I/O functions is currently using. For a discussion of these functions' usage, please see the Remarks sections of SetFileApisToOEM and SetFileApisToANSI.
/// The file I/O functions whose code page is ascertained by AreFileApisANSI are those functions exported by KERNEL32.DLL that accept or return a file name.
/// The functions SetFileApisToOEM and SetFileApisToANSI set the code page for a process, so AreFileApisANSI returns a value indicating the code page of an entire process.
/// </remarks>
[return: MarshalAs(UnmanagedType.Bool)]
[DllImport("kernel32.dll", CharSet = CharSet.None, ExactSpelling = true, CallingConvention = CallingConvention.Winapi)]
static extern bool AreFileApisANSI();
- 8/13/2010
- Nam Jung Hyun
- 8/13/2010
- Nam Jung Hyun