Skip to main content

OH_ResourceManager_GetStringArrayByName

Function OH_ResourceManager_GetStringArrayByName 

Source
pub unsafe extern "C" fn OH_ResourceManager_GetStringArrayByName(
    mgr: *const NativeResourceManager,
    resName: *const c_char,
    resultValue: *mut *mut *mut c_char,
    resultLen: *mut u32,
) -> ResourceManager_ErrorCode
Expand description

@brief Obtains the array of character strings.

Obtains the array of character strings corresponding to a specified resource name. You need to call the OH_ResourceManager_ReleaseStringArray() method to release the memory of string array.

@param mgr Indicates the pointer to {@link NativeResourceManager} {@link OH_ResourceManager_InitNativeResourceManager}. @param resName Indicates the resource name. @param resultValue the result write to resultValue. @param resultLen the StringArray length write to resultLen. @return {@link SUCCESS} 0 - Success. {@link ERROR_CODE_INVALID_INPUT_PARAMETER} 401 - The input parameter invalid. Possible causes: Incorrect parameter types. {@link ERROR_CODE_RES_NAME_NOT_FOUND} 9001003 - Invalid resource name. {@link ERROR_CODE_RES_NOT_FOUND_BY_NAME} 9001004 - No matching resource is found based on the resource name. {@link ERROR_CODE_RES_REF_TOO_MUCH} 9001006 - The resource is referenced cyclically. {@link ERROR_CODE_OUT_OF_MEMORY} 9001100 - Out of memory. @since 12