2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
15 * INCLUSIONS _________________________________________________________________
19 #include <WINNT/TaLocale.h>
20 #undef REALLOC /* RT ticket 2120; So we can redefine it later */
26 #include <WINNT/al_wizard.h>
30 #include <osithrdnt.h>
37 #include "checklist.h"
51 * REG PATHS __________________________________________________________________
55 #define REGSTR_BASE HKEY_LOCAL_MACHINE
56 #define REGSTR_PATH_AFS TEXT("Software\\TransarcCorporation\\AFS Client\\CurrentVersion")
57 #define REGSTR_PATH_AFSCREDS TEXT("Software\\TransarcCorporation\\AFS Client\\AfsCreds")
59 #define REGVAL_AFS_TITLE TEXT("Title")
60 #define REGVAL_AFS_VERSION TEXT("VersionString")
61 #define REGVAL_AFS_PATCH TEXT("PatchLevel")
62 #define REGVAL_AFS_PATH TEXT("PathName")
64 #define cszSHORTCUT_NAME TEXT("AFS Credentials.lnk")
66 #define AFSCREDS_SHORTCUT_OPTIONS TEXT("-A -M -N -Q")
69 * VARIABLES __________________________________________________________________
75 TCHAR szCell[ MAX_PATH ];
76 TCHAR szUser[ MAX_PATH ];
91 TCHAR szHelpFile[ MAX_PATH ];
92 osi_mutex_t expirationCheckLock;
93 osi_mutex_t credsLock;
100 * TIMING _____________________________________________________________________
104 #define cminREMIND_TEST 1 // test every minute for expired creds
105 #define cminREMIND_WARN 15 // warn if creds expire in 15 minutes
106 #define cminRENEW 20 // renew creds when there are 20 minutes remaining
107 #define cminMINLIFE 30 // minimum life of Kerberos creds
109 #define cmsecMOUSEOVER 1000 // retest freq when mouse is over tray icon
110 #define cmsecSERVICE 2000 // retest freq when starting/stopping service
112 #define c100ns1SECOND (LONGLONG)10000000
113 #define cmsec1SECOND 1000
114 #define cmsec1MINUTE 60000
115 #define csec1MINUTE 60
118 #define ID_REMIND_TIMER 1000
119 #define ID_SERVICE_TIMER 1001
120 #define ID_WIZARD_TIMER 1002
124 * MACROS _____________________________________________________________________
129 #define FileExists(_psz) ((GetFileAttributes (_psz) == 0xFFFFFFFF) ? FALSE : TRUE)
133 #define THIS_HINST (HINSTANCE)GetModuleHandle(NULL)
137 #define iswhite(_ch) ( ((_ch)==TEXT(' ')) || ((_ch)==TEXT('\t')) || ((_ch)==TEXT('\r')) || ((_ch)==TEXT('\n')) )
141 #define cxRECT(_r) ((_r).right - (_r).left)
145 #define cyRECT(_r) ((_r).bottom - (_r).top)
149 #define REALLOC(_a,_c,_r,_i) AfsCredsReallocFunction ((LPVOID*)&_a,sizeof(*_a),&_c,_r,_i)
154 * PROTOTYPES _________________________________________________________________
160 BOOL AfsCredsReallocFunction (LPVOID *ppTarget, size_t cbElement, size_t *pcTarget, size_t cReq, size_t cInc);
162 void LoadRemind (size_t iCreds);
163 void SaveRemind (size_t iCreds);
165 void TimeToSystemTime (SYSTEMTIME *pst, time_t TimeT);
167 LPARAM GetTabParam (HWND hTab, int iTab);
168 HWND GetTabChild (HWND hTab);