Index: trunk/src/emx/include/os2emx.h
===================================================================
--- trunk/src/emx/include/os2emx.h	(revision 140)
+++ trunk/src/emx/include/os2emx.h	(revision 141)
@@ -153,6 +153,6 @@
 /* ------------------------ DISABLE KEYWORDS ------------------------------ */
 
-#define APIENTRY
-#define EXPENTRY
+#define APIENTRY _System
+#define EXPENTRY _System
 #define FAR
 
@@ -266,5 +266,10 @@
 typedef TID *PTID;
 
-typedef int (*PFN)();
+#ifdef OS2EMX_UNSTRICT
+typedef int _PFN();
+#else
+typedef int APIENTRY _PFN();
+#endif
+typedef _PFN *PFN;
 typedef PFN *PPFN;
 
@@ -974,9 +979,9 @@
 #define END_LIBPATH		2
 
-ULONG DosErrClass (ULONG ulCode, PULONG pulClass, PULONG pulAction,
+ULONG APIENTRY DosErrClass (ULONG ulCode, PULONG pulClass, PULONG pulAction,
     PULONG pulLocus);
-ULONG DosError (ULONG ulError);
-ULONG DosQueryExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags);
-ULONG DosSetExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags);
+ULONG APIENTRY DosError (ULONG ulError);
+ULONG APIENTRY DosQueryExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags);
+ULONG APIENTRY DosSetExtLIBPATH (PCSZ pszExtLIBPATH, ULONG flags);
 
 #endif /* INCL_DOSMISC */
@@ -1154,22 +1159,22 @@
 #define fSET			(fPERM|PAG_COMMIT|PAG_DECOMMIT|PAG_DEFAULT)
 
