diff options
Diffstat (limited to 'src/windows/leash/Leash.cpp')
| -rw-r--r-- | src/windows/leash/Leash.cpp | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/windows/leash/Leash.cpp b/src/windows/leash/Leash.cpp index 0c68faf5e..a4469972e 100644 --- a/src/windows/leash/Leash.cpp +++ b/src/windows/leash/Leash.cpp @@ -55,6 +55,7 @@ HANDLE m_tgsReqMutex = 0; HWND CLeashApp::m_hProgram = 0; HINSTANCE CLeashApp::m_hLeashDLL = 0; +HINSTANCE CLeashApp::m_hComErr = 0; ////@#+Remove #ifndef NO_KRB4 HINSTANCE CLeashApp::m_hKrb4DLL = 0; @@ -625,6 +626,12 @@ FUNC_INFO krb4_fi[] = { }; #endif +// com_err funcitons +DECL_FUNC_PTR(error_message); +FUNC_INFO ce_fi[] = { + MAKE_FUNC_INFO(error_message), + END_FUNC_INFO +}; // psapi functions DECL_FUNC_PTR(GetModuleFileNameExA); @@ -669,6 +676,27 @@ DECL_FUNC_PTR(krb5_free_cred_contents); DECL_FUNC_PTR(krb5_cc_resolve); DECL_FUNC_PTR(krb5_unparse_name); DECL_FUNC_PTR(krb5_free_unparsed_name); +DECL_FUNC_PTR(krb5_cc_destroy); +DECL_FUNC_PTR(krb5_cccol_cursor_new); +DECL_FUNC_PTR(krb5_cccol_cursor_free); +DECL_FUNC_PTR(krb5_cccol_cursor_next); +DECL_FUNC_PTR(krb5_cc_start_seq_get); +DECL_FUNC_PTR(krb5_cc_next_cred); +DECL_FUNC_PTR(krb5_cc_end_seq_get); +DECL_FUNC_PTR(krb5_cc_get_name); +DECL_FUNC_PTR(krb5_cc_set_flags); +DECL_FUNC_PTR(krb5_is_config_principal); +DECL_FUNC_PTR(krb5_free_ticket); +DECL_FUNC_PTR(krb5_decode_ticket); +DECL_FUNC_PTR(krb5_cc_switch); +DECL_FUNC_PTR(krb5_build_principal_ext); +DECL_FUNC_PTR(krb5_get_renewed_creds); +DECL_FUNC_PTR(krb5_cc_initialize); +DECL_FUNC_PTR(krb5_cc_store_cred); +DECL_FUNC_PTR(krb5_cc_get_full_name); +DECL_FUNC_PTR(krb5_enctype_to_name); +DECL_FUNC_PTR(krb5_cc_get_type); +DECL_FUNC_PTR(krb5int_cc_user_set_default_name); FUNC_INFO krb5_fi[] = { MAKE_FUNC_INFO(krb5_cc_default_name), @@ -691,6 +719,27 @@ FUNC_INFO krb5_fi[] = { MAKE_FUNC_INFO(krb5_cc_resolve), MAKE_FUNC_INFO(krb5_unparse_name), MAKE_FUNC_INFO(krb5_free_unparsed_name), + MAKE_FUNC_INFO(krb5_cc_destroy), + MAKE_FUNC_INFO(krb5_cccol_cursor_new), + MAKE_FUNC_INFO(krb5_cccol_cursor_next), + MAKE_FUNC_INFO(krb5_cccol_cursor_free), + MAKE_FUNC_INFO(krb5_cc_start_seq_get), + MAKE_FUNC_INFO(krb5_cc_next_cred), + MAKE_FUNC_INFO(krb5_cc_end_seq_get), + MAKE_FUNC_INFO(krb5_cc_get_name), + MAKE_FUNC_INFO(krb5_cc_set_flags), + MAKE_FUNC_INFO(krb5_is_config_principal), + MAKE_FUNC_INFO(krb5_free_ticket), + MAKE_FUNC_INFO(krb5_decode_ticket), + MAKE_FUNC_INFO(krb5_cc_switch), + MAKE_FUNC_INFO(krb5_build_principal_ext), + MAKE_FUNC_INFO(krb5_get_renewed_creds), + MAKE_FUNC_INFO(krb5_cc_initialize), + MAKE_FUNC_INFO(krb5_cc_store_cred), + MAKE_FUNC_INFO(krb5_cc_get_full_name), + MAKE_FUNC_INFO(krb5_enctype_to_name), + MAKE_FUNC_INFO(krb5_cc_get_type), + MAKE_FUNC_INFO(krb5int_cc_user_set_default_name), END_FUNC_INFO }; @@ -738,6 +787,7 @@ BOOL CLeashApp::InitDLLs() #endif m_hKrb5DLL = AfxLoadLibrary(KERB5DLL); m_hKrb5ProfileDLL = AfxLoadLibrary(KERB5_PPROFILE_DLL); + m_hComErr - AfxLoadLibrary(COMERR_DLL); #ifndef NO_AFS afscompat_init(); @@ -767,6 +817,12 @@ BOOL CLeashApp::InitDLLs() return FALSE; } + if (!LoadFuncs(COMERR_DLL, ce_fi, &m_hComErr, 0, 0, 1, 0)) { + MessageBox(hwnd, + "Functions within " COMERR_DLL "didn't load properly!", + "Error", MB_OK); + return FALSE; + } //// #ifndef NO_KRB4 if (m_hKrb4DLL) |
