Fixed int/HANDLE mismatches revealed by -DSTRICT.
Replaced the Win16 hmemcpy16 (obsolete) with memcpy.

diff --git a/programs/progman/group.c b/programs/progman/group.c
index 7b3dc0e..6171d0d 100644
--- a/programs/progman/group.c
+++ b/programs/progman/group.c
@@ -117,8 +117,8 @@
       if (hGrpFile) LocalFree(hGrpFile);
       return(0);
     }
-  hmemcpy16(LocalLock(hName), lpszName, 1 + lstrlen(lpszName));
-  hmemcpy16(LocalLock(hGrpFile), lpszGrpFile, 1 + lstrlen(lpszGrpFile));
+  memcpy(LocalLock(hName), lpszName, 1 + lstrlen(lpszName));
+  memcpy(LocalLock(hGrpFile), lpszGrpFile, 1 + lstrlen(lpszGrpFile));
 
   Globals.hActiveGroup   = hGroup;
 
diff --git a/programs/progman/grpfile.c b/programs/progman/grpfile.c
index 2eee09e..34ab927 100644
--- a/programs/progman/grpfile.c
+++ b/programs/progman/grpfile.c
@@ -89,7 +89,7 @@
 static BOOL GRPFILE_ReadFileToBuffer(LPCSTR path, HLOCAL *phBuffer,
 				     INT *piSize)
 {
-  INT    len, size;
+  UINT    len, size;
   LPSTR  buffer;
   HLOCAL hBuffer, hNewBuffer;
   HFILE  file;
@@ -119,7 +119,7 @@
 
   _lclose(file);
 
-  if (len == HFILE_ERROR)
+  if (len == (UINT)HFILE_ERROR)
     {
       LocalFree(hBuffer);
       return FALSE;
@@ -563,7 +563,7 @@
   PUT_SHORT(buffer, 30, 0x0000); /* unknown */
   PUT_SHORT(buffer, 32, NumProg);
 
-  if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 34)) return FALSE;
+  if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 34)) return FALSE;
 
   /* Program table */
   CurrProg = Progs;
@@ -574,7 +574,7 @@
       PROGRAM *program = LocalLock(hProgram);
 
       PUT_SHORT(buffer, 0, CurrProg);
-      if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 2)) 
+      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 2)) 
 	      return FALSE;
 
       GRPFILE_CalculateSizes(program, &CurrProg, &CurrIcon);
@@ -582,7 +582,7 @@
     }
 
   /* Title */
-  if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszTitle, 
+  if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszTitle, 
 					       lstrlen(lpszTitle) + 1))
     return FALSE;
 
@@ -616,10 +616,10 @@
       ptr += lstrlen(CmdLine) + 1;
       PUT_SHORT(buffer, 22, ptr);
 
-      if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 24) ||
-	  HFILE_ERROR == GRPFILE_WriteWithChecksum(file, Name, lstrlen(Name) + 1) ||
-	  HFILE_ERROR == GRPFILE_WriteWithChecksum(file, CmdLine, lstrlen(CmdLine) + 1) ||
-	  HFILE_ERROR == GRPFILE_WriteWithChecksum(file, IconFile, lstrlen(IconFile) + 1))
+      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 24) ||
+	  (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, Name, lstrlen(Name) + 1) ||
+	  (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, CmdLine, lstrlen(CmdLine) + 1) ||
+	  (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, IconFile, lstrlen(IconFile) + 1))
 	return FALSE;
 
       GRPFILE_CalculateSizes(program, &CurrProg, &CurrIcon);
@@ -645,9 +645,9 @@
       buffer[10] = iconinfo->bPlanes;
       buffer[11] = iconinfo->bBitsPerPixel;
 
-      if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 12) ||
-	  HFILE_ERROR == GRPFILE_WriteWithChecksum(file, AndBits, sizeAnd) ||
-	  HFILE_ERROR == GRPFILE_WriteWithChecksum(file, XorBits, sizeXor)) return FALSE;
+      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 12) ||
+	  (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, AndBits, sizeAnd) ||
+	  (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, XorBits, sizeXor)) return FALSE;
 
       hProgram = program->hNext;
     }
