anchor.diff:        (error-code (array sb-alien:int 10)))) ; 10 = fd-max-events
   
     (sb-alien:define-alien-routine ("WSACreateEvent" wsa-event-create)
  -      sb-alien::hinstance) ; return type only
  +      ws-event) ; return type only
  +
  +  (sb-alien:define-alien-routine ("WSAResetEvent" wsa-event-reset)
  +      (boolean #.sb-vm::n-machine-word-bits)
  +    (event-object ws-event))
   
     (sb-alien:define-alien-routine ("WSACloseEvent" wsa-event-close)
  -      (sb-alien:boolean #.sb-vm::n-machine-word-bits)
  -    (event-object sb-alien::hinstance))
  +      (boolean #.sb-vm::n-machine-word-bits)
  +    (event-object ws-event))
   
     (sb-alien:define-alien-routine ("WSAEnumNetworkEvents" wsa-enum-network-events)
         sb-alien:int
       (socket ws-socket)
  -    (event-object sb-alien::hinstance)
  +    (event-object ws-event)
       (network-events (* (sb-alien:struct wsa-network-events))))
   
     (sb-alien:define-alien-routine ("WSAEventSelect" wsa-event-select)
         sb-alien:int
       (socket ws-socket)
  -    (event-object sb-alien::hinstance)
  +    (event-object ws-event)
       (network-events sb-alien:long))
   
  -  (sb-alien:define-alien-routine ("WaitForSingleObject" wait-for-single-object)
  -      sb-alien:long
  -    (object sb-alien::hinstance)
  -    (timeout sb-alien:long))
  +  (sb-alien:define-alien-routine ("WSAWaitForMultipleEvents" wsa-wait-for-multiple-events)
  +      ws-dword
  +    (number-of-events ws-dword)
  +    (events (* ws-event))
  +    (wait-all-p (boolean #.sb-vm::n-machine-word-bits))
  +    (timeout ws-dword)
  +    (alertable-p (boolean #.sb-vm::n-machine-word-bits)))
   
     (sb-alien:define-alien-routine ("ioctlsocket" wsa-ioctlsocket)
         sb-alien:int
  
positive.code: #+ecl
  (eval-when (:compile-toplevel :load-toplevel :execute)
    (require :sockets))
  
  #+(and sbcl win32) ; for "WaitForSingleObject"
  (eval-when (:compile-toplevel :load-toplevel :execute)
    (sb-alien:load-shared-object "kernel32.dll"))
  
  #+sbcl
  (progn
  
negative.code: 
  #+(and sbcl win32)
  (eval-when (:compile-toplevel)
    (defconstant +wsa-wait-failed+ #xffffffff)
    (defconstant +wsa-wait-event-0+ 0)
    (defconstant +wsa-wait-timeout+ 258))
  
  #+(and sbcl win32)
  (progn
  