IPXS_PDFVariant::Arr_SetString Method

From PDF XChange PDF SDK
Jump to: navigation, search
m (Automatic page editing by robot)
Line 6: Line 6:
 
{{ToReview}}
 
{{ToReview}}
  
The method of interface of PDF-XChange Editor SDK.
+
Replace specified element of array with new variant with type <code>PVT_String</code> and specified value.
  
 
== Syntax ==
 
== Syntax ==
Line 14: Line 14:
 
== Parameters ==
 
== Parameters ==
 
;nPos
 
;nPos
:[in]  Value of ULONG.
+
:[in]  Specifies index of element to replace. If it is greater or equal to array size function will return <code>E_INVALIDARG</code>.
 
;sVal
 
;sVal
:[in]  Value of LPWSTR.
+
:[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_SetStringR|Arr_SetStringR]], 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.
 +
 
  
 
== Return Value ==
 
== Return Value ==

Revision as of 06:44, 21 August 2015


Replace specified element of array with new variant with type PVT_String and specified value.

Syntax

HRESULT Arr_SetString([in]  ULONG   nPos,
                      [in]  LPWSTR  sVal);

Parameters

nPos
[in] Specifies index of element to replace. If it is greater or equal to array size function will return E_INVALIDARG.
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_SetStringR, 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.


Return Value

Returns S_OK if operation was successful or error code in other cases.

See Also

IPXS_PDFVariant