if (nDestIndex == nSrcIndex || nDestIndex == nSrcIndex+1)
return; //didn't move
CString str1, str2;
- DWORD dwData;
+ DWORD_PTR dwData;
GetText(nSrcIndex, str1);
GetText(nDestIndex, str2);
dwData = GetItemData(nSrcIndex);
#include <errno.h>
+#include <afxwin.h>
+
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
0 == stricmp(optionParam+1, "i"))
{
LSH_DLGINFO_EX ldi;
- char username[64]="";
- char realm[192]="";
- int i=0, j=0;
+ char username[64]="";
+ char realm[192]="";
+ int i=0, j=0;
TicketList* ticketList = NULL;
if (WaitForSingleObject( ticketinfo.lockObj, INFINITE ) != WAIT_OBJECT_0)
throw("Unable to lock ticketinfo");
}
char realmkey[256]="SYSTEM\\CurrentControlSet\\Control\\Lsa\\Kerberos\\Domains\\";
- int keylen = strlen(realmkey)-1;
+ size_t keylen = strlen(realmkey)-1;
if ( domain[0] ) {
strncpy(realm,domain,256);
/////////////////////////////////////////////////////////////////////////////
// CLeashMessageBox message handlers
-void CALLBACK CLeashMessageBox::MessageBoxTimer(HWND hwnd, UINT uiMsg, UINT idEvent, DWORD dwTime)
+void CALLBACK CLeashMessageBox::MessageBoxTimer(HWND hwnd, UINT uiMsg, UINT_PTR idEvent, DWORD dwTime)
{
::KillTimer(hwnd, 2);
::SendMessage(hwnd, WM_CLOSE, 0, 0);
BOOL CLeashMessageBox::OnInitDialog()
{
CDialog::OnInitDialog();
- UINT idTimer = SetTimer(2, m_dwTime, (TIMERPROC)MessageBoxTimer);
+ UINT_PTR idTimer = SetTimer(2, m_dwTime, &MessageBoxTimer);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
{
private:
static DWORD m_dwTime;
- static void CALLBACK MessageBoxTimer(HWND hwnd, UINT uiMsg, UINT idEvent, DWORD dwTime);
+ static void CALLBACK MessageBoxTimer(HWND hwnd, UINT uiMsg, UINT_PTR idEvent, DWORD dwTime);
// Construction
public:
END_MESSAGE_MAP()
-LONG CLeashView::m_ticketTimeLeft = 0; // # of seconds left before tickets expire
+time_t CLeashView::m_ticketTimeLeft = 0; // # of seconds left before tickets expire
INT CLeashView::m_forwardableTicket = 0;
INT CLeashView::m_proxiableTicket = 0;
INT CLeashView::m_renewableTicket = 0;
printf("OnClose\n");
}
-LONG CLeashView::LeashTime()
+time_t CLeashView::LeashTime()
{
_tzset();
return time(0);
VOID CALLBACK EXPORT CLeashView::TimerProc(HWND hWnd, UINT nMsg,
- UINT nIDEvent, DWORD dwTime)
+ UINT_PTR nIDEvent, DWORD dwTime)
{
// All of the work is being done in the PreTranslateMessage method
// in order to have access to the object
static INT m_warningOfTicketTimeLeftLockKrb5;
static INT m_updateDisplayCount;
static INT m_alreadyPlayedDisplayCount;
- static LONG m_ticketTimeLeft;
- static BOOL m_lowTicketAlarmSound;
+ static time_t m_ticketTimeLeft;
+ static BOOL m_lowTicketAlarmSound;
static LONG m_timerMsgNotInProgress;
VOID ResetTreeNodes();
//void GetRowWidthHeight(CDC* pDC, LPCSTR theString, int& nRowWidth,
// int& nRowHeight, int& nCharWidth);
static VOID AlarmBeep();
- static VOID CALLBACK EXPORT TimerProc(HWND hWnd, UINT nMsg, UINT nIDEvent,
- DWORD dwTime);
- static VOID UpdateTicketTime(TICKETINFO& ticketinfo);
- static INT GetLowTicketStatus(int);
- static LONG LeashTime();
+ static VOID CALLBACK EXPORT TimerProc(HWND hWnd, UINT nMsg, UINT_PTR nIDEvent,
+ DWORD dwTime);
+ static VOID UpdateTicketTime(TICKETINFO& ticketinfo);
+ static INT GetLowTicketStatus(int);
+ static time_t LeashTime();
void SetTrayIcon(int nim, int state=0);
void SetTrayText(int nim, CString tip);
BOOL UpdateDisplay();
static UINT InitTicket(void *);
- static UINT RenewTicket(void *);
- static UINT ImportTicket(void *);
+ static UINT RenewTicket(void *);
+ static UINT ImportTicket(void *);
protected: // create from serialization only
DECLARE_DYNCREATE(CLeashView)