home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / INC / BASEDEF.INC next >
Text File  |  1995-04-14  |  4KB  |  219 lines

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