Fixed some handle type mismatches and added a few casts in prevision
of void* handles.

diff --git a/server/registry.c b/server/registry.c
index 48de2fb..1a54f12 100644
--- a/server/registry.c
+++ b/server/registry.c
@@ -87,8 +87,8 @@
 
 
 /* the special root keys */
-#define HKEY_SPECIAL_ROOT_FIRST   HKEY_CLASSES_ROOT
-#define HKEY_SPECIAL_ROOT_LAST    HKEY_DYN_DATA
+#define HKEY_SPECIAL_ROOT_FIRST   ((unsigned int)HKEY_CLASSES_ROOT)
+#define HKEY_SPECIAL_ROOT_LAST    ((unsigned int)HKEY_DYN_DATA)
 #define NB_SPECIAL_ROOT_KEYS      (HKEY_SPECIAL_ROOT_LAST - HKEY_SPECIAL_ROOT_FIRST + 1)
 #define IS_SPECIAL_ROOT_HKEY(h)   (((unsigned int)(h) >= HKEY_SPECIAL_ROOT_FIRST) && \
                                    ((unsigned int)(h) <= HKEY_SPECIAL_ROOT_LAST))
diff --git a/server/sock.c b/server/sock.c
index 1615a20..fb72611 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -72,7 +72,7 @@
     struct event       *event;       /* event object */
     user_handle_t       window;      /* window to send the message to */
     unsigned int        message;     /* message to send */
-    unsigned int        wparam;      /* message wparam (socket handle) */
+    obj_handle_t        wparam;      /* message wparam (socket handle) */
     int                 errors[FD_MAX_EVENTS]; /* event errors */
     struct sock*        deferred;    /* socket that waits for a deferred accept */
     struct async_queue  read_q;      /* Queue for asynchronous reads */
@@ -260,7 +260,7 @@
             if (sock->pmask & (1 << event))
             {
                 unsigned int lparam = (1 << event) | (sock->errors[event] << 16);
-                post_message( sock->window, sock->message, sock->wparam, lparam );
+                post_message( sock->window, sock->message, (unsigned int)sock->wparam, lparam );
             }
         }
         sock->pmask = 0;