static khm_int32 KHMAPI set_state_from_ui_thread(HWND hwnd_main, void * stuff) { struct state_data * d = (struct state_data *) stuff; wchar_t certs[COLLECT_STR_LEN] = L""; initialize_if_necessary(); if (d->credset) kcdb_credset_apply(d->credset, collect_kca_cert_names, certs); if (certs[0] == L'\0') { set_tooltip_and_icon(IDS_CRED_TT_NONE, NULL, IDI_CRED_NONE); return KHM_ERROR_SUCCESS; } set_tooltip_and_icon(IDS_CRED_TT_GOOD, certs, IDI_CRED_GOOD); return KHM_ERROR_SUCCESS; }
static khm_int32 KHMAPI set_state_from_ui_thread(HWND hwnd_main, void * stuff) { struct state_data * d = (struct state_data *) stuff; initialize_if_necessary(); switch (d->state) { case AFSICON_REPORT_TOKENS: { wchar_t cells[COLLECT_STR_LEN] = L""; kcdb_credset_apply(d->credset, collect_cell_names, cells); if (cells[0] == L'\0') { set_tooltip_and_icon(IDS_CRED_TT_NONE, NULL, IDI_CRED_NONE); break; } set_tooltip_and_icon(0, cells, IDI_CRED_OK); } break; case AFSICON_SERVICE_STOPPED: set_tooltip_and_icon(IDS_CRED_TT_NOS, NULL, IDI_CRED_SVCSTOP); break; case AFSICON_SERVICE_ERROR: set_tooltip_and_icon(IDS_CRED_TT_SERR, NULL, IDI_CRED_BROKEN); break; default: assert(FALSE); } (void) hwnd_main; /* unreferenced */ return KHM_ERROR_SUCCESS; }