32 Value vreader = pop_value(vm);
35 int ctx_id = (int)
vctx.i;
40 pcsc_ctx_entry *e = pcsc_get_ctx(ctx_id);
42 if (rname)
free(rname);
47 int hslot = pcsc_alloc_card_slot();
53 pcsc_card_entry *ce = pcsc_get_card(hslot);
55 LONG rv = SCardConnect(e->ctx, rname, SCARD_SHARE_SHARED,
56 SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1,
59 if (rv != SCARD_S_SUCCESS) {
67 Value vreader = pop_value(vm);
push_value(vm, make_int(0))
Tagged union representing a Fun value.
char * value_to_string_alloc(const Value *v)
Allocate a printable C string for a Value.
Value make_int(int64_t v)
Construct a Value representing a 64-bit integer.