! Force default run-time and windows libraries

c$pragma library
c$pragma library win386

! Force startup code to be included

c$pragma aux wstart "_cstart_"

c$pragma aux (__pascal) callback far

c$pragma aux (__pascal) winapi

c$pragma aux (__cdecl) windecl

! Define "dll_function" alias (to be used for DLL functions)

c$pragma aux (__pascal) dll_function far parm( value )

!-------------------------------------------------------------------------------
!  General Purpose Defines
!-------------------------------------------------------------------------------

c$pragma aux MAKELONG = zc1e210 \ shl edx,16
c                       z0bc2   \ or  eax,edx
c                   parm ( value*2, value*2 ) [eax] [edx] \
c                   value [eax] \
c                   modify exact [eax edx]
c$pragma aux HIWORD = zc1e810 \ shr eax,16
c                   parm( value*4 ) [eax] \
c                   value [ax] \
c                   modify exact [eax]
c$pragma aux LOBYTE = \
c                   parm( value*1 ) [al] \
c                   value [al] \
c                   modify exact []
c$pragma aux HIBYTE = \
c                   parm( value*2 ) [ax] \
c                   value [ah] \
c                   modify exact []
c$pragma aux LOWORD = \
c                   parm( value*2 ) [ax] \
c                   value [ax] \
c                   modify exact []

!-------------------------------------------------------------------------------
!  KERNEL Section
!-------------------------------------------------------------------------------

!---- begin KERNEL -------------------------------------------------------------

! Loader Routines

c$pragma aux (winapi) GetVersion parm
c$pragma aux (winapi) GetNumTasks parm
c$pragma aux (winapi) GetCodeHandle parm( value*4 )
c$pragma aux (winapi) GetCodeInfo parm( reference, reference )
c$pragma aux (winapi) GetModuleHandle parm( value )
c$pragma aux (winapi) GetModuleUsage parm( value*2 )
c$pragma aux (winapi) GetModuleFileName parm( value*2, value, value*2 )
c$pragma aux (winapi) GetInstanceData parm( value*2, reference near, value*2 )
c$pragma aux (winapi) GetProcAddress parm( value*2, value )
c$pragma aux (winapi) MakeProcInstance parm( value*4, value*2 )
c$pragma aux (winapi) FreeProcInstance parm( value*4 )
c$pragma aux (winapi) LoadLibrary parm( value )
c$pragma aux (winapi) LoadModule parm( value, reference )
c$pragma aux (winapi) FreeModule parm( value*2 )
c$pragma aux (winapi) FreeLibrary parm( value*2 )
c$pragma aux (winapi) GetFreeSpace parm( value*2 )
c$pragma aux (winapi) WinExec parm( value, value*2 )
c$pragma aux (winapi) DebugBreak parm
c$pragma aux (winapi) OutputDebugString parm( value )
c$pragma aux (winapi) SwitchStackBack parm
c$pragma aux (winapi) SwitchStackTo parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetCurrentPDB parm

!---- begin OPENFILE -----------------------------------------------------------

c$pragma aux (winapi) OpenFile parm( value, reference, value*2 )

c$pragma aux (winapi) GetTempDrive parm( value*1 )
c$pragma aux (winapi) GetTempFileName parm( value*1, value, value*2, value )
c$pragma aux (winapi) SetHandleCount parm( value*2 )

c$pragma aux (winapi) GetDriveType parm( value*2 )

!---- end OPENFILE -------------------------------------------------------------

!---- begin MEMMGR -------------------------------------------------------------

c$pragma aux (winapi) GlobalAlloc parm( value*2, value*4 )
c$pragma aux (winapi) GlobalDosAlloc parm( value*4 )
c$pragma aux (winapi) GlobalDosFree parm( value*2 )
c$pragma aux (winapi) GlobalCompact parm( value*4 )
c$pragma aux (winapi) GlobalFree parm( value*2 )
c$pragma aux (winapi) GlobalHandle parm( value*2 )
c$pragma aux (winapi) GlobalLock parm( value*2 )
c$pragma aux (winapi) GlobalReAlloc parm( value*2, value*4, value*2 )
c$pragma aux (winapi) GlobalSize parm( value*2 )
c$pragma aux (winapi) GlobalUnlock parm( value*2 )
c$pragma aux (winapi) GlobalFlags parm( value*2 )
c$pragma aux (winapi) GlobalWire parm( value*2 )
c$pragma aux (winapi) GlobalUnWire parm( value*2 )
c$pragma aux (winapi) GlobalUnlock parm( value*2 )
c$pragma aux (winapi) GlobalLRUNewest parm( value*2 )
c$pragma aux (winapi) GlobalLRUOldest parm( value*2 )
c$pragma aux (winapi) GlobalNotify parm( reference )
c$pragma aux (winapi) GlobalPageLock parm( value*2 )
c$pragma aux (winapi) GlobalPageUnlock parm( value*2 )
c$pragma aux (winapi) GlobalFix parm( value*2 )
c$pragma aux (winapi) GlobalUnfix parm( value*2 )

c$pragma aux (winapi) GlobalDiscard parm( value*2 )

c$pragma aux (winapi) LockSegment parm( value*2 )
c$pragma aux (winapi) UnlockSegment parm( value*2 )

c$pragma aux (winapi) LockData parm( value*2 )

c$pragma aux (winapi) UnLockData parm( value*2 )

c$pragma aux (winapi) LocalAlloc parm( value*2, value*2 )
c$pragma aux (winapi) LocalCompact parm( value*2 )
c$pragma aux (winapi) LocalFree parm( value*2 )
c$pragma aux (winapi) LocalHandle parm( value*2 )
c$pragma aux (winapi) LocalInit parm( value*2, value*2, value*2 )
c$pragma aux (winapi) LocalLock parm( value*2 )
c$pragma aux (winapi) LocalNotify parm( reference )
c$pragma aux (winapi) LocalReAlloc parm( value*2, value*2, value*2 )
c$pragma aux (winapi) LocalSize parm( value*2 )
c$pragma aux (winapi) LocalUnlock parm( value*2 )
c$pragma aux (winapi) LocalFlags parm( value*2 )
c$pragma aux (winapi) LocalShrink parm( value*2, value*2 )

c$pragma aux (winapi) LocalDiscard parm( value*2 )

!---- end MEMMGR ---------------------------------------------------------------

c$pragma aux (winapi) SetSwapAreaSize parm( value*2 )
c$pragma aux (winapi) ValidateFreeSpaces parm
c$pragma aux (winapi) LimitEmsPages parm( value*4 )
c$pragma aux (winapi) SetErrorMode parm( value*2 )
c$pragma aux (winapi) ValidateCodeSegments parm

c$pragma aux (winapi) GetDOSEnvironment parm

c$pragma aux (winapi) AllocDStoCSAlias parm( value*2 )
c$pragma aux (winapi) AllocSelector parm( value*2 )
c$pragma aux (winapi) ChangeSelector parm( value*2, value*2 )
c$pragma aux (winapi) FreeSelector parm( value*2 )

c$pragma aux (winapi) UnlockResource "GlobalUnlock" parm ( value*2 )

c$pragma aux (winapi) FindResource parm( value*2, value, value )
c$pragma aux (winapi) LoadResource parm( value*2, value*2 )
c$pragma aux (winapi) FreeResource parm( value*2 )
c$pragma aux (winapi) LockResource parm( value*2 )
c$pragma aux (winapi) SetResourceHandler parm( value*2, reference, reference )
c$pragma aux (winapi) AllocResource parm( value*2, value*2, value*4 )
c$pragma aux (winapi) SizeofResource parm( value*2, value*2 )
c$pragma aux (winapi) AccessResource parm( value*2, value*2 )

c$pragma aux MAKEINTRESOURCE = z0d0000ffff \ or eax,0ffff0000h
c                   parm( value*2 ) [ax] \
c                   value [eax] \
c                   modify exact [eax]

c$pragma aux (winapi) Yield parm
c$pragma aux (winapi) GetCurrentTask parm

!---- begin ATOM ---------------------------------------------------------------

c$pragma aux (winapi) InitAtomTable parm( value*2 )
c$pragma aux (winapi) AddAtom parm( value )
c$pragma aux (winapi) DeleteAtom parm( value*2 )
c$pragma aux (winapi) FindAtom parm( value )
c$pragma aux (winapi) GetAtomName parm( value*2, value, value*2 )
c$pragma aux (winapi) GlobalAddAtom parm( value )
c$pragma aux (winapi) GlobalDeleteAtom parm( value*2 )
c$pragma aux (winapi) GlobalFindAtom parm( value )
c$pragma aux (winapi) GlobalGetAtomName parm( value*2, value, value*2 )
c$pragma aux (winapi) GetAtomHandle parm( value*2 )

!---- end ATOM -----------------------------------------------------------------

! User Profile Routines

