sc_allocate_handle()

Allocate a handle for the specified resource.

Synopsis:

#include <smartcard/sc_smart_card.h>
 
sc_response_code_t sc_allocate_handle(sc_context_t *context,                 
                                      sc_handle_type_t handle_type,                 
                                      const char *handle_name)

Since:

BlackBerry 10.2.0

Arguments:

context

The active smart card context. This value cannot be NULL.

handle_type

The type of the resource for which a handle is being requested.

handle_name

The name of the resource for which a handle is being requested. This value can be NULL if the resource does not have an associated name.

Library:

libscs (For the qcc command, use the -l scs option to link against this library)

Description:

A resource is identified by a type and a name. While all resources have a specific type, not all resources have an associated name. Generally, all reader and card resources require a name.

Only a single instance of each type of handle can be stored within a context. Attempting to associate multiple instances of the same type of handle will result in an error being returned.

When a handle is no longer required, the handle should be deallocated using the sc_free_handle() function.

Returns:

SC_SCARD_S_SUCCESS upon success, an error code otherwise. See sc_response_code_t for defined error codes.