19 is identified by a "C" suffix in the class name. The length of a non-modifiable |
19 is identified by a "C" suffix in the class name. The length of a non-modifiable |
20 descriptor is defined when compiling an application, and the length of a modifiable |
20 descriptor is defined when compiling an application, and the length of a modifiable |
21 descriptor can vary within the limits set by <codeph>iMaxLength</codeph>. |
21 descriptor can vary within the limits set by <codeph>iMaxLength</codeph>. |
22 Nonmodifiable descriptors are more secure, as their length is checked during |
22 Nonmodifiable descriptors are more secure, as their length is checked during |
23 compilation. The following figure shows the differences between these types.</p> |
23 compilation. The following figure shows the differences between these types.</p> |
24 <fig id="GUID-A8F9937F-25A6-4E80-845F-35994B7E13E5"><title>Differences between modifiable, nonmodifiable, and pointer descriptors</title><image href="GUID-40619192-8C2F-4267-BFCA-F53E10BF5A31_d0e11254_href.png"/></fig> |
24 <fig id="GUID-A8F9937F-25A6-4E80-845F-35994B7E13E5"><title>Differences between modifiable, nonmodifiable, and pointer descriptors</title><image href="GUID-40619192-8C2F-4267-BFCA-F53E10BF5A31_d0e12529_href.png"/></fig> |
25 <p>When designing applications, avoid using fixed-length buffers as parameters |
25 <p>When designing applications, avoid using fixed-length buffers as parameters |
26 and use base classes (preferably constant base type <codeph><xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Kernel_Architecture_2/e32cmn.hGlobals.html#%3a%3aTDesC" format="application/java-archive">TDesC</xref></codeph>) |
26 and use base classes (preferably constant base type <codeph><xref href="jar:GUID-35228542-8C95-4849-A73F-2B4F082F0C44.jar!/sdk/doc_source/reference/reference-cpp/Kernel_Architecture_2/e32cmn.hGlobals.html#%3a%3aTDesC" format="application/java-archive">TDesC</xref></codeph>) |
27 instead. Descriptor objects provide a flexible interface for manipulating |
27 instead. Descriptor objects provide a flexible interface for manipulating |
28 the contained string, including size and length checks. Take advantage of |
28 the contained string, including size and length checks. Take advantage of |
29 these when possible.</p> |
29 these when possible.</p> |