Oem2AnsiBuff Function | |
Convert a specified number of OEM characters in a source buffer to a buffer of corresponding, if any, ANSI characters.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION Oem2AnsiBuff(
pszTarget AS PSZ,
pszSource AS PSZ,
dwCount AS DWORD
) AS PSZ
public static Psz Oem2AnsiBuff(
Psz pszTarget,
Psz pszSource,
uint dwCount
)
Request Example
View SourceParameters
- pszTarget
- Type: Psz
A pointer to the buffer that will contain the converted string. - pszSource
- Type: Psz
A pointer to the buffer that contains the string to convert. - dwCount
- Type: DWord
The number of characters to convert.
Return Value
Type:
Psz
A pointer to the buffer that contains the converted string.
Remarks
Oem2AnsiBuff() is the same as Oem2Ansi, except that the resulting pointer 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 Tip |
---|
The PSZ type is included in the X# language and runtime for compatibility only.
In most cases the type can and should be replaced with normal strings.
If you need to interface with Win32 API functions that expect an ansi string, there is often also
an alternative with a unicode string. We recommend to use that alternative when possible.
|
Examples
This example does a conversion from OEM to ANSI. Note that the source string is also used as the target string:
1LOCAL cStr := "ßá"
2Oem2AnsiBuff(Ptr(_CAST, cStr),;
3 Ptr(_CAST, cStr), sLen(cStr))
See Also