Convert a specified number of ANSI characters in a source buffer to a buffer of corresponding OEM characters.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.7
Syntax FUNCTION Ansi2OemBuff(
pszTarget AS BYTE[],
pszSource AS BYTE[],
dwCount AS DWORD
) AS BYTE[]
public static byte[] Ansi2OemBuff(
byte[] pszTarget,
byte[] pszSource,
uint dwCount
)
Request Example
View SourceParameters
- pszTarget
- Type: Byte
A pointer to the buffer that will contain the converted string. - pszSource
- Type: Byte
A pointer to the buffer that contains the string to convert. - dwCount
- Type: UInt32
The number of characters to convert.
Return Value
Type:
Byte
A pointer to the buffer that contains the converted string.
Remarks
Ansi2OemBuff() is similar to Ansi2Oem(), except that the resulting string is stored in the buffer pointed to by <pszTarget>.
Also, the <dwCount> argument lets you specify the number of characters to be converted.
Tip |
---|
You are responsible for allocating space for the buffer pointed to by <pszTarget>.
Using an unallocated buffer pointer can have adverse results.
|
Remarks
Examples
This example uses Ansi2OemBuff() to convert the contents of the ANSI string "ßä" to the OEM character set. Note that the source string is also used as a target string:
1LOCAL cStr := "ßä"
2Ansi2OemBuff(PSZ(_CAST, cStr), PSZ(_CAST, cStr), SLen(cStr))
See Also