Path: blob/main/crypto/krb5/src/windows/leash/Leash.h
34889 views
// **************************************************************************************1// File: Leash.h2// By: Arthur David Leather3// Created: 12/02/984// Copyright @1998 Massachusetts Institute of Technology - All rights reserved.5// Description: H file for Leash.cpp. Contains variables and functions6// for Leash7//8// History:9//10// MM/DD/YY Inits Description of Change11// 12/02/98 ADL Original12// **************************************************************************************131415#if !defined(AFX_Leash_H__6F45AD91_561B_11D0_8FCF_00C04FC2A0C2__INCLUDED_)16#define AFX_Leash_H__6F45AD91_561B_11D0_8FCF_00C04FC2A0C2__INCLUDED_1718#if _MSC_VER >= 100019#pragma once20#endif // _MSC_VER >= 10002122#ifndef __AFXWIN_H__23#error include 'stdafx.h' before including this file for PCH24#endif2526// Help27#define HID_GET_TICKETS_COMMAND 98343 // ID_INIT_TICKET + 6553628#define HID_RENEW_TICKETS_COMMAND 98312 // ID_RENEW_TICKET + 6553629#define HID_DESTROY_TICKETS_COMMAND 9831330#define HID_SYNCHRONIZE_TIME_OPTION 9831431#define HID_CHANGE_PASSWORD_COMMAND 9831532#define HID_UPDATE_DISPLAY_COMMAND 9831633#define HID_DEBUG_WINDOW_OPTION 9831734#define HID_LEASH_PROGRAM 9831935#define HID_ABOUT_KERBEROS 9832036#define HID_LARGE_ICONS_OPTION 9832237#define HID_DESTROY_TICKETS_ON_EXIT 9832138#define HID_UPPERCASE_REALM_OPTION 9832339#define HID_RESET_WINDOW_OPTION 9832640#define HID_KRB5_PROPERTIES_COMMAND 9833041#define HID_LEASH_PROPERTIES_COMMAND 9833142#define HID_LOW_TICKET_ALARM_OPTION 9833443#define HID_KRBCHECK_OPTION 9833544#define HID_KERBEROS_PROPERTIES_COMMAND 9833745#define HID_HELP_CONTENTS 9834046#define HID_WHY_USE_LEASH32 983414748#define HID_ABOUT_LEASH32_COMMAND 12320049#define HID_EXIT_COMMAND 12320150#define HID_TOOLBAR_OPTION 12492851#define HID_STATUS_BAR_OPTION 12492952#define HID_LEASH_COMMANDS 13120053#define HID_ABOUT_LEASH32_MODULES 13122554#define HID_DEBUG_WINDOW 13122955#define HID_KERBEROS_PROPERTIES_EDIT 13123356#define HID_LEASH_PROPERTIES_EDIT 13123957#define HID_KRB5_PROPERTIES_FORWARDING 13124058#define HID_KRB5_PROPERTIES_EDIT 13124159#define HID_KERBEROS_PROPERTIES_LISTRLM 13125060#define HID_KERBEROS_PROPERTIES_ADDRLM 13125361#define HID_KERBEROS_PROPERTIES_EDITRLM 13125462#define HID_KERBEROS_PROPERTIES_ADDDOM 13125563#define HID_KERBEROS_PROPERTIES_EDITDOM 13125664#define HID_KERBEROS_PROPERTIES_ADDHOST 13126965#define HID_KERBEROS_PROPERTIES_EDITHOST 13127166#define HID_KERBEROS_PROPERTIES_LISTDOM 1312796768#define USE_HTMLHELP6970#ifdef USE_HTMLHELP71#if _MSC_VER >= 130072#define CALL_HTMLHELP73#endif74#endif7576////Is this a good place for these defines?77#if !defined(MAX_HSTNM)78#define MAX_HSTNM 10079#endif808182#include "resource.h" // main symbols83#include "lglobals.h"8485/////////////////////////////////////////////////////////////////////////////86// CLeashApp:87// See Leash.cpp for the implementation of this class88//8990class CLeashApp : public CWinAppEx91{92private:93CString m_leashDLL;94CString m_krbDLL;95CString m_helpFile;96CString m_msgError;9798BOOL InitDLLs();99BOOL FirstInstance();100101public:102static HWND m_hProgram;103static HINSTANCE m_hLeashDLL;104static HINSTANCE m_hComErr;105////106static HINSTANCE m_hKrb5DLL;107static HINSTANCE m_hKrb5ProfileDLL;108static HINSTANCE m_hPsapi;109static HINSTANCE m_hToolHelp32;110static krb5_context m_krbv5_context;111static profile_t m_krbv5_profile;112static HINSTANCE m_hKrbLSA;113static int m_useRibbon; // temporary while ribbon UI in dev114static BOOL m_bUpdateDisplay;115116CLeashApp();117virtual ~CLeashApp();118119static BOOL GetProfileFile(LPSTR confname, UINT szConfname);120static void ValidateConfigFiles();121static void ObtainTicketsViaUserIfNeeded(HWND hWnd);122static DWORD GetNumOfIpAddrs(void);123static UINT IpAddrChangeMonitor(void *);124DWORD IpAddrChangeMonitorInit(HWND hWnd);125static BOOL ProbeKDC(void);126static UINT InitWorker(void *);127128// Overrides129// ClassWizard generated virtual function overrides130//{{AFX_VIRTUAL(CLeashApp)131public:132virtual BOOL InitInstance();133#ifdef USE_HTMLHELP134#if _MSC_VER < 1300135virtual void WinHelp(DWORD dwData, UINT nCmd);136#endif137#endif138//}}AFX_VIRTUAL139140virtual void ParseParam (LPCTSTR lpszParam,BOOL bFlag,BOOL bLast );141142protected:143// Implementation144145//{{AFX_MSG(CLeashApp)146//}}AFX_MSG147DECLARE_MESSAGE_MAP()148public:149virtual BOOL OnIdle(LONG lCount);150};151152extern CLeashApp theApp;153154/////////////////////////////////////////////////////////////////////////////155156//{{AFX_INSERT_LOCATION}}157// Microsoft Developer Studio will insert additional declarations immediately before the previous line.158159160161#endif // !defined(AFX_Leash_H__6F45AD91_561B_11D0_8FCF_00C04FC2A0C2__INCLUDED_)162163164