ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzaik_5.4.0.1/rzaikcaexpressprogstd.htm

136 lines
9.9 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="security" content="public" />
<meta name="Robots" content="index,follow" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta name="DC.Type" content="reference" />
<meta name="DC.Title" content="OEM, ANSI, and Unicode considerations" />
<meta name="abstract" content="Most of the iSeries Access for Windows C/C++ APIs that accept string parameters exist in three forms: OEM, ANSI, or Unicode." />
<meta name="description" content="Most of the iSeries Access for Windows C/C++ APIs that accept string parameters exist in three forms: OEM, ANSI, or Unicode." />
<meta name="DC.Relation" scheme="URI" content="rzaikcaexpapiover.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaiksingleapitype.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaikmixedapitypes.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaikwritegencaapp.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaikadmin.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaikappncm.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaikappdq.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaikdt.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaiknls.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaikupdatex.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaikappobj.htm" />
<meta name="DC.Relation" scheme="URI" content="rzaikapprc.htm" />
<meta name="copyright" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 1999, 2006" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="caexpressprogstd" />
<meta name="DC.Language" content="en-us" />
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
<link rel="stylesheet" type="text/css" href="./ic.css" />
<title>OEM, ANSI, and Unicode considerations</title>
</head>
<body id="caexpressprogstd"><a name="caexpressprogstd"><!-- --></a>
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<h1 class="topictitle1">OEM, ANSI, and Unicode considerations</h1>
<div><p>Most of the iSeries™ Access for Windows<sup>®</sup> C/C++ APIs that accept string
parameters exist in three forms: OEM, ANSI, or Unicode.</p>
<div class="section"></div>
<div class="section"><p>The generic version of the iSeries Access for Windows C/C++
APIs follows the same form as the default OEM version. Only a single name
for each function appears in this information, but there are three different
system entry points. For example: </p>
<pre>cwbNL_GetLang();
compiles to:
cwbNL_GetLang(); //CWB_OEM or undefined
or:
cwbNL_GetLangA(); //CWB_ANSI defined
or:
cwbNL_GetLangW(); //CWB_UNICODE defined</pre>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" width="100%" frame="border" border="1" rules="all"><caption>Table 1. API types, name formats, and pre-processor
definitions</caption><thead align="left"><tr><th align="left" valign="bottom" width="27.22222222222222%" id="d0e63">API type</th>
<th align="left" valign="bottom" width="39.44444444444444%" id="d0e65">API name format (if it exists)</th>
<th align="left" valign="bottom" width="33.33333333333333%" id="d0e67">Pre-processor definition</th>
</tr>
</thead>
<tbody><tr><td align="left" valign="top" width="27.22222222222222%" headers="d0e63 ">OEM</td>
<td align="left" valign="top" width="39.44444444444444%" headers="d0e65 ">cwbXX_xxx</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e67 ">None (may specify CWB_OEM explicitly)</td>
</tr>
<tr><td align="left" valign="top" width="27.22222222222222%" headers="d0e63 ">ANSI</td>
<td align="left" valign="top" width="39.44444444444444%" headers="d0e65 ">cwbXX_xxxA</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e67 ">CWB_ANSI</td>
</tr>
<tr><td align="left" valign="top" width="27.22222222222222%" headers="d0e63 ">UNICODE</td>
<td align="left" valign="top" width="39.44444444444444%" headers="d0e65 ">cwbXX_xxxW</td>
<td align="left" valign="top" width="33.33333333333333%" headers="d0e67 ">CWB_UNICODE</td>
</tr>
</tbody>
</table>
</div>
<div class="section"> <div class="note"><span class="notetitle">Note:</span> <ul><li>Data transformation APIs <strong>(cwbDT_xxx)</strong> do not follow the "A" and
"W" suffix conventions. The generic version of the APIs uses "String" as part
of the function name. The ANSI/OEM version uses "ASCII" as part of the function
name. The Unicode version uses "Wide" as part of the function name. There
is no difference between OEM and ANSI character sets in <strong>cwbDT_xxx</strong> APIs,
which handle numeric strings. Therefore, ANSI and OEM versions of the relevant
APIs are the same. For example: <pre>cwbDT_HexToString();
compiles to:
cwbDT_HexToASCII(); //CWB_UNICODE not defined
or:
cwbDT_HexToWide(); //CWB_UNICODE defined</pre>
See the data transformation <strong>cwbdt.h</strong> <a href="rzaikapigrphdrfile.htm#apigrphdrfile">header
file</a> for more details.</li>
<li>For Unicode APIs that take a buffer and a length for passing strings (for
example, <strong>cwbCO_GetUserIDExW</strong>), the length is treated as the number of
bytes. It is not treated as the number of characters.</li>
</ul>
</div>
</div>
</div>
<div>
<ul class="ullinks">
<li class="ulchildlink"><strong><a href="rzaiksingleapitype.htm">Use a single iSeries Access for Windows API type</a></strong><br />
To restrict your application to a particular type of iSeries Access
for Windows API,
you must define one, and only one preprocessor definitions.</li>
<li class="ulchildlink"><strong><a href="rzaikmixedapitypes.htm">Use mixed iSeries Access for Windows API types</a></strong><br />
You can mix ANSI, OEM, and Unicode APIs by using explicit API names.</li>
<li class="ulchildlink"><strong><a href="rzaikwritegencaapp.htm">Write a generic iSeries Access for Windows application</a></strong><br />
Generic applications allow maximum portability because the same source code can be compiled for OEM, ANSI, and Unicode.</li>
</ul>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaikcaexpapiover.htm" title="See the following topics for iSeries Access for Windows C/C++ APIs overview information.">iSeries Access for Windows C/C++ APIs overview</a></div>
</div>
<div class="relref"><strong>Related reference</strong><br />
<div><a href="rzaikadmin.htm" title="iSeries Access for Windows Administration APIs provide functions that access information about the iSeries Access for Windows code that is installed on the PC.">iSeries Access for Windows Administration APIs</a></div>
<div><a href="rzaikappncm.htm" title="The iSeries Access for Windows Communications and Security topic shows you how to use iSeries Access for Windows application programming interfaces (APIs)">iSeries Access for Windows Communications and Security APIs</a></div>
<div><a href="rzaikappdq.htm" title="Use iSeries Access for Windows Data Queues application programming interfaces (APIs) to provide easy access to iSeries data queues. Data queues allow you to create client/server applications that do not require the use of communications APIs.">iSeries Access for Windows Data Queues APIs</a></div>
<div><a href="rzaikdt.htm" title="iSeries Access for Windowsdata transformation application programming interfaces (APIs) enable your client/server applications to transform numeric data between iSeries server and PC formats. Transformation may be required when you send and receive numeric data to and from the iSeries server. Data transformation APIs support transformation of many numeric formats.">iSeries Access for Windows data transformation APIs</a></div>
<div><a href="rzaiknls.htm" title="iSeries Access for Windows national language support APIs enable your applications to get and save (query and change) the iSeries Access for Windows settings that are relevant to national language support.">iSeries Access for Windows national language support (NLS) APIs</a></div>
<div><a href="rzaikupdatex.htm" title="The iSeries Access for Windows Directory Update function allows users to specify PC directories for updating from a configured network server or from multiple networked servers. This permits users to load non-iSeries Access for Windows software products on a server in the network, and to keep those files updated on PCs. Directory Update is an optionally installable iSeries Access for Windows component.">iSeries Access for Windows Directory Update APIs</a></div>
<div><a href="rzaikappobj.htm" title="iSeries Objects for iSeries Access for Windows application programming interfaces (APIs) allow you to work with iSeries print-related objects. These APIs make it possible to work with iSeries spooled files, writer jobs, output queues, printers, and more.">iSeries Objects APIs for iSeries Access for Windows</a></div>
<div><a href="rzaikapprc.htm" title="The iSeries Access for Windows Remote Command/Distributed Program Call APIs allow the PC application programmer to access functions on the iSeries system. User program and system commands can be called without requiring an emulation session. A single iSeries program serves commands and programs, so only one iSeries job is started for both.">iSeries Access for Windows Remote Command/Distributed Program Call APIs</a></div>
</div>
</div>
</body>
</html>