Function _conToOemCp() Foundation

Converts an ANSI string to an OEM string.

Syntax
XPPAPIRET XPPAPIENTRY _conToOemCp(CHAR *strOem,
                                   const CHAR *strAnsi,
                                   ULONG ansiLength);
Parameters
CHAR* strOem
Pointer to a string which will contain the OEM string.
CHAR* strAnsi
Pointer to the ANSI string that is to be converted to an OEM character set.
ULONG ansiLength
The length of the ANSI character string that is to be converted.
Return

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).

Description

The function _conToOemCp is used to convert a string from an ANSI to an OEM character set.

Examples
#include <windows.h> 

#include "xppdef.h" 
0#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( _conToOemCp( cString, "äöüß", 4 )) 
{ /* Error handling... */ 
} 

chResult = _conPutC( NULLCONTAINER, cString ); 

_conReturn( paramList, chResult ); 
} 
Feedback

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.