c$pragma aux (winapi) GetProfileInt parm( value, value, value*2 )
c$pragma aux (winapi) GetProfileString parm( value, value, value, value, \
c                                            value*2 )
c$pragma aux (winapi) WriteProfileString parm( value, value, value )
c$pragma aux (winapi) GetPrivateProfileInt parm( value, value, value*2, value )
c$pragma aux (winapi) GetPrivateProfileString parm( value, value, value, \
c                                                   value, value*2, value )
c$pragma aux (winapi) WritePrivateProfileString parm( value, value, value, \
c                                                     value )

c$pragma aux (winapi) GetWindowsDirectory parm( value, value*2 )
c$pragma aux (winapi) GetSystemDirectory parm( value, value*2 )

! Catch() and Throw()

c$pragma aux (winapi) Catch parm( reference )
c$pragma aux (winapi) Throw parm( reference, value*2 )

c$pragma aux (winapi) FatalAppExit parm( value*2, value )
c$pragma aux (winapi) FatalExit parm( value*2 )

c$pragma aux (winapi) SwapRecording parm( value*2 )

! Character Translation Routines

c$pragma aux (winapi) AnsiToOem parm( value, value )
c$pragma aux (winapi) OemToAnsi parm( value, value )
c$pragma aux (winapi) AnsiToOemBuff parm( value, value, value*2 )
c$pragma aux (winapi) OemToAnsiBuff parm( value, value, value*2 )
c$pragma aux (winapi) AnsiUpper parm( value )
c$pragma aux (winapi) AnsiUpperBuff parm( value, value*2 )
c$pragma aux (winapi) AnsiLower parm( value )
c$pragma aux (winapi) AnsiLowerBuff parm( value, value*2 )
c$pragma aux (winapi) AnsiNext parm( value )
c$pragma aux (winapi) AnsiPrev parm( value, value )

!---- begin KEYBOARDINFO -------------------------------------------------------

! Keyboard Information Routines

c$pragma aux (winapi) OemKeyScan parm( value*2 )
c$pragma aux (winapi) VkKeyScan parm( value*2 )
c$pragma aux (winapi) GetKeyboardType parm( value*2 )
c$pragma aux (winapi) MapVirtualKey parm( value*2, value*2 )
c$pragma aux (winapi) GetKBCodePage parm
c$pragma aux (winapi) GetKeyNameText parm( value*4, value, value*2 )
c$pragma aux (winapi) ToAscii parm( value*2, value*2, reference, reference, \
c                                   value*2 )

!---- end KEYBOARDINFO ---------------------------------------------------------

!---- begin LANGUAGE -----------------------------------------------------------

! Language dependent Routines

c$pragma aux (winapi) IsCharAlpha parm( value*1 )
c$pragma aux (winapi) IsCharAlphaNumeric parm( value*1 )
c$pragma aux (winapi) IsCharUpper parm( value*1 )
c$pragma aux (winapi) IsCharLower parm( value*1 )

!---- end LANGUAGE -------------------------------------------------------------

c$pragma aux (winapi) GetWinFlags parm

!---- end KERNEL ---------------------------------------------------------------

!-------------------------------------------------------------------------------
!  GDI Section
!-------------------------------------------------------------------------------

!---- begin GDI ----------------------------------------------------------------

c$pragma aux RGB = z30f6   \ xor   dh,dh
c                  zc1e210 \ shl   edx,16
c                  z0bc2   \ or    eax,edx
c                  parm ( value*1, value*1, value*1 ) [al] [ah] [dl] \
c                  value [eax] \
c                  modify exact [eax edx]
c$pragma aux PALETTERGB = zb602   \ mov   dh,02h
c                         zc1e210 \ shl   edx,16
c                         z0bc2   \ or    eax,edx
c                  parm ( value*1, value*1, value*1 ) [al] [ah] [dl] \
c                  value [eax] \
c                  modify exact [eax edx]
c$pragma aux PALETTEINDEX = z0fb7c0     \ movzx eax,ax
c                           z0d00000001 \ or    eax,01000000h
c                  parm ( value*2 ) [ax] \
c                  value [eax] \
c                  modify exact [eax]
c$pragma aux GetRValue = \
c                  parm ( value*4 ) [eax] \
c                  value [al] \
c                  modify exact []
c$pragma aux GetGValue = \
c                  parm ( value*4 ) [eax] \
c                  value [ah] \
c                  modify exact []
c$pragma aux GetBValue = zc1e810 \ shr eax,16
c                  parm ( value*4 ) [eax] \
c                  value [al] \
c                  modify exact [eax]

!---- begin DRAWTEXT -----------------------------------------------------------

c$pragma aux (winapi) DrawText parm( value*2, value, value*2, reference, \
c                                    value*2 )
c$pragma aux (winapi) DrawIcon parm( value*2, value*2, value*2, value*2 )

!---- end DRAWTEXT -------------------------------------------------------------

c$pragma aux (winapi) GetWindowDC parm( value*2 )
c$pragma aux (winapi) GetDC parm( value*2 )
c$pragma aux (winapi) ReleaseDC parm( value*2, value*2 )
c$pragma aux (winapi) CreateDC parm( value, value, value, value )
c$pragma aux (winapi) CreateIC parm( value, value, value, value )
c$pragma aux (winapi) CreateCompatibleDC parm( value*2 )
c$pragma aux (winapi) DeleteDC parm( value*2 )
c$pragma aux (winapi) SaveDC parm( value*2 )
c$pragma aux (winapi) RestoreDC parm( value*2, value*2 )
c$pragma aux (winapi) MoveTo parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetCurrentPosition parm( value*2 )
c$pragma aux (winapi) LineTo parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetDCOrg parm( value*2 )

c$pragma aux (winapi) MulDiv parm( value*2, value*2, value*2 )

c$pragma aux (winapi) ExtTextOut parm( value*2, value*2, value*2, value*2, \
c                                      reference, value, value*2, reference )

c$pragma aux (winapi) Polyline parm( value*2, reference, value*2 )
c$pragma aux (winapi) Polygon parm( value*2, reference, value*2 )
c$pragma aux (winapi) PolyPolygon parm( value*2, reference, reference, value*2 )

c$pragma aux (winapi) Rectangle parm( value*2, value*2, value*2, value*2, \
c                                     value*2 )
c$pragma aux (winapi) RoundRect parm( value*2, value*2, value*2, value*2, \
c                                     value*2, value*2, value*2 )
c$pragma aux (winapi) Ellipse parm( value*2, value*2, value*2, value*2, \
c                                   value*2 )
c$pragma aux (winapi) Arc parm( value*2, value*2, value*2, value*2, \
c                                   value*2, value*2, value*2, value*2, \
c                                   value*2 )
c$pragma aux (winapi) Chord parm( value*2, value*2, value*2, value*2, \
c                                 value*2, value*2, value*2, value*2, \
c                                 value*2 )
c$pragma aux (winapi) Pie parm( value*2, value*2, value*2, value*2, value*2, \
c                               value*2, value*2, value*2, value*2 )
c$pragma aux (winapi) PatBlt parm( value*2, value*2, value*2, value*2, \
c                                  value*2, value*4 )
c$pragma aux (winapi) BitBlt parm( value*2, value*2, value*2, value*2, \
c                                  value*2, value*2, value*2, value*2, value*4 )
c$pragma aux (winapi) StretchBlt parm( value*2, value*2, value*2, value*2, \
c                                      value*2, value*2, value*2, value*2, \
c                                      value*2, value*2, value*4 )
c$pragma aux (winapi) TextOut parm( value*2, value*2, value*2, value, value*2 )
c$pragma aux (winapi) TabbedTextOut parm( value*2, value*2, value*2, value, \
c                                         value*2, value*2, reference, value*2 )
c$pragma aux (winapi) GetCharWidth parm( value*2, value*2, value*2, reference )
c$pragma aux (winapi) SetPixel parm( value*2, value*2, value*2, value*4 )
c$pragma aux (winapi) GetPixel parm( value*2, value*2, value*2 )
c$pragma aux (winapi) FloodFill parm( value*2, value*2, value*2, value*4 )
c$pragma aux (winapi) ExtFloodFill parm( value*2, value*2, value*2, \
c                                        value*4, value*2 )
c$pragma aux (winapi) LineDDA parm( value*2, value*2, value*2, value*2, \
c                                   reference, reference )

c$pragma aux (winapi) GetStockObject parm( value*2 )

c$pragma aux (winapi) CreatePen parm( value*2, value*2, value*4 )
c$pragma aux (winapi) CreatePenIndirect parm( reference )

c$pragma aux (winapi) CreateSolidBrush parm( value*4 )
c$pragma aux (winapi) CreateHatchBrush parm( value*2, value*4 )
c$pragma aux (winapi) SetBrushOrg parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetBrushOrg parm( value*2 )
c$pragma aux (winapi) CreatePatternBrush parm( value*2 )
c$pragma aux (winapi) CreateBrushIndirect parm( reference )

c$pragma aux (winapi) CreateBitmap parm( value*2, value*2, value*1, value*1, \
c                                        reference )
c$pragma aux (winapi) CreateBitmapIndirect parm( reference )
c$pragma aux (winapi) CreateCompatibleBitmap parm( value*2, value*2, value*2 )
c$pragma aux (winapi) CreateDiscardableBitmap parm( value*2, value*2, value*2 )

