summaryrefslogtreecommitdiff
path: root/plugins/WinterSpeak/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-10-19 21:38:38 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-10-19 21:38:38 +0000
commitc12702e77fa2e539f48301be4f04861c503dea08 (patch)
treeb6336a194b95a4fe035182d20cfe2d852555b451 /plugins/WinterSpeak/src
parentce83b46d4548feb14cc4fb521a22de135c5c6dfa (diff)
x64 compilation fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@6545 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WinterSpeak/src')
-rw-r--r--plugins/WinterSpeak/src/DialogConfigActive.cpp2
-rw-r--r--plugins/WinterSpeak/src/EventInformation.cpp2
-rw-r--r--plugins/WinterSpeak/src/EventInformation.h2
-rw-r--r--plugins/WinterSpeak/src/ProtocolInformation.cpp23
-rw-r--r--plugins/WinterSpeak/src/ProtocolInformation.h3
-rw-r--r--plugins/WinterSpeak/src/main.cpp5
6 files changed, 17 insertions, 20 deletions
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp
index 8caea38e8b..5d20b91586 100644
--- a/plugins/WinterSpeak/src/DialogConfigActive.cpp
+++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp
@@ -19,7 +19,7 @@ DialogConfigActive::~DialogConfigActive()
}
//------------------------------------------------------------------------------
-int CALLBACK DialogConfigActive::process(HWND window, UINT message, WPARAM wparam, LPARAM lparam)
+INT_PTR CALLBACK DialogConfigActive::process(HWND window, UINT message, WPARAM wparam, LPARAM lparam)
{
if (!m_instance)
{
diff --git a/plugins/WinterSpeak/src/EventInformation.cpp b/plugins/WinterSpeak/src/EventInformation.cpp
index 69437a71ea..65923022d2 100644
--- a/plugins/WinterSpeak/src/EventInformation.cpp
+++ b/plugins/WinterSpeak/src/EventInformation.cpp
@@ -71,7 +71,7 @@ std::wstring EventInformation::getMessage()
}
//------------------------------------------------------------------------------
-unsigned int EventInformation::getMessageSize()
+size_t EventInformation::getMessageSize()
{
return std::wstring((WCHAR *)m_event_info.pBlob).size();
}
diff --git a/plugins/WinterSpeak/src/EventInformation.h b/plugins/WinterSpeak/src/EventInformation.h
index 2715dee7f9..42169d21e9 100644
--- a/plugins/WinterSpeak/src/EventInformation.h
+++ b/plugins/WinterSpeak/src/EventInformation.h
@@ -39,7 +39,7 @@ class EventInformation
// Description : get the size of the message from the last event
// Return : the size of the message
//--------------------------------------------------------------------------
- unsigned int getMessageSize();
+ size_t getMessageSize();
//--------------------------------------------------------------------------
// Description : get the event string
diff --git a/plugins/WinterSpeak/src/ProtocolInformation.cpp b/plugins/WinterSpeak/src/ProtocolInformation.cpp
index d04f485a9b..d601fa6757 100644
--- a/plugins/WinterSpeak/src/ProtocolInformation.cpp
+++ b/plugins/WinterSpeak/src/ProtocolInformation.cpp
@@ -27,6 +27,15 @@ ProtocolInformation::~ProtocolInformation()
}
}
+void CALLBACK ProtocolInformation::TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
+{
+ ProtocolTimeout pt = m_instance->m_protocol_timeout.front();
+
+ KillTimer(NULL, pt.second);
+
+ m_instance->m_protocol_timeout.pop_front();
+}
+
//------------------------------------------------------------------------------
void ProtocolInformation::disable(const char *protocol)
{
@@ -37,7 +46,7 @@ void ProtocolInformation::disable(const char *protocol)
const unsigned int TIMEOUT = 10000;
- unsigned int t = SetTimer(NULL, NULL, TIMEOUT, ProtocolInformation::timeout);
+ unsigned int t = SetTimer(NULL, (UINT_PTR)this, TIMEOUT, (TIMERPROC)TimerProc);
m_protocol_timeout.push_back(std::make_pair(protocol, t));
}
@@ -63,16 +72,4 @@ bool ProtocolInformation::isDisabled(const char *protocol) const
return false;
}
-//------------------------------------------------------------------------------
-// private:
-//------------------------------------------------------------------------------
-void CALLBACK ProtocolInformation::timeout(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
-{
- ProtocolTimeout pt = m_instance->m_protocol_timeout.front();
-
- KillTimer(NULL, pt.second);
-
- m_instance->m_protocol_timeout.pop_front();
-}
-
//==============================================================================
diff --git a/plugins/WinterSpeak/src/ProtocolInformation.h b/plugins/WinterSpeak/src/ProtocolInformation.h
index dcfb6eca18..b57fc14f0a 100644
--- a/plugins/WinterSpeak/src/ProtocolInformation.h
+++ b/plugins/WinterSpeak/src/ProtocolInformation.h
@@ -16,8 +16,7 @@ class ProtocolInformation
typedef std::pair<std::string, unsigned int> ProtocolTimeout;
typedef std::deque<ProtocolTimeout> ProtocolTimeoutQueue;
- static void CALLBACK timeout(HWND hwnd, UINT uMsg, UINT idEvent,
- DWORD dwTime);
+ static void CALLBACK TimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
static ProtocolInformation *m_instance;
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp
index debe87cf29..301d165901 100644
--- a/plugins/WinterSpeak/src/main.cpp
+++ b/plugins/WinterSpeak/src/main.cpp
@@ -29,11 +29,12 @@ PLUGININFOEX pluginInfo={
//-----------------------------------------------------------------------------
// Description : External hook
//-----------------------------------------------------------------------------
-int status(WPARAM wParam, LPARAM lParam)
+INT_PTR status(WPARAM wParam, LPARAM lParam)
{
return g_speak_config->status(reinterpret_cast<WCHAR *>(lParam), reinterpret_cast<HANDLE>(wParam));
}
-int message(WPARAM wParam, LPARAM lParam)
+
+INT_PTR message(WPARAM wParam, LPARAM lParam)
{
return g_speak_config->message(reinterpret_cast<WCHAR *>(lParam), reinterpret_cast<HANDLE>(wParam));
}