⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sc_establish_context.3

📁 读写Smart卡加解密接口的程序
💻 3
字号:
.TH sc_establish_context 3 "April 2003" "OpenSC Programmer's Manual.SH NAMEsc_establish_context \- establish OpenSC context.SH SYNOPSIS.nf.B #include <opensc.h>.sp.BI "int sc_establish_context(sc_context_t **" ctx ",.BI "                         const char *" app_name ");.fi.SH DESCRIPTIONThis function establishes an OpenSC context. This context is requiredin all subsequent calls to OpenSC functions..PP\fIctx\fP is a pointer to a pointer that will receive the allocated context..PP\fIapp_name\fP is a string that identifies the application. This string willbe used to apply application-specific from the \fBopensc.conf\fP(5) configurationfile.  If \fBNULL\fP is passed, just the settings specified in the \fBdefault\fPsection apply; otherwise, settings from the section identified by \fIapp_name\fPwill be applied as well..PPThe \fBsc_context\fP structure contains the following members, amongothers:.PP.in +4.nf.B "typedef struct sc_context {.B "     struct sc_reader *reader[SC_MAX_READERS];.B "     int reader_count;.B "} sc_context_t;.fi.in.PPThe \fBreader_count\fP field contains the number of readers found byOpenSC. Information on the individual card readers are stored in\fBsc_reader\fP objects, which look like follows:.PP.in +4.nf.B "typedef struct sc_reader {.B "     char *name;.B "     int slot_count;.B "} sc_reader_t;.fi.in.PPHere, \fBname\fP contains a printable name of the reader, and \fBslot_count\fPshows the number of slots supported by this device..PPOf course, these structs contain other members as well, but applicationsusually should not use these fields..SH RETURN VALUEIf a context could be established, 0 is returned. Otherwise, a negativeerror code is returned, as described in \fbsc_error\fP(3)..SH SEE ALSO.BR sc_release_context (3),.BR sc_detect_card_presence (3),.BR sc_connect_card (3)..SH AUTHORThis manual page was written by Olaf Kirch <okir@suse.de>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -