xref: /freebsd/crypto/krb5/src/windows/leash/Leash.h (revision 7f2fe78b9dd5f51c821d771b63d2e096f6fd49e9)
1 //	**************************************************************************************
2 //	File:			Leash.h
3 //	By:				Arthur David Leather
4 //	Created:		12/02/98
5 //	Copyright		@1998 Massachusetts Institute of Technology - All rights reserved.
6 //	Description:	H file for Leash.cpp. Contains variables and functions
7 //					for Leash
8 //
9 //	History:
10 //
11 //	MM/DD/YY	Inits	Description of Change
12 //	12/02/98	ADL		Original
13 //	**************************************************************************************
14 
15 
16 #if !defined(AFX_Leash_H__6F45AD91_561B_11D0_8FCF_00C04FC2A0C2__INCLUDED_)
17 #define AFX_Leash_H__6F45AD91_561B_11D0_8FCF_00C04FC2A0C2__INCLUDED_
18 
19 #if _MSC_VER >= 1000
20 #pragma once
21 #endif // _MSC_VER >= 1000
22 
23 #ifndef __AFXWIN_H__
24 	#error include 'stdafx.h' before including this file for PCH
25 #endif
26 
27 // Help
28 #define HID_GET_TICKETS_COMMAND			98343 // ID_INIT_TICKET + 65536
29 #define HID_RENEW_TICKETS_COMMAND       98312 // ID_RENEW_TICKET + 65536
30 #define HID_DESTROY_TICKETS_COMMAND     98313
31 #define HID_SYNCHRONIZE_TIME_OPTION     98314
32 #define HID_CHANGE_PASSWORD_COMMAND		98315
33 #define HID_UPDATE_DISPLAY_COMMAND      98316
34 #define HID_DEBUG_WINDOW_OPTION			98317
35 #define HID_LEASH_PROGRAM               98319
36 #define HID_ABOUT_KERBEROS              98320
37 #define HID_LARGE_ICONS_OPTION          98322
38 #define HID_DESTROY_TICKETS_ON_EXIT		98321
39 #define HID_UPPERCASE_REALM_OPTION      98323
40 #define HID_RESET_WINDOW_OPTION			98326
41 #define HID_KRB5_PROPERTIES_COMMAND		98330
42 #define HID_LEASH_PROPERTIES_COMMAND	98331
43 #define HID_LOW_TICKET_ALARM_OPTION		98334
44 #define HID_KRBCHECK_OPTION				98335
45 #define HID_KERBEROS_PROPERTIES_COMMAND 98337
46 #define HID_HELP_CONTENTS               98340
47 #define HID_WHY_USE_LEASH32				98341
48 
49 #define HID_ABOUT_LEASH32_COMMAND       123200
50 #define HID_EXIT_COMMAND                123201
51 #define HID_TOOLBAR_OPTION				124928
52 #define HID_STATUS_BAR_OPTION           124929
53 #define HID_LEASH_COMMANDS              131200
54 #define HID_ABOUT_LEASH32_MODULES       131225
55 #define HID_DEBUG_WINDOW				131229
56 #define HID_KERBEROS_PROPERTIES_EDIT	131233
57 #define HID_LEASH_PROPERTIES_EDIT		131239
58 #define HID_KRB5_PROPERTIES_FORWARDING  131240
59 #define HID_KRB5_PROPERTIES_EDIT	    131241
60 #define HID_KERBEROS_PROPERTIES_LISTRLM 131250
61 #define HID_KERBEROS_PROPERTIES_ADDRLM  131253
62 #define HID_KERBEROS_PROPERTIES_EDITRLM 131254
63 #define HID_KERBEROS_PROPERTIES_ADDDOM  131255
64 #define HID_KERBEROS_PROPERTIES_EDITDOM 131256
65 #define HID_KERBEROS_PROPERTIES_ADDHOST 131269
66 #define HID_KERBEROS_PROPERTIES_EDITHOST 131271
67 #define HID_KERBEROS_PROPERTIES_LISTDOM 131279
68 
69 #define USE_HTMLHELP
70 
71 #ifdef USE_HTMLHELP
72 #if _MSC_VER >= 1300
73 #define CALL_HTMLHELP
74 #endif
75 #endif
76 
77 ////Is this a good place for these defines?
78 #if !defined(MAX_HSTNM)
79 #define         MAX_HSTNM       100
80 #endif
81 
82 
83 #include "resource.h"       // main symbols
84 #include "lglobals.h"
85 
86 /////////////////////////////////////////////////////////////////////////////
87 // CLeashApp:
88 // See Leash.cpp for the implementation of this class
89 //
90 
91 class CLeashApp : public CWinAppEx
92 {
93 private:
94 	CString		m_leashDLL;
95 	CString		m_krbDLL;
96     CString     m_helpFile;
97 	CString		m_msgError;
98 
99 	BOOL		InitDLLs();
100 	BOOL		FirstInstance();
101 
102 public:
103 	static HWND			m_hProgram;
104 	static HINSTANCE	m_hLeashDLL;
105 	static HINSTANCE	m_hComErr;
106 ////
107 	static HINSTANCE	m_hKrb5DLL;
108 	static HINSTANCE	m_hKrb5ProfileDLL;
109 	static HINSTANCE	m_hPsapi;
110 	static HINSTANCE	m_hToolHelp32;
111 	static krb5_context m_krbv5_context;
112 	static profile_t    m_krbv5_profile;
113 	static HINSTANCE    m_hKrbLSA;
114 	static int          m_useRibbon; // temporary while ribbon UI in dev
115 	static BOOL         m_bUpdateDisplay;
116 
117 	CLeashApp();
118 	virtual ~CLeashApp();
119 
120     static BOOL  GetProfileFile(LPSTR confname, UINT szConfname);
121     static void  ValidateConfigFiles();
122     static void  ObtainTicketsViaUserIfNeeded(HWND hWnd);
123     static DWORD GetNumOfIpAddrs(void);
124     static UINT  IpAddrChangeMonitor(void *);
125            DWORD IpAddrChangeMonitorInit(HWND hWnd);
126     static BOOL  ProbeKDC(void);
127     static UINT  InitWorker(void *);
128 
129 	// Overrides
130 	// ClassWizard generated virtual function overrides
131 	//{{AFX_VIRTUAL(CLeashApp)
132 	public:
133 	virtual BOOL InitInstance();
134 #ifdef USE_HTMLHELP
135 #if _MSC_VER < 1300
136     virtual void WinHelp(DWORD dwData, UINT nCmd);
137 #endif
138 #endif
139     //}}AFX_VIRTUAL
140 
141     virtual void ParseParam (LPCTSTR lpszParam,BOOL bFlag,BOOL bLast );
142 
143   protected:
144 // Implementation
145 
146 	//{{AFX_MSG(CLeashApp)
147     //}}AFX_MSG
148 	DECLARE_MESSAGE_MAP()
149 public:
150     virtual BOOL OnIdle(LONG lCount);
151 };
152 
153 extern CLeashApp theApp;
154 
155 /////////////////////////////////////////////////////////////////////////////
156 
157 //{{AFX_INSERT_LOCATION}}
158 // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
159 
160 
161 
162 #endif // !defined(AFX_Leash_H__6F45AD91_561B_11D0_8FCF_00C04FC2A0C2__INCLUDED_)
163