*** *** Source code snippets from our custom Kerberos service -- NPLogonNotify entry point *** NPLogonNotify (in krbautolog.dll) [NPLogonNotify loads Autologon.dll] [Call Autologon.dll API below] [Exit NPLogonNotify to return to system] Autologon.dll [Some beginning processing] DebugLog("In LoadFunctions_v5"); if ((hKrb5_32Lib = LoadLibrary ("krb5_32.dll")) == NULL) { MessageBox(0, "Unable to load krb5_32.dll", "autologon - LoadFunctions_v5", MB_OK); DebugLog("LoadFunctions_v5: Unable to load krb5_32.dll (error %d)", GetLastError()); return 1; } DebugLog("LoadFunctions_v5: hKrb5_32Lib=%i",hKrb5_32Lib); [Bulk of authentication process -- Comments in log files have "KerberosLogin:" prefix] DebugLog("ObtainTGT: Successfully acquired Kerberos tickets."); [Cleanup at end of Autologon.dll processing] DebugLog("In UnLoadFunctions_v5"); if (hKrb5_32Lib != NULL) { DebugLog("UnLoadFunctions_v5: Going to free hKrb5_32Lib=%i",hKrb5_32Lib); if (FreeLibrary(hKrb5_32Lib)) DebugLog("UnLoadFunctions_v5: successfully freed library hKrb5_32Lib."); else DebugLog("UnLoadFunctions_v5: FreeLibrary(hKrb5_32Lib) caused error %d", GetLastError()); } DebugLog("UnLoadFunctions_v5: returning to the caller."); [Some other processing] DebugLog("ObtainTGT: returning 0 to the caller"); [When process detaches, DLLMain logs "DllMain: finished processing DLL_PROCESS_DETACH"] [Return to NPLogonNotify]