c$pragma aux (winapi) SetBitmapBits parm( value*2, value*4, reference )
c$pragma aux (winapi) GetBitmapBits parm( value*2, value*4, reference )
c$pragma aux (winapi) SetBitmapDimension parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetBitmapDimension parm( value*2 )

c$pragma aux (winapi) CreateFont parm( value*2, value*2, value*2, value*2, \
c                                      value*2, value*1, value*1, value*1, \
c                                      value*1, value*1, value*1, value*1, \
c                                      value*1, value )
c$pragma aux (winapi) CreateFontIndirect parm( reference )

c$pragma aux (winapi) SelectClipRgn parm( value*2, value*2 )
c$pragma aux (winapi) CreateRectRgn parm( value*2, value*2, value*2, \
c                                         value*2 )
c$pragma aux (winapi) SetRectRgn parm( value*2, value*2, value*2, value*2, \
c                                      value*2 )
c$pragma aux (winapi) CreateRectRgnIndirect parm( reference )
c$pragma aux (winapi) CreateEllipticRgnIndirect parm( reference )
c$pragma aux (winapi) CreateEllipticRgn parm( value*2, value*2, value*2, \
c                                             value*2 )
c$pragma aux (winapi) CreatePolygonRgn parm( reference, value*2, value*2 )
c$pragma aux (winapi) CreatePolyPolygonRgn parm( reference, reference, \
c                                                value*2, value*2 )
c$pragma aux (winapi) CreateRoundRectRgn parm( value*2, value*2, value*2, \
c                                              value*2, value*2, value*2 )

c$pragma aux (winapi) GetObject parm( value*2, value*2, reference )
c$pragma aux (winapi) DeleteObject parm( value*2 )
c$pragma aux (winapi) SelectObject parm( value*2, value*2 )
c$pragma aux (winapi) UnrealizeObject parm( value*2 )

c$pragma aux (winapi) SetBkColor parm( value*2, value*4 )
c$pragma aux (winapi) GetBkColor parm( value*2 )
c$pragma aux (winapi) SetBkMode parm( value*2, value*2 )
c$pragma aux (winapi) GetBkMode parm( value*2 )
c$pragma aux (winapi) SetTextColor parm( value*2, value*4 )
c$pragma aux (winapi) GetTextColor parm( value*2 )
c$pragma aux (winapi) SetTextAlign parm( value*2, value*2 )
c$pragma aux (winapi) GetTextAlign parm( value*2 )
c$pragma aux (winapi) SetMapperFlags parm( value*2, value*4 )
c$pragma aux (winapi) GetAspectRatioFilter parm( value*2 )
c$pragma aux (winapi) GetNearestColor parm( value*2, value*4 )
c$pragma aux (winapi) SetROP2 parm( value*2, value*2 )
c$pragma aux (winapi) GetROP2 parm( value*2 )
c$pragma aux (winapi) SetStretchBltMode parm( value*2, value*2 )
c$pragma aux (winapi) GetStretchBltMode parm( value*2 )
c$pragma aux (winapi) SetPolyFillMode parm( value*2, value*2 )
c$pragma aux (winapi) GetPolyFillMode parm( value*2 )
c$pragma aux (winapi) SetMapMode parm( value*2, value*2 )
c$pragma aux (winapi) GetMapMode parm( value*2 )
c$pragma aux (winapi) SetWindowOrg parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetWindowOrg parm( value*2 )
c$pragma aux (winapi) SetWindowExt parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetWindowExt parm( value*2 )
c$pragma aux (winapi) SetViewportOrg parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetViewportOrg parm( value*2 )
c$pragma aux (winapi) SetViewportExt parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetViewportExt parm( value*2 )
c$pragma aux (winapi) OffsetViewportOrg parm( value*2, value*2, value*2 )
c$pragma aux (winapi) ScaleViewportExt parm( value*2, value*2, value*2, \
c                                            value*2, value*2 )
c$pragma aux (winapi) OffsetWindowOrg parm( value*2, value*2, value*2 )
c$pragma aux (winapi) ScaleWindowExt parm( value*2, value*2, value*2, \
c                                          value*2, value*2 )

c$pragma aux (winapi) GetClipBox parm( value*2, reference )
c$pragma aux (winapi) IntersectClipRect parm( value*2, value*2, value*2, \
c                                             value*2, value*2 )
c$pragma aux (winapi) OffsetClipRgn parm( value*2, value*2, value*2 )
c$pragma aux (winapi) ExcludeClipRect parm( value*2, value*2, value*2, \
c                                           value*2, value*2 )
c$pragma aux (winapi) PtVisible parm( value*2, value*2, value*2 )
c$pragma aux (winapi) CombineRgn parm( value*2, value*2, value*2, value*2 )
c$pragma aux (winapi) EqualRgn parm( value*2, value*2 )
c$pragma aux (winapi) OffsetRgn parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetRgnBox parm( value*2, reference )

c$pragma aux (winapi) SetTextJustification parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetTextExtent parm( value*2, value, value*2 )
c$pragma aux (winapi) GetTabbedTextExtent parm( value*2, value, value*2, \
c                                               value*2, reference )
c$pragma aux (winapi) SetTextCharacterExtra parm( value*2, value*2 )
c$pragma aux (winapi) GetTextCharacterExtra parm( value*2 )

c$pragma aux (winapi) GetMetaFile parm( value )
c$pragma aux (winapi) DeleteMetaFile parm( value*2 )
c$pragma aux (winapi) CopyMetaFile parm( value*2, value )

!---- begin METAFILE -----------------------------------------------------------

c$pragma aux (winapi) PlayMetaFileRecord parm( value*2, reference, reference, \
c                                              value*2 )
c$pragma aux (winapi) EnumMetaFile parm( value*2, value*2, value, \
c                                        value )

!---- end METAFILE -------------------------------------------------------------

c$pragma aux (winapi) PlayMetaFile parm( value*2, value*2 )
c$pragma aux (winapi) Escape parm( value*2, value*2, value*2, value, \
c                                  value )
c$pragma aux (winapi) EnumFonts parm( value*2, value, value, value )
c$pragma aux (winapi) EnumObjects parm( value*2, value*2, value, value )
c$pragma aux (winapi) GetTextFace parm( value*2, value*2, value )

!---- begin TEXTMETRIC ---------------------------------------------------------

c$pragma aux (winapi) GetTextMetrics parm( value*2, reference )

!---- end TEXTMETRIC -----------------------------------------------------------

c$pragma aux (winapi) GetDeviceCaps parm( value*2, value*2 )

c$pragma aux (winapi) SetEnvironment parm( value, value, value*2 )
c$pragma aux (winapi) GetEnvironment parm( value, value, value*2 )

c$pragma aux (winapi) DPtoLP parm( value*2, reference, value*2 )
c$pragma aux (winapi) LPtoDP parm( value*2, reference, value*2 )

c$pragma aux (winapi) CreateMetaFile parm( value )
c$pragma aux (winapi) CloseMetaFile parm( value*2 )
c$pragma aux (winapi) GetMetaFileBits parm( value*2 )
c$pragma aux (winapi) SetMetaFileBits parm( value*2 )

c$pragma aux (winapi) SetDIBits parm( value*2, value*2, value*2, value*2, \
c                                     reference, reference, value*2 )
c$pragma aux (winapi) GetDIBits parm( value*2, value*2, value*2, value*2, \
c                                     reference, reference, value*2 )
c$pragma aux (winapi) SetDIBitsToDevice parm( value*2, value*2, value*2, \
c                                             value*2, value*2, value*2, \
c                                             value*2, value*2, value*2, \
c                                             reference, reference, value*2 )
c$pragma aux (winapi) CreateDIBitmap parm( value*2, reference, value*4, \
c                                          reference, reference, value*2 )
c$pragma aux (winapi) CreateDIBPatternBrush parm( value*2, value*2 )
c$pragma aux (winapi) StretchDIBits parm( value*2, value*2, value*2, value*2, \
c                                         value*2, value*2, value*2, value*2, \
c                                         value*2, reference, reference, \
c                                         value*2, value*4 )

c$pragma aux (winapi) CreatePalette parm( reference )
c$pragma aux (winapi) SelectPalette parm( value*2, value*2, value*2 )
c$pragma aux (winapi) RealizePalette parm( value*2 )
c$pragma aux (winapi) UpdateColors parm( value*2 )
c$pragma aux (winapi) AnimatePalette parm( value*2, value*2, value*2, \
c                                          reference )
c$pragma aux (winapi) SetPaletteEntries parm( value*2, value*2, value*2, \
c                                             reference )
c$pragma aux (winapi) GetPaletteEntries parm( value*2, value*2, value*2, \
c                                             reference )
c$pragma aux (winapi) GetNearestPaletteIndex parm( value*2, value*4 )
c$pragma aux (winapi) ResizePalette parm( value*2, value*2 )

c$pragma aux (winapi) GetSystemPaletteEntries parm( value*2, value*2, \
c                                                   value*2, \
c                                                   reference )
c$pragma aux (winapi) GetSystemPaletteUse parm( value*2, value*2 )
c$pragma aux (winapi) SetSystemPaletteUse parm( value*2, value*2 )

