Allocate a handle for the specified resource.
#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)
BlackBerry 10.2.0
The active smart card context. This value cannot be NULL.
The type of the resource for which a handle is being requested.
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.
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.
SC_SCARD_S_SUCCESS upon success, an error code otherwise. See sc_response_code_t for defined error codes.