SetNativeString Function

Sets a string in a native parameter.

int SetNativeString(int param, const char[] source, int maxlength, bool utf8, int& bytes)

Parameters

int param

Parameter number, starting from 1.

const char[] source

Source string to use.

int maxlength

Maximum number of bytes to write.

bool utf8

If false, string will not be written with UTF8 safety.

int& bytes

Optionally store the number of bytes written.

Return Value

SP_ERROR_NONE on success, any other integer on failure.

Errors

Invalid parameter number or calling from a non-native function.

Notes

Output conditions are undefined on failure.