Function _conToAnsiCp() Foundation
Converts an OEM string to an ANSI string.
XPPAPIRET XPPAPIENTRY _conToAnsiCp(CHAR *strAnsi,
const CHAR *strOem,
ULONG oemLength);
If the string could be converted, NULL is returned. Otherwise the error which occurred is indicated by the return value (see the XPP_ERR_... macros).
The function _conToAnsiCp is used to convert a string from an OEM to an ANSI character set.
#include <windows.h>
#include "xppdef.h"
#include "xpppar.h"
#include "xppcon.h"
XPPRET XPPENTRY MyCAPIFunction(XppParamList paramList)
{ /* Declare and initialize variables */
ContainerHandle chResult;
char cString[20];
int i;
for(i=0;i<20;cString[i++]=0);
if( _conToAnsiCp( cString, "äöüß", 4 ))
{ /* Error handling... */
}
chResult = _conPutC( NULLCONTAINER, cString );
_conReturn( paramList, chResult );
}
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.