mirror of
https://github.com/pcsc-for-php/pcsc.git
synced 2026-08-08 21:09:26 +02:00
Replace warnings with RETURN_FALSE and a global last_errno to allow userland response to errors
git-svn-id: https://svn.php.net/repository/pecl/pcsc/trunk@332847 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
9791060ed7
commit
d47c882716
2 changed files with 60 additions and 25 deletions
15
php_pcsc.h
15
php_pcsc.h
|
|
@ -29,11 +29,22 @@ PHP_FUNCTION(scard_connect);
|
|||
PHP_FUNCTION(scard_disconnect);
|
||||
PHP_FUNCTION(scard_status);
|
||||
PHP_FUNCTION(scard_transmit);
|
||||
//PHP_FUNCTION(scard_cancel);
|
||||
PHP_FUNCTION(scard_last_errno);
|
||||
PHP_FUNCTION(scard_errstr);
|
||||
|
||||
#define PHP_PCSC_CTX_RES_NAME "PC/SC Context"
|
||||
#define PHP_PCSC_CONN_RES_NAME "PC/SC Connection"
|
||||
|
||||
static char* php_pcsc_error_to_string(LONG dwRC);
|
||||
static char* php_pcsc_error_to_string(DWORD dwRC);
|
||||
|
||||
ZEND_BEGIN_MODULE_GLOBALS(pcsc)
|
||||
DWORD last_errno;
|
||||
ZEND_END_MODULE_GLOBALS(pcsc)
|
||||
|
||||
#ifdef ZTS
|
||||
#define PCSC_G(v) TSRMG(pcsc_globals_id,zend_pcsc_globals*,v)
|
||||
#else
|
||||
#define PCSC_G(v) (pcsc_globals.v)
|
||||
#endif
|
||||
|
||||
#endif /* PHP_PCSC_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue