1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 8.0.0.0 for Windows">
7<META http-equiv="Content-Style-Type" content="text/css">
8<title>STDConvertSjisCallback</title>
9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css">
10</head>
11
12<body>
13
14<h1 align="left">STDConvertSjisCallback<img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1>
15<h2>Definition</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;nitro/std.h&gt;</CODE><BR>
20<PRE><CODE>typedef <a href="STDResult.html">STDResult</a> (*STDConvertSjisCallback) (char *dst, int *dst_len, const u16 *src, int *src_len);</CODE></PRE>
21  </dd>
22
23</dl><h2>Arguments</h2>
24<TABLE border="1" width="100%">
25  <TBODY>
26    <TR>
27<TD width="30%"><CODE>dst</CODE></TD>
28<TD width="70%">Pointer to the location storing the converted Shift-JIS character.</TD>
29    </TR>
30    <TR>
31<TD width="30%"><CODE>dst_len</CODE></TD>
32<TD width="70%">Accepting the maximum byte size that can be stored in the destination buffer, this pointer returns the byte size actually stored.</TD>
33    </TR>
34    <TR>
35<TD width="30%"><CODE>src</CODE></TD>
36<TD width="70%">Pointer to the location where conversion of the Unicode string failed.</TD>
37    </TR>
38    <TR>
39<TD width="30%"><CODE>srclen</CODE></TD>
40<TD width="70%">Accepting the remaining number of unconverted characters that <CODE>src</CODE> points to, this pointer returns the number of characters actually required for conversion.<br></TD>
41    </TR>
42  </TBODY>
43</TABLE>
44
45<h2>Return Values</h2>
46<p>Returns <a href="STDResult.html"><CODE>STD_RESULT_SUCCESS</CODE></a> if conversion succeeds. Otherwise, returns <a href="STDResult.html"><CODE>STD_RESULT_CONVERSION_FAILED</CODE></a>.<br>Be sure to store the number of characters actually used in conversion in the arguments <CODE>dst_len</CODE> and <CODE>src_len</CODE>.</p>
47
48<H2>Description</H2>
49<P>
50The type of the callback function configured with the <A href="STD_ConvertStringUnicodeToSjis.html"><CODE>STD_ConvertStringUnicodeToSjis</CODE></A> function. This callback is called every time a character that cannot be converted by the <A href="STD_ConvertStringSjisToUnicode.html"><CODE>STD_ConvertStringUnicodeToSjis</CODE></A> function is detected. Conversion processing can be freely defined here.<BR><br> A four-character array is always guaranteed for <CODE>dst</CODE>. Store characters that result from conversion here. A null terminator does not need to be added.<br>Be sure to store the number of characters in one character's worth of <CODE>src</CODE> to be read for conversion in <CODE>srclen</CODE>. (Note that the number of characters does not give the byte size.)<br><br>If the result of conversion is two or more characters and either <CODE>src</CODE> or <CODE>dst</CODE> exceed the end of the buffer, the result will be ignored and will be treated as if the end of buffer has been reached.<br>
51</P>
52
53<h2>See Also</h2>
54<p><a href="STDResult.html"><CODE>STDResult</CODE></a><br> <A href="STD_ConvertStringUnicodeToSjis.html"><CODE>STD_ConvertStringUnicodeToSjis</CODE></A></p>
55
56<H2>Revision History</H2>
57<P>
582006/08/10 Changed the interface.<br>2006/07/24 Changed the interface. Added a description of restrictions on return values.<br>2006/07/05 Initial version.
59</P>
60<hr><p>CONFIDENTIAL</p></body>
61</html>
62