Skip to main content

OH_Scan_GetScannerParameter

Function OH_Scan_GetScannerParameter 

Source
pub unsafe extern "C" fn OH_Scan_GetScannerParameter(
    scannerId: *const c_char,
    errorCode: *mut i32,
) -> *mut Scan_ScannerOptions
Available on crate features scan and api-12 only.
Expand description

This API can be used to get a list of options that can be set by the scanner. The returned struct pointer points to memory that is automatically freed when OH_Scan_Exit, and only one copy will be stored in memory for each model.

ohos.permission.PRINT

§Arguments

  • scannerId - The id used to obtain the scanner parameters.

  • errorCode - The errorCode returns Scan_ErrorCode if the execution is successful, otherwise returns a specific error code, refer to [Print_ErrorCode].

§Returns

  • [Scan_ERROR_NONE] Indicates that the scanner parameter options are successfully obtained. [SCAN_ERROR_NO_PERMISSION] Indicates have no permission to use this interface. [SCAN_ERROR_RPC_FAILURE] Indicates an RPC communication error. [SCAN_ERROR_SERVER_FAILURE] Indicates An error occurs in the scan process. [SCAN_ERROR_INVALID_PARAMETER] Indicates invalid parameter.

Required System Capabilities: SystemCapability.Print.PrintFramework

Available since API-level: 12