@@ -660,7 +660,7 @@
       PUT_SHORT(buffer, 4, 0x000a);
       buffer[6] = 'P', buffer[7] = 'M';
       buffer[8] = 'C', buffer[9] = 'C';
-      if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 10)) 
+      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 10)) 
 	      return FALSE;
 
       seqnum = 0;
@@ -676,8 +676,8 @@
 	      PUT_SHORT(buffer, 0, 0x8101);
 	      PUT_SHORT(buffer, 2, seqnum);
 	      PUT_SHORT(buffer, 4, 7 + lstrlen(lpszWorkDir));
-	      if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 6) ||
-		  HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszWorkDir, lstrlen(lpszWorkDir) + 1))
+	      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 6) ||
+		  (UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, lpszWorkDir, lstrlen(lpszWorkDir) + 1))
 		return FALSE;
 	    }
 
@@ -688,7 +688,7 @@
 	      PUT_SHORT(buffer, 2, seqnum);
 	      PUT_SHORT(buffer, 4, 8);
 	      PUT_SHORT(buffer, 6, program->nHotKey);
-	      if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 8)) return FALSE;
+	      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 8)) return FALSE;
 	    }
 
 	  /* Show command */
@@ -698,7 +698,7 @@
 	      PUT_SHORT(buffer, 2, seqnum);
 	      PUT_SHORT(buffer, 4, 8);
 	      PUT_SHORT(buffer, 6, program->nCmdShow);
-	      if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 8)) return FALSE;
+	      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 8)) return FALSE;
 	    }
 
 	  seqnum++;
@@ -709,7 +709,7 @@
       PUT_SHORT(buffer, 0, 0xffff);
       PUT_SHORT(buffer, 2, 0xffff);
       PUT_SHORT(buffer, 4, 0x0000);
-      if (HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 6)) return FALSE;
+      if ((UINT)HFILE_ERROR == GRPFILE_WriteWithChecksum(file, buffer, 6)) return FALSE;
     }
 
   checksum = GRPFILE_GetChecksum();
diff --git a/programs/progman/program.c b/programs/progman/program.c
index 51a4e54..a283eb1 100644
--- a/programs/progman/program.c
+++ b/programs/progman/program.c
@@ -170,10 +170,10 @@
       if (hWorkDir)  LocalFree(hWorkDir);
       return(0);
     }
-  hmemcpy16(LocalLock(hName),     lpszName,     1 + lstrlen(lpszName));
-  hmemcpy16(LocalLock(hCmdLine),  lpszCmdLine,  1 + lstrlen(lpszCmdLine));
-  hmemcpy16(LocalLock(hIconFile), lpszIconFile, 1 + lstrlen(lpszIconFile));
-  hmemcpy16(LocalLock(hWorkDir),  lpszWorkDir,  1 + lstrlen(lpszWorkDir));
+  memcpy(LocalLock(hName),     lpszName,     1 + lstrlen(lpszName));
+  memcpy(LocalLock(hCmdLine),  lpszCmdLine,  1 + lstrlen(lpszCmdLine));
+  memcpy(LocalLock(hIconFile), lpszIconFile, 1 + lstrlen(lpszIconFile));
+  memcpy(LocalLock(hWorkDir),  lpszWorkDir,  1 + lstrlen(lpszWorkDir));
 
   group->hActiveProgram  = hProgram;
 
diff --git a/programs/regapi/regapi.c b/programs/regapi/regapi.c
index 70eea66..237c532 100644
--- a/programs/regapi/regapi.c
+++ b/programs/regapi/regapi.c
@@ -142,7 +142,7 @@
 /* 
  * Generic prototyes
  */
-static HKEY    getDataType(LPSTR *lpValue);
+static DWORD   getDataType(LPSTR *lpValue);
 static LPSTR   getRegKeyName(LPSTR lpLine);
 static HKEY    getRegClass(LPSTR lpLine);
 static LPSTR   getArg(LPSTR arg);
