[utils,smartcard] better logging and error checks

* Use wLog as argument where possible to reduce the number of WLog_Get
  calls
* Do better failure checks to avoid reading invalid memory
This commit is contained in:
akallabeth
2025-05-27 08:51:20 +02:00
parent d2395d2e13
commit 6b80a2d4ef
7 changed files with 862 additions and 642 deletions

View File

@@ -51,6 +51,17 @@ extern "C"
FREERDP_API const char* rdpdr_cap_type_string(UINT16 capability);
FREERDP_API LONG scard_log_status_error(const char* tag, const char* what, LONG status);
/** @brief log a smartcard related issue with a wLog
*
* @param log The logger to use
* @param what The module affected
* @param status The status to log
*
* @return The \ref status logged
* @since version 3.16.0
*/
FREERDP_API LONG scard_log_status_error_wlog(wLog* log, const char* what, LONG status);
FREERDP_API const char* scard_get_ioctl_string(UINT32 ioControlCode, BOOL funcName);
FREERDP_API BOOL rdpdr_write_iocompletion_header(wStream* out, UINT32 DeviceId,