diff options
Diffstat (limited to 'plugins/WinterSpeak/src')
-rw-r--r-- | plugins/WinterSpeak/src/DialogConfigActive.cpp | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/EventInformation.cpp | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/EventInformation.h | 2 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/ProtocolInformation.cpp | 23 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/ProtocolInformation.h | 3 | ||||
-rw-r--r-- | plugins/WinterSpeak/src/main.cpp | 5 |
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));
}
|