!---- end GDI ------------------------------------------------------------------

!-------------------------------------------------------------------------------
!      USER Section
!-------------------------------------------------------------------------------

!---- begin USER ---------------------------------------------------------------

c$pragma aux (winapi) wvsprintf parm( value, value, reference )
c$pragma aux (windecl) wsprintf parm( value, value )

!---- begin WINMESSAGES --------------------------------------------------------

c$pragma aux (winapi) RegisterWindowMessage parm( value )

!---- end WINMESSAGES ----------------------------------------------------------

!---- begin MSG ----------------------------------------------------------------

! Message Function Templates

c$pragma aux (winapi) GetMessage parm( reference, value*2, value*2, value*2 )
c$pragma aux (winapi) TranslateMessage parm( reference )
c$pragma aux (winapi) DispatchMessage parm( reference )
c$pragma aux (winapi) PeekMessage parm( reference, value*2, value*2, \
c                                       value*2, value*2 )

!---- end MSG ------------------------------------------------------------------

c$pragma aux (winapi) ExitWindows parm( value*4, value*2 )

c$pragma aux (winapi) SwapMouseButton parm( value*2 )
c$pragma aux (winapi) GetMessagePos parm
c$pragma aux (winapi) GetMessageTime parm

c$pragma aux (winapi) GetSysModalWindow parm
c$pragma aux (winapi) SetSysModalWindow parm( value*2 )

c$pragma aux (winapi) SendMessage parm( value*2, value*2, value*2, value*4 )
c$pragma aux (winapi) PostMessage parm( value*2, value*2, value*2, value*4 )
c$pragma aux (winapi) PostAppMessage parm( value*2, value*2, value*2, value*4 )
c$pragma aux (winapi) ReplyMessage parm( value*4 )
c$pragma aux (winapi) WaitMessage parm
c$pragma aux (winapi) DefWindowProc parm( value*2, value*2, value*2, value*4 )
c$pragma aux (winapi) PostQuitMessage parm( value*2 )
c$pragma aux (winapi) CallWindowProc parm( value, value*2, \
c                                          value*2, value*2, value*4 )
c$pragma aux (winapi) InSendMessage parm

c$pragma aux (winapi) GetDoubleClickTime parm
c$pragma aux (winapi) SetDoubleClickTime parm( value*2 )

c$pragma aux (winapi) RegisterClass parm( reference )
c$pragma aux (winapi) UnregisterClass parm( value, value*2 )
c$pragma aux (winapi) GetClassInfo parm( value*2, value, reference )

c$pragma aux (winapi) SetMessageQueue parm( value*2 )

c$pragma aux (winapi) CreateWindow parm( value, value, value*4, \
c                                        value*2, value*2, value*2, \
c                                        value*2, value*2, value*2, \
c                                        value*2, value*4 )
c$pragma aux (winapi) CreateWindowEx parm( value*4, value, \
c                                          value, value*4, value*2, \
c                                          value*2, value*2, value*2, \
c                                          value*2, value*2, value*2, \
c                                          value*4 )

c$pragma aux (winapi) IsWindow parm( value*2 )
c$pragma aux (winapi) IsChild parm( value*2, value*2 )
c$pragma aux (winapi) DestroyWindow parm( value*2 )

c$pragma aux (winapi) ShowWindow parm( value*2, value*2 )
c$pragma aux (winapi) FlashWindow parm( value*2, value*2 )
c$pragma aux (winapi) ShowOwnedPopups parm( value*2, value*2 )

c$pragma aux (winapi) OpenIcon parm( value*2 )
c$pragma aux (winapi) CloseWindow parm( value*2 )
c$pragma aux (winapi) MoveWindow parm( value*2, value*2, value*2, value*2, \
c                                      value*2, value*2 )
c$pragma aux (winapi) SetWindowPos parm( value*2, value*2, value*2, \
c                                        value*2, value*2, value*2, \
c                                        value*2 )

!---- begin DEFERWINDOWPOS -----------------------------------------------------

c$pragma aux (winapi) BeginDeferWindowPos parm( value*2 )
c$pragma aux (winapi) DeferWindowPos parm( value*2, value*2, value*2, \
c                                          value*2, value*2, value*2, \
c                                          value*2, value*2 )
c$pragma aux (winapi) EndDeferWindowPos parm( value*2 )

!---- end DEFERWINDOWPOS -------------------------------------------------------

c$pragma aux (winapi) IsWindowVisible parm( value*2 )
c$pragma aux (winapi) IsIconic parm( value*2 )
c$pragma aux (winapi) AnyPopup parm
c$pragma aux (winapi) BringWindowToTop parm( value*2 )
c$pragma aux (winapi) IsZoomed parm( value*2 )

!---- begin CTLMGR -------------------------------------------------------------

c$pragma aux (winapi) CreateDialog parm( value*2, value, value*2, value*4 )
c$pragma aux (winapi) CreateDialogIndirect parm( value*2, reference, \
c                                                value*2, value*4 )
c$pragma aux (winapi) CreateDialogParam parm( value*2, value, value*2, \
c                                             value*4, value*4 )
c$pragma aux (winapi) CreateDialogIndirectParam parm( value*2, reference, \
c                                                     value*2, value*4, \
c                                                     value*4 )
c$pragma aux (winapi) DialogBox parm( value*2, value, value*2, value*4 )
c$pragma aux (winapi) DialogBoxIndirect parm( value*2, value*2, value*2, \
c                                             value*4 )
c$pragma aux (winapi) DialogBoxParam parm( value*2, value, value*2, \
c                                          value*4, value*4 )
c$pragma aux (winapi) DialogBoxIndirectParam parm( value*2, value*2, value*2, \
c                                                  value*4, value*4 )
c$pragma aux (winapi) EndDialog parm( value*2, value*2 )
c$pragma aux (winapi) GetDlgItem parm( value*2, value*2 )
c$pragma aux (winapi) SetDlgItemInt parm( value*2, value*2, value*2, \
c                                         value*2 )
c$pragma aux (winapi) GetDlgItemInt parm( value*2, value*2, reference, \
c                                         value*2 )
c$pragma aux (winapi) SetDlgItemText parm( value*2, value*2, value )
c$pragma aux (winapi) GetDlgItemText parm( value*2, value*2, value, \
c                                          value*2 )
c$pragma aux (winapi) CheckDlgButton parm( value*2, value*2, value*2 )
c$pragma aux (winapi) CheckRadioButton parm( value*2, value*2, value*2, \
c                                            value*2 )
c$pragma aux (winapi) IsDlgButtonChecked parm( value*2, value*2 )
c$pragma aux (winapi) SendDlgItemMessage parm( value*2, value*2, value*2, \
c                                              value*2, value*4 )
c$pragma aux (winapi) GetNextDlgGroupItem parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetNextDlgTabItem parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetDlgCtrlID parm( value*2 )
c$pragma aux (winapi) GetDialogBaseUnits parm
c$pragma aux (winapi) DefDlgProc parm( value*2, value*2, value*2, value*4 )

!---- end CTLMGR ---------------------------------------------------------------

!---- begin MSG ----------------------------------------------------------------

c$pragma aux (winapi) CallMsgFilter parm( reference, value*2 )

!---- end MSG ------------------------------------------------------------------

!---- begin CLIPBOARD ----------------------------------------------------------

! Clipboard Manager Functions

c$pragma aux (winapi) OpenClipboard parm( value*2 )
c$pragma aux (winapi) CloseClipboard parm
c$pragma aux (winapi) GetClipboardOwner parm
c$pragma aux (winapi) SetClipboardViewer parm( value*2 )
c$pragma aux (winapi) GetClipboardViewer parm
c$pragma aux (winapi) ChangeClipboardChain parm( value*2, value*2 )
c$pragma aux (winapi) SetClipboardData parm( value*2, value*2 )
c$pragma aux (winapi) GetClipboardData parm( value*2 )
c$pragma aux (winapi) RegisterClipboardFormat parm( value )
c$pragma aux (winapi) CountClipboardFormats parm
c$pragma aux (winapi) EnumClipboardFormats parm( value*2 )
c$pragma aux (winapi) GetClipboardFormatName parm( value*2, value, value*2 )
c$pragma aux (winapi) EmptyClipboard parm
c$pragma aux (winapi) IsClipboardFormatAvailable parm( value*2 )
c$pragma aux (winapi) GetPriorityClipboardFormat parm( reference, value*2 )

!---- end CLIPBOARD ------------------------------------------------------------

c$pragma aux (winapi) SetFocus parm( value*2 )
c$pragma aux (winapi) GetFocus parm
c$pragma aux (winapi) GetActiveWindow parm
c$pragma aux (winapi) GetKeyState parm( value*2 )
c$pragma aux (winapi) GetAsyncKeyState parm( value*2 )
c$pragma aux (winapi) GetKeyboardState parm( reference )
c$pragma aux (winapi) SetKeyboardState parm( reference )
c$pragma aux (winapi) EnableHardwareInput parm( value*2 )
c$pragma aux (winapi) GetInputState parm
c$pragma aux (winapi) GetCapture parm
c$pragma aux (winapi) SetCapture parm( value*2 )
c$pragma aux (winapi) ReleaseCapture parm

