IPXS_PDFVariant::Arr_InsertString Method
From PDF XChange PDF SDK
m (Automatic page editing by robot) |
|||
(6 intermediate revisions by one other user not shown) | |||
Line 2: | Line 2: | ||
[[Category:Editor]] | [[Category:Editor]] | ||
{{#customTitle:IPXS_PDFVariant::Arr_InsertString Method}} | {{#customTitle:IPXS_PDFVariant::Arr_InsertString Method}} | ||
− | {{#parentPage:PXV:IPXS_PDFVariant|Arr_InsertString | + | {{#parentPage:PXV:IPXS_PDFVariant#Methods|Arr_InsertString|method}} |
− | + | ||
{{ToReview}} | {{ToReview}} | ||
− | + | Insert new variant with type <code>PVT_String</code> and specified value into array container. | |
== Syntax == | == Syntax == | ||
− | <pre class="brush:cpp;gutter:false">HRESULT Arr_InsertString([in] LPWSTR | + | <pre class="brush:cpp;gutter:false">HRESULT Arr_InsertString([in] LPWSTR sVal, |
[in, defaultvalue(-1)] ULONG nBefore);</pre> | [in, defaultvalue(-1)] ULONG nBefore);</pre> | ||
== Parameters == | == Parameters == | ||
− | ; | + | ;sVal |
− | :[in] | + | :[in] Pointer to null-terminated Unicode string, which will be used as variant value. If string can be represented as ASCII string it will be stored using single byte per character, otherwise two bytes per characters will be used (same as in Unicode). If you need to add ASCII string to array it will be faster to use [[PXV:IPXS_PDFVariant_Arr_InsertStringR|Arr_InsertStringR]], but please note that if your string contain characters with codes greater than 127 they will be interpreted as codes from '''PDFDocEncoding''', not as codes from current code page. |
+ | |||
;nBefore | ;nBefore | ||
− | :[in, defaultvalue(-1)] | + | :[in, defaultvalue(-1)] Specifies index of element before which we will insert new one. If index is greater or equal array size new element will be inserted at the end of array. |
== Return Value == | == Return Value == | ||
Line 22: | Line 22: | ||
== See Also == | == See Also == | ||
− | [[PXV:IPXS_PDFVariant|IPXS_PDFVariant]] | + | [[PXV:IPXS_PDFVariant|IPXS_PDFVariant]] |
Latest revision as of 04:50, 21 August 2015
Insert new variant with type PVT_String
and specified value into array container.
Syntax
HRESULT Arr_InsertString([in] LPWSTR sVal, [in, defaultvalue(-1)] ULONG nBefore);
Parameters
- sVal
- [in] Pointer to null-terminated Unicode string, which will be used as variant value. If string can be represented as ASCII string it will be stored using single byte per character, otherwise two bytes per characters will be used (same as in Unicode). If you need to add ASCII string to array it will be faster to use Arr_InsertStringR, but please note that if your string contain characters with codes greater than 127 they will be interpreted as codes from PDFDocEncoding, not as codes from current code page.
- nBefore
- [in, defaultvalue(-1)] Specifies index of element before which we will insert new one. If index is greater or equal array size new element will be inserted at the end of array.
Return Value
Returns S_OK if operation was successful or error code in other cases.