home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tolkit45.zip / os2tk45 / inc / basedef.inc < prev    next >
Text File  |  1999-04-30  |  4KB  |  209 lines

  1. ;***    BASEDEF.INC
  2. ;
  3. ;
  4. ;    Basic constants and types
  5. ;    Copyright (c) 1988,1989 Microsoft Corporation
  6. ;
  7. ;
  8. ;    MODIFICATION HISTORY
  9. ;        10/10/88  JTP    Created.
  10. ;        10/11/88  JTP    Added more base types.
  11. ;
  12. ;    To control what is included use the following:
  13. ;
  14. ;        INCL_TYPES         basic typedefs
  15. ;
  16.  
  17.  
  18. ;*** Basic constants
  19. ;
  20.  
  21.  
  22. NULL  equ     0
  23. TRUE  equ    -1
  24. FALSE equ     0
  25.  
  26. CTRUE    EQU    1
  27.  
  28. KSIZE    EQU    1024
  29.  
  30. ifdef  INCL_PAGE
  31. PAGESIZE    EQU    4096
  32. endif
  33.  
  34.  
  35. ;*** Basic data types
  36. ;
  37.  
  38.  
  39. DefType VOID
  40.  
  41. DefEntry CENTRY CDECL FAR         ;to declare misc. C-based interfaces
  42. DefEntry PRIVENTRY PASCAL FAR         ;to declare private routines
  43. DefEntry EXPENTRY PASCAL FAR         ;to declare exported routines
  44. DefEntry API32ENTRY PASCAL FAR         ;to declare exported API routines
  45. DefEntry DYNENTRY PASCAL FAR _export     ;to declare exported dynlink routines
  46.  
  47. ifdef  INCL_TYPES
  48.  
  49. DefType _INT,dd            ;i
  50. DefType UINT,dd            ;u
  51. DefType BOOL,_INT            ;f
  52.  
  53. DefType _BYTE,db            ;b
  54. DefType _WORD,dw            ;w
  55. DefType _DWORD,dd            ;dw
  56.  
  57. DefType CHAR,db            ;ch
  58. DefType UCHAR,db            ;uch
  59. DefType _SHORT,dw            ;s
  60. DefType USHORT,dw            ;us
  61. DefType LONG,dd            ;l
  62. DefType ULONG,dd            ;ul
  63.  
  64. DefType BBOOL,UCHAR            ;bf
  65. DefType SBOOL,USHORT            ;sf
  66. DefType LBOOL,ULONG            ;lf
  67.  
  68. DefType FLAGS,ULONG            ;fl
  69. DefType PORT,ULONG            ;port
  70.  
  71.  
  72. ;*** Basic pointer types
  73. ;
  74. DefType PVOID,dd            ;p
  75. DefType NPVOID,dd            ;np
  76.  
  77.  
  78. ;*** Basic pointer-to-basic-data types
  79. ;
  80. DefType PINT,dd            ;pi
  81. DefType NPINT,dd            ;npi
  82.  
  83. DefType PUINT,dd            ;pu
  84. DefType NPUINT,dd            ;npu
  85.  
  86. DefType PBYTE,dd            ;pb
  87. DefType NPBYTE,dd            ;npb
  88.  
  89. DefType PWORD,dd            ;pw
  90. DefType NPWORD,dd            ;npw
  91.  
  92. DefType PDWORD,dd            ;pdw
  93. DefType NPDWORD,dd            ;npdw
  94.  
  95. DefType PCHAR,dd            ;pch
  96. DefType NPCHAR,dd            ;npch
  97.  
  98. DefType PSHORT,dd            ;ps
  99. DefType NPSHORT,dd            ;nps
  100.  
  101. DefType PLONG,dd            ;pl
  102. DefType NPLONG,dd            ;npl
  103.  
  104. DefType PUCHAR,dd            ;puch
  105. DefType NPUCHAR,dd            ;npuch
  106.  
  107. DefType PUSHORT,dd            ;pus
  108. DefType NPUSHORT,dd            ;npus
  109.  
  110. DefType PULONG,dd            ;pul
  111. DefType NPULONG,dd            ;npul
  112.  
  113. DefType PBOOL,dd            ;pf
  114. DefType NPBOOL,dd            ;npf
  115.  
  116. DefType PBBOOL,dd            ;pbf
  117. DefType NPBBOOL,dd            ;npbf
  118.  
  119. DefType PSBOOL,dd            ;psf
  120. DefType NPSBOOL,dd            ;npsf
  121.  
  122. DefType PLBOOL,dd            ;plf
  123. DefType NPLBOOL,dd            ;nplf
  124.  
  125. DefType PFLAGS,dd            ;pfl
  126. DefType NPFLAGS,dd            ;npfl
  127.  
  128. DefType PPVOID,dd            ;pp
  129. DefType NPPVOID,dd            ;npp
  130.  
  131.  
  132. ;*** Other common types (and their pointers)
  133. ;
  134. DefType BUF,_BYTE            ;buf
  135. DefType PBUF,dd            ;pbuf
  136.  
  137. DefType NAM,CHAR            ;nam
  138. DefType SZ,CHAR            ;sz
  139. DefType PSZ,dd            ;psz
  140. DefType NPSZ,dd            ;npsz
  141. DefType SZZ,CHAR            ;szz
  142. DefType PSZZ,dd            ;pszz
  143. DefType NPSZZ,dd            ;npszz
  144.  
  145. DefType SEL,USHORT            ;sel
  146. DefType PSEL,dd            ;psel
  147. DefType NPSEL,dd            ;npsel
  148.  
  149. DefType SOFFSET,USHORT            ;soff
  150. DefType _OFFSET,ULONG            ;off
  151.  
  152. DefType PPHYS,ULONG            ;pphys
  153.  
  154. DefType PFN,dd            ;pfn
  155. DefType NPFN,dd            ;npfn
  156. DefType FPFN,dq            ;fpfn
  157. DefType FPVOID,dq            ;fp (the only kind of FPVOID allowed)
  158.  
  159. DefType PPFN,dd            ;ppfn
  160. DefType NPPFN,dd            ;nppfn
  161. DefType PFPFN,dd            ;pfpfn
  162. DefType NPFPFN,dd            ;npfpfn
  163.  
  164. DefType SHANDLE,USHORT            ;sh
  165. DefType HANDLE,PVOID            ;h
  166.  
  167. DefStruc ,_POINTL            ;ptl
  168.     LONG  x
  169.     LONG  y
  170. EndStruc POINTL
  171. DefType PPOINTL,dd
  172.  
  173. DefStruc ,_RECTL            ;rcl
  174.     LONG  xLeft
  175.     LONG  yBottom
  176.     LONG  xRight
  177.     LONG  yTop
  178. EndStruc RECTL
  179. DefType PRECTL,dd
  180.  
  181. DefStruc ,_RGB            ;rgb
  182.     _BYTE bBlue
  183.     _BYTE bGreen
  184.     _BYTE bRed
  185. EndStruc RGB
  186. DefType PRGB,dd
  187.  
  188.  
  189. ;*** OS/2-specific types
  190. ;
  191. DefType ERRCODE,ULONG            ;errc
  192. DefType RETCODE,ULONG            ;rc
  193. DefType SRETCODE,USHORT            ;src
  194.  
  195. DefType PID,USHORT            ;pid
  196. DefType SGID,USHORT            ;sgid
  197. DefType TID,USHORT            ;tid
  198.  
  199. DefStruc ,_RESULTCODES            ;rsc
  200.     USHORT codeTerminate
  201.     USHORT codeResult
  202. EndStruc RESULTCODES
  203. DefType PRESULTCODES,dd
  204.  
  205. DefType HFILE,SHANDLE            ;shf
  206. DefType PHFILE,dd            ;pshf
  207.  
  208. endif  ;INCL_TYPES
  209.