! Windows Functions

c$pragma aux (winapi) SetTimer parm( value*2, value*2, value*2, value*4 )
c$pragma aux (winapi) KillTimer parm( value*2, value*2 )

c$pragma aux (winapi) EnableWindow parm( value*2, value*2 )
c$pragma aux (winapi) IsWindowEnabled parm( value*2 )

c$pragma aux (winapi) LoadAccelerators parm( value*2, value )

!---- begin MSG ----------------------------------------------------------------

c$pragma aux (winapi) TranslateAccelerator parm( value*2, value*2, reference )

!---- end MSG ------------------------------------------------------------------

!---- begin SYSMETRICS ---------------------------------------------------------

c$pragma aux (winapi) GetSystemMetrics parm( value*2 )

!---- end SYSMETRICS -----------------------------------------------------------

!---- begin MENUS --------------------------------------------------------------

c$pragma aux (winapi) LoadMenu parm( value*2, value )
c$pragma aux (winapi) LoadMenuIndirect parm( reference )
c$pragma aux (winapi) GetMenu parm( value*2 )
c$pragma aux (winapi) SetMenu parm( value*2, value*2 )
c$pragma aux (winapi) ChangeMenu parm( value*2, value*2, value, \
c                                      value*2, value*2 )
c$pragma aux (winapi) HiliteMenuItem parm( value*2, value*2, value*2, \
c                                          value*2 )
c$pragma aux (winapi) GetMenuString parm( value*2, value*2, value, \
c                                         value*2, value*2 )
c$pragma aux (winapi) GetMenuState parm( value*2, value*2, value*2 )
c$pragma aux (winapi) DrawMenuBar parm( value*2 )
c$pragma aux (winapi) GetSystemMenu parm( value*2, value*2 )
c$pragma aux (winapi) CreateMenu parm
c$pragma aux (winapi) CreatePopupMenu parm
c$pragma aux (winapi) DestroyMenu parm( value*2 )
c$pragma aux (winapi) CheckMenuItem parm( value*2, value*2, value*2 )
c$pragma aux (winapi) EnableMenuItem parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetSubMenu parm( value*2, value*2 )
c$pragma aux (winapi) GetMenuItemID parm( value*2, value*2 )
c$pragma aux (winapi) GetMenuItemCount parm( value*2 )

c$pragma aux (winapi) InsertMenu parm( value*2, value*2, value*2, value*2, \
c                                      value )
c$pragma aux (winapi) AppendMenu parm( value*2, value*2, value*2, value )
c$pragma aux (winapi) ModifyMenu parm( value*2, value*2, value*2, value*2, \
c                                      value )
c$pragma aux (winapi) RemoveMenu parm( value*2, value*2, value*2 )
c$pragma aux (winapi) DeleteMenu parm( value*2, value*2, value*2 )
c$pragma aux (winapi) SetMenuItemBitmaps parm( value*2, value*2, value*2, \
c                                              value*2, value*2 )
c$pragma aux (winapi) GetMenuCheckMarkDimensions parm
c$pragma aux (winapi) TrackPopupMenu parm( value*2, value*2, value*2, \
c                                          value*2, value*2, value*2, \
c                                          reference )

!---- end MENUS ----------------------------------------------------------------

c$pragma aux (winapi) GrayString parm( value*2, value*2, reference, \
c                                      value*4, value*2, value*2, value*2, \
c                                      value*2, value*2 )
c$pragma aux (winapi) UpdateWindow parm( value*2 )
c$pragma aux (winapi) SetActiveWindow parm( value*2 )

c$pragma aux (winapi) BeginPaint parm( value*2, reference )
c$pragma aux (winapi) EndPaint parm( value*2, reference )
c$pragma aux (winapi) GetUpdateRect parm( value*2, reference, value*2 )
c$pragma aux (winapi) GetUpdateRgn parm( value*2, value*2, value*2 )

c$pragma aux (winapi) ExcludeUpdateRgn parm( value*2, value*2 )

c$pragma aux (winapi) InvalidateRect parm( value*2, reference, value*2 )
c$pragma aux (winapi) ValidateRect parm( value*2, reference )

c$pragma aux (winapi) InvalidateRgn parm( value*2, value*2, value*2 )
c$pragma aux (winapi) ValidateRgn parm( value*2, value*2 )

c$pragma aux (winapi) ScrollWindow parm( value*2, value*2, value*2, \
c                                        reference, reference )
c$pragma aux (winapi) ScrollDC parm( value*2, value*2, value*2, \
c                                    reference, reference, \
c                                    value*2, reference )

!---- begin SCROLL -------------------------------------------------------------

c$pragma aux (winapi) SetScrollPos parm( value*2, value*2, value*2, value*2 )
c$pragma aux (winapi) GetScrollPos parm( value*2, value*2 )
c$pragma aux (winapi) SetScrollRange parm( value*2, value*2, value*2, \
c                                          value*2, value*2 )
c$pragma aux (winapi) GetScrollRange parm( value*2, value*2, \
c                                          reference, reference )
c$pragma aux (winapi) ShowScrollBar parm( value*2, value*2, value*2 )

!---- end SCROLL ---------------------------------------------------------------

c$pragma aux (winapi) SetProp parm( value*2, value, value*2 )
c$pragma aux (winapi) GetProp parm( value*2, value )
c$pragma aux (winapi) RemoveProp parm( value*2, value )
c$pragma aux (winapi) EnumProps parm( value*2, value )
c$pragma aux (winapi) SetWindowText parm( value*2, value )
c$pragma aux (winapi) GetWindowText parm( value*2, value, value*2 )
c$pragma aux (winapi) GetWindowTextLength parm( value*2 )

c$pragma aux (winapi) GetClientRect parm( value*2, reference )
c$pragma aux (winapi) GetWindowRect parm( value*2, reference )
c$pragma aux (winapi) AdjustWindowRect parm( reference, value*4, \
c                                            value*2 )
c$pragma aux (winapi) AdjustWindowRectEx parm( reference, value*4, \
c                                              value*2, value*4 )

!---- begin MB -----------------------------------------------------------------

c$pragma aux (winapi) MessageBox parm( value*2, value, value, value*2 )
c$pragma aux (winapi) MessageBeep parm( value*2 )

!---- end MB -------------------------------------------------------------------

c$pragma aux (winapi) ShowCursor parm( value*2 )
c$pragma aux (winapi) SetCursorPos parm( value*2, value*2 )
c$pragma aux (winapi) SetCursor parm( value*2 )
c$pragma aux (winapi) GetCursorPos parm( reference )
c$pragma aux (winapi) ClipCursor parm( reference )

c$pragma aux (winapi) CreateCaret parm( value*2, value*2, value*2, value*2 )
c$pragma aux (winapi) GetCaretBlinkTime parm
c$pragma aux (winapi) SetCaretBlinkTime parm( value*2 )
c$pragma aux (winapi) DestroyCaret parm
c$pragma aux (winapi) HideCaret parm( value*2 )
c$pragma aux (winapi) ShowCaret parm( value*2 )
c$pragma aux (winapi) SetCaretPos parm( value*2, value*2 )
c$pragma aux (winapi) GetCaretPos parm( reference )

c$pragma aux (winapi) ClientToScreen parm( value*2, reference )
c$pragma aux (winapi) ScreenToClient parm( value*2, reference )
c$pragma aux (winapi) WindowFromPoint parm( value )
c$pragma aux (winapi) ChildWindowFromPoint parm( value*2, value )

!---- begin COLOR --------------------------------------------------------------

c$pragma aux (winapi) GetSysColor parm( value*2 )
c$pragma aux (winapi) SetSysColors parm( value*2, reference, reference )

!---- end COLOR ----------------------------------------------------------------

c$pragma aux (winapi) FillRgn parm( value*2, value*2, value*2 )
c$pragma aux (winapi) FrameRgn parm( value*2, value*2, value*2, value*2, \
c                                    value*2 )
c$pragma aux (winapi) InvertRgn parm( value*2, value*2 )
c$pragma aux (winapi) PaintRgn parm( value*2, value*2 )
c$pragma aux (winapi) PtInRegion parm( value*2, value*2, value*2 )

c$pragma aux (winapi) DrawFocusRect parm( value*2, reference )
c$pragma aux (winapi) FillRect parm( value*2, reference, value*2 )
c$pragma aux (winapi) FrameRect parm( value*2, reference, value*2 )
c$pragma aux (winapi) InvertRect parm( value*2, reference )
c$pragma aux (winapi) SetRect parm( reference, value*2, value*2, value*2, \
c                                   value*2 )
c$pragma aux (winapi) SetRectEmpty parm( reference )
c$pragma aux (winapi) CopyRect parm( reference, reference )
c$pragma aux (winapi) InflateRect parm( reference, value*2, value*2 )
c$pragma aux (winapi) IntersectRect parm( reference, reference, reference )
c$pragma aux (winapi) UnionRect parm( reference, reference, reference )
c$pragma aux (winapi) OffsetRect parm( reference, value*2, value*2 )
c$pragma aux (winapi) IsRectEmpty parm( reference )
c$pragma aux (winapi) EqualRect parm( reference, reference )
c$pragma aux (winapi) PtInRect parm( reference, value )
c$pragma aux (winapi) RectVisible parm( value*2, reference )
c$pragma aux (winapi) RectInRegion parm( value*2, reference )

