burstas / spserver

Automatically exported from code.google.com/p/spserver
Other
0 stars 1 forks source link

spserver windows x64 compile #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
BOOL isSuccess = GetQueuedCompletionStatus( completionPort, 
&bytesTransferred,&completionKey, &overlapped, timeout );
在windows x64 无法编译通过,提示错误:
改成:
    BOOL isSuccess = GetQueuedCompletionStatus( completionPort, &bytesTransferred,
        reinterpret_cast<PULONG_PTR>(&completionKey), &overlapped, timeout );
在程序中仍然不能用!

Original issue reported on code.google.com by zhouqian...@gmail.com on 26 Dec 2011 at 6:30

GoogleCodeExporter commented 9 years ago
直接使用整数保存指针地址,在32位和64位环境下不兼容.可以��
�用ULONG_PTR.
ULONG_PTR completionKey;
BOOL isSuccess = GetQueuedCompletionStatus( completionPort, &bytesTransferred,
        &completionKey, &overlapped, timeout );

/// ULONG_PTR的定义为:
#if defined(_WIN64)
 typedef unsigned __int64 ULONG_PTR;
#else
 typedef unsigned long ULONG_PTR;
#endif

Original comment by cpp.ch...@gmail.com on 16 Apr 2012 at 2:18

GoogleCodeExporter commented 9 years ago
Thanks

Original comment by zhouqian...@gmail.com on 20 Apr 2012 at 3:34