Function _conGetCharSet() Foundation
Checks if the character set of the current thread is of type OEM or ANSI.
ULONG XPPAPIENTRY _conGetCharSet()
This function returns one of the values defined in COLLAT.CH.
The function _conGetCharSet() is used to query the type of the current thread's character set. It returns a value as defined in COLLAT.CH. If the thread's character set is of type OEM, CHARSET_OEM is returned. In case the character set is of type ANSI, CHARSET_ANSI is returned.
#include <windows.h>
#include "xppdef.h"
#include "xpppar.h"
#include "xppcon.h"
#include "collat.ch"
XPPRET XPPENTRY MyCAPIFunction(XppParamList paramList)
{
ContainerHandle chCollation;
ULONG ulCollationType = _conGetCharSet();
switch( ulCollationType )
{ case CHARSET_ANSI:
chCollation = _conPutC( NULLCONTAINER, "ANSI collation type" );
break;
case CHARSET_OEM:
chCollation = _conPutC( NULLCONTAINER, "OEM collation type" );
break;
default:
chCollation = _conPutC( NULLCONTAINER, "Unknown collation type" );
}
_conReturn( paramList, chCollation );
_conRelease( chCollation );
}
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.