c$pragma aux (winapi) GetCurrentTime parm
c$pragma aux (winapi) GetTickCount parm

!---- begin WINOFFSETS ---------------------------------------------------------

c$pragma aux (winapi) GetWindowWord parm( value*2, value*2 )
c$pragma aux (winapi) SetWindowWord parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetWindowLong parm( value*2, value*2 )
c$pragma aux (winapi) SetWindowLong parm( value*2, value*2, value*4 )
c$pragma aux (winapi) GetClassWord parm( value*2, value*2 )
c$pragma aux (winapi) SetClassWord parm( value*2, value*2, value*2 )
c$pragma aux (winapi) GetClassLong parm( value*2, value*2 )
c$pragma aux (winapi) SetClassLong parm( value*2, value*2, value*4 )
c$pragma aux (winapi) GetDesktopHwnd parm
c$pragma aux (winapi) GetDesktopWindow parm

!---- end WINOFFSETS -----------------------------------------------------------

c$pragma aux (winapi) GetParent parm( value*2 )
c$pragma aux (winapi) SetParent parm( value*2, value*2 )
c$pragma aux (winapi) EnumChildWindows parm( value*2, value, value*4 )
c$pragma aux (winapi) FindWindow parm( value, value )
c$pragma aux (winapi) EnumWindows parm( value, value*4 )
c$pragma aux (winapi) EnumTaskWindows parm( value*2, value, value*4 )
c$pragma aux (winapi) GetClassName parm( value*2, value, value*2 )
c$pragma aux (winapi) GetTopWindow parm( value*2 )
c$pragma aux (winapi) GetNextWindow parm( value*2, value*2 )
c$pragma aux (winapi) GetWindowTask parm( value*2 )
c$pragma aux (winapi) GetLastActivePopup parm( value*2 )

c$pragma aux (winapi) GetWindow parm( value*2, value*2 )

!---- begin NOWH ---------------------------------------------------------------

c$pragma aux (winapi) SetWindowsHook parm( value*2, reference )
c$pragma aux (winapi) UnhookWindowsHook parm( value*2, reference )
c$pragma aux (winapi) DefHookProc parm( value*2, value*2, value*4, reference )

!---- end NOWH -----------------------------------------------------------------

! Resource Loading Routines

c$pragma aux (winapi) LoadBitmap parm( value*2, value )
c$pragma aux (winapi) LoadCursor parm( value*2, value*4 )
c$pragma aux (winapi) CreateCursor parm( value*2, value*2, value*2, value*2, \
c                                        value*2, reference, reference )
c$pragma aux (winapi) DestroyCursor parm( value*2 )

c$pragma aux (winapi) LoadIcon parm( value*2, value )
c$pragma aux (winapi) CreateIcon parm( value*2, value*2, value*2, value*1, \
c                                      value*1, reference, reference )
c$pragma aux (winapi) DestroyIcon parm( value*2 )

c$pragma aux (winapi) LoadString parm( value*2, value*2, value, value*2 )

c$pragma aux (winapi) AddFontResource parm( value )
c$pragma aux (winapi) RemoveFontResource parm( value )

!---- begin KANJI --------------------------------------------------------------

c$pragma aux (winapi) ConvertRequest parm( value*2, reference )
c$pragma aux (winapi) SetConvertParams parm( value*2, value*2 )
c$pragma aux (winapi) SetConvertHook parm( value*2 )

!---- end KANJI ----------------------------------------------------------------

! Key Conversion Window

c$pragma aux (winapi) IsTwoByteCharPrefix parm( value*1 )

!---- begin CTLMGR -------------------------------------------------------------

! Dialog Manager Routines

!---- begin MSG ----------------------------------------------------------------

c$pragma aux (winapi) IsDialogMessage parm( value*2, reference )

!---- end MSG ------------------------------------------------------------------

c$pragma aux (winapi) MapDialogRect parm( value*2, reference )

c$pragma aux (winapi) DlgDirList parm( value*2, value, value*2, value*2, \
c                                      value*2 )
c$pragma aux (winapi) DlgDirSelect parm( value*2, value, value*2 )
c$pragma aux (winapi) DlgDirListComboBox parm( value*2, value, \
c                                              value*2, value*2, value*2 )
c$pragma aux (winapi) DlgDirSelectComboBox parm( value*2, value, value*2 )

!---- end CTLMGR ---------------------------------------------------------------

!---- begin SOUND --------------------------------------------------------------

c$pragma aux (winapi) OpenSound parm
c$pragma aux (winapi) CloseSound parm
c$pragma aux (winapi) SetVoiceQueueSize parm( value*2, value*2 )
c$pragma aux (winapi) SetVoiceNote parm( value*2, value*2, value*2, value*2 )
c$pragma aux (winapi) SetVoiceAccent parm( value*2, value*2, value*2, \
c                                          value*2, value*2 )
c$pragma aux (winapi) SetVoiceEnvelope parm( value*2, value*2, value*2 )
c$pragma aux (winapi) SetSoundNoise parm( value*2, value*2 )
c$pragma aux (winapi) SetVoiceSound parm( value*2, value*4, value*2 )
c$pragma aux (winapi) StartSound parm
c$pragma aux (winapi) StopSound parm
c$pragma aux (winapi) WaitSoundState parm( value*2 )
c$pragma aux (winapi) SyncAllVoices parm
c$pragma aux (winapi) CountVoiceNotes parm( value*2 )
c$pragma aux (winapi) GetThresholdEvent parm
c$pragma aux (winapi) GetThresholdStatus parm
c$pragma aux (winapi) SetVoiceThreshold parm( value*2, value*2 )

!---- end SOUND ----------------------------------------------------------------

!---- begin COMM ---------------------------------------------------------------

c$pragma aux (winapi) OpenComm parm( value, value*2, value*2 )
c$pragma aux (winapi) SetCommState parm( reference )
c$pragma aux (winapi) GetCommState parm( value*2, reference )
c$pragma aux (winapi) ReadComm parm( value*2, value, value*2 )
c$pragma aux (winapi) UngetCommChar parm( value*2, value*1 )
c$pragma aux (winapi) WriteComm parm( value*2, value, value*2 )
c$pragma aux (winapi) CloseComm parm( value*2 )
c$pragma aux (winapi) GetCommError parm( value*2, reference )
c$pragma aux (winapi) BuildCommDCB parm( value, reference )
c$pragma aux (winapi) TransmitCommChar parm( value*2, value*1 )
c$pragma aux (winapi) SetCommEventMask parm( value*2, value*2 )
c$pragma aux (winapi) GetCommEventMask parm( value*2, value*2 )
c$pragma aux (winapi) SetCommBreak parm( value*2 )
c$pragma aux (winapi) ClearCommBreak parm( value*2 )
c$pragma aux (winapi) FlushComm parm( value*2, value*2 )
c$pragma aux (winapi) EscapeCommFunction parm( value*2, value*2 )

!---- end COMM -----------------------------------------------------------------

!---- begin MDI ----------------------------------------------------------------

c$pragma aux (winapi) DefFrameProc parm( value*2, value*2, value*2, \
c                                        value*2, value*4 )
c$pragma aux (winapi) DefMDIChildProc parm( value*2, value*2, value*2, \
c                                           value*4 )

!---- begin MSG ----------------------------------------------------------------

c$pragma aux (winapi) TranslateMDISysAccel parm( value*2, reference )

!---- end MSG ------------------------------------------------------------------

c$pragma aux (winapi) ArrangeIconicWindows parm( value*2 )

!---- end MDI ------------------------------------------------------------------

!---- end USER -----------------------------------------------------------------

!---- begin HELP ---------------------------------------------------------------

c$pragma aux (winapi) WinHelp parm( value*2, value, value*2, value*4 )

!---- end HELP -----------------------------------------------------------------

!---- begin PROFILER -----------------------------------------------------------

! function declarations for profiler routines contained in Windows libraries

c$pragma aux (winapi) ProfInsChk parm
c$pragma aux (winapi) ProfSetup parm( value*2, value*2 )
c$pragma aux (winapi) ProfSampRate parm( value*2, value*2 )
c$pragma aux (winapi) ProfStart parm
c$pragma aux (winapi) ProfStop parm
c$pragma aux (winapi) ProfClear parm
c$pragma aux (winapi) ProfFlush parm
c$pragma aux (winapi) ProfFinish parm

!---- end PROFILER -------------------------------------------------------------


!---- begin COMMDLG -----------------------------------------------------------

! function declarations common dialogs