-ULONG DosAllocMem (PPVOID pBaseAddress, ULONG ulObjectSize,
+ULONG APIENTRY DosAllocMem (PPVOID pBaseAddress, ULONG ulObjectSize,
     ULONG ulAllocationFlags);
-ULONG DosAllocSharedMem (PPVOID pBaseAddress, PCSZ pszName,
+ULONG APIENTRY DosAllocSharedMem (PPVOID pBaseAddress, PCSZ pszName,
     ULONG ulObjectSize, ULONG ulAllocationFlags);
-ULONG DosFreeMem (PVOID pBaseAddress);
-ULONG DosGetNamedSharedMem (PPVOID pBaseAddress, PCSZ pszSharedMemName,
+ULONG APIENTRY DosFreeMem (PVOID pBaseAddress);
+ULONG APIENTRY DosGetNamedSharedMem (PPVOID pBaseAddress, PCSZ pszSharedMemName,
     ULONG ulAttributeFlags);
-ULONG DosGetSharedMem (CPVOID pBaseAddress, ULONG ulAttributeFlags);
-ULONG DosGiveSharedMem (CPVOID pBaseAddress, PID idProcessId,
+ULONG APIENTRY DosGetSharedMem (CPVOID pBaseAddress, ULONG ulAttributeFlags);
+ULONG APIENTRY DosGiveSharedMem (CPVOID pBaseAddress, PID idProcessId,
     ULONG ulAttributeFlags);
-ULONG DosQueryMem (CPVOID pBaseAddress, PULONG pulRegionSize,
+ULONG APIENTRY DosQueryMem (CPVOID pBaseAddress, PULONG pulRegionSize,
     PULONG pulAllocationFlags);
-ULONG DosSetMem (CPVOID pBaseAddress, ULONG ulRegionSize,
+ULONG APIENTRY DosSetMem (CPVOID pBaseAddress, ULONG ulRegionSize,
     ULONG ulAttributeFlags);
-ULONG DosSubAllocMem (PVOID pOffset, PPVOID pBlockOffset, ULONG ulSize);
-ULONG DosSubFreeMem (PVOID pOffset, PVOID pBlockOffset, ULONG ulSize);
-ULONG DosSubSetMem (PVOID pOffset, ULONG ulFlags, ULONG ulSize);
-ULONG DosSubUnsetMem (PVOID pOffset);
+ULONG APIENTRY DosSubAllocMem (PVOID pOffset, PPVOID pBlockOffset, ULONG ulSize);
+ULONG APIENTRY DosSubFreeMem (PVOID pOffset, PVOID pBlockOffset, ULONG ulSize);
+ULONG APIENTRY DosSubSetMem (PVOID pOffset, ULONG ulFlags, ULONG ulSize);
+ULONG APIENTRY DosSubUnsetMem (PVOID pOffset);
 
 #endif /* INCL_DOSMEMMGR || !INCL_NOCOMMON */
@@ -1661,91 +1666,91 @@
 
 
-ULONG DosCancelLockRequest (HFILE hFile, __const__ FILELOCK *pfl);
-ULONG DosClose (HFILE hFile);
-ULONG DosCopy (PCSZ pszSource, PCSZ pszTarget, ULONG ulOption);
-ULONG DosCreateDir (PCSZ pszDirName, PEAOP2 pEABuf);
-ULONG DosDelete (PCSZ pszFileName);
-ULONG DosDeleteDir (PCSZ pszDirName);
-ULONG DosDupHandle (HFILE hFile, PHFILE phFile);
-ULONG DosEditName (ULONG ulLevel, PCSZ pszSource, PCSZ pszEdit,
+ULONG APIENTRY DosCancelLockRequest (HFILE hFile, __const__ FILELOCK *pfl);
+ULONG APIENTRY DosClose (HFILE hFile);
+ULONG APIENTRY DosCopy (PCSZ pszSource, PCSZ pszTarget, ULONG ulOption);
+ULONG APIENTRY DosCreateDir (PCSZ pszDirName, PEAOP2 pEABuf);
+ULONG APIENTRY DosDelete (PCSZ pszFileName);
+ULONG APIENTRY DosDeleteDir (PCSZ pszDirName);
+ULONG APIENTRY DosDupHandle (HFILE hFile, PHFILE phFile);
+ULONG APIENTRY DosEditName (ULONG ulLevel, PCSZ pszSource, PCSZ pszEdit,
     PBYTE pszTargetBuf, ULONG ulTargetBufLength);
-ULONG DosEnumAttribute (ULONG ulRefType, CPVOID pvFile, ULONG ulEntry,
+ULONG APIENTRY DosEnumAttribute (ULONG ulRefType, CPVOID pvFile, ULONG ulEntry,
     PVOID pvBuf, ULONG ulBufLength, PULONG pulCount, ULONG ulInfoLevel);
-ULONG DosFindClose (HDIR hDir);
-ULONG DosFindFirst (PCSZ pszFileSpec, PHDIR phDir, ULONG flAttribute,
+ULONG APIENTRY DosFindClose (HDIR hDir);
+ULONG APIENTRY DosFindFirst (PCSZ pszFileSpec, PHDIR phDir, ULONG flAttribute,
     PVOID pFindBuf, ULONG ulFindBufLength, PULONG pulFileNames,
     ULONG ulInfoLevel);
-ULONG DosFindNext (HDIR hDir, PVOID pFindBuf, ULONG ulFindBufLength,
+ULONG APIENTRY DosFindNext (HDIR hDir, PVOID pFindBuf, ULONG ulFindBufLength,
     PULONG pulFileNames);
-ULONG DosForceDelete (PCSZ pszFileName);
-ULONG DosFSAttach (PCSZ pszDevice, PCSZ pszFilesystem,
+ULONG APIENTRY DosForceDelete (PCSZ pszFileName);
+ULONG APIENTRY DosFSAttach (PCSZ pszDevice, PCSZ pszFilesystem,
     __const__ VOID *pData, ULONG ulDataLength, ULONG ulFlag);
-ULONG DosFSCtl (PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength,
+ULONG APIENTRY DosFSCtl (PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength,
     PVOID pParmList, ULONG ulParmLengthMax, PULONG pulParmLength,
     ULONG ulFunction, PCSZ pszRouteName, HFILE hFile, ULONG ulMethod);
-ULONG DosMove (PCSZ pszOldName, PCSZ pszNewName);
-ULONG DosOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction,
+ULONG APIENTRY DosMove (PCSZ pszOldName, PCSZ pszNewName);
+ULONG APIENTRY DosOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction,
     ULONG ulFileSize, ULONG ulAttribute, ULONG ulOpenFlags, ULONG ulOpenMode,
     PEAOP2 pEABuf);
-ULONG DosProtectClose (HFILE hFile, FHLOCK fhFileHandleLockID);
-ULONG DosProtectEnumAttribute (ULONG ulRefType, CPVOID pvFile,
+ULONG APIENTRY DosProtectClose (HFILE hFile, FHLOCK fhFileHandleLockID);
+ULONG APIENTRY DosProtectEnumAttribute (ULONG ulRefType, CPVOID pvFile,
     ULONG ulEntry, PVOID pvBuf, ULONG ulBufLength, PULONG pulCount,
     ULONG ulInfoLevel, FHLOCK fhFileHandleLockID);
-ULONG DosProtectOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction,
+ULONG APIENTRY DosProtectOpen (PCSZ pszFileName, PHFILE phFile, PULONG pulAction,
     ULONG ulFileSize, ULONG ulAttribute, ULONG ulOpenFlags, ULONG ulOpenMode,
     PEAOP2 pEABuf, PFHLOCK pfhFileHandleLockID);
-ULONG DosProtectQueryFHState (HFILE hFile, PULONG pulMode,
+ULONG APIENTRY DosProtectQueryFHState (HFILE hFile, PULONG pulMode,
     FHLOCK fhFileHandleLockID);
-ULONG DosProtectQueryFileInfo (HFILE hFile, ULONG ulInfoLevel,
+ULONG APIENTRY DosProtectQueryFileInfo (HFILE hFile, ULONG ulInfoLevel,
     PVOID pInfoBuffer, ULONG ulInfoLength, FHLOCK fhFileHandleLockID);
-ULONG DosProtectRead (HFILE hFile, PVOID pBuffer, ULONG ulLength,
+ULONG APIENTRY DosProtectRead (HFILE hFile, PVOID pBuffer, ULONG ulLength,
     PULONG pulBytesRead, FHLOCK fhFileHandleLockID);
-ULONG DosProtectSetFHState (HFILE hFile, ULONG ulMode,
+ULONG APIENTRY DosProtectSetFHState (HFILE hFile, ULONG ulMode,
     FHLOCK fhFileHandleLockID);
-ULONG DosProtectSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
+ULONG APIENTRY DosProtectSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
     ULONG ulInfoLength, FHLOCK fhFileHandleLockID);
-ULONG DosProtectSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock,
+ULONG APIENTRY DosProtectSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock,
     __const__ FILELOCK *pflLock, ULONG ulTimeout, ULONG ulFlags,
     FHLOCK fhFileHandleLockID);
-ULONG DosProtectSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin,
+ULONG APIENTRY DosProtectSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin,
     PULONG pulPos, FHLOCK fhFileHandleLockID);
-ULONG DosProtectSetFileSize (HFILE hFile, ULONG ulSize,
+ULONG APIENTRY DosProtectSetFileSize (HFILE hFile, ULONG ulSize,
     FHLOCK fhFileHandleLockID);
-ULONG DosProtectWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength,
+ULONG APIENTRY DosProtectWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength,
     PULONG pulBytesWritten, FHLOCK fhFileHandleLockID);
-ULONG DosQueryCurrentDir (ULONG ulDrive, PBYTE pPath, PULONG pulPathLength);
-ULONG DosQueryCurrentDisk (PULONG pulDrive, PULONG pulLogical);
-ULONG DosQueryFHState (HFILE hFile, PULONG pulMode);
-ULONG DosQueryFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
+ULONG APIENTRY DosQueryCurrentDir (ULONG ulDrive, PBYTE pPath, PULONG pulPathLength);
+ULONG APIENTRY DosQueryCurrentDisk (PULONG pulDrive, PULONG pulLogical);
+ULONG APIENTRY DosQueryFHState (HFILE hFile, PULONG pulMode);
+ULONG APIENTRY DosQueryFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
     ULONG ulInfoLength);
-ULONG DosQueryFSAttach (PCSZ pszDeviceName, ULONG ulOrdinal,
+ULONG APIENTRY DosQueryFSAttach (PCSZ pszDeviceName, ULONG ulOrdinal,
     ULONG ulFSAInfoLevel, PFSQBUFFER2 pfsqb, PULONG pulBufLength);
-ULONG DosQueryFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
+ULONG APIENTRY DosQueryFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
     ULONG ulBufLength);
-ULONG DosQueryHType (HFILE hFile, PULONG pulType, PULONG pulAttr);
-ULONG DosQueryPathInfo (PCSZ pszPathName, ULONG ulInfoLevel,
+ULONG APIENTRY DosQueryHType (HFILE hFile, PULONG pulType, PULONG pulAttr);
+ULONG APIENTRY DosQueryPathInfo (PCSZ pszPathName, ULONG ulInfoLevel,
     PVOID pInfoBuffer, ULONG ulInfoLength);
-ULONG DosQueryVerify (PBOOL32 pVerify);
-ULONG DosRead (HFILE hFile, PVOID pBuffer, ULONG ulLength,
+ULONG APIENTRY DosQueryVerify (PBOOL32 pVerify);
+ULONG APIENTRY DosRead (HFILE hFile, PVOID pBuffer, ULONG ulLength,
     PULONG pulBytesRead);
-ULONG DosResetBuffer (HFILE hf);
-ULONG DosSetCurrentDir (PCSZ pszDir);
-ULONG DosSetDefaultDisk (ULONG ulDrive);
-ULONG DosSetFHState (HFILE hFile, ULONG ulMode);
-ULONG DosSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
+ULONG APIENTRY DosResetBuffer (HFILE hf);
+ULONG APIENTRY DosSetCurrentDir (PCSZ pszDir);
+ULONG APIENTRY DosSetDefaultDisk (ULONG ulDrive);
+ULONG APIENTRY DosSetFHState (HFILE hFile, ULONG ulMode);
+ULONG APIENTRY DosSetFileInfo (HFILE hFile, ULONG ulInfoLevel, PVOID pInfoBuffer,
     ULONG ulInfoLength);
-ULONG DosSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock,
+ULONG APIENTRY DosSetFileLocks (HFILE hFile, __const__ FILELOCK *pflUnlock,
     __const__ FILELOCK *pflLock, ULONG ulTimeout, ULONG ulFlags);
-ULONG DosSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin, PULONG pulPos);
-ULONG DosSetFileSize (HFILE hFile, ULONG ulSize);
-ULONG DosSetFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
+ULONG APIENTRY DosSetFilePtr (HFILE hFile, LONG lOffset, ULONG ulOrigin, PULONG pulPos);
+ULONG APIENTRY DosSetFileSize (HFILE hFile, ULONG ulSize);
+ULONG APIENTRY DosSetFSInfo (ULONG ulDrive, ULONG ulInfoLevel, PVOID pBuf,
     ULONG ulBufLength);
-ULONG DosSetMaxFH (ULONG ulCount);
-ULONG DosSetPathInfo (PCSZ pszPathName, ULONG ulInfoLevel, PVOID pInfoBuffer,
+ULONG APIENTRY DosSetMaxFH (ULONG ulCount);
+ULONG APIENTRY DosSetPathInfo (PCSZ pszPathName, ULONG ulInfoLevel, PVOID pInfoBuffer,
     ULONG ulInfoLength, ULONG ulOptions);
-ULONG DosSetRelMaxFH (PLONG pulReqCount, PULONG pulCurMaxFH);
-ULONG DosSetVerify (BOOL32 f32Verify);
-ULONG DosShutdown (ULONG ulReserved);
-ULONG DosWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength,
+ULONG APIENTRY DosSetRelMaxFH (PLONG pulReqCount, PULONG pulCurMaxFH);
+ULONG APIENTRY DosSetVerify (BOOL32 f32Verify);
+ULONG APIENTRY DosShutdown (ULONG ulReserved);
+ULONG APIENTRY DosWrite (HFILE hFile, CPVOID pBuffer, ULONG ulLength,
     PULONG pulBytesWritten);
 
@@ -1754,5 +1759,5 @@
 
 #if defined (INCL_DOSMISC)
-ULONG DosSearchPath (ULONG ulControl, PCSZ pszPath, PCSZ pszFilename,
+ULONG APIENTRY DosSearchPath (ULONG ulControl, PCSZ pszPath, PCSZ pszFilename,
     PBYTE pBuf, ULONG ulBufLength);
 #endif /* INCL_DOSMISC */
@@ -1774,9 +1779,9 @@
 #define INFO_FREEIOCTLHANDLE	       3
 
-ULONG DosDevConfig (PVOID pInfo, ULONG ulItem);
-ULONG DosDevIOCtl (HFILE hDevice, ULONG ulCategory, ULONG ulFunction,
+ULONG APIENTRY DosDevConfig (PVOID pInfo, ULONG ulItem);
+ULONG APIENTRY DosDevIOCtl (HFILE hDevice, ULONG ulCategory, ULONG ulFunction,
     PVOID pParams, ULONG ulParamsLengthMax, PULONG pulParamsLength,
     PVOID pData, ULONG ulDataLengthMax, PULONG pulDataLength);
-ULONG DosPhysicalDisk (ULONG ulFunction, PVOID pBuffer, ULONG ulBufferLength,
+ULONG APIENTRY DosPhysicalDisk (ULONG ulFunction, PVOID pBuffer, ULONG ulBufferLength,
     PVOID pParams, ULONG ulParamsLength);
 
@@ -2467,13 +2472,13 @@
 
 
-ULONG DosMapCase (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
+ULONG APIENTRY DosMapCase (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
     PCHAR pchString);
-ULONG DosQueryCollate (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
+ULONG APIENTRY DosQueryCollate (ULONG ulLength, __const__ COUNTRYCODE *pCountryCode,
     PCHAR pchBuffer, PULONG pulDataLength);
-ULONG DosQueryCp (ULONG ulLength, PULONG pCodePageList, PULONG pDataLength);
-ULONG DosQueryCtryInfo (ULONG ulLength, PCOUNTRYCODE pCountryCode,
+ULONG APIENTRY DosQueryCp (ULONG ulLength, PULONG pCodePageList, PULONG pDataLength);
+ULONG APIENTRY DosQueryCtryInfo (ULONG ulLength, PCOUNTRYCODE pCountryCode,
     PCOUNTRYINFO pCountryInfo, PULONG pulDataLength);
-ULONG DosQueryDBCSEnv (ULONG ulLength, PCOUNTRYCODE pCountryCode, PCHAR pBuf);
-ULONG DosSetProcessCp (ULONG ulCodePage);
+ULONG APIENTRY DosQueryDBCSEnv (ULONG ulLength, PCOUNTRYCODE pCountryCode, PCHAR pBuf);
+ULONG APIENTRY DosSetProcessCp (ULONG ulCodePage);
 
 #endif /* INCL_DOSNLS */
@@ -2487,12 +2492,12 @@
 
 
-ULONG DosFreeModule (HMODULE hmod);
-ULONG DosLoadModule (PSZ pszObject, ULONG uObjectLen, PCSZ pszModule,
+ULONG APIENTRY DosFreeModule (HMODULE hmod);
+ULONG APIENTRY DosLoadModule (PSZ pszObject, ULONG uObjectLen, PCSZ pszModule,
     PHMODULE phmod);
-ULONG DosQueryModuleHandle (PCSZ pszModname, PHMODULE phmod);
-ULONG DosQueryModuleName (HMODULE hmod, ULONG ulNameLength, PCHAR pNameBuf);
-ULONG DosQueryProcAddr (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName,
+ULONG APIENTRY DosQueryModuleHandle (PCSZ pszModname, PHMODULE phmod);
+ULONG APIENTRY DosQueryModuleName (HMODULE hmod, ULONG ulNameLength, PCHAR pNameBuf);
+ULONG APIENTRY DosQueryProcAddr (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName,
     PPFN pProcAddr);
-ULONG DosQueryProcType (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName,
+ULONG APIENTRY DosQueryProcType (HMODULE hmod, ULONG ulOrdinal, PCSZ pszProcName,
      PULONG pulProcType);
 
@@ -2529,8 +2534,8 @@
 
 
-ULONG DosFreeResource (PVOID pResAddr);
-ULONG DosGetResource (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
+ULONG APIENTRY DosFreeResource (PVOID pResAddr);
+ULONG APIENTRY DosGetResource (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
     PPVOID pOffset);
-ULONG DosQueryResourceSize (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
+ULONG APIENTRY DosQueryResourceSize (HMODULE hmod, ULONG ulTypeID, ULONG ulNameID,
     PULONG pulSize);
 
@@ -2544,6 +2549,6 @@
 #define EXIT_PROCESS		1
 
-ULONG DosBeep (ULONG ulFrequency, ULONG ulDuration);
-VOID DosExit (ULONG ulAction, ULONG ulResult) __attribute__ ((__noreturn__));
+ULONG APIENTRY DosBeep (ULONG ulFrequency, ULONG ulDuration);
+VOID APIENTRY DosExit (ULONG ulAction, ULONG ulResult) __attribute__ ((__noreturn__));
 
 #endif /* INCL_DOSPROCESS || !defined (INCL_NOCOMMON) */
@@ -2639,28 +2644,39 @@
 typedef PIB *PPIB;
 
-typedef VOID (*PFNTHREAD)(ULONG ulThreadArg);
-typedef VOID (*PFNEXITLIST)(ULONG ulArg);
-
-
-ULONG DosAllocThreadLocalMemory (ULONG cb, PULONG *p);
-ULONG DosCreateThread (PTID ptidThreadID, PFNTHREAD pfnThreadAddr,
+#ifdef OS2EMX_UNSTRICT
+typedef VOID FNTHREAD(ULONG ulThreadArg);
+#else
+typedef VOID APIENTRY FNTHREAD(ULONG ulThreadArg);
+#endif
+typedef FNTHREAD *PFNTHREAD;
+
+#ifdef OS2EMX_UNSTRICT
+typedef VOID FNEXITLIST(ULONG ulArg);
+#else
+typedef VOID APIENTRY FNEXITLIST(ULONG ulArg);
+#endif
+typedef FNEXITLIST *PFNEXITLIST;
+
+
+ULONG APIENTRY DosAllocThreadLocalMemory (ULONG cb, PULONG *p);
+ULONG APIENTRY DosCreateThread (PTID ptidThreadID, PFNTHREAD pfnThreadAddr,
     ULONG ulThreadArg, ULONG ulFlags, ULONG ulStackSize);
-ULONG DosEnterCritSec (VOID);
-ULONG DosExecPgm (PCHAR pObjname, LONG lObjnameLength, ULONG ulFlagS,
+ULONG APIENTRY DosEnterCritSec (VOID);
+ULONG APIENTRY DosExecPgm (PCHAR pObjname, LONG lObjnameLength, ULONG ulFlagS,
     PCSZ pszArg, PCSZ pszEnv, PRESULTCODES pReturnCodes, PCSZ pszName);
-ULONG DosExitCritSec (VOID);
-ULONG DosExitList (ULONG ulOrder, PFNEXITLIST pfn);
-ULONG DosFreeThreadLocalMemory (ULONG *p);
-ULONG DosGetInfoBlocks (PTIB *ptib, PPIB *ppib);
-ULONG DosKillProcess (ULONG ulAction, PID pid);
-ULONG DosKillThread (TID tid);
-ULONG DosResumeThread (TID tid);
-ULONG DosSetPriority (ULONG ulScope, ULONG ulClass, LONG lDelta, ULONG ulID);
-ULONG DosSleep (ULONG ulInterval);
-ULONG DosSuspendThread (TID tid);
-ULONG DosVerifyPidTid (PID pid, TID tid);
-ULONG DosWaitChild (ULONG ulAction, ULONG ulWait, PRESULTCODES pReturnCodes,
+ULONG APIENTRY DosExitCritSec (VOID);
+ULONG APIENTRY DosExitList (ULONG ulOrder, PFNEXITLIST pfn);
+ULONG APIENTRY DosFreeThreadLocalMemory (ULONG *p);
+ULONG APIENTRY DosGetInfoBlocks (PTIB *ptib, PPIB *ppib);
+ULONG APIENTRY DosKillProcess (ULONG ulAction, PID pid);
+ULONG APIENTRY DosKillThread (TID tid);
+ULONG APIENTRY DosResumeThread (TID tid);
+ULONG APIENTRY DosSetPriority (ULONG ulScope, ULONG ulClass, LONG lDelta, ULONG ulID);
+ULONG APIENTRY DosSleep (ULONG ulInterval);
+ULONG APIENTRY DosSuspendThread (TID tid);
+ULONG APIENTRY DosVerifyPidTid (PID pid, TID tid);
+ULONG APIENTRY DosWaitChild (ULONG ulAction, ULONG ulWait, PRESULTCODES pReturnCodes,
     PPID ppidOut, PID pidIn);
-ULONG DosWaitThread (PTID ptid, ULONG ulWait);
+ULONG APIENTRY DosWaitThread (PTID ptid, ULONG ulWait);
 
 #endif /* INCL_DOSPROCESS */
@@ -2768,9 +2784,9 @@
 typedef STATUSDATA *PSTATUSDATA;
 
-ULONG DosQueryAppType (PCSZ pszName, PULONG pulFlags);
-ULONG DosSelectSession (ULONG ulIDSession);
-ULONG DosSetSession (ULONG ulIDSession, PSTATUSDATA psd);
-ULONG DosStartSession (PSTARTDATA psd, PULONG pulIDSession, PPID ppid);
-ULONG DosStopSession (ULONG ulScope, ULONG ulIDSession);
+ULONG APIENTRY DosQueryAppType (PCSZ pszName, PULONG pulFlags);
+ULONG APIENTRY DosSelectSession (ULONG ulIDSession);
+ULONG APIENTRY DosSetSession (ULONG ulIDSession, PSTATUSDATA psd);
+ULONG APIENTRY DosStartSession (PSTARTDATA psd, PULONG pulIDSession, PPID ppid);
+ULONG APIENTRY DosStopSession (ULONG ulScope, ULONG ulIDSession);
 
 #endif /* INCL_DOSSESMGR */
@@ -2801,29 +2817,29 @@
 #if defined (INCL_DOSSEMAPHORES)
 
-ULONG DosCloseEventSem (HEV hev);
-ULONG DosCreateEventSem (PCSZ pszName, PHEV phev, ULONG ulAttr, BOOL32 fState);
-ULONG DosOpenEventSem (PCSZ pszName, PHEV phev);
-ULONG DosPostEventSem (HEV hev);
-ULONG DosQueryEventSem (HEV hev, PULONG pulCount);
-ULONG DosResetEventSem (HEV hev, PULONG pulCount);
-ULONG DosWaitEventSem (HEV hev, ULONG ulTimeout);
-
-ULONG DosCloseMutexSem (HMTX hmtx);
-ULONG DosCreateMutexSem (PCSZ pszName, PHMTX phmtx, ULONG ulAttr,
+ULONG APIENTRY DosCloseEventSem (HEV hev);
+ULONG APIENTRY DosCreateEventSem (PCSZ pszName, PHEV phev, ULONG ulAttr, BOOL32 fState);
+ULONG APIENTRY DosOpenEventSem (PCSZ pszName, PHEV phev);
+ULONG APIENTRY DosPostEventSem (HEV hev);
+ULONG APIENTRY DosQueryEventSem (HEV hev, PULONG pulCount);
+ULONG APIENTRY DosResetEventSem (HEV hev, PULONG pulCount);
+ULONG APIENTRY DosWaitEventSem (HEV hev, ULONG ulTimeout);
+
+ULONG APIENTRY DosCloseMutexSem (HMTX hmtx);
+ULONG APIENTRY DosCreateMutexSem (PCSZ pszName, PHMTX phmtx, ULONG ulAttr,
     BOOL32 fState);
-ULONG DosOpenMutexSem (PCSZ pszName, PHMTX phmtx);
-ULONG DosQueryMutexSem (HMTX hmtx, PPID ppid, PTID ptid, PULONG pulCount);
-ULONG DosReleaseMutexSem (HMTX hmtx);
-ULONG DosRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
-
-ULONG DosAddMuxWaitSem (HMUX hmux, PSEMRECORD pSemRec);
-ULONG DosCloseMuxWaitSem (HMUX hmux);
-ULONG DosCreateMuxWaitSem (PCSZ pszName, PHMUX phmux, ULONG ulcSemRec,
+ULONG APIENTRY DosOpenMutexSem (PCSZ pszName, PHMTX phmtx);
+ULONG APIENTRY DosQueryMutexSem (HMTX hmtx, PPID ppid, PTID ptid, PULONG pulCount);
+ULONG APIENTRY DosReleaseMutexSem (HMTX hmtx);
+ULONG APIENTRY DosRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
+
+ULONG APIENTRY DosAddMuxWaitSem (HMUX hmux, PSEMRECORD pSemRec);
+ULONG APIENTRY DosCloseMuxWaitSem (HMUX hmux);
+ULONG APIENTRY DosCreateMuxWaitSem (PCSZ pszName, PHMUX phmux, ULONG ulcSemRec,
     PSEMRECORD pSemRec, ULONG ulAttr);
-ULONG DosDeleteMuxWaitSem (HMUX hmux, HSEM hSem);
-ULONG DosOpenMuxWaitSem (PCSZ pszName, PHMUX phmux);
-ULONG DosQueryMuxWaitSem (HMUX hmux, PULONG pulcSemRec, PSEMRECORD pSemRec,
+ULONG APIENTRY DosDeleteMuxWaitSem (HMUX hmux, HSEM hSem);
+ULONG APIENTRY DosOpenMuxWaitSem (PCSZ pszName, PHMUX phmux);
+ULONG APIENTRY DosQueryMuxWaitSem (HMUX hmux, PULONG pulcSemRec, PSEMRECORD pSemRec,
     PULONG pulAttr);
-ULONG DosWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
+ULONG APIENTRY DosWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
 
 #endif /* INCL_DOSSEMAPHORES */
@@ -2897,27 +2913,27 @@
 typedef PIPESEMSTATE *PPIPESEMSTATE;
 
-ULONG DosCallNPipe (PCSZ pszName, PVOID pInbuf, ULONG ulInbufLength,
+ULONG APIENTRY DosCallNPipe (PCSZ pszName, PVOID pInbuf, ULONG ulInbufLength,
     PVOID pOutbuf, ULONG ulOutbufSize, PULONG pulActualLength,
     ULONG ulTimeout);
-ULONG DosConnectNPipe (HPIPE hpipe);
-ULONG DosCreateNPipe (PCSZ pszName, PHPIPE phpipe, ULONG ulOpenMode,
+ULONG APIENTRY DosConnectNPipe (HPIPE hpipe);
+ULONG APIENTRY DosCreateNPipe (PCSZ pszName, PHPIPE phpipe, ULONG ulOpenMode,
     ULONG ulPipeMode, ULONG ulInbufLength, ULONG ulOutbufLength,
     ULONG ulTimeout);
-ULONG DosDisConnectNPipe (HPIPE hpipe);
-ULONG DosPeekNPipe (HPIPE hpipe, PVOID pBuf, ULONG ulBufLength,
+ULONG APIENTRY DosDisConnectNPipe (HPIPE hpipe);
+ULONG APIENTRY DosPeekNPipe (HPIPE hpipe, PVOID pBuf, ULONG ulBufLength,
     PULONG pulActualLength, PAVAILDATA pAvail, PULONG pulState);
-ULONG DosQueryNPHState (HPIPE hpipe, PULONG pulState);
-ULONG DosQueryNPipeInfo (HPIPE hpipe, ULONG ulInfoLevel, PVOID pBuf,
+ULONG APIENTRY DosQueryNPHState (HPIPE hpipe, PULONG pulState);
+ULONG APIENTRY DosQueryNPipeInfo (HPIPE hpipe, ULONG ulInfoLevel, PVOID pBuf,
     ULONG ulBufLength);
-ULONG DosQueryNPipeSemState (HSEM hsem, PPIPESEMSTATE pState,
+ULONG APIENTRY DosQueryNPipeSemState (HSEM hsem, PPIPESEMSTATE pState,
     ULONG ulBufLength);
-ULONG DosRawReadNPipe (PCSZ pszName, ULONG ulCount, PULONG pulLength,
+ULONG APIENTRY DosRawReadNPipe (PCSZ pszName, ULONG ulCount, PULONG pulLength,
     PVOID pBuf);
-ULONG DosRawWriteNPipe (PCSZ pszName, ULONG ulCount);
-ULONG DosSetNPHState (HPIPE hpipe, ULONG ulState);
-ULONG DosSetNPipeSem (HPIPE hpipe, HSEM hsem, ULONG ulKey);
-ULONG DosTransactNPipe (HPIPE hpipe, PVOID pOutbuf, ULONG ulOutbufLength,
+ULONG APIENTRY DosRawWriteNPipe (PCSZ pszName, ULONG ulCount);
+ULONG APIENTRY DosSetNPHState (HPIPE hpipe, ULONG ulState);
+ULONG APIENTRY DosSetNPipeSem (HPIPE hpipe, HSEM hsem, ULONG ulKey);
+ULONG APIENTRY DosTransactNPipe (HPIPE hpipe, PVOID pOutbuf, ULONG ulOutbufLength,
     PVOID pInbuf, ULONG ulInbufLength, PULONG pulBytesRead);
-ULONG DosWaitNPipe (PCSZ pszName, ULONG ulTimeout);
+ULONG APIENTRY DosWaitNPipe (PCSZ pszName, ULONG ulTimeout);
 
 /* ------------------------------- QUEUES --------------------------------- */
@@ -2938,19 +2954,19 @@
 typedef REQUESTDATA *PREQUESTDATA;
 
-ULONG DosCreatePipe (PHFILE phfReadHandle, PHFILE phfWriteHandle,
+ULONG APIENTRY DosCreatePipe (PHFILE phfReadHandle, PHFILE phfWriteHandle,
     ULONG ulPipeSize);
 
-ULONG DosCloseQueue (HQUEUE hq);
-ULONG DosCreateQueue (PHQUEUE phq, ULONG ulPriority, PCSZ pszName);
-ULONG DosOpenQueue (PPID ppid, PHQUEUE phq, PCSZ pszName);
-ULONG DosPeekQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
+ULONG APIENTRY DosCloseQueue (HQUEUE hq);
+ULONG APIENTRY DosCreateQueue (PHQUEUE phq, ULONG ulPriority, PCSZ pszName);
+ULONG APIENTRY DosOpenQueue (PPID ppid, PHQUEUE phq, PCSZ pszName);
+ULONG APIENTRY DosPeekQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
     PPVOID pDataAddress, PULONG pulElement, BOOL32 fNowait, PBYTE pPriority,
     HEV hsem);
-ULONG DosPurgeQueue (HQUEUE hq);
-ULONG DosQueryQueue (HQUEUE hq, PULONG pulCount);
-ULONG DosReadQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
+ULONG APIENTRY DosPurgeQueue (HQUEUE hq);
+ULONG APIENTRY DosQueryQueue (HQUEUE hq, PULONG pulCount);
+ULONG APIENTRY DosReadQueue (HQUEUE hq, PREQUESTDATA pRequest, PULONG pulDataLength,
     PPVOID pDataAddress, ULONG pulElement, BOOL32 fNowait, PBYTE pPriority,
     HEV hsem);
-ULONG DosWriteQueue (HQUEUE hq, ULONG ulRequest, ULONG ulDataLength,
+ULONG APIENTRY DosWriteQueue (HQUEUE hq, ULONG ulRequest, ULONG ulDataLength,
     PVOID pData, ULONG ulPriority);
 
@@ -3077,7 +3093,13 @@
 struct _EXCEPTIONREGISTRATIONRECORD;
 
+#ifdef OS2EMX_UNSTRICT
 typedef ULONG _ERR (PEXCEPTIONREPORTRECORD pReport,
 		    struct _EXCEPTIONREGISTRATIONRECORD *pRegistration,
 		    PCONTEXTRECORD pContext, PVOID pWhatever);
+#else
+typedef ULONG APIENTRY _ERR (PEXCEPTIONREPORTRECORD pReport,
+		    struct _EXCEPTIONREGISTRATIONRECORD *pRegistration,
+		    PCONTEXTRECORD pContext, PVOID pWhatever);
+#endif
 typedef _ERR *ERR;
 
@@ -3091,14 +3113,14 @@
 #define END_OF_CHAIN		((PEXCEPTIONREGISTRATIONRECORD)(-1))
 
-ULONG DosAcknowledgeSignalException (ULONG ulSignal);
-ULONG DosEnterMustComplete (PULONG pulNesting);
-ULONG DosExitMustComplete (PULONG pulNesting);
-ULONG DosQueryThreadContext (TID tid, ULONG ulLevel, PCONTEXTRECORD pContext);
-ULONG DosRaiseException (PEXCEPTIONREPORTRECORD pXRepRec);
-ULONG DosSendSignalException (PID pid, ULONG ulSignal);
-ULONG DosSetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
-ULONG DosSetSignalExceptionFocus (BOOL32 flag, PULONG pulTimes);
-ULONG DosUnsetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
-ULONG DosUnwindException (PEXCEPTIONREGISTRATIONRECORD pXRegRec,
+ULONG APIENTRY DosAcknowledgeSignalException (ULONG ulSignal);
+ULONG APIENTRY DosEnterMustComplete (PULONG pulNesting);
+ULONG APIENTRY DosExitMustComplete (PULONG pulNesting);
+ULONG APIENTRY DosQueryThreadContext (TID tid, ULONG ulLevel, PCONTEXTRECORD pContext);
+ULONG APIENTRY DosRaiseException (PEXCEPTIONREPORTRECORD pXRepRec);
+ULONG APIENTRY DosSendSignalException (PID pid, ULONG ulSignal);
+ULONG APIENTRY DosSetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
+ULONG APIENTRY DosSetSignalExceptionFocus (BOOL32 flag, PULONG pulTimes);
+ULONG APIENTRY DosUnsetExceptionHandler (PEXCEPTIONREGISTRATIONRECORD pXRegRec);
+ULONG APIENTRY DosUnwindException (PEXCEPTIONREGISTRATIONRECORD pXRegRec,
     PVOID pJumpThere, PEXCEPTIONREPORTRECORD pXRepRec);
 
@@ -3140,8 +3162,8 @@
 #define SIS_SYS_LOG			2
 
-ULONG DosQuerySysInfo (ULONG ulStart, ULONG ulLast, PVOID pBuf,
+ULONG APIENTRY DosQuerySysInfo (ULONG ulStart, ULONG ulLast, PVOID pBuf,
     ULONG ulBufLength);
-ULONG DosScanEnv (PCSZ pszName, PSZ *pszValue);
-ULONG DosQueryRASInfo (ULONG Index, PPVOID Addr);
+ULONG APIENTRY DosScanEnv (PCSZ pszName, PSZ *pszValue);
+ULONG APIENTRY DosQueryRASInfo (ULONG Index, PPVOID Addr);
 
 #endif /* INCL_DOSMISC */
@@ -3165,6 +3187,6 @@
 typedef DATETIME *PDATETIME;
 
-ULONG DosGetDateTime (PDATETIME pdt);
-ULONG DosSetDateTime (__const__ DATETIME *pdt);
+ULONG APIENTRY DosGetDateTime (PDATETIME pdt);
+ULONG APIENTRY DosSetDateTime (__const__ DATETIME *pdt);
 
 #endif /* INCL_DOSDATETIME || !INCL_NOCOMMON */
@@ -3176,7 +3198,7 @@
 typedef HTIMER	*PHTIMER;
 
-ULONG DosAsyncTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
-ULONG DosStartTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
-ULONG DosStopTimer (HTIMER htimer);
+ULONG APIENTRY DosAsyncTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
+ULONG APIENTRY DosStartTimer (ULONG ulMilliSec, HSEM hsem, PHTIMER phtimer);
+ULONG APIENTRY DosStopTimer (HTIMER htimer);
 
 #endif /* INCL_DOSDATETIME */
@@ -3191,6 +3213,6 @@
 typedef QWORD *PQWORD;
 
-ULONG DosTmrQueryFreq (PULONG pulTmrFreq);
-ULONG DosTmrQueryTime (PQWORD pqwTmrTime);
+ULONG APIENTRY DosTmrQueryFreq (PULONG pulTmrFreq);
+ULONG APIENTRY DosTmrQueryTime (PQWORD pqwTmrTime);
 
 #endif /* INCL_DOSPROFILE */
@@ -3205,12 +3227,12 @@
 typedef HVDD *PHVDD;
 
-ULONG DosCloseVDD (HVDD hvdd);
-ULONG DosOpenVDD (PCSZ pszVDD, PHVDD phvdd);
-ULONG DosQueryDOSProperty (SGID sgidSesssionID, PCSZ pszName,
+ULONG APIENTRY DosCloseVDD (HVDD hvdd);
+ULONG APIENTRY DosOpenVDD (PCSZ pszVDD, PHVDD phvdd);
+ULONG APIENTRY DosQueryDOSProperty (SGID sgidSesssionID, PCSZ pszName,
     ULONG ulBufferLength, PSZ pBuffer);
-ULONG DosRequestVDD (HVDD hvdd, SGID sgidSessionID, ULONG ulCommand,
+ULONG APIENTRY DosRequestVDD (HVDD hvdd, SGID sgidSessionID, ULONG ulCommand,
     ULONG ulInputBufferLength, PVOID pInputBuffer,
     ULONG ulOutputBufferLength, PVOID pOutputBuffer);
-ULONG DosSetDOSProperty (SGID sgidSessionID, PCSZ pszName,
+ULONG APIENTRY DosSetDOSProperty (SGID sgidSessionID, PCSZ pszName,
     ULONG ulBufferLength, PCSZ pBuffer);
 
@@ -3357,5 +3379,5 @@
 } uDB_t;
 
-ULONG DosDebug (uDB_t *pDebugBuffer);
+ULONG APIENTRY DosDebug (uDB_t *pDebugBuffer);
 
 #endif /* INCL_DOSPROCESS */
@@ -3365,12 +3387,12 @@
 #if defined (INCL_DOSMISC)
 
-ULONG DosGetMessage (PCHAR *pTable, ULONG ulTableEntries,
+ULONG APIENTRY DosGetMessage (PCHAR *pTable, ULONG ulTableEntries,
     PCHAR pBuffer, ULONG ulBufferLengthMax, ULONG ulMsgnNumber,
     PCSZ pszFile, PULONG pulBufferLength);
-ULONG DosInsertMessage (PCHAR *pTable, ULONG ulCount, PCSZ pszMsg,
+ULONG APIENTRY DosInsertMessage (PCHAR *pTable, ULONG ulCount, PCSZ pszMsg,
     ULONG ulMsgLength, PCHAR pBuffer, ULONG ulBufferLengthMax,
     PULONG pulBufferLength);
-ULONG DosPutMessage (HFILE hfile, ULONG ulMessageLength, PCHAR pMessage);
-ULONG DosQueryMessageCP (PCHAR pBuffer, ULONG ulBufferLengthMax,
+ULONG APIENTRY DosPutMessage (HFILE hfile, ULONG ulMessageLength, PCHAR pMessage);
+ULONG APIENTRY DosQueryMessageCP (PCHAR pBuffer, ULONG ulBufferLengthMax,
     PCSZ pszFilename, PULONG pulBufferLength);
 
@@ -3395,8 +3417,8 @@
 #define SPU_ENABLESUPPRESSION		1
 
-ULONG DosDumpProcess (ULONG ulFlag, ULONG ulDrive, PID pid);
-ULONG DosForceSystemDump (ULONG ulReserved);
-ULONG DosQueryRASInfo (ULONG ulIndex, PPVOID addr);
-ULONG DosSuppressPopUps (ULONG ulFlag, ULONG ulDrive);
+ULONG APIENTRY DosDumpProcess (ULONG ulFlag, ULONG ulDrive, PID pid);
+ULONG APIENTRY DosForceSystemDump (ULONG ulReserved);
+ULONG APIENTRY DosQueryRASInfo (ULONG ulIndex, PPVOID addr);
+ULONG APIENTRY DosSuppressPopUps (ULONG ulFlag, ULONG ulDrive);
 
 #endif /* INCL_DOSRAS */
@@ -3458,13 +3480,18 @@
 #define RXSUBCOM_NOPROC			127
 
+#ifdef OS2EMX_UNSTRICT
 typedef ULONG RexxSubcomHandler (PRXSTRING prxCommand, PUSHORT pusFlags,
     PRXSTRING prxResult);
-
-ULONG RexxDeregisterSubcom (PCSZ pszEnvName, PCSZ pszModuleName);
-ULONG RexxQuerySubcom (PCSZ pszEnvName, PCSZ pszModuleName, PUSHORT pusFlags,
+#else
+typedef ULONG APIENTRY RexxSubcomHandler (PRXSTRING prxCommand, PUSHORT pusFlags,
+    PRXSTRING prxResult);
+#endif
+
+ULONG APIENTRY RexxDeregisterSubcom (PCSZ pszEnvName, PCSZ pszModuleName);
+ULONG APIENTRY RexxQuerySubcom (PCSZ pszEnvName, PCSZ pszModuleName, PUSHORT pusFlags,
     PUCHAR pUserWord);
-ULONG RexxRegisterSubcomDll (PCSZ pszEnvName, PCSZ pszModuleName,
+ULONG APIENTRY RexxRegisterSubcomDll (PCSZ pszEnvName, PCSZ pszModuleName,
     PCSZ pszEntryPoint, PUCHAR pUserArea, ULONG ulDropAuth);
-ULONG RexxRegisterSubcomExe (PCSZ pszEnvName, PFN pfnEntryPoint,
+ULONG APIENTRY RexxRegisterSubcomExe (PCSZ pszEnvName, PFN pfnEntryPoint,
     PUCHAR pUserArea);
 
@@ -3510,5 +3537,5 @@
 typedef SHVBLOCK *PSHVBLOCK;
 
-ULONG RexxVariablePool (PSHVBLOCK pRequest);
+ULONG APIENTRY RexxVariablePool (PSHVBLOCK pRequest);
 
 #define REXXVARIABLEPOOL		RexxVariablePool
@@ -3530,12 +3557,17 @@
 #define RXFUNC_BADTYPE			70
 
+#ifdef OS2EMX_UNSTRICT
 typedef ULONG RexxFunctionHandler (PCSZ pszName, ULONG ulArgCount,
     PRXSTRING prxArgList, PCSZ pszQueueName, PRXSTRING prxResult);
-
-ULONG RexxDeregisterFunction (PCSZ pszFuncName);
-ULONG RexxQueryFunction (PCSZ pszFuncName);
-ULONG RexxRegisterFunctionDll (PCSZ pszFuncName, PCSZ pszModuleName,
+#else
+typedef ULONG APIENTRY RexxFunctionHandler (PCSZ pszName, ULONG ulArgCount,
+    PRXSTRING prxArgList, PCSZ pszQueueName, PRXSTRING prxResult);
+#endif
+
+ULONG APIENTRY RexxDeregisterFunction (PCSZ pszFuncName);
+ULONG APIENTRY RexxQueryFunction (PCSZ pszFuncName);
+ULONG APIENTRY RexxRegisterFunctionDll (PCSZ pszFuncName, PCSZ pszModuleName,
     PCSZ pszEntryPoint);
-ULONG RexxRegisterFunctionExe (PCSZ pszFuncName,
+ULONG APIENTRY RexxRegisterFunctionExe (PCSZ pszFuncName,
     RexxFunctionHandler *pfnEntryPoint);
 
@@ -3713,13 +3745,18 @@
 } RXTRCTST_PARM;
 
+#ifdef OS2EMX_UNSTRICT
 typedef LONG RexxExitHandler (LONG lExitNumber, LONG lSubfunction,
     PEXIT pParmBlock);
-
-ULONG RexxDeregisterExit (PCSZ pszEnvName, PCSZ pszModuleName);
-ULONG RexxQueryExit (PCSZ pszEnvName, PCSZ pszModuleName, PUSHORT pusFlag,
+#else
+typedef LONG APIENTRY RexxExitHandler (LONG lExitNumber, LONG lSubfunction,
+    PEXIT pParmBlock);
+#endif
+
+ULONG APIENTRY RexxDeregisterExit (PCSZ pszEnvName, PCSZ pszModuleName);
+ULONG APIENTRY RexxQueryExit (PCSZ pszEnvName, PCSZ pszModuleName, PUSHORT pusFlag,
     PUCHAR pUserWord);
-ULONG RexxRegisterExitDll (PCSZ pszEnvName, PCSZ pszModuleName,
+ULONG APIENTRY RexxRegisterExitDll (PCSZ pszEnvName, PCSZ pszModuleName,
     PCSZ pszEntryName, PUCHAR pUserArea, ULONG ulDropAuth);
-ULONG RexxRegisterExitExe (PCSZ pszEnvName, PFN pfnEntryPoint,
+ULONG APIENTRY RexxRegisterExitExe (PCSZ pszEnvName, PFN pfnEntryPoint,
     PUCHAR pUserArea);
 
@@ -3737,7 +3774,7 @@
 #define RXARI_PROCESSING_ERROR		2
 
-ULONG RexxResetTrace (PID pid, TID tid);
-ULONG RexxSetHalt (PID pid, TID tid);
-ULONG RexxSetTrace (PID pid, TID tid);
+ULONG APIENTRY RexxResetTrace (PID pid, TID tid);
+ULONG APIENTRY RexxSetHalt (PID pid, TID tid);
+ULONG APIENTRY RexxSetTrace (PID pid, TID tid);
 
 #define REXXRESETTRACE			RexxResetTrace
@@ -3763,12 +3800,12 @@
 #define RXMACRO_NOT_INIT		9
 
-ULONG RexxAddMacro (PCSZ pszFuncName, PCSZ pszSourceFile, ULONG ulPosition);
-ULONG RexxClearMacroSpace (VOID);
-ULONG RexxDropMacro (PCSZ pszFuncName);
-ULONG RexxLoadMacroSpace (ULONG ulFuncCout, PCSZ *apszFuncNames,
+ULONG APIENTRY RexxAddMacro (PCSZ pszFuncName, PCSZ pszSourceFile, ULONG ulPosition);
+ULONG APIENTRY RexxClearMacroSpace (VOID);
+ULONG APIENTRY RexxDropMacro (PCSZ pszFuncName);
+ULONG APIENTRY RexxLoadMacroSpace (ULONG ulFuncCout, PCSZ *apszFuncNames,
     PCSZ pszMacroLibFile);
-ULONG RexxQueryMacro (PCSZ pszFuncName, PUSHORT pusPosition);
-ULONG RexxReorderMacro(PCSZ pszFuncName, ULONG ulPosition);
-ULONG RexxSaveMacroSpace (ULONG ulFuncCount, PCSZ *apszFuncNames,
+ULONG APIENTRY RexxQueryMacro (PCSZ pszFuncName, PUSHORT pusPosition);
+ULONG APIENTRY RexxReorderMacro(PCSZ pszFuncName, ULONG ulPosition);
+ULONG APIENTRY RexxSaveMacroSpace (ULONG ulFuncCount, PCSZ *apszFuncNames,
     PCSZ pszMacroLibFile);
 
@@ -3785,5 +3822,5 @@
 #if defined (INCL_RXSUBCOM) || defined (INCL_RXSHV) || defined (INCL_RXFUNC) || defined (INCL_RXSYSEXIT) || defined (INCL_RXMACRO) || defined (INCL_RXARI)
 
-LONG RexxStart (LONG lArgCount, PRXSTRING prxArgList, PCSZ pszProgramName,
+LONG APIENTRY RexxStart (LONG lArgCount, PRXSTRING prxArgList, PCSZ pszProgramName,
     PRXSTRING prxInstore, PCSZ pszEnvName, LONG lCallType, PRXSYSEXIT pExits,
     PSHORT psReturnCode, PRXSTRING prxResult);
@@ -4650,5 +4687,9 @@
 typedef ERRORID *PERRORID;
 
-typedef MRESULT FNWP (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+#ifdef OS2EMX_UNSTRICT
+typedef MRESULT (FNWP) (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+#else
+typedef MRESULT (EXPENTRY FNWP) (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+#endif
 typedef FNWP *PFNWP;
 
@@ -5046,26 +5087,26 @@
 
 
-BOOL WinCancelShutdown (HMQ hmq, BOOL fCancelAlways);
-HMQ WinCreateMsgQueue (HAB hab, LONG cmsg);
-BOOL WinDestroyMsgQueue (HMQ hmq);
-MRESULT WinDispatchMsg (HAB hab, PQMSG pqmsg);
-BOOL WinGetMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG msgFilterFirst,
+BOOL APIENTRY WinCancelShutdown (HMQ hmq, BOOL fCancelAlways);
+HMQ APIENTRY WinCreateMsgQueue (HAB hab, LONG cmsg);
+BOOL APIENTRY WinDestroyMsgQueue (HMQ hmq);
+MRESULT APIENTRY WinDispatchMsg (HAB hab, PQMSG pqmsg);
+BOOL APIENTRY WinGetMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG msgFilterFirst,
     ULONG msgFilterLast);
-BOOL WinLockInput (HMQ hmq, ULONG fLock);
-BOOL WinPeekMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG msgFilterFirst,
+BOOL APIENTRY WinLockInput (HMQ hmq, ULONG fLock);
+BOOL APIENTRY WinPeekMsg (HAB hab, PQMSG pqmsg, HWND hwndFilter, ULONG msgFilterFirst,
     ULONG msgFilterLast, ULONG fl);
-BOOL WinPostMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-HMQ WinQueueFromID (HAB hab, PID pid, TID tid);
-BOOL WinQueryQueueInfo (HMQ hmq, PMQINFO pmqi, ULONG cbCopy);
-HMQ WinQuerySendMsg (HAB hab, HMQ hmqSender, HMQ hmqReceiver, PQMSG pqmsg);
-BOOL WinRegisterUserDatatype (HAB hab, LONG datatype, LONG count, PLONG types);
-BOOL WinRegisterUserMsg (HAB hab, ULONG msgid, LONG datatype1, LONG dir1,
+BOOL APIENTRY WinPostMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+HMQ APIENTRY WinQueueFromID (HAB hab, PID pid, TID tid);
+BOOL APIENTRY WinQueryQueueInfo (HMQ hmq, PMQINFO pmqi, ULONG cbCopy);
+HMQ APIENTRY WinQuerySendMsg (HAB hab, HMQ hmqSender, HMQ hmqReceiver, PQMSG pqmsg);
+BOOL APIENTRY WinRegisterUserDatatype (HAB hab, LONG datatype, LONG count, PLONG types);
+BOOL APIENTRY WinRegisterUserMsg (HAB hab, ULONG msgid, LONG datatype1, LONG dir1,
     LONG datatype2, LONG dir2, LONG datatyper);
-BOOL WinReplyMsg (HAB hab, HMQ hmqSender, HMQ hmqReceiver, MRESULT mresult);
-MRESULT WinSendMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-BOOL WinSetMsgMode (HAB hab, PCSZ classname, LONG control);
-BOOL WinSetSynchroMode (HAB hab, LONG mode);
-BOOL WinThreadAssocQueue (HAB hab, HMQ hmq);
-BOOL WinWakeThread (HMQ hmq);
+BOOL APIENTRY WinReplyMsg (HAB hab, HMQ hmqSender, HMQ hmqReceiver, MRESULT mresult);
+MRESULT APIENTRY WinSendMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+BOOL APIENTRY WinSetMsgMode (HAB hab, PCSZ classname, LONG control);
+BOOL APIENTRY WinSetSynchroMode (HAB hab, LONG mode);
+BOOL APIENTRY WinThreadAssocQueue (HAB hab, HMQ hmq);
+BOOL APIENTRY WinWakeThread (HMQ hmq);
 
 #endif /* INCL_WINMESSAGEMGR || !INCL_NOCOMMON */
@@ -5129,45 +5170,45 @@
 
 
-HWND WinCreateWindow (HWND hwndParent, PCSZ pszClass, PCSZ pszName,
+HWND APIENTRY WinCreateWindow (HWND hwndParent, PCSZ pszClass, PCSZ pszName,
     ULONG flStyle, LONG x, LONG y, LONG cx, LONG cy, HWND hwndOwner,
     HWND hwndInsertBehind, ULONG id, PVOID pCtlData, PVOID pPresParams);
-BOOL WinDrawBitmap (HPS hpsDst, HBITMAP hbm, __const__ RECTL *pwrcSrc,
+BOOL APIENTRY WinDrawBitmap (HPS hpsDst, HBITMAP hbm, __const__ RECTL *pwrcSrc,
     __const__ POINTL *pptlDst, LONG clrFore, LONG clrBack, ULONG fl);
-BOOL WinDrawBorder (HPS hps, __const__ RECTL *prcl, LONG cx, LONG cy,
+BOOL APIENTRY WinDrawBorder (HPS hps, __const__ RECTL *prcl, LONG cx, LONG cy,
     LONG clrFore, LONG clrBack, ULONG flCmd);
-LONG WinDrawText (HPS hps, LONG cchText, PCCH lpchText, PRECTL prcl,
+LONG APIENTRY WinDrawText (HPS hps, LONG cchText, PCCH lpchText, PRECTL prcl,
     LONG clrFore, LONG clrBack, ULONG flCmd);
-BOOL WinEnableWindow (HWND hwnd, BOOL fEnable);
-BOOL WinEnableWindowUpdate (HWND hwnd, BOOL fEnable);
-BOOL WinInvalidateRect (HWND hwnd, __const__ RECTL *prcl,
+BOOL APIENTRY WinEnableWindow (HWND hwnd, BOOL fEnable);
+BOOL APIENTRY WinEnableWindowUpdate (HWND hwnd, BOOL fEnable);
+BOOL APIENTRY WinInvalidateRect (HWND hwnd, __const__ RECTL *prcl,
     BOOL fIncludeChildren);
-BOOL WinInvalidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren);
-BOOL WinInvertRect (HPS hps, __const__ RECTL *prcl);
-BOOL WinIsChild (HWND hwnd, HWND hwndParent);
-BOOL WinIsWindow (HAB hab, HWND hwnd);
-BOOL WinIsWindowEnabled (HWND hwnd);
-BOOL WinIsWindowVisible (HWND hwnd);
-LONG WinLoadMessage (HAB hab, HMODULE hmod, ULONG id, LONG cchMax,
+BOOL APIENTRY WinInvalidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren);
+BOOL APIENTRY WinInvertRect (HPS hps, __const__ RECTL *prcl);
+BOOL APIENTRY WinIsChild (HWND hwnd, HWND hwndParent);
+BOOL APIENTRY WinIsWindow (HAB hab, HWND hwnd);
+BOOL APIENTRY WinIsWindowEnabled (HWND hwnd);
+BOOL APIENTRY WinIsWindowVisible (HWND hwnd);
+LONG APIENTRY WinLoadMessage (HAB hab, HMODULE hmod, ULONG id, LONG cchMax,
     PSZ pchBuffer);
-LONG WinLoadString (HAB hab, HMODULE hmod, ULONG id, LONG cchMax,
+LONG APIENTRY WinLoadString (HAB hab, HMODULE hmod, ULONG id, LONG cchMax,
     PSZ pchBuffer);
-LONG WinMultWindowFromIDs (HWND hwndParent, PHWND prghwnd, ULONG idFirst,
+LONG APIENTRY WinMultWindowFromIDs (HWND hwndParent, PHWND prghwnd, ULONG idFirst,
     ULONG idLast);
-HWND WinQueryDesktopWindow (HAB hab, HDC hdc);
-HWND WinQueryObjectWindow (HWND hwndDesktop);
-HPOINTER WinQueryPointer (HWND hwndDesktop);
-HWND WinQueryWindow (HWND hwnd, LONG cmd);
-BOOL WinQueryWindowPos (HWND hwnd, PSWP pswp);
-BOOL WinQueryWindowProcess (HWND hwnd, PPID ppid, PTID ptid);
-LONG WinQueryWindowText (HWND hwnd, LONG cchBufferMax, PCH pchBuffer);
-LONG WinQueryWindowTextLength (HWND hwnd);
-BOOL WinSetMultWindowPos (HAB hab, __const__ SWP *pswp, ULONG cswp);
-BOOL WinSetOwner (HWND hwnd, HWND hwndNewOwner);
-BOOL WinSetParent (HWND hwnd, HWND hwndNewParent, BOOL fRedraw);
-BOOL WinSetWindowPos (HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y,
+HWND APIENTRY WinQueryDesktopWindow (HAB hab, HDC hdc);
+HWND APIENTRY WinQueryObjectWindow (HWND hwndDesktop);
+HPOINTER APIENTRY WinQueryPointer (HWND hwndDesktop);
+HWND APIENTRY WinQueryWindow (HWND hwnd, LONG cmd);
+BOOL APIENTRY WinQueryWindowPos (HWND hwnd, PSWP pswp);
+BOOL APIENTRY WinQueryWindowProcess (HWND hwnd, PPID ppid, PTID ptid);
+LONG APIENTRY WinQueryWindowText (HWND hwnd, LONG cchBufferMax, PCH pchBuffer);
+LONG APIENTRY WinQueryWindowTextLength (HWND hwnd);
+BOOL APIENTRY WinSetMultWindowPos (HAB hab, __const__ SWP *pswp, ULONG cswp);
+BOOL APIENTRY WinSetOwner (HWND hwnd, HWND hwndNewOwner);
+BOOL APIENTRY WinSetParent (HWND hwnd, HWND hwndNewParent, BOOL fRedraw);
+BOOL APIENTRY WinSetWindowPos (HWND hwnd, HWND hwndInsertBehind, LONG x, LONG y,
     LONG cx, LONG cy, ULONG fl);
-BOOL WinSetWindowText (HWND hwnd, PCSZ pszText);
-BOOL WinUpdateWindow (HWND hwnd);
-HWND WinWindowFromID (HWND hwndParent, ULONG id);
+BOOL APIENTRY WinSetWindowText (HWND hwnd, PCSZ pszText);
+BOOL APIENTRY WinUpdateWindow (HWND hwnd);
+HWND APIENTRY WinWindowFromID (HWND hwndParent, ULONG id);
 
 
@@ -5245,5 +5286,5 @@
 typedef FRAMECDATA *PFRAMECDATA;
 
-HWND WinCreateStdWindow (HWND hwndParent, ULONG flStyle,
+HWND APIENTRY WinCreateStdWindow (HWND hwndParent, ULONG flStyle,
     PULONG pflCreateFlags, PCSZ pszClientClass, PCSZ pszTitle,
     ULONG styleClient, HMODULE hmod, ULONG idResources, PHWND phwndClient);
@@ -5330,11 +5371,11 @@
 typedef LHANDLE HSAVEWP;
 
-BOOL WinCalcFrameRect (HWND hwndFrame, PRECTL prcl, BOOL fClient);
-BOOL WinCreateFrameControls (HWND hwndFrame, PFRAMECDATA pfcdata,
+BOOL APIENTRY WinCalcFrameRect (HWND hwndFrame, PRECTL prcl, BOOL fClient);
+BOOL APIENTRY WinCreateFrameControls (HWND hwndFrame, PFRAMECDATA pfcdata,
     PCSZ pszTitle);
-BOOL WinFlashWindow (HWND hwndFrame, BOOL fFlash);
-BOOL WinGetMaxPosition (HWND hwnd, PSWP pswp);
-BOOL WinGetMinPosition (HWND hwnd, PSWP pswp, __const__ POINTL *pptl);
-BOOL WinSaveWindowPos (HSAVEWP hsvwp, PSWP pswp, ULONG cswp);
+BOOL APIENTRY WinFlashWindow (HWND hwndFrame, BOOL fFlash);
+BOOL APIENTRY WinGetMaxPosition (HWND hwnd, PSWP pswp);
+BOOL APIENTRY WinGetMinPosition (HWND hwnd, PSWP pswp, __const__ POINTL *pptl);
+BOOL APIENTRY WinSaveWindowPos (HSAVEWP hsvwp, PSWP pswp, ULONG cswp);
 
 #endif /* INCL_WINFRAMEMGR */
@@ -5368,26 +5409,26 @@
 
 
-HPS WinBeginPaint (HWND hwnd, HPS hps, PRECTL prclPaint);
-MRESULT WinDefWindowProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-BOOL WinDestroyWindow (HWND hwnd);
-BOOL WinEndPaint (HPS hps);
-BOOL WinFillRect (HPS hps, __const__ RECTL *prcl, LONG lColor);
-HPS WinGetClipPS (HWND hwnd, HWND hwndClip, ULONG fl);
-HPS WinGetPS (HWND hwnd);
-HAB WinInitialize (ULONG fsOptions);
-BOOL WinIsWindowShowing (HWND hwnd);
-HDC WinOpenWindowDC (HWND hwnd);
-HAB WinQueryAnchorBlock (HWND hwnd);
-ULONG WinQueryVersion (HAB hab);
-BOOL WinQueryWindowRect (HWND hwnd, PRECTL prclDest);
-BOOL WinRegisterClass (HAB hab, PCSZ pszClassName, PFNWP pfnWndProc,
+HPS APIENTRY WinBeginPaint (HWND hwnd, HPS hps, PRECTL prclPaint);
+MRESULT APIENTRY WinDefWindowProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+BOOL APIENTRY WinDestroyWindow (HWND hwnd);
+BOOL APIENTRY WinEndPaint (HPS hps);
+BOOL APIENTRY WinFillRect (HPS hps, __const__ RECTL *prcl, LONG lColor);
+HPS APIENTRY WinGetClipPS (HWND hwnd, HWND hwndClip, ULONG fl);
+HPS APIENTRY WinGetPS (HWND hwnd);
+HAB APIENTRY WinInitialize (ULONG fsOptions);
+BOOL APIENTRY WinIsWindowShowing (HWND hwnd);
+HDC APIENTRY WinOpenWindowDC (HWND hwnd);
+HAB APIENTRY WinQueryAnchorBlock (HWND hwnd);
+ULONG APIENTRY WinQueryVersion (HAB hab);
+BOOL APIENTRY WinQueryWindowRect (HWND hwnd, PRECTL prclDest);
+BOOL APIENTRY WinRegisterClass (HAB hab, PCSZ pszClassName, PFNWP pfnWndProc,
     ULONG flStyle, ULONG cbWindowData);
-BOOL WinReleasePS (HPS hps);
-LONG WinScrollWindow (HWND hwnd, LONG dx, LONG dy, __const__ RECTL *prclScroll,
+BOOL APIENTRY WinReleasePS (HPS hps);
+LONG APIENTRY WinScrollWindow (HWND hwnd, LONG dx, LONG dy, __const__ RECTL *prclScroll,
     __const__ RECTL *prclClip, HRGN hrgnUpdate, PRECTL prclUpdate,
     ULONG rgfsw);
-BOOL WinSetActiveWindow (HWND hwndDesktop, HWND hwnd);
-BOOL WinShowWindow (HWND hwnd, BOOL fShow);
-BOOL WinTerminate (HAB hab);
+BOOL APIENTRY WinSetActiveWindow (HWND hwndDesktop, HWND hwnd);
+BOOL APIENTRY WinShowWindow (HWND hwnd, BOOL fShow);
+BOOL APIENTRY WinTerminate (HAB hab);
 
 #endif /* INCL_WINWINDOWMGR || !INCL_NOCOMMON */
@@ -5461,34 +5502,34 @@
 
 
-HENUM WinBeginEnumWindows (HWND hwnd);
-BOOL WinEndEnumWindows (HENUM henum);
-LONG WinExcludeUpdateRegion (HPS hps, HWND hwnd);
-HWND WinGetNextWindow (HENUM henum);
-HPS WinGetScreenPS (HWND hwndDesktop);
-BOOL WinIsThreadActive (HAB hab);
-BOOL WinLockVisRegions (HWND hwndDesktop, BOOL fLock);
-BOOL WinLockWindowUpdate (HWND hwndDesktop, HWND hwndLockUpdate);
-BOOL WinMapWindowPoints (HWND hwndFrom, HWND hwndTo, PPOINTL prgptl,
+HENUM APIENTRY WinBeginEnumWindows (HWND hwnd);
+BOOL APIENTRY WinEndEnumWindows (HENUM henum);
+LONG APIENTRY WinExcludeUpdateRegion (HPS hps, HWND hwnd);
+HWND APIENTRY WinGetNextWindow (HENUM henum);
+HPS APIENTRY WinGetScreenPS (HWND hwndDesktop);
+BOOL APIENTRY WinIsThreadActive (HAB hab);
+BOOL APIENTRY WinLockVisRegions (HWND hwndDesktop, BOOL fLock);
+BOOL APIENTRY WinLockWindowUpdate (HWND hwndDesktop, HWND hwndLockUpdate);
+BOOL APIENTRY WinMapWindowPoints (HWND hwndFrom, HWND hwndTo, PPOINTL prgptl,
     LONG cwpt);
-HWND WinQueryActiveWindow (HWND hwndDesktop);
-BOOL WinQueryClassInfo (HAB hab, PCSZ pszClassName, PCLASSINFO pClassInfo);
-LONG WinQueryClassName (HWND hwnd, LONG cchMax, PCH pch);
-BOOL WinQueryUpdateRect (HWND hwnd, PRECTL prcl);
-LONG WinQueryUpdateRegion (HWND hwnd, HRGN hrgn);
-HWND WinQuerySysModalWindow (HWND hwndDesktop);
-HDC WinQueryWindowDC (HWND hwnd);
-PVOID WinQueryWindowPtr (HWND hwnd, LONG index);
-ULONG WinQueryWindowULong (HWND hwnd, LONG index);
-USHORT WinQueryWindowUShort (HWND hwnd, LONG index);
-BOOL WinSetSysModalWindow (HWND hwndDesktop, HWND hwnd);
-BOOL WinSetWindowBits (HWND hwnd, LONG index, ULONG flData, ULONG flMask);
-BOOL WinSetWindowPtr (HWND hwnd, LONG index, PVOID p);
-BOOL WinSetWindowULong (HWND hwnd, LONG index, ULONG ul);
-BOOL WinSetWindowUShort (HWND hwnd, LONG index, USHORT us);
-PFNWP WinSubclassWindow (HWND hwnd, PFNWP pfnwp);
-BOOL WinValidateRect (HWND hwnd, __const__ RECTL *prcl, BOOL fIncludeChildren);
-BOOL WinValidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren);
-HWND WinWindowFromDC (HDC hdc);
-HWND WinWindowFromPoint (HWND hwnd, __const__ POINTL *pptl, BOOL fChildren);
+HWND APIENTRY WinQueryActiveWindow (HWND hwndDesktop);
+BOOL APIENTRY WinQueryClassInfo (HAB hab, PCSZ pszClassName, PCLASSINFO pClassInfo);
+LONG APIENTRY WinQueryClassName (HWND hwnd, LONG cchMax, PCH pch);
+BOOL APIENTRY WinQueryUpdateRect (HWND hwnd, PRECTL prcl);
+LONG APIENTRY WinQueryUpdateRegion (HWND hwnd, HRGN hrgn);
+HWND APIENTRY WinQuerySysModalWindow (HWND hwndDesktop);
+HDC APIENTRY WinQueryWindowDC (HWND hwnd);
+PVOID APIENTRY WinQueryWindowPtr (HWND hwnd, LONG index);
+ULONG APIENTRY WinQueryWindowULong (HWND hwnd, LONG index);
+USHORT APIENTRY WinQueryWindowUShort (HWND hwnd, LONG index);
+BOOL APIENTRY WinSetSysModalWindow (HWND hwndDesktop, HWND hwnd);
+BOOL APIENTRY WinSetWindowBits (HWND hwnd, LONG index, ULONG flData, ULONG flMask);
+BOOL APIENTRY WinSetWindowPtr (HWND hwnd, LONG index, PVOID p);
+BOOL APIENTRY WinSetWindowULong (HWND hwnd, LONG index, ULONG ul);
+BOOL APIENTRY WinSetWindowUShort (HWND hwnd, LONG index, USHORT us);
+PFNWP APIENTRY WinSubclassWindow (HWND hwnd, PFNWP pfnwp);
+BOOL APIENTRY WinValidateRect (HWND hwnd, __const__ RECTL *prcl, BOOL fIncludeChildren);
+BOOL APIENTRY WinValidateRegion (HWND hwnd, HRGN hrgn, BOOL fIncludeChildren);
+HWND APIENTRY WinWindowFromDC (HDC hdc);
+HWND APIENTRY WinWindowFromPoint (HWND hwnd, __const__ POINTL *pptl, BOOL fChildren);
 
 #endif /* INCL_WINWINDOWMGR */
@@ -5523,12 +5564,12 @@
 typedef ACCELTABLE *PACCELTABLE;
 
-ULONG WinCopyAccelTable (HACCEL haccel, PACCELTABLE pAccelTable,
+ULONG APIENTRY WinCopyAccelTable (HACCEL haccel, PACCELTABLE pAccelTable,
     ULONG cbCopyMax);
-HACCEL WinCreateAccelTable (HAB hab, PACCELTABLE pAccelTable);
-BOOL WinDestroyAccelTable (HACCEL haccel);
-HACCEL WinLoadAccelTable (HAB hab, HMODULE hmod, ULONG idAccelTable);
-HACCEL WinQueryAccelTable (HAB hab, HWND hwndFrame);
-BOOL WinSetAccelTable (HAB hab, HACCEL haccel, HWND hwndFrame);
-BOOL WinTranslateAccel (HAB hab, HWND hwnd, HACCEL haccel, PQMSG pqmsg);
+HACCEL APIENTRY WinCreateAccelTable (HAB hab, PACCELTABLE pAccelTable);
+BOOL APIENTRY WinDestroyAccelTable (HACCEL haccel);
+HACCEL APIENTRY WinLoadAccelTable (HAB hab, HMODULE hmod, ULONG idAccelTable);
+HACCEL APIENTRY WinQueryAccelTable (HAB hab, HWND hwndFrame);
+BOOL APIENTRY WinSetAccelTable (HAB hab, HACCEL haccel, HWND hwndFrame);
+BOOL APIENTRY WinTranslateAccel (HAB hab, HWND hwnd, HACCEL haccel, PQMSG pqmsg);
 
 #endif /* INCL_WINACCELERATORS */
@@ -5542,14 +5583,14 @@
 #define MAKEINTATOM(x)		((PCH)MAKEULONG (x, 0xffff))
 
-ATOM WinAddAtom (HATOMTBL hAtomTbl, PCSZ pszAtomName);
-HATOMTBL WinCreateAtomTable (ULONG cbInitial, ULONG cBuckets);
-ATOM WinDeleteAtom (HATOMTBL hAtomTbl, ATOM atom);
-HATOMTBL WinDestroyAtomTable (HATOMTBL hAtomTbl);
-ATOM WinFindAtom (HATOMTBL hAtomTbl, PCSZ pszAtomName);
-ULONG WinQueryAtomLength (HATOMTBL hAtomTbl, ATOM atom);
-ULONG WinQueryAtomName (HATOMTBL hAtomTbl, ATOM atom, PSZ pchBuffer,
+ATOM APIENTRY WinAddAtom (HATOMTBL hAtomTbl, PCSZ pszAtomName);
+HATOMTBL APIENTRY WinCreateAtomTable (ULONG cbInitial, ULONG cBuckets);
+ATOM APIENTRY WinDeleteAtom (HATOMTBL hAtomTbl, ATOM atom);
+HATOMTBL APIENTRY WinDestroyAtomTable (HATOMTBL hAtomTbl);
+ATOM APIENTRY WinFindAtom (HATOMTBL hAtomTbl, PCSZ pszAtomName);
+ULONG APIENTRY WinQueryAtomLength (HATOMTBL hAtomTbl, ATOM atom);
+ULONG APIENTRY WinQueryAtomName (HATOMTBL hAtomTbl, ATOM atom, PSZ pchBuffer,
     ULONG cchBufferMax);
-ULONG WinQueryAtomUsage (HATOMTBL hAtomTbl, ATOM atom);
-HATOMTBL WinQuerySystemAtomTable (VOID);
+ULONG APIENTRY WinQueryAtomUsage (HATOMTBL hAtomTbl, ATOM atom);
+HATOMTBL APIENTRY WinQuerySystemAtomTable (VOID);
 
 #endif /* INCL_WINATOM */
@@ -5687,15 +5728,15 @@
 #define CFI_POINTER			0x0400
 
-BOOL WinCloseClipbrd (HAB hab);
-BOOL WinEmptyClipbrd (HAB hab);
-ULONG WinEnumClipbrdFmts (HAB hab, ULONG fmt);
-BOOL WinOpenClipbrd (HAB hab);
-ULONG WinQueryClipbrdData (HAB hab, ULONG fmt);
-BOOL WinQueryClipbrdFmtInfo (HAB hab, ULONG fmt, PULONG prgfFmtInfo);
-HWND WinQueryClipbrdOwner (HAB hab);
-HWND WinQueryClipbrdViewer (HAB hab);
-BOOL WinSetClipbrdData (HAB hab, ULONG ulData, ULONG fmt, ULONG rgfFmtInfo);
-BOOL WinSetClipbrdOwner (HAB hab, HWND hwnd);
-BOOL WinSetClipbrdViewer (HAB hab, HWND hwndNewClipViewer);
+BOOL APIENTRY WinCloseClipbrd (HAB hab);
+BOOL APIENTRY WinEmptyClipbrd (HAB hab);
+ULONG APIENTRY WinEnumClipbrdFmts (HAB hab, ULONG fmt);
+BOOL APIENTRY WinOpenClipbrd (HAB hab);
+ULONG APIENTRY WinQueryClipbrdData (HAB hab, ULONG fmt);
+BOOL APIENTRY WinQueryClipbrdFmtInfo (HAB hab, ULONG fmt, PULONG prgfFmtInfo);
+HWND APIENTRY WinQueryClipbrdOwner (HAB hab);
+HWND APIENTRY WinQueryClipbrdViewer (HAB hab);
+BOOL APIENTRY WinSetClipbrdData (HAB hab, ULONG ulData, ULONG fmt, ULONG rgfFmtInfo);
+BOOL APIENTRY WinSetClipbrdOwner (HAB hab, HWND hwnd);
+BOOL APIENTRY WinSetClipbrdViewer (HAB hab, HWND hwndNewClipViewer);
 
 #endif /* INCL_WINCLIPBOARD */
@@ -5784,9 +5825,9 @@
     ((PCONVCONTEXT)((PBYTE)pddei + pddei->offConvContext))
 
-BOOL WinDdeInitiate (HWND hwndClient, PCSZ pszAppName, PCSZ pszTopicName,
+BOOL APIENTRY WinDdeInitiate (HWND hwndClient, PCSZ pszAppName, PCSZ pszTopicName,
     __const__ CONVCONTEXT *pcctxt);
-BOOL WinDdePostMsg (HWND hwndTo, HWND hwndFrom, ULONG wm,
+BOOL APIENTRY WinDdePostMsg (HWND hwndTo, HWND hwndFrom, ULONG wm,
     __const__ DDESTRUCT *pddest, ULONG flOptions);
-MRESULT WinDdeRespond (HWND hwndClient, HWND hwndServer, PCSZ pszAppName,
+MRESULT APIENTRY WinDdeRespond (HWND hwndClient, HWND hwndServer, PCSZ pszAppName,
     PCSZ pszTopicName, __const__ CONVCONTEXT *pcctxt);
 
@@ -5801,17 +5842,17 @@
 #define WCS_GT				3
 
-ULONG WinCompareStrings (HAB hab, ULONG idcp, ULONG idcc, PCSZ psz1,
+ULONG APIENTRY WinCompareStrings (HAB hab, ULONG idcp, ULONG idcc, PCSZ psz1,
     PCSZ psz2, ULONG reserved);
-UCHAR WinCpTranslateChar (HAB hab, ULONG cpSrc, UCHAR chSrc, ULONG cpDst);
-BOOL WinCpTranslateString (HAB hab, ULONG cpSrc, PCSZ pszSrc, ULONG cpDst,
+UCHAR APIENTRY WinCpTranslateChar (HAB hab, ULONG cpSrc, UCHAR chSrc, ULONG cpDst);
+BOOL APIENTRY WinCpTranslateString (HAB hab, ULONG cpSrc, PCSZ pszSrc, ULONG cpDst,
     ULONG cchDestMax, PSZ pchDest);
-PSZ WinNextChar (HAB hab, ULONG idcp, ULONG idcc, PCSZ psz);
-PSZ WinPrevChar (HAB hab, ULONG idcp, ULONG idcc, PCSZ pszStart,
+PSZ APIENTRY WinNextChar (HAB hab, ULONG idcp, ULONG idcc, PCSZ psz);
+PSZ APIENTRY WinPrevChar (HAB hab, ULONG idcp, ULONG idcc, PCSZ pszStart,
     PCSZ psz);
-ULONG WinQueryCp (HMQ hmq);
-ULONG WinQueryCpList (HAB hab, ULONG ccpMax, PULONG prgcp);
-BOOL WinSetCp (HMQ hmq, ULONG idCodePage);
-ULONG WinUpper (HAB hab, ULONG idcp, ULONG idcc, PSZ psz);
-ULONG WinUpperChar (HAB hab, ULONG idcp, ULONG idcc, ULONG c);
+ULONG APIENTRY WinQueryCp (HMQ hmq);
+ULONG APIENTRY WinQueryCpList (HAB hab, ULONG ccpMax, PULONG prgcp);
+BOOL APIENTRY WinSetCp (HMQ hmq, ULONG idCodePage);
+ULONG APIENTRY WinUpper (HAB hab, ULONG idcp, ULONG idcc, PSZ psz);
+ULONG APIENTRY WinUpperChar (HAB hab, ULONG idcp, ULONG idcc, ULONG c);
 
 #endif /* INCL_WINCOUNTRY */
@@ -5828,8 +5869,8 @@
 #define CURSOR_SETPOS			0x8000
 
-BOOL WinCreateCursor (HWND hwnd, LONG x, LONG y, LONG cx, LONG cy,
+BOOL APIENTRY WinCreateCursor (HWND hwnd, LONG x, LONG y, LONG cx, LONG cy,
     ULONG fs, PRECTL prclClip);
-BOOL WinDestroyCursor (HWND hwnd);
-BOOL WinShowCursor (HWND hwnd, BOOL fShow);
+BOOL APIENTRY WinDestroyCursor (HWND hwnd);
+BOOL APIENTRY WinShowCursor (HWND hwnd, BOOL fShow);
 
 #endif /* INCL_WINCURSORS || !INCL_NOCOMMON */
@@ -5849,5 +5890,5 @@
 typedef CURSORINFO *PCURSORINFO;
 
-BOOL WinQueryCursorInfo (HWND hwndDesktop, PCURSORINFO pCursorInfo);
+BOOL APIENTRY WinQueryCursorInfo (HWND hwndDesktop, PCURSORINFO pCursorInfo);
 
 #endif /* INCL_WINCURSORS */
@@ -5877,6 +5918,6 @@
 typedef DESKTOP *PDESKTOP;
 
-BOOL WinQueryDesktopBkgnd (HWND hwndDesktop, PDESKTOP pdsk);
-HBITMAP WinSetDesktopBkgnd (HWND hwndDesktop, __const__ DESKTOP *pdskNew);
+BOOL APIENTRY WinQueryDesktopBkgnd (HWND hwndDesktop, PDESKTOP pdsk);
+HBITMAP APIENTRY WinSetDesktopBkgnd (HWND hwndDesktop, __const__ DESKTOP *pdskNew);
 
 #endif /* INCL_WINDESKTOP */
@@ -5990,24 +6031,24 @@
 
 
-BOOL WinAlarm (HWND hwndDesktop, ULONG rgfType);
-MRESULT WinDefDlgProc (HWND hwndDlg, ULONG msg, MPARAM mp1, MPARAM mp2);
-BOOL WinDismissDlg (HWND hwndDlg, ULONG usResult);
-ULONG WinDlgBox (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
+BOOL APIENTRY WinAlarm (HWND hwndDesktop, ULONG rgfType);
+MRESULT APIENTRY WinDefDlgProc (HWND hwndDlg, ULONG msg, MPARAM mp1, MPARAM mp2);
+BOOL APIENTRY WinDismissDlg (HWND hwndDlg, ULONG usResult);
+ULONG APIENTRY WinDlgBox (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
     HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
-BOOL WinGetDlgMsg (HWND hwndDlg, PQMSG pqmsg);
-HWND WinLoadDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
+BOOL APIENTRY WinGetDlgMsg (HWND hwndDlg, PQMSG pqmsg);
+HWND APIENTRY WinLoadDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
     HMODULE hmod, ULONG idDlg, PVOID pCreateParams);
-ULONG WinMessageBox (HWND hwndParent, HWND hwndOwner, PCSZ pszText,
+ULONG APIENTRY WinMessageBox (HWND hwndParent, HWND hwndOwner, PCSZ pszText,
     PCSZ pszCaption, ULONG idWindow, ULONG flStyle);
-ULONG WinMessageBox2 (HWND hwndParent, HWND hwndOwner, PCSZ pszText,
+ULONG APIENTRY WinMessageBox2 (HWND hwndParent, HWND hwndOwner, PCSZ pszText,
     PCSZ pszCaption, ULONG idWindow, PMB2INFO pmb2info);
-BOOL WinQueryDlgItemShort (HWND hwndDlg, ULONG idItem, PSHORT pResult,
+BOOL APIENTRY WinQueryDlgItemShort (HWND hwndDlg, ULONG idItem, PSHORT pResult,
     BOOL fSigned);
-ULONG WinQueryDlgItemText (HWND hwndDlg, ULONG idItem, LONG cchBufferMax,
+ULONG APIENTRY WinQueryDlgItemText (HWND hwndDlg, ULONG idItem, LONG cchBufferMax,
     PSZ pchBuffer);
-LONG WinQueryDlgItemTextLength (HWND hwndDlg, ULONG idItem);
-BOOL WinSetDlgItemShort (HWND hwndDlg, ULONG idItem, USHORT usValue,
+LONG APIENTRY WinQueryDlgItemTextLength (HWND hwndDlg, ULONG idItem);
+BOOL APIENTRY WinSetDlgItemShort (HWND hwndDlg, ULONG idItem, USHORT usValue,
     BOOL fSigned);
-BOOL WinSetDlgItemText (HWND hwndDlg, ULONG idItem, PCSZ pszText);
+BOOL APIENTRY WinSetDlgItemText (HWND hwndDlg, ULONG idItem, PCSZ pszText);
 
 #endif /* INCL_WINDIALOGS || !defined (INCL_NOCOMMON) */
@@ -6070,13 +6111,13 @@
 
 
-HWND WinCreateDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
+HWND APIENTRY WinCreateDlg (HWND hwndParent, HWND hwndOwner, PFNWP pfnDlgProc,
     PDLGTEMPLATE pdlgt, PVOID pCreateParams);
-HWND WinEnumDlgItem (HWND hwndDlg, HWND hwnd, ULONG code);
-BOOL WinMapDlgPoints (HWND hwndDlg, PPOINTL prgwptl, ULONG cwpt,
+HWND APIENTRY WinEnumDlgItem (HWND hwndDlg, HWND hwnd, ULONG code);
+BOOL APIENTRY WinMapDlgPoints (HWND hwndDlg, PPOINTL prgwptl, ULONG cwpt,
     BOOL fCalcWindowCoords);
-ULONG WinProcessDlg (HWND hwndDlg);
-MRESULT WinSendDlgItemMsg (HWND hwndDlg, ULONG idItem, ULONG msg,
+ULONG APIENTRY WinProcessDlg (HWND hwndDlg);
+MRESULT APIENTRY WinSendDlgItemMsg (HWND hwndDlg, ULONG idItem, ULONG msg,
     MPARAM mp1, MPARAM mp2);
-LONG WinSubstituteStrings (HWND hwnd, PCSZ pszSrc, LONG cchDstMax,
+LONG APIENTRY WinSubstituteStrings (HWND hwnd, PCSZ pszSrc, LONG cchDstMax,
     PSZ pszDst);
 
@@ -6179,7 +6220,7 @@
 typedef ERRINFO *PERRINFO;
 
-ERRORID WinGetLastError (HAB hab);
-BOOL WinFreeErrorInfo (PERRINFO perrinfo);
-PERRINFO WinGetErrorInfo (HAB hab);
+ERRORID APIENTRY WinGetLastError (HAB hab);
+BOOL APIENTRY WinFreeErrorInfo (PERRINFO perrinfo);
+PERRINFO APIENTRY WinGetErrorInfo (HAB hab);
 
 #endif /* INCL_WINERRORS */
@@ -6256,7 +6297,7 @@
 
 
-BOOL WinCallMsgFilter (HAB hab, PQMSG pqmsg, ULONG msgf);
-BOOL WinReleaseHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod);
-BOOL WinSetHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod);
+BOOL APIENTRY WinCallMsgFilter (HAB hab, PQMSG pqmsg, ULONG msgf);
+BOOL APIENTRY WinReleaseHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod);
+BOOL APIENTRY WinSetHook (HAB hab, HMQ hmq, LONG iHook, PFN pfnHook, HMODULE hmod);
 
 #endif /* INCL_WINHOOKS */
@@ -6280,8 +6321,8 @@
 #define QFC_PARTOFCHAIN			0x0005
 
-BOOL WinFocusChange (HWND hwndDesktop, HWND hwndSetFocus, ULONG flFocusChange);
-BOOL WinLockupSystem (HAB hab);
-BOOL WinSetFocus (HWND hwndDesktop, HWND hwndSetFocus);
-BOOL WinUnlockSystem (HAB hab, PCSZ pszPassword);
+BOOL APIENTRY WinFocusChange (HWND hwndDesktop, HWND hwndSetFocus, ULONG flFocusChange);
+BOOL APIENTRY WinLockupSystem (HAB hab);
+BOOL APIENTRY WinSetFocus (HWND hwndDesktop, HWND hwndSetFocus);
+BOOL APIENTRY WinUnlockSystem (HAB hab, PCSZ pszPassword);
 
 #endif /* INCL_WININPUT || !INCL_NOCOMMON */
@@ -6478,16 +6519,16 @@
 #define MOUSEMSG(pmsg)		((PMSEMSG)((PBYTE)pmsg + sizeof (ULONG)))
 
-BOOL WinCheckInput (HAB hab);
-BOOL WinEnablePhysInput (HWND hwndDesktop, BOOL fEnable);
-LONG WinGetKeyState (HWND hwndDesktop, LONG vkey);
-LONG WinGetPhysKeyState (HWND hwndDesktop, LONG sc);
-BOOL WinIsPhysInputEnabled (HWND hwndDesktop);
-HWND WinQueryCapture (HWND hwndDesktop);
-HWND WinQueryFocus (HWND hwndDesktop);
-ULONG WinQueryVisibleRegion (HWND hwnd, HRGN hrgn);
-BOOL WinSetCapture (HWND hwndDesktop, HWND hwnd);
-BOOL WinSetKeyboardStateTable (HWND hwndDesktop, PBYTE pKeyStateTable,
+BOOL APIENTRY WinCheckInput (HAB hab);
+BOOL APIENTRY WinEnablePhysInput (HWND hwndDesktop, BOOL fEnable);
+LONG APIENTRY WinGetKeyState (HWND hwndDesktop, LONG vkey);
+LONG APIENTRY WinGetPhysKeyState (HWND hwndDesktop, LONG sc);
+BOOL APIENTRY WinIsPhysInputEnabled (HWND hwndDesktop);
+HWND APIENTRY WinQueryCapture (HWND hwndDesktop);
+HWND APIENTRY WinQueryFocus (HWND hwndDesktop);
+ULONG APIENTRY WinQueryVisibleRegion (HWND hwnd, HRGN hrgn);
+BOOL APIENTRY WinSetCapture (HWND hwndDesktop, HWND hwnd);
+BOOL APIENTRY WinSetKeyboardStateTable (HWND hwndDesktop, PBYTE pKeyStateTable,
     BOOL fSet);
-BOOL WinSetVisibleRegionNotify (HWND hwnd, BOOL fEnable);
+BOOL APIENTRY WinSetVisibleRegionNotify (HWND hwnd, BOOL fEnable);
 
 #endif /* INCL_WININPUT */
@@ -6584,8 +6625,8 @@
 #if defined (INCL_WINLOAD)
 
-BOOL WinDeleteLibrary (HAB hab, HLIB libhandle);
-BOOL WinDeleteProcedure (HAB hab, PFNWP wndproc);
-HLIB WinLoadLibrary (HAB hab, PCSZ libname);
-PFNWP WinLoadProcedure (HAB hab, HLIB libhandle, PSZ procname);
+BOOL APIENTRY WinDeleteLibrary (HAB hab, HLIB libhandle);
+BOOL APIENTRY WinDeleteProcedure (HAB hab, PFNWP wndproc);
+HLIB APIENTRY WinLoadLibrary (HAB hab, PCSZ libname);
+PFNWP APIENTRY WinLoadProcedure (HAB hab, HLIB libhandle, PSZ procname);
 
 #endif /* INCL_WINLOAD */
@@ -6738,7 +6779,7 @@
 
 
-HWND WinCreateMenu (HWND hwndParent, CPVOID lpmt);
-HWND WinLoadMenu (HWND hwndFrame, HMODULE hmod, ULONG idMenu);
-BOOL WinPopupMenu (HWND hwndParent, HWND hwndOwner, HWND hwndMenu,
+HWND APIENTRY WinCreateMenu (HWND hwndParent, CPVOID lpmt);
+HWND APIENTRY WinLoadMenu (HWND hwndFrame, HMODULE hmod, ULONG idMenu);
+BOOL APIENTRY WinPopupMenu (HWND hwndParent, HWND hwndOwner, HWND hwndMenu,
     LONG x, LONG y, LONG idItem, ULONG fs);
 
@@ -6805,17 +6846,17 @@
 typedef WNDPARAMS *PWNDPARAMS;
 
-BOOL WinBroadcastMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, ULONG rgf);
-BOOL WinInSendMsg (HAB hab);
-BOOL WinPostQueueMsg (HMQ hmq, ULONG msg, MPARAM mp1, MPARAM mp2);
-BOOL WinQueryMsgPos (HAB hab, PPOINTL pptl);
-ULONG WinQueryMsgTime (HAB hab);
-ULONG WinQueryQueueStatus (HWND hwndDesktop);
-ULONG WinRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
-BOOL WinSetClassMsgInterest (HAB hab, PCSZ pszClassName, ULONG msg_class,
+BOOL APIENTRY WinBroadcastMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2, ULONG rgf);
+BOOL APIENTRY WinInSendMsg (HAB hab);
+BOOL APIENTRY WinPostQueueMsg (HMQ hmq, ULONG msg, MPARAM mp1, MPARAM mp2);
+BOOL APIENTRY WinQueryMsgPos (HAB hab, PPOINTL pptl);
+ULONG APIENTRY WinQueryMsgTime (HAB hab);
+ULONG APIENTRY WinQueryQueueStatus (HWND hwndDesktop);
+ULONG APIENTRY WinRequestMutexSem (HMTX hmtx, ULONG ulTimeout);
+BOOL APIENTRY WinSetClassMsgInterest (HAB hab, PCSZ pszClassName, ULONG msg_class,
     LONG control);
-BOOL WinSetMsgInterest (HWND hwnd, ULONG msg_class, LONG control);
-ULONG WinWaitEventSem (HEV hev, ULONG ulTimeout);
-BOOL WinWaitMsg (HAB hab, ULONG msgFirst, ULONG msgLast);
-ULONG WinWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
+BOOL APIENTRY WinSetMsgInterest (HWND hwnd, ULONG msg_class, LONG control);
+ULONG APIENTRY WinWaitEventSem (HEV hev, ULONG ulTimeout);
+BOOL APIENTRY WinWaitMsg (HAB hab, ULONG msgFirst, ULONG msgLast);
+ULONG APIENTRY WinWaitMuxWaitSem (HMUX hmux, ULONG ulTimeout, PULONG pulUser);
 
 #endif /* INCL_WINMESSAGEMGR */
@@ -6824,5 +6865,5 @@
 #if defined (INCL_WINPALETTE)
 
-LONG WinRealizePalette (HWND hwnd, HPS hps, PULONG pcclr);
+LONG APIENTRY WinRealizePalette (HWND hwnd, HPS hps, PULONG pcclr);
 
 #endif /* INCL_WINPALETTE */
@@ -6928,25 +6969,25 @@
 
 
-HPOINTER WinCreatePointer (HWND hwndDesktop, HBITMAP hbmPointer, BOOL fPointer,
+HPOINTER APIENTRY WinCreatePointer (HWND hwndDesktop, HBITMAP hbmPointer, BOOL fPointer,
     LONG xHotspot, LONG yHotspot);
-HPOINTER WinCreatePointerIndirect (HWND hwndDesktop,
+HPOINTER APIENTRY WinCreatePointerIndirect (HWND hwndDesktop,
     __const__ POINTERINFO *pptri);
-BOOL WinDestroyPointer (HPOINTER hptr);
-BOOL WinDrawPointer (HPS hps, LONG x, LONG y, HPOINTER hptr, ULONG fs);
-HBITMAP WinGetSysBitmap (HWND hwndDesktop, ULONG ibm);
-HPOINTER WinLoadPointer (HWND hwndDesktop, HMODULE hmod, ULONG idres);
-BOOL WinLockPointerUpdate (HWND hwndDesktop, HPOINTER hptrNew,
+BOOL APIENTRY WinDestroyPointer (HPOINTER hptr);
+BOOL APIENTRY WinDrawPointer (HPS hps, LONG x, LONG y, HPOINTER hptr, ULONG fs);
+HBITMAP APIENTRY WinGetSysBitmap (HWND hwndDesktop, ULONG ibm);
+HPOINTER APIENTRY WinLoadPointer (HWND hwndDesktop, HMODULE hmod, ULONG idres);
+BOOL APIENTRY WinLockPointerUpdate (HWND hwndDesktop, HPOINTER hptrNew,
     ULONG ulTimeInterval);
-BOOL WinQueryPointerPos (HWND hwndDesktop, PPOINTL pptl);
-BOOL WinQueryPointerInfo (HPOINTER hptr, PPOINTERINFO pPointerInfo);
-HPOINTER WinQuerySysPointer (HWND hwndDesktop, LONG lId, BOOL fCopy);
-BOOL WinQuerySysPointerData (HWND hwndDesktop, ULONG ulId,
+BOOL APIENTRY WinQueryPointerPos (HWND hwndDesktop, PPOINTL pptl);
+BOOL APIENTRY WinQueryPointerInfo (HPOINTER hptr, PPOINTERINFO pPointerInfo);
+HPOINTER APIENTRY WinQuerySysPointer (HWND hwndDesktop, LONG lId, BOOL fCopy);
+BOOL APIENTRY WinQuerySysPointerData (HWND hwndDesktop, ULONG ulId,
     PICONINFO pIconInfo);
-BOOL WinSetPointer (HWND hwndDesktop, HPOINTER hptrNew);
-BOOL WinSetPointerOwner (HPOINTER hptr, PID pid, BOOL fDestroy);
-BOOL WinSetPointerPos (HWND hwndDesktop, LONG x, LONG y);
-BOOL WinSetSysPointerData (HWND hwndDesktop, ULONG ulId,
+BOOL APIENTRY WinSetPointer (HWND hwndDesktop, HPOINTER hptrNew);
+BOOL APIENTRY WinSetPointerOwner (HPOINTER hptr, PID pid, BOOL fDestroy);
+BOOL APIENTRY WinSetPointerPos (HWND hwndDesktop, LONG x, LONG y);
+BOOL APIENTRY WinSetSysPointerData (HWND hwndDesktop, ULONG ulId,
     __const__ ICONINFO *pIconInfo);
-BOOL WinShowPointer (HWND hwndDesktop, BOOL fShow);
+BOOL APIENTRY WinShowPointer (HWND hwndDesktop, BOOL fShow);
 
 #endif /* INCL_WINPOINTERS */
@@ -6955,20 +6996,20 @@
 #if defined (INCL_WINRECTANGLES)
 
-BOOL WinCopyRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc);
-BOOL WinEqualRect (HAB hab, __const__ RECTL *prcl1, __const__ RECTL *prcl2);
-BOOL WinInflateRect (HAB hab, PRECTL prcl, LONG cx, LONG cy);
-BOOL WinIntersectRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
+BOOL APIENTRY WinCopyRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc);
+BOOL APIENTRY WinEqualRect (HAB hab, __const__ RECTL *prcl1, __const__ RECTL *prcl2);
+BOOL APIENTRY WinInflateRect (HAB hab, PRECTL prcl, LONG cx, LONG cy);
+BOOL APIENTRY WinIntersectRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
     __const__ RECTL *prclSrc2);
-BOOL WinIsRectEmpty (HAB hab, __const__ RECTL *prcl);
-BOOL WinMakePoints (HAB hab, PPOINTL pwpt, ULONG cwpt);
-BOOL WinMakeRect (HAB hab, PRECTL pwrc);
-BOOL WinOffsetRect (HAB hab, PRECTL prcl, LONG cx, LONG cy);
-BOOL WinPtInRect (HAB hab, __const__ RECTL *prcl, __const__ POINTL *pptl);
-BOOL WinSetRect (HAB hab, PRECTL prcl, LONG xLeft, LONG yBottom, LONG xRight,
+BOOL APIENTRY WinIsRectEmpty (HAB hab, __const__ RECTL *prcl);
+BOOL APIENTRY WinMakePoints (HAB hab, PPOINTL pwpt, ULONG cwpt);
+BOOL APIENTRY WinMakeRect (HAB hab, PRECTL pwrc);
+BOOL APIENTRY WinOffsetRect (HAB hab, PRECTL prcl, LONG cx, LONG cy);
+BOOL APIENTRY WinPtInRect (HAB hab, __const__ RECTL *prcl, __const__ POINTL *pptl);
+BOOL APIENTRY WinSetRect (HAB hab, PRECTL prcl, LONG xLeft, LONG yBottom, LONG xRight,
     LONG yTop);
-BOOL WinSetRectEmpty (HAB hab, PRECTL prcl);
-BOOL WinSubtractRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
+BOOL APIENTRY WinSetRectEmpty (HAB hab, PRECTL prcl);
+BOOL APIENTRY WinSubtractRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
     __const__ RECTL *prclSrc2);
-BOOL WinUnionRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
+BOOL APIENTRY WinUnionRect (HAB hab, PRECTL prclDst, __const__ RECTL *prclSrc1,
     __const__ RECTL *prclSrc2);
 
@@ -7379,17 +7420,17 @@
 
 
-LONG WinQueryControlColors (HWND hwnd, LONG clrType, ULONG flCtlColor,
+LONG APIENTRY WinQueryControlColors (HWND hwnd, LONG clrType, ULONG flCtlColor,
     ULONG cCtlColor, PCTLCOLOR pCtlColor);
-ULONG WinQueryPresParam (HWND hwnd, ULONG id1, ULONG id2, PULONG pulId,
+ULONG APIENTRY WinQueryPresParam (HWND hwnd, ULONG id1, ULONG id2, PULONG pulId,
     ULONG cbBuf, PVOID pbBuf, ULONG fs);
-LONG WinQuerySysColor (HWND hwndDesktop, LONG clr, LONG lReserved);
-LONG WinQuerySysValue (HWND hwndDesktop, LONG iSysValue);
-BOOL WinRemovePresParam (HWND hwnd, ULONG id);
-LONG WinSetControlColors (HWND hwnd, LONG clrType, ULONG flCtlColor,
+LONG APIENTRY WinQuerySysColor (HWND hwndDesktop, LONG clr, LONG lReserved);
+LONG APIENTRY WinQuerySysValue (HWND hwndDesktop, LONG iSysValue);
+BOOL APIENTRY WinRemovePresParam (HWND hwnd, ULONG id);
+LONG APIENTRY WinSetControlColors (HWND hwnd, LONG clrType, ULONG flCtlColor,
     ULONG cCtlColor, PCTLCOLOR pCtlColor);
-BOOL WinSetPresParam (HWND hwnd, ULONG id, ULONG cbParam, PVOID pbParam);
-BOOL WinSetSysColors (HWND hwndDesktop, ULONG flOptions, ULONG flFormat,
+BOOL APIENTRY WinSetPresParam (HWND hwnd, ULONG id, ULONG cbParam, PVOID pbParam);
+BOOL APIENTRY WinSetSysColors (HWND hwndDesktop, ULONG flOptions, ULONG flFormat,
     LONG clrFirst, ULONG cclr, __const__ LONG *pclr);
-BOOL WinSetSysValue (HWND hwndDesktop, LONG iSysValue, LONG lValue);
+BOOL APIENTRY WinSetSysValue (HWND hwndDesktop, LONG iSysValue, LONG lValue);
 
 #endif /* INCL_WINSYS */
@@ -7398,9 +7439,9 @@
 #if defined (INCL_WINTHUNKAPI)
 
-PFN WinQueryClassThunkProc (PCSZ pszClassname);
-LONG WinQueryWindowModel (HWND hwnd);
-PFN WinQueryWindowThunkProc (HWND hwnd);
-BOOL WinSetClassThunkProc (PCSZ pszClassname, PFN pfnThunkProc);
-BOOL WinSetWindowThunkProc (HWND hwnd, PFN pfnThunkProc);
+PFN APIENTRY WinQueryClassThunkProc (PCSZ pszClassname);
+LONG APIENTRY WinQueryWindowModel (HWND hwnd);
+PFN APIENTRY WinQueryWindowThunkProc (HWND hwnd);
+BOOL APIENTRY WinSetClassThunkProc (PCSZ pszClassname, PFN pfnThunkProc);
+BOOL APIENTRY WinSetWindowThunkProc (HWND hwnd, PFN pfnThunkProc);
 
 #endif /* INCL_WINTHUNKAPI */
@@ -7414,7 +7455,7 @@
 #define TID_USERMAX			0x7fff
 
-ULONG  WinGetCurrentTime (HAB hab);
-ULONG WinStartTimer (HAB hab, HWND hwnd, ULONG idTimer, ULONG dtTimeout);
-BOOL WinStopTimer (HAB hab, HWND hwnd, ULONG idTimer);
+ULONG APIENTRY  WinGetCurrentTime (HAB hab);
+ULONG APIENTRY WinStartTimer (HAB hab, HWND hwnd, ULONG idTimer, ULONG dtTimeout);
+BOOL APIENTRY WinStopTimer (HAB hab, HWND hwnd, ULONG idTimer);
 
 #endif /* INCL_WINTIMER */
@@ -7451,6 +7492,6 @@
 typedef TRACKINFO *PTRACKINFO;
 
-BOOL WinShowTrackRect (HWND hwnd, BOOL fShow);
-BOOL WinTrackRect (HWND hwnd, HPS hps, PTRACKINFO pti);
+BOOL APIENTRY WinShowTrackRect (HWND hwnd, BOOL fShow);
+BOOL APIENTRY WinTrackRect (HWND hwnd, HPS hps, PTRACKINFO pti);
 
 #endif /* INCL_WINTRACKRECT */
@@ -8275,251 +8316,251 @@
 
 
-LONG GpiAnimatePalette (HPAL hpal, ULONG ulFormat, ULONG ulStart,
+LONG APIENTRY GpiAnimatePalette (HPAL hpal, ULONG ulFormat, ULONG ulStart,
     ULONG ulCount, __const__ ULONG *aulTable);
-BOOL GpiBeginArea (HPS hps, ULONG flOptions);
-BOOL GpiBeginElement (HPS hps, LONG lType, PCSZ pszDesc);
-BOOL GpiBeginPath (HPS hps, LONG lPath);
-LONG GpiBox (HPS hps, LONG lControl, __const__ POINTL *pptlPoint, LONG lHRound,
+BOOL APIENTRY GpiBeginArea (HPS hps, ULONG flOptions);
+BOOL APIENTRY GpiBeginElement (HPS hps, LONG lType, PCSZ pszDesc);
+BOOL APIENTRY GpiBeginPath (HPS hps, LONG lPath);
+LONG APIENTRY GpiBox (HPS hps, LONG lControl, __const__ POINTL *pptlPoint, LONG lHRound,
     LONG lVRound);
-LONG GpiCallSegmentMatrix (HPS hps, LONG lSegment, LONG lCount,
+LONG APIENTRY GpiCallSegmentMatrix (HPS hps, LONG lSegment, LONG lCount,
     __const__ MATRIXLF *pmatlfArray, LONG lOptions);
-LONG GpiCharString (HPS hps, LONG lCount, PCCH pchString);
-LONG GpiCharStringAt (HPS hps, __const__ POINTL *pptlPoint, LONG lCount,
+LONG APIENTRY GpiCharString (HPS hps, LONG lCount, PCCH pchString);
+LONG APIENTRY GpiCharStringAt (HPS hps, __const__ POINTL *pptlPoint, LONG lCount,
      PCCH pchString);
-LONG GpiCharStringPos (HPS hps, __const__ RECTL *prclRect, ULONG flOptions,
+LONG APIENTRY GpiCharStringPos (HPS hps, __const__ RECTL *prclRect, ULONG flOptions,
     LONG lCount, PCCH pchString, __const__ LONG *alAdx);
-LONG  GpiCharStringPosAt (HPS hps, __const__ POINTL *pptlStart,
+LONG APIENTRY  GpiCharStringPosAt (HPS hps, __const__ POINTL *pptlStart,
     __const__ RECTL *prclRect, ULONG flOptions, LONG lCount, PCCH pchString,
     __const__ LONG *alAdx);
-BOOL GpiCloseFigure (HPS hps);
-LONG GpiCombineRegion (HPS hps, HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2,
+BOOL APIENTRY GpiCloseFigure (HPS hps);
+LONG APIENTRY GpiCombineRegion (HPS hps, HRGN hrgnDest, HRGN hrgnSrc1, HRGN hrgnSrc2,
     LONG lMode);
-BOOL GpiComment (HPS hps, LONG lLength, __const__ BYTE *pbData);
-BOOL GpiConvert (HPS hps, LONG lSrc, LONG lTarg, LONG lCount,
+BOOL APIENTRY GpiComment (HPS hps, LONG lLength, __const__ BYTE *pbData);
+BOOL APIENTRY GpiConvert (HPS hps, LONG lSrc, LONG lTarg, LONG lCount,
     PPOINTL aptlPoints);
-BOOL GpiConvertWithMatrix (HPS hps, LONG lCountp, PPOINTL aptlPoints,
+BOOL APIENTRY GpiConvertWithMatrix (HPS hps, LONG lCountp, PPOINTL aptlPoints,
     LONG lCount, __const__ MATRIXLF *pmatlfArray);
-HMF GpiCopyMetaFile (HMF hmf);
-BOOL GpiCreateLogColorTable (HPS hps, ULONG flOptions, LONG lFormat,
+HMF APIENTRY GpiCopyMetaFile (HMF hmf);
+BOOL APIENTRY GpiCreateLogColorTable (HPS hps, ULONG flOptions, LONG lFormat,
     LONG lStart, LONG lCount, __const__ LONG *alTable);
-LONG GpiCreateLogFont (HPS hps, __const__ STR8 *pName, LONG lLcid,
+LONG APIENTRY GpiCreateLogFont (HPS hps, __const__ STR8 *pName, LONG lLcid,
     __const__ FATTRS *pfatAttrs);
-HPAL GpiCreatePalette (HAB hab, ULONG flOptions, ULONG ulFormat,
+HPAL APIENTRY GpiCreatePalette (HAB hab, ULONG flOptions, ULONG ulFormat,
     ULONG ulCount, __const__ ULONG *aulTable);
-HRGN GpiCreateRegion (HPS hps, LONG lCount, __const__ RECTL *arclRectangles);
-BOOL GpiDeleteElement (HPS hps);
-BOOL GpiDeleteElementRange (HPS hps, LONG lFirstElement, LONG lLastElement);
-BOOL GpiDeleteElementsBetweenLabels (HPS hps, LONG lFirstLabel,
+HRGN APIENTRY GpiCreateRegion (HPS hps, LONG lCount, __const__ RECTL *arclRectangles);
+BOOL APIENTRY GpiDeleteElement (HPS hps);
+BOOL APIENTRY GpiDeleteElementRange (HPS hps, LONG lFirstElement, LONG lLastElement);
+BOOL APIENTRY GpiDeleteElementsBetweenLabels (HPS hps, LONG lFirstLabel,
     LONG lLastLabel);
-BOOL GpiDeleteMetaFile (HMF hmf);
-BOOL GpiDeletePalette (HPAL hpal);
-BOOL GpiDeleteSetId (HPS hps, LONG lLcid);
-BOOL GpiDestroyRegion (HPS hps, HRGN hrgn);
-LONG GpiElement (HPS hps, LONG lType, PCSZ pszDesc, LONG lLength,
+BOOL APIENTRY GpiDeleteMetaFile (HMF hmf);
+BOOL APIENTRY GpiDeletePalette (HPAL hpal);
+BOOL APIENTRY GpiDeleteSetId (HPS hps, LONG lLcid);
+BOOL APIENTRY GpiDestroyRegion (HPS hps, HRGN hrgn);
+LONG APIENTRY GpiElement (HPS hps, LONG lType, PCSZ pszDesc, LONG lLength,
     __const__ BYTE *pbData);
-LONG GpiEndArea (HPS hps);
-BOOL GpiEndElement (HPS hps);
-BOOL GpiEndPath (HPS hps);
-LONG GpiEqualRegion (HPS hps, HRGN hrgnSrc1, HRGN hrgnSrc2);
-LONG GpiExcludeClipRectangle (HPS hps, __const__ RECTL *prclRectangle);
-LONG GpiFillPath (HPS hps, LONG lPath, LONG lOptions);
-LONG GpiFrameRegion (HPS hps, HRGN hrgn, __const__ SIZEL *thickness);
-LONG GpiFullArc (HPS hps, LONG lControl, FIXED fxMultiplier);
-LONG GpiImage (HPS hps, LONG lFormat, __const__ SIZEL *psizlImageSize,
+LONG APIENTRY GpiEndArea (HPS hps);
+BOOL APIENTRY GpiEndElement (HPS hps);
+BOOL APIENTRY GpiEndPath (HPS hps);
+LONG APIENTRY GpiEqualRegion (HPS hps, HRGN hrgnSrc1, HRGN hrgnSrc2);
+LONG APIENTRY GpiExcludeClipRectangle (HPS hps, __const__ RECTL *prclRectangle);
+LONG APIENTRY GpiFillPath (HPS hps, LONG lPath, LONG lOptions);
+LONG APIENTRY GpiFrameRegion (HPS hps, HRGN hrgn, __const__ SIZEL *thickness);
+LONG APIENTRY GpiFullArc (HPS hps, LONG lControl, FIXED fxMultiplier);
+LONG APIENTRY GpiImage (HPS hps, LONG lFormat, __const__ SIZEL *psizlImageSize,
     LONG lLength, __const__ BYTE *pbData);
-LONG GpiIntersectClipRectangle (HPS hps, __const__ RECTL *prclRectangle);
-BOOL GpiLabel (HPS hps, LONG lLabel);
-LONG GpiLine (HPS hps, __const__ POINTL *pptlEndPoint);
-BOOL GpiLoadFonts (HAB hab, PCSZ pszFilename);
-HMF GpiLoadMetaFile (HAB hab, PCSZ pszFilename);
-BOOL GpiLoadPublicFonts (HAB hab, PCSZ pszFileName);
-LONG GpiMarker (HPS hps, __const__ POINTL *pptlPoint);
-BOOL GpiModifyPath (HPS hps, LONG lPath, LONG lMode);
-BOOL GpiMove (HPS hps, __const__ POINTL *pptlPoint);
-LONG GpiOffsetClipRegion (HPS hps, __const__ POINTL *pptlPoint);
-BOOL GpiOffsetElementPointer (HPS hps, LONG loffset);
-BOOL GpiOffsetRegion (HPS hps, HRGN Hrgn, __const__ POINTL *pptlOffset);
-LONG GpiOutlinePath (HPS hps, LONG lPath, LONG lOptions);
-LONG GpiPaintRegion (HPS hps, HRGN hrgn);
-LONG GpiPartialArc (HPS hps, __const__ POINTL *pptlCenter, FIXED fxMultiplier,
+LONG APIENTRY GpiIntersectClipRectangle (HPS hps, __const__ RECTL *prclRectangle);
+BOOL APIENTRY GpiLabel (HPS hps, LONG lLabel);
+LONG APIENTRY GpiLine (HPS hps, __const__ POINTL *pptlEndPoint);
+BOOL APIENTRY GpiLoadFonts (HAB hab, PCSZ pszFilename);
+HMF APIENTRY GpiLoadMetaFile (HAB hab, PCSZ pszFilename);
+BOOL APIENTRY GpiLoadPublicFonts (HAB hab, PCSZ pszFileName);
+LONG APIENTRY GpiMarker (HPS hps, __const__ POINTL *pptlPoint);
+BOOL APIENTRY GpiModifyPath (HPS hps, LONG lPath, LONG lMode);
+BOOL APIENTRY GpiMove (HPS hps, __const__ POINTL *pptlPoint);
+LONG APIENTRY GpiOffsetClipRegion (HPS hps, __const__ POINTL *pptlPoint);
+BOOL APIENTRY GpiOffsetElementPointer (HPS hps, LONG loffset);
+BOOL APIENTRY GpiOffsetRegion (HPS hps, HRGN Hrgn, __const__ POINTL *pptlOffset);
+LONG APIENTRY GpiOutlinePath (HPS hps, LONG lPath, LONG lOptions);
+LONG APIENTRY GpiPaintRegion (HPS hps, HRGN hrgn);
+LONG APIENTRY GpiPartialArc (HPS hps, __const__ POINTL *pptlCenter, FIXED fxMultiplier,
     FIXED fxStartAngle, FIXED fxSweepAngle);
-HRGN GpiPathToRegion (HPS GpiH, LONG lPath, LONG lOptions);
-LONG GpiPlayMetaFile (HPS hps, HMF hmf, LONG lCount1,
+HRGN APIENTRY GpiPathToRegion (HPS GpiH, LONG lPath, LONG lOptions);
+LONG APIENTRY GpiPlayMetaFile (HPS hps, HMF hmf, LONG lCount1,
     __const__ LONG *alOptarray, PLONG plSegCount, LONG lCount2, PSZ pszDesc);
-LONG GpiPointArc (HPS hps, __const__ POINTL *pptl2);
-LONG GpiPolyFillet (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
-LONG GpiPolyFilletSharp (HPS hps, LONG lCount, __const__ POINTL *aptlPoints,
+LONG APIENTRY GpiPointArc (HPS hps, __const__ POINTL *pptl2);
+LONG APIENTRY GpiPolyFillet (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
+LONG APIENTRY GpiPolyFilletSharp (HPS hps, LONG lCount, __const__ POINTL *aptlPoints,
     __const__ FIXED *afxPoints);
-LONG GpiPolygons (HPS hps, ULONG ulCount, __const__ POLYGON *paplgn,
+LONG APIENTRY GpiPolygons (HPS hps, ULONG ulCount, __const__ POLYGON *paplgn,
     ULONG flOptions, ULONG flModel);
-LONG GpiPolyLine (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
-LONG GpiPolyLineDisjoint (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
-LONG GpiPolyMarker (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
-LONG GpiPolySpline (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
-BOOL GpiPop (HPS hps, LONG lCount);
-LONG GpiPtInRegion (HPS hps, HRGN hrgn, __const__ POINTL *pptlPoint);
-LONG GpiPtVisible (HPS hps, __const__ POINTL *pptlPoint);
-BOOL GpiQueryArcParams (HPS hps, PARCPARAMS parcpArcParams);
-LONG GpiQueryAttrMode (HPS hps);
-LONG GpiQueryAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
+LONG APIENTRY GpiPolyLine (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
+LONG APIENTRY GpiPolyLineDisjoint (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
+LONG APIENTRY GpiPolyMarker (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
+LONG APIENTRY GpiPolySpline (HPS hps, LONG lCount, __const__ POINTL *aptlPoints);
+BOOL APIENTRY GpiPop (HPS hps, LONG lCount);
+LONG APIENTRY GpiPtInRegion (HPS hps, HRGN hrgn, __const__ POINTL *pptlPoint);
+LONG APIENTRY GpiPtVisible (HPS hps, __const__ POINTL *pptlPoint);
+BOOL APIENTRY GpiQueryArcParams (HPS hps, PARCPARAMS parcpArcParams);
+LONG APIENTRY GpiQueryAttrMode (HPS hps);
+LONG APIENTRY GpiQueryAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
     PBUNDLE ppbunAttrs);
-LONG GpiQueryBackColor (HPS hps);
-LONG GpiQueryBackMix (HPS hps);
-BOOL GpiQueryCharAngle (HPS hps, PGRADIENTL pgradlAngle);
-BOOL GpiQueryCharBox (HPS hps, PSIZEF psizfxSize);
-BOOL GpiQueryCharBreakExtra (HPS hps, PFIXED BreakExtra);
-LONG GpiQueryCharDirection (HPS hps);
-BOOL GpiQueryCharExtra (HPS hps, PFIXED Extra);
-LONG GpiQueryCharMode (HPS hps);
-LONG GpiQueryCharSet (HPS hps);
-BOOL GpiQueryCharShear (HPS hps, PPOINTL pptlShear);
-BOOL GpiQueryCharStringPos (HPS hps, ULONG flOptions, LONG lCount,
+LONG APIENTRY GpiQueryBackColor (HPS hps);
+LONG APIENTRY GpiQueryBackMix (HPS hps);
+BOOL APIENTRY GpiQueryCharAngle (HPS hps, PGRADIENTL pgradlAngle);
+BOOL APIENTRY GpiQueryCharBox (HPS hps, PSIZEF psizfxSize);
+BOOL APIENTRY GpiQueryCharBreakExtra (HPS hps, PFIXED BreakExtra);
+LONG APIENTRY GpiQueryCharDirection (HPS hps);
+BOOL APIENTRY GpiQueryCharExtra (HPS hps, PFIXED Extra);
+LONG APIENTRY GpiQueryCharMode (HPS hps);
+LONG APIENTRY GpiQueryCharSet (HPS hps);
+BOOL APIENTRY GpiQueryCharShear (HPS hps, PPOINTL pptlShear);
+BOOL APIENTRY GpiQueryCharStringPos (HPS hps, ULONG flOptions, LONG lCount,
     PCCH pchString, PLONG alXincrements, PPOINTL aptlPositions);
-BOOL GpiQueryCharStringPosAt (HPS hps, PPOINTL pptlStart, ULONG flOptions,
+BOOL APIENTRY GpiQueryCharStringPosAt (HPS hps, PPOINTL pptlStart, ULONG flOptions,
     LONG lCount, PCCH pchString, PLONG alXincrements, PPOINTL aptlPositions);
-LONG GpiQueryClipBox (HPS hps, PRECTL prclBound);
-HRGN GpiQueryClipRegion (HPS hps);
-LONG GpiQueryColor (HPS hps);
-BOOL GpiQueryColorData (HPS hps, LONG lCount, PLONG alArray);
-LONG GpiQueryColorIndex (HPS hps, ULONG flOptions, LONG lRgbColor);
-ULONG GpiQueryCp (HPS hps);
-BOOL GpiQueryCurrentPosition (HPS hps, PPOINTL pptlPoint);
-BOOL GpiQueryDefArcParams (HPS hps, PARCPARAMS parcpArcParams);
-BOOL GpiQueryDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
+LONG APIENTRY GpiQueryClipBox (HPS hps, PRECTL prclBound);
+HRGN APIENTRY GpiQueryClipRegion (HPS hps);
+LONG APIENTRY GpiQueryColor (HPS hps);
+BOOL APIENTRY GpiQueryColorData (HPS hps, LONG lCount, PLONG alArray);
+LONG APIENTRY GpiQueryColorIndex (HPS hps, ULONG flOptions, LONG lRgbColor);
+ULONG APIENTRY GpiQueryCp (HPS hps);
+BOOL APIENTRY GpiQueryCurrentPosition (HPS hps, PPOINTL pptlPoint);
+BOOL APIENTRY GpiQueryDefArcParams (HPS hps, PARCPARAMS parcpArcParams);
+BOOL APIENTRY GpiQueryDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
     PBUNDLE ppbunAttrs);
-BOOL GpiQueryDefCharBox (HPS hps, PSIZEL psizlSize);
-BOOL GpiQueryDefTag (HPS hps, PLONG plTag);
-BOOL GpiQueryDefViewingLimits (HPS hps, PRECTL prclLimits);
-BOOL GpiQueryDefaultViewMatrix (HPS hps, LONG lCount, PMATRIXLF pmatlfArray);
-LONG GpiQueryEditMode (HPS hps);
-LONG GpiQueryElement (HPS hps, LONG lOff, LONG lMaxLength, PBYTE pbData);
-LONG GpiQueryElementPointer (HPS hps);
-LONG GpiQueryElementType (HPS hps, PLONG plType, LONG lLength, PSZ pszData);
-ULONG GpiQueryFaceString (HPS PS, PCSZ FamilyName, PFACENAMEDESC attrs,
+BOOL APIENTRY GpiQueryDefCharBox (HPS hps, PSIZEL psizlSize);
+BOOL APIENTRY GpiQueryDefTag (HPS hps, PLONG plTag);
+BOOL APIENTRY GpiQueryDefViewingLimits (HPS hps, PRECTL prclLimits);
+BOOL APIENTRY GpiQueryDefaultViewMatrix (HPS hps, LONG lCount, PMATRIXLF pmatlfArray);
+LONG APIENTRY GpiQueryEditMode (HPS hps);
+LONG APIENTRY GpiQueryElement (HPS hps, LONG lOff, LONG lMaxLength, PBYTE pbData);
+LONG APIENTRY GpiQueryElementPointer (HPS hps);
+LONG APIENTRY GpiQueryElementType (HPS hps, PLONG plType, LONG lLength, PSZ pszData);
+ULONG APIENTRY GpiQueryFaceString (HPS PS, PCSZ FamilyName, PFACENAMEDESC attrs,
     LONG length, PSZ CompoundFaceName);
-ULONG GpiQueryFontAction (HAB anchor, ULONG options);
-LONG GpiQueryFontFileDescriptions (HAB hab, PCSZ pszFilename, PLONG plCount,
+ULONG APIENTRY GpiQueryFontAction (HAB anchor, ULONG options);
+LONG APIENTRY GpiQueryFontFileDescriptions (HAB hab, PCSZ pszFilename, PLONG plCount,
     PFFDESCS affdescsNames);
-BOOL GpiQueryFontMetrics (HPS hps, LONG lMetricsLength,
+BOOL APIENTRY GpiQueryFontMetrics (HPS hps, LONG lMetricsLength,
     PFONTMETRICS pfmMetrics);
-LONG GpiQueryFonts (HPS hps, ULONG flOptions, PCSZ pszFacename,
+LONG APIENTRY GpiQueryFonts (HPS hps, ULONG flOptions, PCSZ pszFacename,
     PLONG plReqFonts, LONG lMetricsLength, PFONTMETRICS afmMetrics);
-LONG GpiQueryFullFontFileDescs (HAB hab, PCSZ pszFilename, PLONG plCount,
+LONG APIENTRY GpiQueryFullFontFileDescs (HAB hab, PCSZ pszFilename, PLONG plCount,
     PVOID pNames, PLONG plNamesBuffLength);
-BOOL GpiQueryGraphicsField (HPS hps, PRECTL prclField);
-LONG GpiQueryKerningPairs (HPS hps, LONG lCount, PKERNINGPAIRS akrnprData);
-LONG GpiQueryLineEnd (HPS hps);
-LONG GpiQueryLineJoin (HPS hps);
-LONG GpiQueryLineType (HPS hps);
-FIXED GpiQueryLineWidth (HPS hps);
-LONG GpiQueryLineWidthGeom (HPS hps);
-LONG GpiQueryLogColorTable (HPS hps, ULONG flOptions, LONG lStart, LONG lCount,
+BOOL APIENTRY GpiQueryGraphicsField (HPS hps, PRECTL prclField);
+LONG APIENTRY GpiQueryKerningPairs (HPS hps, LONG lCount, PKERNINGPAIRS akrnprData);
+LONG APIENTRY GpiQueryLineEnd (HPS hps);
+LONG APIENTRY GpiQueryLineJoin (HPS hps);
+LONG APIENTRY GpiQueryLineType (HPS hps);
+FIXED APIENTRY GpiQueryLineWidth (HPS hps);
+LONG APIENTRY GpiQueryLineWidthGeom (HPS hps);
+LONG APIENTRY GpiQueryLogColorTable (HPS hps, ULONG flOptions, LONG lStart, LONG lCount,
     PLONG alArray);
-BOOL GpiQueryLogicalFont (HPS PS, LONG lcid, PSTR8 name, PFATTRS attrs,
+BOOL APIENTRY GpiQueryLogicalFont (HPS PS, LONG lcid, PSTR8 name, PFATTRS attrs,
     LONG length);
-LONG GpiQueryMarker (HPS hps);
-BOOL GpiQueryMarkerBox (HPS hps, PSIZEF psizfxSize);
-LONG GpiQueryMarkerSet (HPS hps);
-BOOL GpiQueryMetaFileBits (HMF hmf, LONG lOffset, LONG lLength, PBYTE pbData);
-LONG GpiQueryMetaFileLength (HMF hmf);
-LONG GpiQueryMix (HPS hps);
-BOOL GpiQueryModelTransformMatrix (HPS hps, LONG lCount,
+LONG APIENTRY GpiQueryMarker (HPS hps);
+BOOL APIENTRY GpiQueryMarkerBox (HPS hps, PSIZEF psizfxSize);
+LONG APIENTRY GpiQueryMarkerSet (HPS hps);
+BOOL APIENTRY GpiQueryMetaFileBits (HMF hmf, LONG lOffset, LONG lLength, PBYTE pbData);
+LONG APIENTRY GpiQueryMetaFileLength (HMF hmf);
+LONG APIENTRY GpiQueryMix (HPS hps);
+BOOL APIENTRY GpiQueryModelTransformMatrix (HPS hps, LONG lCount,
     PMATRIXLF pmatlfArray);
-LONG GpiQueryNearestColor (HPS hps, ULONG flOptions, LONG lRgbIn);
-LONG GpiQueryNumberSetIds (HPS hps);
-BOOL GpiQueryPageViewport (HPS hps, PRECTL prclViewport);
-HPAL GpiQueryPalette (HPS hps);
-LONG GpiQueryPaletteInfo (HPAL hpal, HPS  hps, ULONG flOptions,
+LONG APIENTRY GpiQueryNearestColor (HPS hps, ULONG flOptions, LONG lRgbIn);
+LONG APIENTRY GpiQueryNumberSetIds (HPS hps);
+BOOL APIENTRY GpiQueryPageViewport (HPS hps, PRECTL prclViewport);
+HPAL APIENTRY GpiQueryPalette (HPS hps);
+LONG APIENTRY GpiQueryPaletteInfo (HPAL hpal, HPS  hps, ULONG flOptions,
     ULONG ulStart, ULONG ulCount, PULONG aulArray);
-LONG GpiQueryPattern (HPS hps);
-BOOL GpiQueryPatternRefPoint (HPS hps, PPOINTL pptlRefPoint);
-LONG GpiQueryPatternSet (HPS hps);
-LONG GpiQueryRealColors (HPS hps, ULONG flOptions, LONG lStart, LONG lCount,
+LONG APIENTRY GpiQueryPattern (HPS hps);
+BOOL APIENTRY GpiQueryPatternRefPoint (HPS hps, PPOINTL pptlRefPoint);
+LONG APIENTRY GpiQueryPatternSet (HPS hps);
+LONG APIENTRY GpiQueryRealColors (HPS hps, ULONG flOptions, LONG lStart, LONG lCount,
     PLONG alColors);
-LONG GpiQueryRegionBox (HPS hps, HRGN hrgn, PRECTL prclBound);
-BOOL GpiQueryRegionRects (HPS hps, HRGN hrgn, PRECTL prclBound,
+LONG APIENTRY GpiQueryRegionBox (HPS hps, HRGN hrgn, PRECTL prclBound);
+BOOL APIENTRY GpiQueryRegionRects (HPS hps, HRGN hrgn, PRECTL prclBound,
     PRGNRECT prgnrcControl, PRECTL prclRect);
-LONG GpiQueryRGBColor (HPS hps, ULONG flOptions, LONG lColorIndex);
-BOOL GpiQuerySegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount,
+LONG APIENTRY GpiQueryRGBColor (HPS hps, ULONG flOptions, LONG lColorIndex);
+BOOL APIENTRY GpiQuerySegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount,
     PMATRIXLF pmatlfArray);
-BOOL GpiQuerySetIds (HPS hps, LONG lCount, PLONG alTypes, PSTR8 aNames,
+BOOL APIENTRY GpiQuerySetIds (HPS hps, LONG lCount, PLONG alTypes, PSTR8 aNames,
     PLONG allcids);
-BOOL GpiQueryTextAlignment (HPS hps, PLONG plHoriz, PLONG plVert);
-BOOL GpiQueryTextBox (HPS hps, LONG lCount1, PCH pchString, LONG lCount2,
+BOOL APIENTRY GpiQueryTextAlignment (HPS hps, PLONG plHoriz, PLONG plVert);
+BOOL APIENTRY GpiQueryTextBox (HPS hps, LONG lCount1, PCH pchString, LONG lCount2,
     PPOINTL aptlPoints);
-BOOL GpiQueryViewingLimits (HPS hps, PRECTL prclLimits);
-BOOL GpiQueryViewingTransformMatrix (HPS hps, LONG lCount,
+BOOL APIENTRY GpiQueryViewingLimits (HPS hps, PRECTL prclLimits);
+BOOL APIENTRY GpiQueryViewingTransformMatrix (HPS hps, LONG lCount,
     PMATRIXLF pmatlfArray);
-BOOL GpiQueryWidthTable (HPS hps, LONG lFirstChar, LONG lCount, PLONG alData);
-LONG GpiRectInRegion (HPS hps, HRGN hrgn, __const__ RECTL *prclRect);
-LONG GpiRectVisible (HPS hps, __const__ RECTL *prclRectangle);
-BOOL GpiRotate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions, FIXED fxAngle,
+BOOL APIENTRY GpiQueryWidthTable (HPS hps, LONG lFirstChar, LONG lCount, PLONG alData);
+LONG APIENTRY GpiRectInRegion (HPS hps, HRGN hrgn, __const__ RECTL *prclRect);
+LONG APIENTRY GpiRectVisible (HPS hps, __const__ RECTL *prclRectangle);
+BOOL APIENTRY GpiRotate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions, FIXED fxAngle,
     __const__ POINTL *pptlCenter);
-BOOL GpiSaveMetaFile (HMF hmf, PCSZ pszFilename);
-BOOL GpiScale (HPS hps, PMATRIXLF pmfatlfArray, LONG lOptions,
+BOOL APIENTRY GpiSaveMetaFile (HMF hmf, PCSZ pszFilename);
+BOOL APIENTRY GpiScale (HPS hps, PMATRIXLF pmfatlfArray, LONG lOptions,
     __const__ FIXED *afxScale, __const__ POINTL *pptlCenter);
-HPAL GpiSelectPalette (HPS hps, HPAL hpal);
-BOOL GpiSetArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams);
-BOOL GpiSetAttrMode (HPS hps, LONG lMode);
-BOOL GpiSetAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask, ULONG flDefMask,
+HPAL APIENTRY GpiSelectPalette (HPS hps, HPAL hpal);
+BOOL APIENTRY GpiSetArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams);
+BOOL APIENTRY GpiSetAttrMode (HPS hps, LONG lMode);
+BOOL APIENTRY GpiSetAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask, ULONG flDefMask,
     __const__ VOID *ppbunAttrs);
-BOOL GpiSetBackColor (HPS hps, LONG lColor);
-BOOL GpiSetBackMix (HPS hps, LONG lMixMode);
-BOOL GpiSetCharAngle (HPS hps, __const__ GRADIENTL *pgradlAngle);
-BOOL GpiSetCharBox (HPS hps, __const__ SIZEF *psizfxBox);
-BOOL GpiSetCharBreakExtra (HPS hps, FIXED BreakExtra);
-BOOL GpiSetCharDirection (HPS hps, LONG lDirection);
-BOOL GpiSetCharExtra (HPS hps, FIXED  Extra);
-BOOL GpiSetCharMode (HPS hps, LONG lMode);
-BOOL GpiSetCharSet (HPS hps, LONG llcid);
-BOOL GpiSetCharShear (HPS hps, __const__ POINTL *pptlAngle);
-BOOL GpiSetClipPath (HPS hps, LONG lPath, LONG lOptions);
-LONG GpiSetClipRegion (HPS hps, HRGN hrgn, PHRGN phrgnOld);
-BOOL GpiSetColor (HPS hps, LONG lColor);
-BOOL GpiSetCp (HPS hps, ULONG ulCodePage);
-BOOL GpiSetCurrentPosition (HPS hps, __const__ POINTL *pptlPoint);
-BOOL GpiSetDefArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams);
-BOOL GpiSetDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
+BOOL APIENTRY GpiSetBackColor (HPS hps, LONG lColor);
+BOOL APIENTRY GpiSetBackMix (HPS hps, LONG lMixMode);
+BOOL APIENTRY GpiSetCharAngle (HPS hps, __const__ GRADIENTL *pgradlAngle);
+BOOL APIENTRY GpiSetCharBox (HPS hps, __const__ SIZEF *psizfxBox);
+BOOL APIENTRY GpiSetCharBreakExtra (HPS hps, FIXED BreakExtra);
+BOOL APIENTRY GpiSetCharDirection (HPS hps, LONG lDirection);
+BOOL APIENTRY GpiSetCharExtra (HPS hps, FIXED  Extra);
+BOOL APIENTRY GpiSetCharMode (HPS hps, LONG lMode);
+BOOL APIENTRY GpiSetCharSet (HPS hps, LONG llcid);
+BOOL APIENTRY GpiSetCharShear (HPS hps, __const__ POINTL *pptlAngle);
+BOOL APIENTRY GpiSetClipPath (HPS hps, LONG lPath, LONG lOptions);
+LONG APIENTRY GpiSetClipRegion (HPS hps, HRGN hrgn, PHRGN phrgnOld);
+BOOL APIENTRY GpiSetColor (HPS hps, LONG lColor);
+BOOL APIENTRY GpiSetCp (HPS hps, ULONG ulCodePage);
+BOOL APIENTRY GpiSetCurrentPosition (HPS hps, __const__ POINTL *pptlPoint);
+BOOL APIENTRY GpiSetDefArcParams (HPS hps, __const__ ARCPARAMS *parcpArcParams);
+BOOL APIENTRY GpiSetDefAttrs (HPS hps, LONG lPrimType, ULONG flAttrMask,
     __const__ VOID *ppbunAttrs);
-BOOL GpiSetDefaultViewMatrix (HPS hps, LONG lCount,
+BOOL APIENTRY GpiSetDefaultViewMatrix (HPS hps, LONG lCount,
     __const__ MATRIXLF *pmatlfarray, LONG lOptions);
-BOOL GpiSetDefTag (HPS hps, LONG lTag);
-BOOL GpiSetDefViewingLimits (HPS hps, __const__ RECTL *prclLimits);
-BOOL GpiSetEditMode (HPS hps, LONG lMode);
-BOOL GpiSetElementPointer (HPS hps, LONG lElement);
-BOOL GpiSetElementPointerAtLabel (HPS hps, LONG lLabel);
-BOOL GpiSetGraphicsField (HPS hps, __const__ RECTL *prclField);
-BOOL GpiSetLineEnd (HPS hps, LONG lLineEnd);
-BOOL GpiSetLineJoin (HPS hps, LONG lLineJoin);
-BOOL GpiSetLineType (HPS hps, LONG lLineType);
-BOOL GpiSetLineWidth (HPS hps, FIXED fxLineWidth);
-BOOL GpiSetLineWidthGeom (HPS hps, LONG lLineWidth);
-BOOL GpiSetMarker (HPS hps, LONG lSymbol);
-BOOL GpiSetMarkerBox (HPS hps, __const__ SIZEF *psizfxSize);
-BOOL GpiSetMarkerSet (HPS hps, LONG lSet);
-BOOL GpiSetMetaFileBits (HMF hmf, LONG lOffset, LONG lLength,
+BOOL APIENTRY GpiSetDefTag (HPS hps, LONG lTag);
+BOOL APIENTRY GpiSetDefViewingLimits (HPS hps, __const__ RECTL *prclLimits);
+BOOL APIENTRY GpiSetEditMode (HPS hps, LONG lMode);
+BOOL APIENTRY GpiSetElementPointer (HPS hps, LONG lElement);
+BOOL APIENTRY GpiSetElementPointerAtLabel (HPS hps, LONG lLabel);
+BOOL APIENTRY GpiSetGraphicsField (HPS hps, __const__ RECTL *prclField);
+BOOL APIENTRY GpiSetLineEnd (HPS hps, LONG lLineEnd);
+BOOL APIENTRY GpiSetLineJoin (HPS hps, LONG lLineJoin);
+BOOL APIENTRY GpiSetLineType (HPS hps, LONG lLineType);
+BOOL APIENTRY GpiSetLineWidth (HPS hps, FIXED fxLineWidth);
+BOOL APIENTRY GpiSetLineWidthGeom (HPS hps, LONG lLineWidth);
+BOOL APIENTRY GpiSetMarker (HPS hps, LONG lSymbol);
+BOOL APIENTRY GpiSetMarkerBox (HPS hps, __const__ SIZEF *psizfxSize);
+BOOL APIENTRY GpiSetMarkerSet (HPS hps, LONG lSet);
+BOOL APIENTRY GpiSetMetaFileBits (HMF hmf, LONG lOffset, LONG lLength,
     __const__ BYTE *pbBuffer);
-BOOL GpiSetMix (HPS hps, LONG lMixMode);
-BOOL GpiSetModelTransformMatrix (HPS hps, LONG lCount,
+BOOL APIENTRY GpiSetMix (HPS hps, LONG lMixMode);
+BOOL APIENTRY GpiSetModelTransformMatrix (HPS hps, LONG lCount,
     __const__ MATRIXLF *pmatlfArray, LONG lOptions);
-BOOL GpiSetPageViewport (HPS hps, __const__ RECTL *prclViewport);
-BOOL GpiSetPaletteEntries (HPAL hpal, ULONG ulFormat, ULONG ulStart,
+BOOL APIENTRY GpiSetPageViewport (HPS hps, __const__ RECTL *prclViewport);
+BOOL APIENTRY GpiSetPaletteEntries (HPAL hpal, ULONG ulFormat, ULONG ulStart,
     ULONG ulCount, __const__ ULONG *aulTable);
-BOOL GpiSetPattern (HPS hps, LONG lPatternSymbol);
-BOOL GpiSetPatternRefPoint (HPS hps, __const__ POINTL *pptlRefPoint);
-BOOL GpiSetPatternSet (HPS hps, LONG lSet);
-BOOL GpiSetRegion (HPS hps, HRGN hrgn, LONG lcount,
+BOOL APIENTRY GpiSetPattern (HPS hps, LONG lPatternSymbol);
+BOOL APIENTRY GpiSetPatternRefPoint (HPS hps, __const__ POINTL *pptlRefPoint);
+BOOL APIENTRY GpiSetPatternSet (HPS hps, LONG lSet);
+BOOL APIENTRY GpiSetRegion (HPS hps, HRGN hrgn, LONG lcount,
     __const__ RECTL *arclRectangles);
-BOOL GpiSetSegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount,
+BOOL APIENTRY GpiSetSegmentTransformMatrix (HPS hps, LONG lSegid, LONG lCount,
     __const__ MATRIXLF *pmatlfarray, LONG lOptions);
-BOOL GpiSetTextAlignment (HPS hps, LONG lHoriz, LONG lVert);
-BOOL GpiSetViewingLimits (HPS hps, __const__ RECTL *prclLimits);
-BOOL GpiSetViewingTransformMatrix (HPS hps, LONG lCount,
+BOOL APIENTRY GpiSetTextAlignment (HPS hps, LONG lHoriz, LONG lVert);
+BOOL APIENTRY GpiSetViewingLimits (HPS hps, __const__ RECTL *prclLimits);
+BOOL APIENTRY GpiSetViewingTransformMatrix (HPS hps, LONG lCount,
     __const__ MATRIXLF *pmatlfArray, LONG lOptions);
-LONG GpiStrokePath (HPS hps, LONG lPath, ULONG flOptions);
-BOOL GpiTranslate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions,
+LONG APIENTRY GpiStrokePath (HPS hps, LONG lPath, ULONG flOptions);
+BOOL APIENTRY GpiTranslate (HPS hps, PMATRIXLF pmatlfArray, LONG lOptions,
     __const__ POINTL *pptlTranslation);
-BOOL GpiUnloadFonts (HAB hab, PCSZ pszFilename);
-BOOL GpiUnloadPublicFonts (HAB hab, PCSZ pszFilename);
+BOOL APIENTRY GpiUnloadFonts (HAB hab, PCSZ pszFilename);
+BOOL APIENTRY GpiUnloadPublicFonts (HAB hab, PCSZ pszFilename);
 
 
@@ -8554,11 +8595,11 @@
 
 
-LONG GpiBitBlt (HPS hpsTarget, HPS hpsSource, LONG lCount,
+LONG APIENTRY GpiBitBlt (HPS hpsTarget, HPS hpsSource, LONG lCount,
     __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions);
-BOOL GpiDeleteBitmap (HBITMAP hbm);
-HBITMAP GpiLoadBitmap (HPS hps, HMODULE Resource, ULONG idBitmap,
+BOOL APIENTRY GpiDeleteBitmap (HBITMAP hbm);
+HBITMAP APIENTRY GpiLoadBitmap (HPS hps, HMODULE Resource, ULONG idBitmap,
     LONG lWidth, LONG lHeight);
-HBITMAP GpiSetBitmap (HPS hps, HBITMAP hbm);
-LONG GpiWCBitBlt (HPS hpsTarget, HBITMAP hbmSource, LONG lCount,
+HBITMAP APIENTRY GpiSetBitmap (HPS hps, HBITMAP hbm);
+LONG APIENTRY GpiWCBitBlt (HPS hpsTarget, HBITMAP hbmSource, LONG lCount,
     __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions);
 
@@ -8735,25 +8776,25 @@
 
 
-HBITMAP GpiCreateBitmap (HPS hps, __const__ BITMAPINFOHEADER2 *pbmpNew,
+HBITMAP APIENTRY GpiCreateBitmap (HPS hps, __const__ BITMAPINFOHEADER2 *pbmpNew,
     ULONG flOptions, __const__ BYTE *pbInitData,
     __const__ BITMAPINFO2 *pbmiInfoTable);
-LONG GpiDrawBits (HPS hps, __const__ VOID *pBits,
+LONG APIENTRY GpiDrawBits (HPS hps, __const__ VOID *pBits,
     __const__ BITMAPINFO2 *pbmiInfoTable, LONG lCount,
     __const__ POINTL *aptlPoints, LONG lRop, ULONG flOptions);
-LONG GpiFloodFill (HPS hps, LONG lOptions, LONG lColor);
-LONG GpiQueryBitmapBits (HPS hps, LONG lScanStart, LONG lScans, PBYTE pbBuffer,
+LONG APIENTRY GpiFloodFill (HPS hps, LONG lOptions, LONG lColor);
+LONG APIENTRY GpiQueryBitmapBits (HPS hps, LONG lScanStart, LONG lScans, PBYTE pbBuffer,
     PBITMAPINFO2 pbmiInfoTable);
-BOOL GpiQueryBitmapDimension (HBITMAP hbm, PSIZEL psizlBitmapDimension);
-HBITMAP GpiQueryBitmapHandle (HPS hps, LONG lLcid);
-BOOL GpiQueryBitmapInfoHeader (HBITMAP hbm, PBITMAPINFOHEADER2 pbmpData);
-BOOL GpiQueryBitmapParameters (HBITMAP hbm, PBITMAPINFOHEADER pbmpData);
-BOOL GpiQueryDeviceBitmapFormats (HPS hps, LONG lCount, PLONG alArray);
-LONG  GpiSetBitmapBits (HPS hps, LONG lScanStart, LONG lScans,
+BOOL APIENTRY GpiQueryBitmapDimension (HBITMAP hbm, PSIZEL psizlBitmapDimension);
+HBITMAP APIENTRY GpiQueryBitmapHandle (HPS hps, LONG lLcid);
+BOOL APIENTRY GpiQueryBitmapInfoHeader (HBITMAP hbm, PBITMAPINFOHEADER2 pbmpData);
+BOOL APIENTRY GpiQueryBitmapParameters (HBITMAP hbm, PBITMAPINFOHEADER pbmpData);
+BOOL APIENTRY GpiQueryDeviceBitmapFormats (HPS hps, LONG lCount, PLONG alArray);
+LONG APIENTRY  GpiSetBitmapBits (HPS hps, LONG lScanStart, LONG lScans,
     __const__ BYTE *pbBuffer, __const__ BITMAPINFO2 *pbmiInfoTable);
-LONG GpiQueryPel (HPS hps, PPOINTL pptlPoint);
-BOOL GpiSetBitmapDimension (HBITMAP hbm,
+LONG APIENTRY GpiQueryPel (HPS hps, PPOINTL pptlPoint);
+BOOL APIENTRY GpiSetBitmapDimension (HBITMAP hbm,
     __const__ SIZEL *psizlBitmapDimension);
-BOOL GpiSetBitmapId (HPS hps, HBITMAP hbm, LONG lLcid);
-LONG GpiSetPel (HPS hps, __const__ POINTL *pptlPoint);
+BOOL APIENTRY GpiSetBitmapId (HPS hps, HBITMAP hbm, LONG lLcid);
+LONG APIENTRY GpiSetPel (HPS hps, __const__ POINTL *pptlPoint);
 
 
@@ -8787,11 +8828,11 @@
 
 
-BOOL GpiAssociate (HPS hps, HDC hdc);
-HPS GpiCreatePS (HAB hab, HDC hdc, PSIZEL psizlSize, ULONG flOptions);
-BOOL GpiDestroyPS (HPS hps);
-BOOL GpiErase (HPS hps);
-HDC GpiQueryDevice (HPS hps);
-BOOL GpiRestorePS (HPS hps, LONG lPSid);
-LONG GpiSavePS (HPS hps);
+BOOL APIENTRY GpiAssociate (HPS hps, HDC hdc);
+HPS APIENTRY GpiCreatePS (HAB hab, HDC hdc, PSIZEL psizlSize, ULONG flOptions);
+BOOL APIENTRY GpiDestroyPS (HPS hps);
+BOOL APIENTRY GpiErase (HPS hps);
+HDC APIENTRY GpiQueryDevice (HPS hps);
+BOOL APIENTRY GpiRestorePS (HPS hps, LONG lPSid);
+LONG APIENTRY GpiSavePS (HPS hps);
 
 #endif /* INCL_GPICONTROL */
@@ -8835,14 +8876,14 @@
 
 
-LONG GpiErrorSegmentData (HPS hps, PLONG plSegment, PLONG plContext);
-LONG GpiQueryDrawControl (HPS hps, LONG lControl);
-LONG GpiQueryDrawingMode (HPS hps);
-ULONG GpiQueryPS (HPS hps, PSIZEL psizlSize);
-BOOL GpiResetPS (HPS hps, ULONG flOptions);
-LONG GpiQueryStopDraw (HPS hps);
-BOOL GpiSetDrawControl (HPS hps, LONG lControl, LONG lValue);
-BOOL GpiSetDrawingMode (HPS hps, LONG lMode);
-BOOL GpiSetPS (HPS hps, __const__ SIZEL *psizlsize, ULONG flOptions);
-BOOL GpiSetStopDraw (HPS hps, LONG lValue);
+LONG APIENTRY GpiErrorSegmentData (HPS hps, PLONG plSegment, PLONG plContext);
+LONG APIENTRY GpiQueryDrawControl (HPS hps, LONG lControl);
+LONG APIENTRY GpiQueryDrawingMode (HPS hps);
+ULONG APIENTRY GpiQueryPS (HPS hps, PSIZEL psizlSize);
+BOOL APIENTRY GpiResetPS (HPS hps, ULONG flOptions);
+LONG APIENTRY GpiQueryStopDraw (HPS hps);
+BOOL APIENTRY GpiSetDrawControl (HPS hps, LONG lControl, LONG lValue);
+BOOL APIENTRY GpiSetDrawingMode (HPS hps, LONG lMode);
+BOOL APIENTRY GpiSetPS (HPS hps, __const__ SIZEL *psizlsize, ULONG flOptions);
+BOOL APIENTRY GpiSetStopDraw (HPS hps, LONG lValue);
 
 #endif /* INCL_GPICONTROL */
@@ -8860,20 +8901,20 @@
 
 
-LONG GpiCorrelateChain (HPS hps, LONG lType, __const__ POINTL *pptlPick,
+LONG APIENTRY GpiCorrelateChain (HPS hps, LONG lType, __const__ POINTL *pptlPick,
     LONG lMaxHits, LONG lMaxDepth, PLONG pl2);
-LONG GpiCorrelateFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment,
+LONG APIENTRY GpiCorrelateFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment,
     LONG lType, __const__ POINTL *pptlPick, LONG lMaxHits, LONG lMaxDepth,
     PLONG plSegTag);
-LONG GpiCorrelateSegment (HPS hps, LONG lSegment, LONG lType,
+LONG APIENTRY GpiCorrelateSegment (HPS hps, LONG lSegment, LONG lType,
     __const__ POINTL *pptlPick, LONG lMaxHits, LONG lMaxDepth, PLONG alSegTag);
-BOOL GpiQueryBoundaryData (HPS hps, PRECTL prclBoundary);
-BOOL GpiQueryPickAperturePosition (HPS hps, PPOINTL pptlPoint);
-BOOL GpiQueryPickApertureSize (HPS hps, PSIZEL psizlSize);
-BOOL GpiQueryTag (HPS hps, PLONG plTag);
-BOOL GpiResetBoundaryData (HPS hps);
-BOOL GpiSetPickAperturePosition (HPS hps, __const__ POINTL *pptlPick);
-BOOL GpiSetPickApertureSize (HPS hps, LONG lOptions,
+BOOL APIENTRY GpiQueryBoundaryData (HPS hps, PRECTL prclBoundary);
+BOOL APIENTRY GpiQueryPickAperturePosition (HPS hps, PPOINTL pptlPoint);
+BOOL APIENTRY GpiQueryPickApertureSize (HPS hps, PSIZEL psizlSize);
+BOOL APIENTRY GpiQueryTag (HPS hps, PLONG plTag);
+BOOL APIENTRY GpiResetBoundaryData (HPS hps);
+BOOL APIENTRY GpiSetPickAperturePosition (HPS hps, __const__ POINTL *pptlPick);
+BOOL APIENTRY GpiSetPickApertureSize (HPS hps, LONG lOptions,
     __const__ SIZEL *psizlSize);
-BOOL GpiSetTag (HPS hps, LONG lTag);
+BOOL APIENTRY GpiSetTag (HPS hps, LONG lTag);
 
 #endif /* INCL_GPICORRELATION */
@@ -8890,7 +8931,7 @@
 
 
-BOOL GpiBeginInkPath (HPS hps, LONG lPath, ULONG flOptions);
-BOOL GpiEndInkPath (HPS hps, ULONG flOptions);
-LONG GpiStrokeInkPath (HPS hps, LONG lPath, LONG lCount,
+BOOL APIENTRY GpiBeginInkPath (HPS hps, LONG lPath, ULONG flOptions);
+BOOL APIENTRY GpiEndInkPath (HPS hps, ULONG flOptions);
+LONG APIENTRY GpiStrokeInkPath (HPS hps, LONG lPath, LONG lCount,
     __const__ POINTL *aptlPoints, ULONG flOptions);
 
@@ -8922,24 +8963,24 @@
 
 
-BOOL GpiCloseSegment (HPS hps);
-BOOL GpiDeleteSegment (HPS hps, LONG lSegid);
-BOOL GpiDeleteSegments (HPS hps, LONG lFirstSegment, LONG lLastSegment);
-BOOL GpiDrawChain (HPS hps);
-BOOL GpiDrawDynamics (HPS hps);
-BOOL GpiDrawFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment);
-BOOL GpiDrawSegment (HPS hps, LONG lSegment);
-LONG GpiGetData (HPS hps, LONG lSegid, PLONG plOffset, LONG lFormat,
+BOOL APIENTRY GpiCloseSegment (HPS hps);
+BOOL APIENTRY GpiDeleteSegment (HPS hps, LONG lSegid);
+BOOL APIENTRY GpiDeleteSegments (HPS hps, LONG lFirstSegment, LONG lLastSegment);
+BOOL APIENTRY GpiDrawChain (HPS hps);
+BOOL APIENTRY GpiDrawDynamics (HPS hps);
+BOOL APIENTRY GpiDrawFrom (HPS hps, LONG lFirstSegment, LONG lLastSegment);
+BOOL APIENTRY GpiDrawSegment (HPS hps, LONG lSegment);
+LONG APIENTRY GpiGetData (HPS hps, LONG lSegid, PLONG plOffset, LONG lFormat,
     LONG lLength, PBYTE pbData);
-BOOL GpiOpenSegment (HPS hps, LONG lSegment);
-LONG GpiPutData (HPS hps, LONG lFormat, PLONG plCount, __const__ BYTE *pbData);
-LONG GpiQueryInitialSegmentAttrs (HPS hps, LONG lAttribute);
-LONG GpiQuerySegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute);
-LONG GpiQuerySegmentNames (HPS hps, LONG lFirstSegid, LONG lLastSegid,
+BOOL APIENTRY GpiOpenSegment (HPS hps, LONG lSegment);
+LONG APIENTRY GpiPutData (HPS hps, LONG lFormat, PLONG plCount, __const__ BYTE *pbData);
+LONG APIENTRY GpiQueryInitialSegmentAttrs (HPS hps, LONG lAttribute);
+LONG APIENTRY GpiQuerySegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute);
+LONG APIENTRY GpiQuerySegmentNames (HPS hps, LONG lFirstSegid, LONG lLastSegid,
     LONG lMax, PLONG alSegids);
-LONG GpiQuerySegmentPriority (HPS hps, LONG lRefSegid, LONG lOrder);
-BOOL GpiRemoveDynamics (HPS hps, LONG lFirstSegid, LONG lLastSegid);
-BOOL GpiSetInitialSegmentAttrs (HPS hps, LONG lAttribute, LONG lValue);
-BOOL GpiSetSegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute, LONG lValue);
-BOOL GpiSetSegmentPriority (HPS hps, LONG lSegid, LONG lRefSegid, LONG lOrder);
+LONG APIENTRY GpiQuerySegmentPriority (HPS hps, LONG lRefSegid, LONG lOrder);
+BOOL APIENTRY GpiRemoveDynamics (HPS hps, LONG lFirstSegid, LONG lLastSegid);
+BOOL APIENTRY GpiSetInitialSegmentAttrs (HPS hps, LONG lAttribute, LONG lValue);
+BOOL APIENTRY GpiSetSegmentAttrs (HPS hps, LONG lSegid, LONG lAttribute, LONG lValue);
+BOOL APIENTRY GpiSetSegmentPriority (HPS hps, LONG lSegid, LONG lRefSegid, LONG lOrder);
 
 #endif /* INCL_GPISEGMENTS */
@@ -9210,15 +9251,15 @@
 typedef HCINFO *PHCINFO;
 
-HMF DevCloseDC (HDC hdc);
-LONG DevEscape (HDC hdc, LONG lCode, LONG lInCount, PBYTE pbInData,
+HMF APIENTRY DevCloseDC (HDC hdc);
+LONG APIENTRY DevEscape (HDC hdc, LONG lCode, LONG lInCount, PBYTE pbInData,
     PLONG plOutCount, PBYTE pbOutData);
-HDC DevOpenDC (HAB hab, LONG lType, PCSZ pszToken, LONG lCount,
+HDC APIENTRY DevOpenDC (HAB hab, LONG lType, PCSZ pszToken, LONG lCount,
     PDEVOPENDATA pdopData, HDC hdcComp);
-LONG DevPostDeviceModes (HAB hab, PDRIVDATA pdrivDriverData ,
+LONG APIENTRY DevPostDeviceModes (HAB hab, PDRIVDATA pdrivDriverData ,
     PCSZ pszDriverName, PCSZ pszDeviceName, PCSZ pszName, ULONG flOptions);
-BOOL DevQueryCaps (HDC hdc, LONG lStart, LONG lCount, PLONG alArray);
-BOOL DevQueryDeviceNames (HAB hab, PCSZ pszDriverName, PLONG pldn,
+BOOL APIENTRY DevQueryCaps (HDC hdc, LONG lStart, LONG lCount, PLONG alArray);
+BOOL APIENTRY DevQueryDeviceNames (HAB hab, PCSZ pszDriverName, PLONG pldn,
     PSTR32 aDeviceName, PSTR64 aDeviceDesc, PLONG pldt, PSTR16 aDataType);
-LONG DevQueryHardcopyCaps (HDC hdc, LONG lStartForm, LONG lForms,
+LONG APIENTRY DevQueryHardcopyCaps (HDC hdc, LONG lStartForm, LONG lForms,
     PHCINFO phciHcInfo);
 
@@ -9343,20 +9384,20 @@
 
 
-HPROGRAM PrfAddProgram (HINI hini, PPROGDETAILS pDetails, HPROGRAM hprogGroup);
-BOOL PrfChangeProgram (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails);
-HPROGRAM PrfCreateGroup (HINI hini, PCSZ pszTitle, UCHAR chVisibility);
-BOOL PrfDestroyGroup (HINI hini, HPROGRAM hprogGroup);
-PROGCATEGORY PrfQueryProgramCategory (HINI hini, PCSZ pszExe);
-ULONG PrfQueryProgramHandle (HINI hini, PCSZ pszExe,
+HPROGRAM APIENTRY PrfAddProgram (HINI hini, PPROGDETAILS pDetails, HPROGRAM hprogGroup);
+BOOL APIENTRY PrfChangeProgram (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails);
+HPROGRAM APIENTRY PrfCreateGroup (HINI hini, PCSZ pszTitle, UCHAR chVisibility);
+BOOL APIENTRY PrfDestroyGroup (HINI hini, HPROGRAM hprogGroup);
+PROGCATEGORY APIENTRY PrfQueryProgramCategory (HINI hini, PCSZ pszExe);
+ULONG APIENTRY PrfQueryProgramHandle (HINI hini, PCSZ pszExe,
     PHPROGARRAY phprogArray, ULONG cchBufferMax, PULONG pulCount);
-ULONG PrfQueryProgramTitles (HINI hini, HPROGRAM hprogGroup,
+ULONG APIENTRY PrfQueryProgramTitles (HINI hini, HPROGRAM hprogGroup,
     PPROGTITLE pTitles, ULONG ulBufferLength, PULONG pulCount);
-ULONG PrfQueryDefinition (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails,
+ULONG APIENTRY PrfQueryDefinition (HINI hini, HPROGRAM hprog, PPROGDETAILS pDetails,
     ULONG ulBufferLength);
-BOOL PrfRemoveProgram (HINI hini, HPROGRAM hprog);
-
-HAPP WinStartApp (HWND hwndNotify, PPROGDETAILS pDetails,
+BOOL APIENTRY PrfRemoveProgram (HINI hini, HPROGRAM hprog);
+
+HAPP APIENTRY WinStartApp (HWND hwndNotify, PPROGDETAILS pDetails,
     PCSZ pszParams, PVOID Reserved, ULONG fbOptions);
-BOOL WinTerminateApp (HAPP happ);
+BOOL APIENTRY WinTerminateApp (HAPP happ);
 
 #endif /* INCL_WINPROGRAMLIST */
@@ -9386,6 +9427,6 @@
 typedef SWCNTRL *PSWCNTRL;
 
-HSWITCH WinAddSwitchEntry (__const__ SWCNTRL *pswctl);
-ULONG WinRemoveSwitchEntry (HSWITCH hsw);
+HSWITCH APIENTRY WinAddSwitchEntry (__const__ SWCNTRL *pswctl);
+ULONG APIENTRY WinRemoveSwitchEntry (HSWITCH hsw);
 
 #endif /* INCL_WINSWITCHLIST || !INCL_NOCOMMON */
@@ -9408,14 +9449,14 @@
 
 
-ULONG WinChangeSwitchEntry (HSWITCH hsw, __const__ SWCNTRL *pswctl);
-HSWITCH WinCreateSwitchEntry (HAB hab, __const__ SWCNTRL *pswctl);
-ULONG WinQuerySessionTitle (HAB hab, ULONG usSession, PSZ pszTitle,
+ULONG APIENTRY WinChangeSwitchEntry (HSWITCH hsw, __const__ SWCNTRL *pswctl);
+HSWITCH APIENTRY WinCreateSwitchEntry (HAB hab, __const__ SWCNTRL *pswctl);
+ULONG APIENTRY WinQuerySessionTitle (HAB hab, ULONG usSession, PSZ pszTitle,
     ULONG usTitlelen);
-ULONG WinQuerySwitchEntry (HSWITCH hsw, PSWCNTRL pswctl);
-HSWITCH WinQuerySwitchHandle (HWND hwnd, PID pid);
-ULONG WinQuerySwitchList (HAB hab, PSWBLOCK pswblk, ULONG usDataLength);
-ULONG WinQueryTaskSizePos (HAB hab, ULONG usScreenGroup, PSWP pswp);
-ULONG WinQueryTaskTitle (ULONG usSession, PSZ pszTitle, ULONG usTitlelen);
-ULONG WinSwitchToProgram (HSWITCH hsw);
+ULONG APIENTRY WinQuerySwitchEntry (HSWITCH hsw, PSWCNTRL pswctl);
+HSWITCH APIENTRY WinQuerySwitchHandle (HWND hwnd, PID pid);
+ULONG APIENTRY WinQuerySwitchList (HAB hab, PSWBLOCK pswblk, ULONG usDataLength);
+ULONG APIENTRY WinQueryTaskSizePos (HAB hab, ULONG usScreenGroup, PSWP pswp);
+ULONG APIENTRY WinQueryTaskTitle (ULONG usSession, PSZ pszTitle, ULONG usTitlelen);
+ULONG APIENTRY WinSwitchToProgram (HSWITCH hsw);
 
 #endif /* INCL_WINSWITCHLIST */
@@ -9426,18 +9467,18 @@
 #define PL_ALTERED			0x008e
 
-BOOL PrfCloseProfile (HINI hini);
-HINI PrfOpenProfile (HAB hab, PCSZ pszFileName);
-BOOL PrfQueryProfile (HAB hab, PPRFPROFILE pPrfProfile);
-BOOL PrfQueryProfileData (HINI hini, PCSZ pszApp, PCSZ pszKey, PVOID pBuffer,
+BOOL APIENTRY PrfCloseProfile (HINI hini);
+HINI APIENTRY PrfOpenProfile (HAB hab, PCSZ pszFileName);
+BOOL APIENTRY PrfQueryProfile (HAB hab, PPRFPROFILE pPrfProfile);
+BOOL APIENTRY PrfQueryProfileData (HINI hini, PCSZ pszApp, PCSZ pszKey, PVOID pBuffer,
     PULONG pulBufferLength);
-LONG PrfQueryProfileInt (HINI hini, PCSZ pszApp, PCSZ pszKey, LONG  sDefault);
-BOOL PrfQueryProfileSize (HINI hini, PCSZ pszApp, PCSZ pszKey,
+LONG APIENTRY PrfQueryProfileInt (HINI hini, PCSZ pszApp, PCSZ pszKey, LONG  sDefault);
+BOOL APIENTRY PrfQueryProfileSize (HINI hini, PCSZ pszApp, PCSZ pszKey,
     PULONG pulReqLen);
-ULONG PrfQueryProfileString (HINI hini, PCSZ pszApp, PCSZ pszKey,
+ULONG APIENTRY PrfQueryProfileString (HINI hini, PCSZ pszApp, PCSZ pszKey,
     PCSZ pszDefault, PVOID pBuffer, ULONG ulBufferLength);
-BOOL PrfReset (HAB hab, __const__ PRFPROFILE *pPrfProfile);
-BOOL PrfWriteProfileData (HINI hini, PCSZ pszApp, PCSZ pszKey,
+BOOL APIENTRY PrfReset (HAB hab, __const__ PRFPROFILE *pPrfProfile);
+BOOL APIENTRY PrfWriteProfileData (HINI hini, PCSZ pszApp, PCSZ pszKey,
     CPVOID pData, ULONG ulDataLength);
-BOOL PrfWriteProfileString (HINI hini, PCSZ pszApp, PCSZ pszKey,
+BOOL APIENTRY PrfWriteProfileString (HINI hini, PCSZ pszApp, PCSZ pszKey,
     PCSZ pszData);
 
@@ -9583,7 +9624,7 @@
 
 
-MRESULT WinDefFileDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-HWND WinFileDlg (HWND hwndP, HWND hwndO, PFILEDLG pfild);
-BOOL WinFreeFileDlgList (PAPSZ papszFQFilename);
+MRESULT APIENTRY WinDefFileDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+HWND APIENTRY WinFileDlg (HWND hwndP, HWND hwndO, PFILEDLG pfild);
+BOOL APIENTRY WinFreeFileDlgList (PAPSZ papszFQFilename);
 
 #endif /* INCL_WINSTDFILE */
@@ -9751,6 +9792,6 @@
 typedef STYLECHANGE *PSTYLECHANGE;
 
-HWND WinFontDlg (HWND hwndP, HWND hwndO, PFONTDLG pfntd);
-MRESULT WinDefFontDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+HWND APIENTRY WinFontDlg (HWND hwndP, HWND hwndO, PFONTDLG pfntd);
+MRESULT APIENTRY WinDefFontDlgProc (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
 
 #endif /* INCL_WINSTDFONT */
@@ -10259,54 +10300,54 @@
 
 
-BOOL DrgAcceptDroppedFiles (HWND hwnd, PCSZ pszPath, PCSZ pszTypes,
+BOOL APIENTRY DrgAcceptDroppedFiles (HWND hwnd, PCSZ pszPath, PCSZ pszTypes,
     ULONG ulDefaultOp, ULONG ulReserved);
-BOOL DrgAccessDraginfo (PDRAGINFO pdinfo);
-HSTR DrgAddStrHandle (PCSZ psz);
-PDRAGINFO DrgAllocDraginfo (ULONG cDitem);
-PDRAGTRANSFER DrgAllocDragtransfer (ULONG cdxfer);
-BOOL DrgCancelLazyDrag (VOID);
-BOOL DrgDeleteDraginfoStrHandles (PDRAGINFO pdinfo);
-BOOL DrgDeleteStrHandle (HSTR hstr);
-HWND DrgDrag (HWND hwndSource, PDRAGINFO pdinfo, PDRAGIMAGE pdimg,
+BOOL APIENTRY DrgAccessDraginfo (PDRAGINFO pdinfo);
+HSTR APIENTRY DrgAddStrHandle (PCSZ psz);
+PDRAGINFO APIENTRY DrgAllocDraginfo (ULONG cDitem);
+PDRAGTRANSFER APIENTRY DrgAllocDragtransfer (ULONG cdxfer);
+BOOL APIENTRY DrgCancelLazyDrag (VOID);
+BOOL APIENTRY DrgDeleteDraginfoStrHandles (PDRAGINFO pdinfo);
+BOOL APIENTRY DrgDeleteStrHandle (HSTR hstr);
+HWND APIENTRY DrgDrag (HWND hwndSource, PDRAGINFO pdinfo, PDRAGIMAGE pdimg,
     ULONG cdimg, LONG vkTerminate, PVOID pReserved);
-BOOL DrgDragFiles (HWND hwnd, PSZ *apszFiles, PSZ *apszTypes, PSZ *apszTargets,
+BOOL APIENTRY DrgDragFiles (HWND hwnd, PSZ *apszFiles, PSZ *apszTypes, PSZ *apszTargets,
     ULONG cFiles, HPOINTER hptrDrag, ULONG vkTerm, BOOL fSourceRender,
     ULONG ulReserved);
-BOOL DrgFreeDraginfo (PDRAGINFO pdinfo);
-BOOL DrgFreeDragtransfer (PDRAGTRANSFER pdxfer);
-HPS DrgGetPS (HWND hwnd);
-BOOL DrgLazyDrag (HWND hwndSource, PDRAGINFO pDraginfo, PDRAGIMAGE pdimg,
+BOOL APIENTRY DrgFreeDraginfo (PDRAGINFO pdinfo);
+BOOL APIENTRY DrgFreeDragtransfer (PDRAGTRANSFER pdxfer);
+HPS APIENTRY DrgGetPS (HWND hwnd);
+BOOL APIENTRY DrgLazyDrag (HWND hwndSource, PDRAGINFO pDraginfo, PDRAGIMAGE pdimg,
     ULONG cdimg, PVOID pReserved);
-BOOL DrgLazyDrop (HWND hwndTarget, ULONG ulOperation, PPOINTL pptlDrop);
-BOOL DrgPostTransferMsg (HWND hwnd, ULONG msg, PDRAGTRANSFER pdxfer, ULONG fl,
+BOOL APIENTRY DrgLazyDrop (HWND hwndTarget, ULONG ulOperation, PPOINTL pptlDrop);
+BOOL APIENTRY DrgPostTransferMsg (HWND hwnd, ULONG msg, PDRAGTRANSFER pdxfer, ULONG fl,
     ULONG ulReserved, BOOL fRetry);
-BOOL DrgPushDraginfo (PDRAGINFO pdinfo, HWND hwndDest);
-PDRAGINFO DrgQueryDraginfoPtr (PDRAGINFO pReserved);
-PDRAGINFO DrgQueryDraginfoPtrFromHwnd (HWND hwndSource);
-PDRAGINFO DrgQueryDraginfoPtrFromDragitem (__const__ DRAGITEM *pDragitem);
-BOOL DrgQueryDragitem (PDRAGINFO pdinfo, ULONG cbBuffer, PDRAGITEM pditem,
+BOOL APIENTRY DrgPushDraginfo (PDRAGINFO pdinfo, HWND hwndDest);
+PDRAGINFO APIENTRY DrgQueryDraginfoPtr (PDRAGINFO pReserved);
+PDRAGINFO APIENTRY DrgQueryDraginfoPtrFromHwnd (HWND hwndSource);
+PDRAGINFO APIENTRY DrgQueryDraginfoPtrFromDragitem (__const__ DRAGITEM *pDragitem);
+BOOL APIENTRY DrgQueryDragitem (PDRAGINFO pdinfo, ULONG cbBuffer, PDRAGITEM pditem,
     ULONG iItem);
-ULONG DrgQueryDragitemCount (PDRAGINFO pdinfo);
-PDRAGITEM DrgQueryDragitemPtr (PDRAGINFO pdinfo, ULONG ulIndex);
-ULONG DrgQueryDragStatus (VOID);
-BOOL DrgQueryNativeRMF (PDRAGITEM pditem, ULONG cbBuffer, PCHAR pBuffer);
-ULONG DrgQueryNativeRMFLen (PDRAGITEM pditem);
-ULONG DrgQueryStrName (HSTR hstr, ULONG cbBuffer, PSZ pBuffer);
-ULONG DrgQueryStrNameLen (HSTR hstr);
-BOOL DrgQueryTrueType (PDRAGITEM pditem, ULONG cbBuffer, PSZ pBuffer);
-ULONG DrgQueryTrueTypeLen (PDRAGITEM pditem);
-PDRAGINFO DrgReallocDraginfo (PDRAGINFO pDraginfoOld, ULONG cditem);
-BOOL DrgReleasePS (HPS hps);
-MRESULT DrgSendTransferMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
-BOOL DrgSetDragImage (PDRAGINFO pdinfo, PDRAGIMAGE pdimg, ULONG cdimg,
+ULONG APIENTRY DrgQueryDragitemCount (PDRAGINFO pdinfo);
+PDRAGITEM APIENTRY DrgQueryDragitemPtr (PDRAGINFO pdinfo, ULONG ulIndex);
+ULONG APIENTRY DrgQueryDragStatus (VOID);
+BOOL APIENTRY DrgQueryNativeRMF (PDRAGITEM pditem, ULONG cbBuffer, PCHAR pBuffer);
+ULONG APIENTRY DrgQueryNativeRMFLen (PDRAGITEM pditem);
+ULONG APIENTRY DrgQueryStrName (HSTR hstr, ULONG cbBuffer, PSZ pBuffer);
+ULONG APIENTRY DrgQueryStrNameLen (HSTR hstr);
+BOOL APIENTRY DrgQueryTrueType (PDRAGITEM pditem, ULONG cbBuffer, PSZ pBuffer);
+ULONG APIENTRY DrgQueryTrueTypeLen (PDRAGITEM pditem);
+PDRAGINFO APIENTRY DrgReallocDraginfo (PDRAGINFO pDraginfoOld, ULONG cditem);
+BOOL APIENTRY DrgReleasePS (HPS hps);
+MRESULT APIENTRY DrgSendTransferMsg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
+BOOL APIENTRY DrgSetDragImage (PDRAGINFO pdinfo, PDRAGIMAGE pdimg, ULONG cdimg,
     PVOID pReserved);
-BOOL DrgSetDragitem (PDRAGINFO pdinfo, PDRAGITEM pditem, ULONG cbBuffer,
+BOOL APIENTRY DrgSetDragitem (PDRAGINFO pdinfo, PDRAGITEM pditem, ULONG cbBuffer,
     ULONG iItem);
-BOOL DrgSetDragPointer (PDRAGINFO pdinfo, HPOINTER hptr);
-BOOL DrgVerifyNativeRMF (PDRAGITEM pditem, PCSZ pszRMF);
-BOOL DrgVerifyRMF (PDRAGITEM pditem, PCSZ pszMech, PCSZ pszFmt);
-BOOL DrgVerifyTrueType (PDRAGITEM pditem, PCSZ pszType);
-BOOL DrgVerifyType (PDRAGITEM pditem, PCSZ pszType);
-BOOL DrgVerifyTypeSet (PDRAGITEM pditem, PCSZ pszType, ULONG cbMatch,
+BOOL APIENTRY DrgSetDragPointer (PDRAGINFO pdinfo, HPOINTER hptr);
+BOOL APIENTRY DrgVerifyNativeRMF (PDRAGITEM pditem, PCSZ pszRMF);
+BOOL APIENTRY DrgVerifyRMF (PDRAGITEM pditem, PCSZ pszMech, PCSZ pszFmt);
+BOOL APIENTRY DrgVerifyTrueType (PDRAGITEM pditem, PCSZ pszType);
+BOOL APIENTRY DrgVerifyType (PDRAGITEM pditem, PCSZ pszType);
+BOOL APIENTRY DrgVerifyTypeSet (PDRAGITEM pditem, PCSZ pszType, ULONG cbMatch,
     PSZ pszMatch);
 
@@ -10921,28 +10962,28 @@
 typedef OBJCLASS *POBJCLASS;
 
-HOBJECT WinCopyObject (HOBJECT hObjectofObject, HOBJECT hObjectofDest,
+HOBJECT APIENTRY WinCopyObject (HOBJECT hObjectofObject, HOBJECT hObjectofDest,
     ULONG ulReserved);
-HOBJECT WinCreateObject (PCSZ pszClassName, PCSZ pszTitle, PCSZ pszSetupString,
+HOBJECT APIENTRY WinCreateObject (PCSZ pszClassName, PCSZ pszTitle, PCSZ pszSetupString,
     PCSZ pszLocation, ULONG ulFlags);
-HOBJECT WinCreateShadow (HOBJECT hObjectofObject, HOBJECT hObjectofDest,
+HOBJECT APIENTRY WinCreateShadow (HOBJECT hObjectofObject, HOBJECT hObjectofDest,
     ULONG ulReserved);
-BOOL WinDeregisterObjectClass (PCSZ pszClassName);
-BOOL WinDestroyObject (HOBJECT hObject);
-BOOL WinEnumObjectClasses (POBJCLASS pObjClass, PULONG pulSize);
-BOOL WinIsSOMDDReady (VOID);
-BOOL WinIsWPDServerReady (VOID);
-HOBJECT WinMoveObject (HOBJECT hObjectofObject, HOBJECT hObjectofDest,
+BOOL APIENTRY WinDeregisterObjectClass (PCSZ pszClassName);
+BOOL APIENTRY WinDestroyObject (HOBJECT hObject);
+BOOL APIENTRY WinEnumObjectClasses (POBJCLASS pObjClass, PULONG pulSize);
+BOOL APIENTRY WinIsSOMDDReady (VOID);
+BOOL APIENTRY WinIsWPDServerReady (VOID);
+HOBJECT APIENTRY WinMoveObject (HOBJECT hObjectofObject, HOBJECT hObjectofDest,
     ULONG ulReserved);
-BOOL WinOpenObject (HOBJECT hObject, ULONG ulView, BOOL fFlag);
-BOOL WinQueryActiveDesktopPathname (PSZ pszPathName, ULONG ulSize);
-HOBJECT WinQueryObject (PCSZ pszObjectID);
-BOOL WinQueryObjectPath (HOBJECT hobject, PSZ pszPathName, ULONG ulSize);
-BOOL WinRegisterObjectClass (PCSZ pszClassName, PCSZ pszModName);
-BOOL WinReplaceObjectClass (PCSZ pszOldClassName, PCSZ pszNewClassName,
+BOOL APIENTRY WinOpenObject (HOBJECT hObject, ULONG ulView, BOOL fFlag);
+BOOL APIENTRY WinQueryActiveDesktopPathname (PSZ pszPathName, ULONG ulSize);
+HOBJECT APIENTRY WinQueryObject (PCSZ pszObjectID);
+BOOL APIENTRY WinQueryObjectPath (HOBJECT hobject, PSZ pszPathName, ULONG ulSize);
+BOOL APIENTRY WinRegisterObjectClass (PCSZ pszClassName, PCSZ pszModName);
+BOOL APIENTRY WinReplaceObjectClass (PCSZ pszOldClassName, PCSZ pszNewClassName,
     BOOL fReplace);
-ULONG WinRestartSOMDD (BOOL fState);
-ULONG WinRestartWPDServer (BOOL fState);
-BOOL WinSaveObject (HOBJECT hObject, BOOL fAsync);
-BOOL WinSetObjectData (HOBJECT hObject, PCSZ pszSetupString);
+ULONG APIENTRY WinRestartSOMDD (BOOL fState);
+ULONG APIENTRY WinRestartWPDServer (BOOL fState);
+BOOL APIENTRY WinSaveObject (HOBJECT hObject, BOOL fAsync);
+BOOL APIENTRY WinSetObjectData (HOBJECT hObject, PCSZ pszSetupString);
 
 #endif /* INCL_WPCLASS || !INCL_NOCOMMON */
@@ -10950,12 +10991,12 @@
 #if !defined (INCL_NOCOMMON)
 
-BOOL WinFreeFileIcon (HPOINTER hptr);
-HPOINTER WinLoadFileIcon (PCSZ pszFileName, BOOL fPrivate);
-BOOL WinRestoreWindowPos (PCSZ pszAppName, PCSZ pszKeyName, HWND hwnd);
+BOOL APIENTRY WinFreeFileIcon (HPOINTER hptr);
+HPOINTER APIENTRY WinLoadFileIcon (PCSZ pszFileName, BOOL fPrivate);
+BOOL APIENTRY WinRestoreWindowPos (PCSZ pszAppName, PCSZ pszKeyName, HWND hwnd);
 #if defined (INCL_WINPOINTERS)
-BOOL WinSetFileIcon (PCSZ pszFileName, __const__ ICONINFO *pIconInfo);
+BOOL APIENTRY WinSetFileIcon (PCSZ pszFileName, __const__ ICONINFO *pIconInfo);
 #endif
-BOOL WinShutdownSystem (HAB hab, HMQ hmq);
-BOOL WinStoreWindowPos (PCSZ pszAppName, PCSZ pszKeyName, HWND hwnd);
+BOOL APIENTRY WinShutdownSystem (HAB hab, HMQ hmq);
+BOOL APIENTRY WinStoreWindowPos (PCSZ pszAppName, PCSZ pszKeyName, HWND hwnd);
 
 #endif /* !INCL_NOCOMMON */
@@ -11043,88 +11084,88 @@
 
 
-BOOL SplStdClose (HDC hdc);
-BOOL SplStdDelete (HSTD hMetaFile);
-BOOL SplStdGetBits (HSTD hMetaFile, LONG offData, LONG cbData, PCH pchData);
-BOOL SplStdOpen (HDC hdc);
-LONG SplStdQueryLength (HSTD hMetaFile);
-BOOL SplStdStart (HDC hdc);
-HSTD SplStdStop (HDC hdc);
-
-SPLERR SplControlDevice (PSZ pszComputerName, PSZ pszPortName,
+BOOL APIENTRY SplStdClose (HDC hdc);
+BOOL APIENTRY SplStdDelete (HSTD hMetaFile);
+BOOL APIENTRY SplStdGetBits (HSTD hMetaFile, LONG offData, LONG cbData, PCH pchData);
+BOOL APIENTRY SplStdOpen (HDC hdc);
+LONG APIENTRY SplStdQueryLength (HSTD hMetaFile);
+BOOL APIENTRY SplStdStart (HDC hdc);
+HSTD APIENTRY SplStdStop (HDC hdc);
+
+SPLERR APIENTRY SplControlDevice (PSZ pszComputerName, PSZ pszPortName,
     ULONG ulControl);
-SPLERR SplCopyJob (PCSZ pszSrcComputerName, PCSZ pszSrcQueueName,
+SPLERR APIENTRY SplCopyJob (PCSZ pszSrcComputerName, PCSZ pszSrcQueueName,
     ULONG ulSrcJob, PCSZ pszTrgComputerName, PCSZ pszTrgQueueName,
     PULONG pulTrgJob);
-SPLERR SplCreateDevice (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
+SPLERR APIENTRY SplCreateDevice (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
     ULONG cbBuf);
-SPLERR SplCreatePort (PCSZ pszComputerName, PCSZ pszPortName,
+SPLERR APIENTRY SplCreatePort (PCSZ pszComputerName, PCSZ pszPortName,
     PCSZ pszPortDriver, ULONG ulVersion, PVOID pBuf, ULONG cbBuf);
-SPLERR SplCreateQueue (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
+SPLERR APIENTRY SplCreateQueue (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
     ULONG cbBuf);
-SPLERR SplDeleteDevice (PSZ pszComputerName, PSZ pszPrintDeviceName);
-SPLERR SplDeleteJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob);
-SPLERR SplDeletePort (PCSZ pszComputerName, PCSZ pszPortName);
-SPLERR SplDeleteQueue (PSZ pszComputerName, PSZ pszQueueName);
-SPLERR SplEnumDevice (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
+SPLERR APIENTRY SplDeleteDevice (PSZ pszComputerName, PSZ pszPrintDeviceName);
+SPLERR APIENTRY SplDeleteJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob);
+SPLERR APIENTRY SplDeletePort (PCSZ pszComputerName, PCSZ pszPortName);
+SPLERR APIENTRY SplDeleteQueue (PSZ pszComputerName, PSZ pszQueueName);
+SPLERR APIENTRY SplEnumDevice (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
     ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
     PVOID pReserved);
-SPLERR SplEnumDriver (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
+SPLERR APIENTRY SplEnumDriver (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
     ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
     PVOID pReserved);
-SPLERR SplEnumJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel,
+SPLERR APIENTRY SplEnumJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel,
     PVOID pBuf, ULONG cbBuf, PULONG pcReturned, PULONG pcTotal,
     PULONG pcbNeeded, PVOID pReserved);
-SPLERR SplEnumPort (PCSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
+SPLERR APIENTRY SplEnumPort (PCSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
     ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
     PVOID pReserved);
-SPLERR SplEnumPrinter (PSZ pszComputerName, ULONG uLevel, ULONG flType,
+SPLERR APIENTRY SplEnumPrinter (PSZ pszComputerName, ULONG uLevel, ULONG flType,
     PVOID pBuf, ULONG cbbuf, PULONG pcReturned, PULONG pcTotal,
     PULONG pcbNeeded, PVOID pReserved);
-SPLERR SplEnumQueue (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
+SPLERR APIENTRY SplEnumQueue (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
     ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
     PVOID pReserved);
-SPLERR SplEnumQueueProcessor (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
+SPLERR APIENTRY SplEnumQueueProcessor (PSZ pszComputerName, ULONG ulLevel, PVOID pBuf,
     ULONG cbBuf, PULONG pcReturned, PULONG pcTotal, PULONG pcbNeeded,
     PVOID pReserved);
-SPLERR SplHoldJob (PCSZ pszComputerName, PCSZ pszQueueName, ULONG ulJob);
-SPLERR SplHoldQueue (PSZ pszComputerName, PSZ pszQueueName);
-SPLERR SplPurgeQueue (PSZ pszComputerName, PSZ pszQueueName);
-SPLERR SplQueryDevice (PSZ pszComputerName, PSZ pszPrintDeviceName,
+SPLERR APIENTRY SplHoldJob (PCSZ pszComputerName, PCSZ pszQueueName, ULONG ulJob);
+SPLERR APIENTRY SplHoldQueue (PSZ pszComputerName, PSZ pszQueueName);
+SPLERR APIENTRY SplPurgeQueue (PSZ pszComputerName, PSZ pszQueueName);
+SPLERR APIENTRY SplQueryDevice (PSZ pszComputerName, PSZ pszPrintDeviceName,
     ULONG ulLevel, PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded);
-SPLERR SplQueryDriver (PCSZ pszComputerName, PCSZ pszDriverName,
+SPLERR APIENTRY SplQueryDriver (PCSZ pszComputerName, PCSZ pszDriverName,
     PCSZ pszPrinterName, ULONG ulLevel, PVOID pBuf, ULONG cbBuf,
     PULONG pcbNeeded);
-SPLERR SplQueryJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob,
+SPLERR APIENTRY SplQueryJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob,
     ULONG ulLevel, PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded);
-SPLERR SplQueryPort (PCSZ pszComputerName, PCSZ pszPortName, ULONG ulLevel,
+SPLERR APIENTRY SplQueryPort (PCSZ pszComputerName, PCSZ pszPortName, ULONG ulLevel,
     PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded);
-SPLERR SplQueryQueue (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel,
+SPLERR APIENTRY SplQueryQueue (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel,
     PVOID pBuf, ULONG cbBuf, PULONG pcbNeeded);
-SPLERR SplReleaseJob (PCSZ pszComputerName, PCSZ pszQueueName, ULONG ulJob);
-SPLERR SplReleaseQueue (PSZ pszComputerName, PSZ pszQueueName);
-SPLERR SplSetDevice (PSZ pszComputerName, PSZ pszPrintDeviceName,
+SPLERR APIENTRY SplReleaseJob (PCSZ pszComputerName, PCSZ pszQueueName, ULONG ulJob);
+SPLERR APIENTRY SplReleaseQueue (PSZ pszComputerName, PSZ pszQueueName);
+SPLERR APIENTRY SplSetDevice (PSZ pszComputerName, PSZ pszPrintDeviceName,
     ULONG ulLevel, PVOID pBuf, ULONG cbBuf, ULONG ulParmNum);
-SPLERR SplSetDriver (PCSZ pszComputerName, PCSZ pszDriverName,
+SPLERR APIENTRY SplSetDriver (PCSZ pszComputerName, PCSZ pszDriverName,
     PCSZ pszPrinterName, ULONG ulLevel, PVOID pBuf, ULONG cbBuf,
     ULONG ulParmNum);
-SPLERR SplSetJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob,
+SPLERR APIENTRY SplSetJob (PSZ pszComputerName, PSZ pszQueueName, ULONG ulJob,
     ULONG ulLevel, PVOID pBuf, ULONG cbBuf, ULONG ulParmNum);
-SPLERR SplSetPort (PCSZ pszComputerName, PCSZ pszPortName, ULONG ulLevel,
+SPLERR APIENTRY SplSetPort (PCSZ pszComputerName, PCSZ pszPortName, ULONG ulLevel,
     PVOID pBuf, ULONG cbBuf, ULONG ulParmNum);
-SPLERR SplSetQueue (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel,
+SPLERR APIENTRY SplSetQueue (PSZ pszComputerName, PSZ pszQueueName, ULONG ulLevel,
     PVOID pBuf, ULONG cbBuf, ULONG ulParmNum);
 
-ULONG SplMessageBox (PSZ pszLogAddr, ULONG fErrInfo, ULONG fErrData,
+ULONG APIENTRY SplMessageBox (PSZ pszLogAddr, ULONG fErrInfo, ULONG fErrData,
     PSZ pszText, PSZ pszCaption, ULONG idWindow, ULONG fStyle);
-BOOL SplQmAbort (HSPL hspl);
-BOOL SplQmAbortDoc (HSPL hspl);
-BOOL SplQmClose (HSPL hspl);
-BOOL SplQmEndDoc (HSPL hspl);
-ULONG SplQmGetJobID (HSPL hspl, ULONG ulLevel, PVOID pBuf, ULONG cbBuf,
+BOOL APIENTRY SplQmAbort (HSPL hspl);
+BOOL APIENTRY SplQmAbortDoc (HSPL hspl);
+BOOL APIENTRY SplQmClose (HSPL hspl);
+BOOL APIENTRY SplQmEndDoc (HSPL hspl);
+ULONG APIENTRY SplQmGetJobID (HSPL hspl, ULONG ulLevel, PVOID pBuf, ULONG cbBuf,
     PULONG pcbNeeded);
-BOOL SplQmNewPage (HSPL hspl, ULONG ulPageNumber);
-HSPL SplQmOpen (PSZ pszToken, LONG lCount, PQMOPENDATA pqmdopData);
-BOOL SplQmStartDoc (HSPL hspl, PSZ pszDocName);
-BOOL SplQmWrite (HSPL hspl, LONG lCount, PVOID pData);
+BOOL APIENTRY SplQmNewPage (HSPL hspl, ULONG ulPageNumber);
+HSPL APIENTRY SplQmOpen (PSZ pszToken, LONG lCount, PQMOPENDATA pqmdopData);
+BOOL APIENTRY SplQmStartDoc (HSPL hspl, PSZ pszDocName);
+BOOL APIENTRY SplQmWrite (HSPL hspl, LONG lCount, PVOID pData);
 
 #if defined (INCL_SPLDOSPRINT)
@@ -11661,12 +11702,12 @@
 typedef HELPINIT *PHELPINIT;
 
-BOOL WinAssociateHelpInstance (HWND hwndHelpInstance, HWND hwndApp);
-HWND WinCreateHelpInstance (HAB hab, PHELPINIT phinitHMInitStructure);
-BOOL WinCreateHelpTable (HWND hwndHelpInstance,
+BOOL APIENTRY WinAssociateHelpInstance (HWND hwndHelpInstance, HWND hwndApp);
+HWND APIENTRY WinCreateHelpInstance (HAB hab, PHELPINIT phinitHMInitStructure);
+BOOL APIENTRY WinCreateHelpTable (HWND hwndHelpInstance,
     __const__ HELPTABLE *phtHelpTable);
-BOOL WinDestroyHelpInstance (HWND hwndHelpInstance);
-BOOL WinLoadHelpTable (HWND hwndHelpInstance, ULONG idHelpTable,
+BOOL APIENTRY WinDestroyHelpInstance (HWND hwndHelpInstance);
+BOOL APIENTRY WinLoadHelpTable (HWND hwndHelpInstance, ULONG idHelpTable,
     HMODULE Module);
-HWND WinQueryHelpInstance (HWND hwndApp);
+HWND APIENTRY WinQueryHelpInstance (HWND hwndApp);
 
 #endif /* INCL_WINHELP */
@@ -11713,21 +11754,21 @@
 typedef VOID *HDDF;
 
-BOOL DdfBeginList (HDDF hddf, ULONG ulWidthDT, ULONG fBreakType,
+BOOL APIENTRY DdfBeginList (HDDF hddf, ULONG ulWidthDT, ULONG fBreakType,
     ULONG fSpacing);
-BOOL DdfBitmap (HDDF hddf, HBITMAP hbm, ULONG fAlign);
-BOOL DdfEndList (HDDF hddf);
-BOOL DdfHyperText (HDDF hddf, PCSZ pszText, PCSZ pszReference,
+BOOL APIENTRY DdfBitmap (HDDF hddf, HBITMAP hbm, ULONG fAlign);
+BOOL APIENTRY DdfEndList (HDDF hddf);
+BOOL APIENTRY DdfHyperText (HDDF hddf, PCSZ pszText, PCSZ pszReference,
     ULONG fReferenceType);
-BOOL DdfInform (HDDF hddf, PCSZ pszText, ULONG resInformNumber);
-HDDF DdfInitialize (HWND hwndHelpInstance, ULONG cbBuffer, ULONG ulIncrement);
-BOOL DdfListItem (HDDF hddf, PCSZ pszTerm, PCSZ pszDescription);
-BOOL DdfMetafile (HDDF hddf, HMF hmf, __const__ RECTL *prclRect);
-BOOL DdfPara (HDDF hddf);
-BOOL DdfSetColor (HDDF hddf, COLOR fBackColor, COLOR fForColor);
-BOOL DdfSetFont (HDDF hddf, PCSZ pszFaceName, ULONG ulWidth, ULONG ulHeight);
-BOOL DdfSetFontStyle (HDDF hddf, ULONG fFontStyle);
-BOOL DdfSetFormat (HDDF hddf, ULONG fFormatType);
-BOOL DdfSetTextAlign (HDDF hddf, ULONG fAlign);
-BOOL DdfText (HDDF hddf, PCSZ pszText);
+BOOL APIENTRY DdfInform (HDDF hddf, PCSZ pszText, ULONG resInformNumber);
+HDDF APIENTRY DdfInitialize (HWND hwndHelpInstance, ULONG cbBuffer, ULONG ulIncrement);
+BOOL APIENTRY DdfListItem (HDDF hddf, PCSZ pszTerm, PCSZ pszDescription);
+BOOL APIENTRY DdfMetafile (HDDF hddf, HMF hmf, __const__ RECTL *prclRect);
+BOOL APIENTRY DdfPara (HDDF hddf);
+BOOL APIENTRY DdfSetColor (HDDF hddf, COLOR fBackColor, COLOR fForColor);
+BOOL APIENTRY DdfSetFont (HDDF hddf, PCSZ pszFaceName, ULONG ulWidth, ULONG ulHeight);
+BOOL APIENTRY DdfSetFontStyle (HDDF hddf, ULONG fFontStyle);
+BOOL APIENTRY DdfSetFormat (HDDF hddf, ULONG fFormatType);
+BOOL APIENTRY DdfSetTextAlign (HDDF hddf, ULONG fAlign);
+BOOL APIENTRY DdfText (HDDF hddf, PCSZ pszText);
 
 #endif /* INCL_DDF */
@@ -11936,23 +11977,23 @@
 typedef HVPS *PHVPS;
 
-USHORT VioAssociate (HDC hdc, HVPS hvps);
-USHORT VioCreateLogFont (PFATTRS pfatattrs, LONG llcid, PSTR8 pName,
+USHORT APIENTRY VioAssociate (HDC hdc, HVPS hvps);
+USHORT APIENTRY VioCreateLogFont (PFATTRS pfatattrs, LONG llcid, PSTR8 pName,
     HVPS hvps);
-USHORT VioCreatePS (PHVPS phvps, SHORT sDepth, SHORT sWidth, SHORT sFormat,
+USHORT APIENTRY VioCreatePS (PHVPS phvps, SHORT sDepth, SHORT sWidth, SHORT sFormat,
     SHORT sAttrs, HVPS hvpsReserved);
-USHORT VioDeleteSetId (LONG llcid, HVPS hvps);
-USHORT VioDestroyPS (HVPS hvps);
-USHORT VioGetDeviceCellSize (PSHORT psHeight, PSHORT psWidth, HVPS hvps);
-USHORT VioGetOrg (PSHORT psRow, PSHORT psColumn, HVPS hvps);
-USHORT VioQueryFonts (PLONG plRemfonts, PFONTMETRICS afmMetrics,
+USHORT APIENTRY VioDeleteSetId (LONG llcid, HVPS hvps);
+USHORT APIENTRY VioDestroyPS (HVPS hvps);
+USHORT APIENTRY VioGetDeviceCellSize (PSHORT psHeight, PSHORT psWidth, HVPS hvps);
+USHORT APIENTRY VioGetOrg (PSHORT psRow, PSHORT psColumn, HVPS hvps);
+USHORT APIENTRY VioQueryFonts (PLONG plRemfonts, PFONTMETRICS afmMetrics,
     LONG lMetricsLength, PLONG plFonts, PSZ pszFacename, ULONG flOptions,
     HVPS hvps);
-USHORT VioQuerySetIds (PLONG allcids, PSTR8 pNames, PLONG alTypes, LONG lcount,
+USHORT APIENTRY VioQuerySetIds (PLONG allcids, PSTR8 pNames, PLONG alTypes, LONG lcount,
     HVPS hvps);
-USHORT VioSetDeviceCellSize (SHORT sHeight, SHORT sWidth, HVPS hvps);
-USHORT VioSetOrg (SHORT sRow, SHORT sColumn, HVPS hvps);
-USHORT VioShowPS (SHORT sDepth, SHORT sWidth, SHORT soffCell, HVPS hvps);
-
-MRESULT WinDefAVioWindowProc (HWND hwnd, USHORT msg, ULONG mp1, ULONG mp2);
+USHORT APIENTRY VioSetDeviceCellSize (SHORT sHeight, SHORT sWidth, HVPS hvps);
+USHORT APIENTRY VioSetOrg (SHORT sRow, SHORT sColumn, HVPS hvps);
+USHORT APIENTRY VioShowPS (SHORT sDepth, SHORT sWidth, SHORT soffCell, HVPS hvps);
+
+MRESULT APIENTRY WinDefAVioWindowProc (HWND hwnd, USHORT msg, ULONG mp1, ULONG mp2);
 
 #endif /* INCL_AVIO */
@@ -11985,11 +12026,11 @@
 typedef MONOUT *PMONOUT;
 
-USHORT DosMonOpen (PSZ pszDevName, PHMONITOR phmon);
-USHORT DosMonClose (HMONITOR hmon);
-USHORT DosMonReg (HMONITOR hmon, PBYTE pbInBuf, PBYTE pbOutBuf,
+USHORT APIENTRY DosMonOpen (PSZ pszDevName, PHMONITOR phmon);
+USHORT APIENTRY DosMonClose (HMONITOR hmon);
+USHORT APIENTRY DosMonReg (HMONITOR hmon, PBYTE pbInBuf, PBYTE pbOutBuf,
     USHORT fPosition, USHORT usIndex);
-USHORT DosMonRead (PBYTE pbInBuf, USHORT fWait, PBYTE pbDataBuf,
+USHORT APIENTRY DosMonRead (PBYTE pbInBuf, USHORT fWait, PBYTE pbDataBuf,
     PUSHORT pcbData);
-USHORT DosMonWrite (PBYTE pbOutBuf, PBYTE pbDataBuf, USHORT cbData);
+USHORT APIENTRY DosMonWrite (PBYTE pbOutBuf, PBYTE pbDataBuf, USHORT cbData);
 
 #endif /* INCL_DOSMONITORS */
@@ -12105,24 +12146,24 @@
 typedef STRINGINBUF *PSTRINGINBUF;
 
-USHORT KbdCharIn (PKBDKEYINFO pkbci, USHORT fWait, HKBD hkbd);
-USHORT KbdClose (HKBD hkbd);
-USHORT KbdDeRegister (VOID);
-USHORT KbdFlushBuffer (HKBD hkbd);
-USHORT KbdFreeFocus (HKBD hkbd);
-USHORT KbdGetCp (ULONG ulReserved, PUSHORT pidCP, HKBD hkbd);
-USHORT KbdGetFocus (USHORT fWait, HKBD hkbd);
-USHORT KbdGetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
-USHORT KbdGetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
-USHORT KbdOpen (PHKBD phkbd);
-USHORT KbdPeek (PKBDKEYINFO pkbci, HKBD hkbd);
-USHORT KbdRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask);
-USHORT KbdSetCp (USHORT usReserved, USHORT idCP, HKBD hkbd);
-USHORT KbdSetCustXt (PUSHORT pusCodePage, HKBD hkbd);
-USHORT KbdSetFgnd (VOID);
-USHORT KbdSetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
-USHORT KbdSetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
-USHORT KbdStringIn (PCH pch, PSTRINGINBUF pchIn, USHORT fWait, HKBD hkbd);
-USHORT KbdSynch (USHORT fWait);
-USHORT KbdXlate (PKBDTRANS pkbdtrans, HKBD hkbd);
+USHORT APIENTRY KbdCharIn (PKBDKEYINFO pkbci, USHORT fWait, HKBD hkbd);
+USHORT APIENTRY KbdClose (HKBD hkbd);
+USHORT APIENTRY KbdDeRegister (VOID);
+USHORT APIENTRY KbdFlushBuffer (HKBD hkbd);
+USHORT APIENTRY KbdFreeFocus (HKBD hkbd);
+USHORT APIENTRY KbdGetCp (ULONG ulReserved, PUSHORT pidCP, HKBD hkbd);
+USHORT APIENTRY KbdGetFocus (USHORT fWait, HKBD hkbd);
+USHORT APIENTRY KbdGetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
+USHORT APIENTRY KbdGetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
+USHORT APIENTRY KbdOpen (PHKBD phkbd);
+USHORT APIENTRY KbdPeek (PKBDKEYINFO pkbci, HKBD hkbd);
+USHORT APIENTRY KbdRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask);
+USHORT APIENTRY KbdSetCp (USHORT usReserved, USHORT idCP, HKBD hkbd);
+USHORT APIENTRY KbdSetCustXt (PUSHORT pusCodePage, HKBD hkbd);
+USHORT APIENTRY KbdSetFgnd (VOID);
+USHORT APIENTRY KbdSetHWID (PKBDHWID pkbdhwid, HKBD hkbd);
+USHORT APIENTRY KbdSetStatus (PKBDINFO pkbdinfo, HKBD hkbd);
+USHORT APIENTRY KbdStringIn (PCH pch, PSTRINGINBUF pchIn, USHORT fWait, HKBD hkbd);
+USHORT APIENTRY KbdSynch (USHORT fWait);
+USHORT APIENTRY KbdXlate (PKBDTRANS pkbdtrans, HKBD hkbd);
 
 #endif /* INCL_KBD */
@@ -12364,66 +12405,66 @@
 
 
-USHORT VioCheckCharType (PUSHORT pType, USHORT usRow, USHORT usColumn,
+USHORT APIENTRY VioCheckCharType (PUSHORT pType, USHORT usRow, USHORT usColumn,
     HVIO hvio);
-USHORT VioDeRegister (VOID);
-USHORT VioEndPopUp (HVIO hvio);
-USHORT VioGetAnsi (PUSHORT pfAnsi, HVIO hvio);
-USHORT VioGetBuf (PULONG pLVB, PUSHORT pcbLVB, HVIO hvio);
-USHORT VioGetConfig (USHORT usConfigId, PVIOCONFIGINFO pvioin, HVIO hvio);
-USHORT VioGetCp (USHORT usReserved, PUSHORT pusCodePage, HVIO hvio);
-USHORT VioGetCurPos (PUSHORT pusRow, PUSHORT pusColumn, HVIO hvio);
-USHORT VioGetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
-USHORT VioGetFont (PVIOFONTINFO pviofi, HVIO hvio);
-USHORT VioGetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
-USHORT VioGetPhysBuf (PVIOPHYSBUF pvioPhysBuf, USHORT usReserved);
-USHORT VioGetState (PVOID pState, HVIO hvio);
-USHORT VioGlobalReg (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask1,
+USHORT APIENTRY VioDeRegister (VOID);
+USHORT APIENTRY VioEndPopUp (HVIO hvio);
+USHORT APIENTRY VioGetAnsi (PUSHORT pfAnsi, HVIO hvio);
+USHORT APIENTRY VioGetBuf (PULONG pLVB, PUSHORT pcbLVB, HVIO hvio);
+USHORT APIENTRY VioGetConfig (USHORT usConfigId, PVIOCONFIGINFO pvioin, HVIO hvio);
+USHORT APIENTRY VioGetCp (USHORT usReserved, PUSHORT pusCodePage, HVIO hvio);
+USHORT APIENTRY VioGetCurPos (PUSHORT pusRow, PUSHORT pusColumn, HVIO hvio);
+USHORT APIENTRY VioGetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
+USHORT APIENTRY VioGetFont (PVIOFONTINFO pviofi, HVIO hvio);
+USHORT APIENTRY VioGetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
+USHORT APIENTRY VioGetPhysBuf (PVIOPHYSBUF pvioPhysBuf, USHORT usReserved);
+USHORT APIENTRY VioGetState (PVOID pState, HVIO hvio);
+USHORT APIENTRY VioGlobalReg (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask1,
     ULONG ulFunMask2, USHORT usReturn);
-USHORT VioModeUndo (USHORT usOwnerInd, USHORT usKillInd, USHORT usReserved);
-USHORT VioModeWait (USHORT usReqType, PUSHORT pNotifyType, USHORT usReserved);
-USHORT VioPopUp (PUSHORT pfWait, HVIO hvio);
-USHORT VioPrtSc (HVIO hvio);
-USHORT VioPrtScToggle (HVIO hvio);
-USHORT VioReadCellStr (PCH pchCellStr, PUSHORT pcb, USHORT usRow,
+USHORT APIENTRY VioModeUndo (USHORT usOwnerInd, USHORT usKillInd, USHORT usReserved);
+USHORT APIENTRY VioModeWait (USHORT usReqType, PUSHORT pNotifyType, USHORT usReserved);
+USHORT APIENTRY VioPopUp (PUSHORT pfWait, HVIO hvio);
+USHORT APIENTRY VioPrtSc (HVIO hvio);
+USHORT APIENTRY VioPrtScToggle (HVIO hvio);
+USHORT APIENTRY VioReadCellStr (PCH pchCellStr, PUSHORT pcb, USHORT usRow,
     USHORT usColumn, HVIO hvio);
-USHORT VioReadCharStr (PCH pch, PUSHORT pcb, USHORT usRow, USHORT usColumn,
+USHORT APIENTRY VioReadCharStr (PCH pch, PUSHORT pcb, USHORT usRow, USHORT usColumn,
     HVIO hvio);
-USHORT VioRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask1,
+USHORT APIENTRY VioRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask1,
     ULONG ulFunMask2);
-USHORT VioSavRedrawUndo (USHORT usOwnerInd, USHORT usKillInd,
+USHORT APIENTRY VioSavRedrawUndo (USHORT usOwnerInd, USHORT usKillInd,
     USHORT usReserved);
-USHORT VioSavRedrawWait (USHORT usRedrawInd, PUSHORT pusNotifyType,
+USHORT APIENTRY VioSavRedrawWait (USHORT usRedrawInd, PUSHORT pusNotifyType,
     USHORT usReserved);
-USHORT VioScrLock (USHORT fWait, PUCHAR pfNotLocked, HVIO hvio);
-USHORT VioScrollDn (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
+USHORT APIENTRY VioScrLock (USHORT fWait, PUCHAR pfNotLocked, HVIO hvio);
+USHORT APIENTRY VioScrollDn (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
     USHORT usRightCol, USHORT cbLines, PBYTE pCell, HVIO hvio);
-USHORT VioScrollLf (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
+USHORT APIENTRY VioScrollLf (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
     USHORT usRightCol, USHORT cbCol, PBYTE pCell, HVIO hvio);
-USHORT VioScrollRt (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
+USHORT APIENTRY VioScrollRt (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
     USHORT usRightCol, USHORT cbCol, PBYTE pCell, HVIO hvio);
-USHORT VioScrollUp (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
+USHORT APIENTRY VioScrollUp (USHORT usTopRow, USHORT usLeftCol, USHORT usBotRow,
     USHORT usRightCol, USHORT cbLines, PBYTE pCell, HVIO hvio);
-USHORT VioScrUnLock (HVIO hvio);
-USHORT VioSetAnsi (USHORT fAnsi, HVIO hvio);
-USHORT VioSetCp (USHORT usReserved, USHORT usCodePage, HVIO hvio);
-USHORT VioSetCurPos (USHORT usRow, USHORT usColumn, HVIO hvio);
-USHORT VioSetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
-USHORT VioSetFont (PVIOFONTINFO pviofi, HVIO hvio);
-USHORT VioSetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
-USHORT VioSetState (CPVOID pState, HVIO hvio);
-USHORT VioShowBuf (USHORT offLVB, USHORT cb, HVIO hvio);
-USHORT VioWrtCellStr (PCCH pchCellStr, USHORT cb, USHORT usRow,
+USHORT APIENTRY VioScrUnLock (HVIO hvio);
+USHORT APIENTRY VioSetAnsi (USHORT fAnsi, HVIO hvio);
+USHORT APIENTRY VioSetCp (USHORT usReserved, USHORT usCodePage, HVIO hvio);
+USHORT APIENTRY VioSetCurPos (USHORT usRow, USHORT usColumn, HVIO hvio);
+USHORT APIENTRY VioSetCurType (PVIOCURSORINFO pvioCursorInfo, HVIO hvio);
+USHORT APIENTRY VioSetFont (PVIOFONTINFO pviofi, HVIO hvio);
+USHORT APIENTRY VioSetMode (PVIOMODEINFO pvioModeInfo, HVIO hvio);
+USHORT APIENTRY VioSetState (CPVOID pState, HVIO hvio);
+USHORT APIENTRY VioShowBuf (USHORT offLVB, USHORT cb, HVIO hvio);
+USHORT APIENTRY VioWrtCellStr (PCCH pchCellStr, USHORT cb, USHORT usRow,
     USHORT usColumn, HVIO hvio);
-USHORT VioWrtCharStr (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
+USHORT APIENTRY VioWrtCharStr (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
     HVIO hvio);
-USHORT VioWrtCharStrAtt (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
+USHORT APIENTRY VioWrtCharStrAtt (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
     PBYTE pAttr, HVIO hvio);
-USHORT VioWrtNAttr (__const__ BYTE *pAttr, USHORT cb, USHORT usRow,
+USHORT APIENTRY VioWrtNAttr (__const__ BYTE *pAttr, USHORT cb, USHORT usRow,
     USHORT usColumn, HVIO hvio);
-USHORT VioWrtNCell (__const__ BYTE *pCell, USHORT cb, USHORT usRow,
+USHORT APIENTRY VioWrtNCell (__const__ BYTE *pCell, USHORT cb, USHORT usRow,
     USHORT usColumn, HVIO hvio);
-USHORT VioWrtNChar (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
+USHORT APIENTRY VioWrtNChar (PCCH pch, USHORT cb, USHORT usRow, USHORT usColumn,
     HVIO hvio);
-USHORT VioWrtTTY (PCCH pch, USHORT cb, HVIO hvio);
+USHORT APIENTRY VioWrtTTY (PCCH pch, USHORT cb, HVIO hvio);
 
 #endif /* INCL_VIO */
@@ -12543,29 +12584,29 @@
 
 
-USHORT MouClose (HMOU hmou);
-USHORT MouDeRegister (VOID);
-USHORT MouDrawPtr (HMOU hmou);
-USHORT MouFlushQue (HMOU hmou);
-USHORT MouGetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
-USHORT MouGetEventMask (PUSHORT pfsEvents, HMOU hmou);
-USHORT MouGetNumButtons (PUSHORT pcButtons, HMOU hmou);
-USHORT MouGetNumMickeys (PUSHORT pcMickeys, HMOU hmou);
-USHORT MouGetNumQueEl (PMOUQUEINFO qmouqi, HMOU hmou);
-USHORT MouGetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
-USHORT MouGetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
-USHORT MouGetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
-USHORT MouGetThreshold (PTHRESHOLD pthreshold, HMOU hmou);
-USHORT MouInitReal (PCSZ pszDriverName);
-USHORT MouOpen (PCSZ pszDvrName, PHMOU phmou);
-USHORT MouReadEventQue (PMOUEVENTINFO pmouevEvent, PUSHORT pfWait, HMOU hmou);
-USHORT MouRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask);
-USHORT MouRemovePtr (PNOPTRRECT pmourtRect, HMOU hmou);
-USHORT MouSetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
-USHORT MouSetEventMask (PUSHORT pfsEvents, HMOU hmou);
-USHORT MouSetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
-USHORT MouSetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
-USHORT MouSetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
-USHORT MouSetThreshold (PTHRESHOLD pthreshold, HMOU hmou);
-USHORT MouSynch (USHORT fWait);
+USHORT APIENTRY MouClose (HMOU hmou);
+USHORT APIENTRY MouDeRegister (VOID);
+USHORT APIENTRY MouDrawPtr (HMOU hmou);
+USHORT APIENTRY MouFlushQue (HMOU hmou);
+USHORT APIENTRY MouGetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
+USHORT APIENTRY MouGetEventMask (PUSHORT pfsEvents, HMOU hmou);
+USHORT APIENTRY MouGetNumButtons (PUSHORT pcButtons, HMOU hmou);
+USHORT APIENTRY MouGetNumMickeys (PUSHORT pcMickeys, HMOU hmou);
+USHORT APIENTRY MouGetNumQueEl (PMOUQUEINFO qmouqi, HMOU hmou);
+USHORT APIENTRY MouGetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
+USHORT APIENTRY MouGetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
+USHORT APIENTRY MouGetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
+USHORT APIENTRY MouGetThreshold (PTHRESHOLD pthreshold, HMOU hmou);
+USHORT APIENTRY MouInitReal (PCSZ pszDriverName);
+USHORT APIENTRY MouOpen (PCSZ pszDvrName, PHMOU phmou);
+USHORT APIENTRY MouReadEventQue (PMOUEVENTINFO pmouevEvent, PUSHORT pfWait, HMOU hmou);
+USHORT APIENTRY MouRegister (PCSZ pszModName, PCSZ pszEntryName, ULONG ulFunMask);
+USHORT APIENTRY MouRemovePtr (PNOPTRRECT pmourtRect, HMOU hmou);
+USHORT APIENTRY MouSetDevStatus (PUSHORT pfsDevStatus, HMOU hmou);
+USHORT APIENTRY MouSetEventMask (PUSHORT pfsEvents, HMOU hmou);
+USHORT APIENTRY MouSetPtrPos (PPTRLOC pmouLoc, HMOU hmou);
+USHORT APIENTRY MouSetPtrShape (PBYTE pBuf, PPTRSHAPE pmoupsInfo, HMOU hmou);
+USHORT APIENTRY MouSetScaleFact (PSCALEFACT pmouscFactors, HMOU hmou);
+USHORT APIENTRY MouSetThreshold (PTHRESHOLD pthreshold, HMOU hmou);
+USHORT APIENTRY MouSynch (USHORT fWait);
 
 #endif /* INCL_MOU */
