# HG changeset patch # User Kouhei Sutou # Date 1413028595 -32400 # Node ID de7ec5eef6d2258f426266d1e8d8f27b2adb3a2b # Parent 21043ce2a0058154687a779b4c9b0f241fa7e88a Win32: fixed wrong type cast. GetQueuedCompletionStatus() document on MSDN says the following signature: http://msdn.microsoft.com/en-us/library/windows/desktop/aa364986.aspx BOOL WINAPI GetQueuedCompletionStatus( _In_ HANDLE CompletionPort, _Out_ LPDWORD lpNumberOfBytes, _Out_ PULONG_PTR lpCompletionKey, _Out_ LPOVERLAPPED *lpOverlapped, _In_ DWORD dwMilliseconds ); In the latest specification, the type of the third argument (lpCompletionKey) is PULONG_PTR not LPDWORD. diff --git a/src/event/modules/ngx_iocp_module.c b/src/event/modules/ngx_iocp_module.c --- a/src/event/modules/ngx_iocp_module.c +++ b/src/event/modules/ngx_iocp_module.c @@ -247,7 +247,7 @@ ngx_int_t ngx_iocp_process_events(ngx_cy ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, "iocp timer: %M", timer); - rc = GetQueuedCompletionStatus(iocp, &bytes, (LPDWORD) &key, + rc = GetQueuedCompletionStatus(iocp, &bytes, (PULONG_PTR) &key, (LPOVERLAPPED *) &ovlp, (u_long) timer); if (rc == 0) {