c$pragma aux    (winapi) GetOpenFileName parm( reference )
c$pragma aux    (winapi) GetSaveFileName parm( reference )
c$pragma aux    (winapi) GetFileTitle parm( value*4, value*4, value*2 )
c$pragma aux    (winapi) ChooseColor parm( reference )
c$pragma aux    (winapi) FindText parm( reference )
c$pragma aux    (winapi) ReplaceText parm( reference )
c$pragma aux    (winapi) ChooseFont parm( reference )
c$pragma aux    (winapi) PrintDlg parm( reference )
c$pragma aux    (winapi) CommDlgExtendedError parm

!---- end COMMDLG -----------------------------------------------------------

c$pragma aux (winapi) DeviceCapabilities parm( value, value, value*2, \
c                                              reference, reference )
c$pragma aux (winapi) DeviceMode parm( value*2, value*2, value, value )
c$pragma aux (winapi) ExtDeviceMode parm( value*2, value*2, reference, \
c                                         value, value, reference, value, \
c                                         value*2 )

!---- Special WIN386 library functions -----------------------------------------

c$pragma aux GetProc16 "*_" parm ( value*4, value*4 )
c$pragma aux ReleaseProc16 "*_" parm ( value*4 )
c$pragma aux AllocAlias16 "*_" parm ( value*4 )
c$pragma aux AllocHugeAlias16 "*_" parm ( value*4, value*4 )
c$pragma aux FreeAlias16 "^_" parm ( value*4 )
c$pragma aux FreeHugeAlias16 "*_" parm ( value*4, value*4 )
c$pragma aux MapAliasToFlat "*_" parm ( value*4 )
c$pragma aux InvokeIndirectFunction "*_" parm( value*4 ) caller []
c$pragma aux DefineDLLEntry "*_" parm( value*4 ) caller []
c$pragma aux DefineUserProc16 "*_" parm( value*4, value*4 ) caller []
c$pragma aux GetIndirectFunctionHandle "*_" parm( value*4 ) caller []
c$pragma aux FreeIndirectFunctionHandle "*_" parm( value*4 )
c$pragma aux PASS_WORD_AS_POINTER = z350000ffff \ ! or eax,0ffff0000h
c                                 parm( value*2 ) [ax] \
c                                 value [eax] \
c                                 modify exact [eax]
c$pragma aux _Call16 "*" parm( value ) caller []
c  _Call16 performs the same function as "GetIndirectFunctionHandle,
c  InvokeIndirectFunctionHandle, FreeIndirectFunctionHandle" but is
c  much easier to use.
c  Fmt specifiers for _Call16:
c       c - call 'cdecl' func as opposed to 'pascal' func (must be first char)
c       b - unsigned byte
c       w - 16-bit word
c       d - 32-bit dword
c       f - double precision floating-point
c       p - 32-bit flat pointer (converted to 16:16 pointer)

!-------------------------------------------------------------------------------
!  Define pragma which invokes 32-bit DLLs from 32-bit Windows applications
!-------------------------------------------------------------------------------

c$pragma aux (InvokeIndirectFunction) dll32_call

c$pragma aux (AddAtom) _16AddAtom
c$pragma aux (AddFontResource) _16AddFontResource
c$pragma aux (AdjustWindowRect) _16AdjustWindowRect
c$pragma aux (AdjustWindowRectEx) _16AdjustWindowRectEx
c$pragma aux (AnimatePalette) _16AnimatePalette
c$pragma aux (AnsiLower) _16AnsiLower
c$pragma aux (AnsiLowerBuff) _16AnsiLowerBuff
c$pragma aux (AnsiNext) _16AnsiNext
c$pragma aux (AnsiPrev) _16AnsiPrev
c$pragma aux (AnsiToOem) _16AnsiToOem
c$pragma aux (AnsiToOemBuff) _16AnsiToOemBuff
c$pragma aux (AnsiUpper) _16AnsiUpper
c$pragma aux (AnsiUpperBuff) _16AnsiUpperBuff
c$pragma aux (BuildCommDCB) _16BuildCommDCB
c$pragma aux (CallMsgFilter) _16CallMsgFilter
c$pragma aux (CallWindowProc) _16CallWindowProc
c$pragma aux (ChangeMenu) _16ChangeMenu
c$pragma aux (ClientToScreen) _16ClientToScreen
c$pragma aux (ClipCursor) _16ClipCursor
c$pragma aux (CopyMetaFile) _16CopyMetaFile
c$pragma aux (CopyRect) _16CopyRect
c$pragma aux (CreateBitmap) _16CreateBitmap
c$pragma aux (CreateBitmapIndirect) _16CreateBitmapIndirect
c$pragma aux (CreateBrushIndirect) _16CreateBrushIndirect
c$pragma aux (CreateCursor) _16CreateCursor
c$pragma aux (CreateDC) _16CreateDC
c$pragma aux (CreateDialogIndirect) _16CreateDialogIndirect
c$pragma aux (CreateEllipticRgnIndirect) _16CreateEllipticRgnIndirect
c$pragma aux (CreateFont) _16CreateFont
c$pragma aux (CreateFontIndirect) _16CreateFontIndirect
c$pragma aux (CreateIC) _16CreateIC
c$pragma aux (CreateIcon) _16CreateIcon
c$pragma aux (CreateMetaFile) _16CreateMetaFile
c$pragma aux (CreatePalette) _16CreatePalette
c$pragma aux (CreatePenIndirect) _16CreatePenIndirect
c$pragma aux (CreatePolygonRgn) _16CreatePolygonRgn
c$pragma aux (CreatePolyPolygonRgn) _16CreatePolyPolygonRgn
c$pragma aux (CreateRectRgnIndirect) _16CreateRectRgnIndirect
c$pragma aux (CreateWindow) _16CreateWindow
c$pragma aux (CreateWindowEx) _16CreateWindowEx
c$pragma aux (DialogBox) _16DialogBox
c$pragma aux (DialogBoxIndirect) _16DialogBoxIndirect
c$pragma aux (DialogBoxIndirectParam) _16DialogBoxIndirectParam
c$pragma aux (DialogBoxParam) _16DialogBoxParam
c$pragma aux (DispatchMessage) _16DispatchMessage
c$pragma aux (DlgDirList) _16DlgDirList
c$pragma aux (DlgDirListComboBox) _16DlgDirListComboBox
c$pragma aux (DlgDirSelect) _16DlgDirSelect
c$pragma aux (DlgDirSelectComboBox) _16DlgDirSelectComboBox
c$pragma aux (DPtoLP) _16DPtoLP
c$pragma aux (DrawFocusRect) _16DrawFocusRect
c$pragma aux (DrawText) _16DrawText
c$pragma aux (EndPaint) _16EndPaint
c$pragma aux (EnumChildWindows) _16EnumChildWindows
c$pragma aux (EnumFonts) _16EnumFonts
c$pragma aux (EnumMetaFile) _16EnumMetaFile
c$pragma aux (EnumObjects) _16EnumObjects
c$pragma aux (EnumTaskWindows) _16EnumTaskWindows
c$pragma aux (EnumWindows) _16EnumWindows
c$pragma aux (EqualRect) _16EqualRect
c$pragma aux (ExtTextOut) _16ExtTextOut
c$pragma aux (FillRect) _16FillRect
c$pragma aux (FindAtom) _16FindAtom
c$pragma aux (FindResource) _16FindResource
c$pragma aux (FindWindow) _16FindWindow
c$pragma aux (FrameRect) _16FrameRect
c$pragma aux (GetAtomName) _16GetAtomName
c$pragma aux (GetBitmapBits) _16GetBitmapBits
c$pragma aux (GetCaretPos) _16GetCaretPos
c$pragma aux (GetCharWidth) _16GetCharWidth
c$pragma aux (GetClassInfo) _16GetClassInfo
c$pragma aux (GetClassName) _16GetClassName
c$pragma aux (GetClientRect) _16GetClientRect
c$pragma aux (GetClipboardFormatName) _16GetClipboardFormatName
c$pragma aux (GetClipBox) _16GetClipBox
c$pragma aux (GetCodeInfo) _16GetCodeInfo
c$pragma aux (GetCommError) _16GetCommError
c$pragma aux (GetCommState) _16GetCommState
c$pragma aux (GetCursorPos) _16GetCursorPos
c$pragma aux (GetDIBits) _16GetDIBits
c$pragma aux (GetDlgItemInt) _16GetDlgItemInt
c$pragma aux (GetDlgItemText) _16GetDlgItemText
c$pragma aux (GetEnvironment) _16GetEnvironment
c$pragma aux (GetInstanceData) _16GetInstanceData
c$pragma aux (GetKeyboardState) _16GetKeyboardState
c$pragma aux (GetKeyNameText) _16GetKeyNameText
c$pragma aux (GetMenuString) _16GetMenuString
c$pragma aux (GetMetaFile) _16GetMetaFile
c$pragma aux (GetModuleFileName) _16GetModuleFileName
c$pragma aux (GetModuleHandle) _16GetModuleHandle
c$pragma aux (GetObject) _16GetObject
c$pragma aux (GetPaletteEntries) _16GetPaletteEntries
c$pragma aux (GetPriorityClipboardFormat) _16GetPriorityClipboardFormat
c$pragma aux (GetPrivateProfileInt) _16GetPrivateProfileInt
c$pragma aux (GetPrivateProfileString) _16GetPrivateProfileString
c$pragma aux (GetProcAddress) _16GetProcAddress
c$pragma aux (GetProfileInt) _16GetProfileInt
c$pragma aux (GetProfileString) _16GetProfileString
c$pragma aux (GetProp) _16GetProp
c$pragma aux (GetRgnBox) _16GetRgnBox
c$pragma aux (GetScrollRange) _16GetScrollRange
c$pragma aux (GetSystemDirectory) _16GetSystemDirectory
c$pragma aux (GetSystemPaletteEntries) _16GetSystemPaletteEntries
c$pragma aux (GetTabbedTextExtent) _16GetTabbedTextExtent
c$pragma aux (GetTempFileName) _16GetTempFileName
c$pragma aux (GetTextExtent) _16GetTextExtent
c$pragma aux (GetTextFace) _16GetTextFace
c$pragma aux (GetTextMetrics) _16GetTextMetrics
c$pragma aux (GetUpdateRect) _16GetUpdateRect
c$pragma aux (GetWindowRect) _16GetWindowRect
c$pragma aux (GetWindowsDirectory) _16GetWindowsDirectory
c$pragma aux (GetWindowText) _16GetWindowText
c$pragma aux (GlobalAddAtom) _16GlobalAddAtom
c$pragma aux (GlobalFindAtom) _16GlobalFindAtom
c$pragma aux (GlobalGetAtomName) _16GlobalGetAtomName
c$pragma aux (InflateRect) _16InflateRect
c$pragma aux (IntersectRect) _16IntersectRect
c$pragma aux (InvalidateRect) _16InvalidateRect
c$pragma aux (InvertRect) _16InvertRect
c$pragma aux (IsDialogMessage) _16IsDialogMessage
c$pragma aux (IsRectEmpty) _16IsRectEmpty
c$pragma aux (LineDDA) _16LineDDA
c$pragma aux (LoadAccelerators) _16LoadAccelerators
c$pragma aux (LoadBitmap) _16LoadBitmap
c$pragma aux (LoadCursor) _16LoadCursor
c$pragma aux (LoadIcon) _16LoadIcon
c$pragma aux (LoadLibrary) _16LoadLibrary
c$pragma aux (LoadMenu) _16LoadMenu
c$pragma aux (LoadMenuIndirect) _16LoadMenuIndirect
c$pragma aux (LoadModule) _16LoadModule
c$pragma aux (LoadString) _16LoadString
c$pragma aux (LPtoDP) _16LPtoDP
c$pragma aux (MapDialogRect) _16MapDialogRect
c$pragma aux (MessageBox) _16MessageBox
c$pragma aux (OemToAnsi) _16OemToAnsi
c$pragma aux (OemToAnsiBuff) _16OemToAnsiBuff
c$pragma aux (OffsetRect) _16OffsetRect
c$pragma aux (OpenComm) _16OpenComm
c$pragma aux (OpenFile) _16OpenFile
c$pragma aux (OutputDebugString) _16OutputDebugString
c$pragma aux (PlayMetaFile) _16PlayMetaFile
c$pragma aux (Polygon) _16Polygon
c$pragma aux (Polyline) _16Polyline
c$pragma aux (PolyPolygon) _16PolyPolygon
c$pragma aux (PtInRect) _16PtInRect
c$pragma aux (ReadComm) _16ReadComm
c$pragma aux (RectInRegion) _16RectInRegion
c$pragma aux (RectVisible) _16RectVisible
c$pragma aux (RegisterClipboardFormat) _16RegisterClipboardFormat
c$pragma aux (RegisterWindowMessage) _16RegisterWindowMessage
c$pragma aux (RemoveFontResource) _16RemoveFontResource
c$pragma aux (RemoveProp) _16RemoveProp
c$pragma aux (ScreenToClient) _16ScreenToClient
c$pragma aux (ScrollDC) _16ScrollDC
c$pragma aux (ScrollWindow) _16ScrollWindow
c$pragma aux (SetBitmapBits) _16SetBitmapBits
c$pragma aux (SetCommState) _16SetCommState
c$pragma aux (SetDIBits) _16SetDIBits
c$pragma aux (SetDlgItemText) _16SetDlgItemText
c$pragma aux (SetEnvironment) _16SetEnvironment
c$pragma aux (SetKeyboardState) _16SetKeyboardState
c$pragma aux (SetPaletteEntries) _16SetPaletteEntries
c$pragma aux (SetProp) _16SetProp
c$pragma aux (SetRect) _16SetRect
c$pragma aux (SetRectEmpty) _16SetRectEmpty
c$pragma aux (SetResourceHandler) _16SetResourceHandler
c$pragma aux (SetSysColors) _16SetSysColors
c$pragma aux (SetWindowText) _16SetWindowText
c$pragma aux (TabbedTextOut) _16TabbedTextOut
c$pragma aux (TextOut) _16TextOut
c$pragma aux (ToAscii) _16ToAscii
c$pragma aux (TrackPopupMenu) _16TrackPopupMenu
c$pragma aux (TranslateAccelerator) _16TranslateAccelerator
c$pragma aux (TranslateMDISysAccel) _16TranslateMDISysAccel
c$pragma aux (TranslateMessage) _16TranslateMessage
c$pragma aux (UnionRect) _16UnionRect
c$pragma aux (UnregisterClass) _16UnregisterClass
c$pragma aux (ValidateRect) _16ValidateRect
c$pragma aux (WinExec) _16WinExec
c$pragma aux (WinHelp) _16WinHelp
c$pragma aux (WriteComm) _16WriteComm
c$pragma aux (WritePrivateProfileString) _16WritePrivateProfileString
c$pragma aux (WriteProfileString) _16WriteProfileString

