summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/IceUtil/Thread.cpp')
-rw-r--r--cpp/src/IceUtil/Thread.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/cpp/src/IceUtil/Thread.cpp b/cpp/src/IceUtil/Thread.cpp
index 38b113382a0..65e1886a7b8 100644
--- a/cpp/src/IceUtil/Thread.cpp
+++ b/cpp/src/IceUtil/Thread.cpp
@@ -168,8 +168,8 @@ IceUtil::Thread::id() const
return _id;
}
-static void*
-startHook(void* arg)
+static unsigned int
+WINAPI startHook(void* arg)
{
try
{
@@ -229,8 +229,11 @@ IceUtil::Thread::start(size_t stackSize)
//
__incRef();
- _handle->handle = (HANDLE)_beginthreadex(
- 0, stackSize, (unsigned int (__stdcall*)(void*))startHook, (LPVOID)this, 0, &_id);
+ _handle->handle =
+ reinterpret_cast<HANDLE>(
+ _beginthreadex(0,
+ static_cast<unsigned int>(stackSize),
+ startHook, this, 0, &_id));
if(_handle->handle == 0)
{