@@ -231,10 +231,10 @@
 
 /******************************************************************************
  * This function returns the HKEY associated with the data type encoded in the 
- * value.  It modify the input parameter (key value) in order to skip this 
+ * value.  It modifies the input parameter (key value) in order to skip this 
  * "now useless" data type information.
  */
-HKEY getDataType(LPSTR *lpValue) 
+DWORD getDataType(LPSTR *lpValue) 
 {
   INT   counter  = 0;
   DWORD dwReturn = REG_SZ;
@@ -285,7 +285,7 @@
 
 /******************************************************************************
  * Extracts from a [HKEY/some/key/path] type of line the key class (what 
- * starts after the '[' and end before the first '\'
+ * starts after the '[' and ends before the first '\'
  */
 static HKEY getRegClass(LPSTR lpClass) 
 {
@@ -295,7 +295,7 @@
   char  lpClassCopy[KEY_MAX_LEN];
   
   if (lpClass == NULL)
-    return ERROR_INVALID_PARAMETER;
+    return (HKEY)ERROR_INVALID_PARAMETER;
 
   strcpy(lpClassCopy, lpClass);
 
@@ -314,7 +314,7 @@
   else if (strcmp( classNameBeg, "HKEY_CURRENT_USER") == IDENTICAL )
     return  HKEY_CURRENT_USER;
   else
-    return ERROR_INVALID_PARAMETER;
+    return (HKEY)ERROR_INVALID_PARAMETER;
 }
 
 /******************************************************************************
@@ -593,8 +593,8 @@
 
   /* Get the registry class */
   currentKeyClass = getRegClass(stdInput); /* Sets global variable */
-  if (currentKeyClass == ERROR_INVALID_PARAMETER)
-    return ERROR_INVALID_PARAMETER;
+  if (currentKeyClass == (HKEY)ERROR_INVALID_PARAMETER)
+    return (HRESULT)ERROR_INVALID_PARAMETER;
 
   /* Get the key name */
   currentKeyName = getRegKeyName(stdInput); /* Sets global variable */
@@ -1002,7 +1002,7 @@
  *        It then read the STDIN lines by lines forwarding their processing
  *        to the appropriate method.
  */
-int PASCAL WinMain (HANDLE inst, HANDLE prev, LPSTR cmdline, int show)
+int PASCAL WinMain (HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
 {
   LPSTR  token          = NULL;  /* current token analized */
   LPSTR  stdInput       = NULL;  /* line read from stdin */
diff --git a/programs/winhelp/hlp2sgml.c b/programs/winhelp/hlp2sgml.c
index 3bc3ab9..8c19923 100644
--- a/programs/winhelp/hlp2sgml.c
+++ b/programs/winhelp/hlp2sgml.c
@@ -255,7 +255,7 @@
 HFILE WINAPI OpenFile( LPCSTR path, OFSTRUCT *ofs, UINT mode )
 {
   file = *path ? fopen(path, "r") : stdin;
-  return file ? 1 : HFILE_ERROR;
+  return file ? (HFILE)1 : HFILE_ERROR;
 }
 
 HFILE WINAPI _lclose( HFILE hFile )
diff --git a/programs/winhelp/winhelp.c b/programs/winhelp/winhelp.c
index ef1b220..ccb2702 100644
--- a/programs/winhelp/winhelp.c
+++ b/programs/winhelp/winhelp.c
@@ -37,7 +37,7 @@
  *           WinMain
  */
 
-int PASCAL WinMain (HANDLE hInstance, HANDLE prev, LPSTR cmdline, int show)
+int PASCAL WinMain (HINSTANCE hInstance, HINSTANCE prev, LPSTR cmdline, int show)
 {
   LPCSTR opt_lang = "En";
   CHAR   lang[3];
@@ -78,10 +78,6 @@
 	}
     }
 
-#ifdef WINELIB
-  opt_lang = Languages[Options.language].name;
-#endif
-
   /* Find language specific string table */
   for (langnum = 0; langnum <= MAX_LANGUAGE_NUMBER; langnum++)
     {