!-------------------------------------------------------------------------------

c$ifndef NOCOVERSENDS
c$pragma aux (SendMessage) SendMessage "_COVER_^"
c$pragma aux (SendDlgItemMessage) SendDlgItemMessage "_COVER_^"
c$endif

c$ifndef NOCOVERRC
c$pragma aux (RegisterClass) RegisterClass "_COVER_^"
c$endif

c$ifndef NOAUTOPROCS
c$pragma aux (CreateDialog) CreateDialog "_COVER_^"
c$pragma aux (CreateDialogIndirect) CreateDialogIndirect "_COVER_^"
c$pragma aux (CreateDialogParam) CreateDialogParam "_COVER_^"
c$pragma aux (CreateDialogIndirectParam) CreateDialogIndirectParam "_COVER_^"
c$pragma aux (DialogBox) DialogBox "_COVER_^"
c$pragma aux (DialogBoxIndirect) DialogBoxIndirect "_COVER_^"
c$pragma aux (DialogBoxParam) DialogBoxParam "_COVER_^"
c$pragma aux (DialogBoxIndirectParam) DialogBoxIndirectParam "_COVER_^"
c$pragma aux (EnumChildWindows) EnumChildWindows "_COVER_^"
c$pragma aux (EnumFonts) EnumFonts "_COVER_^"
c$pragma aux (EnumMetaFile) EnumMetaFile "_COVER_^"
c$pragma aux (EnumObjects) EnumObjects "_COVER_^"
c$pragma aux (EnumProps) EnumProps "_COVER_^"
c$pragma aux (EnumTaskWindows) EnumTaskWindows "_COVER_^"
c$pragma aux (EnumWindows) EnumWindows "_COVER_^"
c$pragma aux (Escape) Escape "_COVER_*"
c$pragma aux (FreeProcInstance) FreeProcInstance "_COVER_^"
c$pragma aux (GlobalNotify) GlobalNotify "_COVER_^"
c$pragma aux (GrayString) GrayString "_COVER_^"
c$pragma aux (LineDDA) LineDDA "_COVER_^"
c$pragma aux (MakeProcInstance) MakeProcInstance "_COVER_^" \
c                               parm( reference far, value*2 )
c$pragma aux (SetResourceHandler) SetResourceHandler "_COVER_^"
c$pragma aux (SetTimer) SetTimer "_COVER_^"
c$pragma aux (SetWindowsHook) SetWindowsHook "_COVER_^"
c$pragma aux (SetWindowLong) SetWindowLong "_COVER_^"
c$pragma aux (SetClassLong) SetClassLong "_COVER_^"
c$pragma aux (UnhookWindowsHook) UnhookWindowsHook "_COVER_^"

c$pragma aux (GetOpenFileName) GetOpenFileName "_COVER^"
c$pragma aux (GetSaveFileName) GetSaveFileName "_COVER^"
c$pragma aux (GetFileTitle) GetFileTitle "_COVER^"
c$pragma aux (ChooseColor) ChooseColor "_COVER^"
c$pragma aux (FindText) FindText "_COVER^"
c$pragma aux (ReplaceText) ReplaceText "_COVER^"
c$pragma aux (ChooseFont) ChooseFont "_COVER^"
c$pragma aux (PrintDlg) PrintDlg "_COVER^"
c$endif
