![]() |
Fun 0.41.5
The programming language that makes you have fun!
|
Implements the OP_PCSC_CONNECT opcode (conditional build). More...
Go to the source code of this file.
Functions | |
| free_value (vctx) | |
| free_value (vreader) | |
| if (!e||!rname) | |
| if (!hslot) | |
| free (rname) | |
| if (rv !=SCARD_S_SUCCESS) | |
| push_value (vm, make_int(hslot)) | |
Variables | |
| case | OP_PCSC_CONNECT |
| Value | vctx = pop_value(vm) |
| int | ctx_id = (int)vctx.i |
| char * | rname = value_to_string_alloc(&vreader) |
| pcsc_ctx_entry * | e = pcsc_get_ctx(ctx_id) |
| int | hslot = pcsc_alloc_card_slot() |
| pcsc_card_entry * | ce = pcsc_get_card(hslot) |
| DWORD | dwActive = 0 |
| LONG | rv |
| ce | proto = dwActive |
| break | |
Implements the OP_PCSC_CONNECT opcode (conditional build).
Connects to a smart card in the specified reader using an existing PC/SC context. On success, allocates/returns a card handle id from the internal registry. When PCSC support is disabled at build time, this opcode returns 0.
OP_PCSC_CONNECT: (ctx_id:int, reader_name:any) -> int
Definition in file connect.c.
| free | ( | rname | ) |
| free_value | ( | vctx | ) |
| free_value | ( | vreader | ) |
| pcsc_card_entry* ce = pcsc_get_card(hslot) |
| pcsc_ctx_entry* e = pcsc_get_ctx(ctx_id) |
| int hslot = pcsc_alloc_card_slot() |
| char* rname = value_to_string_alloc(&vreader) |
| LONG rv |