BAD_FUNC_ARG when dev or library are NULL pointers. BAD_PATH_ERROR when dynamic library cannot be opened. WC_INIT_E when the initialization PKCS#11 fails. WC_HW_E when unable to get PKCS#11 function list. 0 on success.