DbiNativeToAnsi

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

DbiNativeToAnsi

Return to chapter overview

C syntax

DBIResult DBIFN DbiNativeToAnsi (pLdObj, pAnsiStr, pOemStr, iLen, pbDataLoss);

Delphi syntax

function DbiNativeToAnsi (LdObj: Pointer; pAnsiStr: PChar; pNativeStr: PChar; iLen: Word; var bDataLoss: Bool): DBIResult stdcall;

Description

DbiNativeToAnsi translates strings from the language driver's native character set to ANSI. If the native character set is ANSI, no translation takes place.

Parameters

pLdObj                Type: pVOID                (Input)
Pointer to the language driver object returned from DbiGetLdObj.

pAnsiStr                Type: pCHAR                (Output)
Pointer to the client buffer that returns the ANSI data. If pAnsiStr equals pOemStr, conversion occurs in place.

pOemStr                Type: pCHAR                (Input)
Pointer to the buffer containing data to be translated.

iLen                Type: UINT16                (Input)
If iLen equals 0, assumes null-terminated string; otherwise, iLen specifies the length of the buffer to convert.

pbDataLoss                Type: pBOOL                (Output)
Pointer to a client variable. Set to TRUE if a character cannot map to an ANSI character.

Usage

This function works on drivers having both ANSI and OEM native character sets, but it does not deal with multi-byte character sets such as Japanese ShiftJIS. If the native character set is ANSI, no translation takes place.

DbiResult

Meaning

DBIERR_NONE

Translation completed successfully.

See also

DbiAnsiToNative, DbiGetLdObj