Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

268 lines
8.0 KiB

  1. __foldwin32sstuff __foldwin32sstuff;
  2. foldstyleinitialization = true;
  3. enablemapdirect1632 = true;
  4. defaultholdwin16lock = true;
  5. #include "types.thk"
  6. typedef DWORD PFF;
  7. typedef DWORD PFC;
  8. typedef LPSTR PSZ;
  9. typedef LPSTR PCONTEXTINFO;
  10. /*
  11. * fd_fnt.c: PFF FDENTRY FdLoadFontFile( PSZ pszFile, ULONG ulLangageID )
  12. * fd_fnt.c: LONG FDENTRY FdUnloadFontFile( PFF pFF )
  13. * fd_fnt.c: LONG FDENTRY FdGetFontData( PFF pFF, ULONG ulTable, ULONG ulStart, P1616 pb1616, ULONG cb )
  14. * fd_fnt.c: LONG FDENTRY FdQueryFontMetrics( PFF pff, ULONG ulOffset, P1616 pfm16, ULONG cMetricLen )
  15. * fd_fnt.c: LONG FDENTRY FdGetGlyphIndexes( PFF pff, ULONG iQuery, P1616 pBuffer16, ULONG cb, P1616 pagi16, ULONG ulgiStart )
  16. * fd_hfc.c: LONG FDENTRY FdEnable( void )
  17. * fd_hfc.c: PFC FDENTRY FdOpenFontContext( PFF pff )
  18. * fd_hfc.c: LONG FDENTRY FdSetFontContext( PFC pfc, PCONTEXTINFO pci )
  19. * fd_hfc.c: LONG FDENTRY FdCloseFontContext( PFC pfc )
  20. * fd_query.c:LONG FDENTRY FdQueryFaceAttr( PFC pfc, ULONG iQuery, P1616 pBuffer16, ULONG cb, P1616 pagi16, ULONG ulgiStart )
  21. * fd_query.c:LONG FDENTRY FdQueryCharAttr( PFC pfc, ULONG dwQuery, P1616 pbmm16, P1616 lpBuffer16, ULONG dwBuffer, ULONG dwGlyph )
  22. * fd_vdmx.c: long FDENTRY Em2FontHeight( PFF pff, short ResX, short ResY, short EM )
  23. */
  24. PFF FdLoadFontFile( PSZ pszFile, ULONG ulLangageID) =
  25. PFF FdLoadFontFile( PSZ pszFile, ULONG ulLangageID)
  26. {}
  27. LONG FdUnloadFontFile( PFF pFF) =
  28. LONG FdUnloadFontFile( PFF pFF)
  29. {}
  30. LONG FdGetFontData( PFF pFF, ULONG ulTable, ULONG ulStart, PBYTE pb,
  31. ULONG cb) =
  32. LONG FdGetFontData( PFF pFF, ULONG ulTable, ULONG ulStart, PBYTE pb,
  33. ULONG cb)
  34. {}
  35. LONG FdQueryFontMetrics( PFF pff, ULONG ulOffset, PBYTE pfm,
  36. ULONG cMetricLen) =
  37. LONG FdQueryFontMetrics( PFF pff, ULONG ulOffset, PBYTE pfm,
  38. ULONG cMetricLen)
  39. {}
  40. LONG FdGetGlyphIndexes( PFF pff, LPWORD pBuffer, ULONG cb, LPWORD pagi, ULONG ulgiStart) =
  41. LONG FdGetGlyphIndexes( PFF pff, LPWORD pBuffer, ULONG cb, LPWORD pagi, ULONG ulgiStart)
  42. {}
  43. LONG FdEnable() =
  44. LONG FdEnable( )
  45. {}
  46. PFC FdOpenFontContext( PFF pff) =
  47. PFC FdOpenFontContext( PFF pff)
  48. {}
  49. LONG FdSetFontContext( PFC pfc, PCONTEXTINFO pci) =
  50. LONG FdSetFontContext( PFC pfc, PCONTEXTINFO pci)
  51. {}
  52. LONG FdCloseFontContext( PFC pfc) =
  53. LONG FdCloseFontContext( PFC pfc)
  54. {}
  55. LONG FdQueryFaceAttr( PFC pfc, ULONG iQuery, PBYTE pBuffer, ULONG cb,
  56. PBYTE pagi, ULONG ulgiStart) =
  57. LONG FdQueryFaceAttr( PFC pfc, ULONG iQuery, PBYTE pBuffer, ULONG cb,
  58. PBYTE pagi, ULONG ulgiStart)
  59. {}
  60. LONG FdQueryCharAttr( PFC pfc, ULONG dwQuery, PBYTE pbmm, PBYTE lpBuffer,
  61. ULONG dwBuffer, ULONG dwGlyph) =
  62. LONG FdQueryCharAttr( PFC pfc, ULONG dwQuery, PBYTE pbmm, PBYTE lpBuffer,
  63. ULONG dwBuffer, ULONG dwGlyph)
  64. {}
  65. LONG Em2FontHeight( PFF pff, UINT ResX, UINT ResY, UINT EM) =
  66. LONG Em2FontHeight( PFF pff, UINT ResX, UINT ResY, UINT EM)
  67. {}
  68. LONG FracSqrtFar( LONG lFrac ) =
  69. LONG HackFracSqrt( LONG lFrac )
  70. {}
  71. LONG fduFindFontFile( PSZ pszFile, PSZ pszFullPath, DWORD dwFullPath ) =
  72. LONG fduFindFontFile( PSZ pszFile, PSZ pszFullPath, DWORD dwFullPath )
  73. {}
  74. /* 32bit font file interface */
  75. /* Releasing the lock is essential because we are going to */
  76. /* be calling LoadLibrary in kernel32. Scary! */
  77. /* 12/19/94 - mikegi */
  78. LONG Gdi32Font( DWORD dwHandle, DWORD dwFunction, PSZ lpszBuffer ) =
  79. LONG Gdi32Font( DWORD dwHandle, DWORD dwFunction, PSZ lpszBuffer )
  80. {
  81. releasewin16lock = true;
  82. }
  83. /* ---------------------------------------------------------------------- */
  84. /* The following thunks are for allocating 32bit heap memory from GDI16 */
  85. /* ---------------------------------------------------------------------- */
  86. LONG GDI32VirtualAlloc (DWORD dwSize) =
  87. LONG GDI32VirtualAlloc (DWORD dwSize)
  88. {}
  89. BOOL GDI32VirtualFree (DWORD lpAdr, DWORD dwSize) =
  90. BOOL GDI32VirtualFree (DWORD lpAdr, DWORD dwSize)
  91. {}
  92. BOOL GDI32UnmapViewOfFile(DWORD) =
  93. BOOL GDI32UnmapViewOfFile(DWORD)
  94. {}
  95. /* ---------------------------------------------------------------------- */
  96. /* */
  97. /* The Following Thunks Are for the Spooler API's */
  98. /* */
  99. /* ---------------------------------------------------------------------- */
  100. /* Make defines to translate simple ptrs */
  101. typedef BYTE TCHAR;
  102. /* Define structures for compiler so it can repack appropriately */
  103. typedef struct _DOC_INFO_2 { /* dci1 */
  104. LPSTR pDocName;
  105. LPSTR pOutputFile;
  106. LPSTR pDatatype;
  107. DWORD fMode;
  108. DWORD channel;
  109. DWORD JobId;
  110. } DOCINFO;
  111. typedef DOCINFO *LPDOCINFO;
  112. typedef struct _PRINTER_DEFAULTS { /* pd */
  113. LPSTR pDatatype;
  114. LPSTR pDevMode;
  115. DWORD AccessGranted ;
  116. } PRINTER_DEFAULTS;
  117. typedef PRINTER_DEFAULTS *LPPRINTER_DEFAULTS;
  118. BOOL OpenPrinterA(LPSTR lpszPrinter, LPDWORD hPrinter, LPPRINTER_DEFAULTS lppd) =
  119. BOOL OpenPrinterA(LPSTR lpszPrinter, LPDWORD hPrinter, LPPRINTER_DEFAULTS lppd)
  120. {
  121. errorcode = 0;
  122. }
  123. BOOL ThkDeleteJob(DWORD hPrinter, DWORD dwJobId) =
  124. BOOL ThkDeleteJob(DWORD hPrinter, DWORD dwJobId)
  125. {
  126. errorcode = 0;
  127. }
  128. DWORD StartDocPrinterA(DWORD hPrinter, DWORD dwLevel, LPDOCINFO lpbDocInfo) =
  129. DWORD StartDocPrinterA(DWORD hPrinter, DWORD dwLevel, LPDOCINFO lpbDocInfo)
  130. {
  131. errorcode = 0;
  132. }
  133. BOOL StartPagePrinter(DWORD hPrinter) =
  134. BOOL StartPagePrinter(DWORD hPrinter)
  135. {
  136. errorcode = 0;
  137. }
  138. BOOL WritePrinter(DWORD hPrinter, LPVOID pBuf, DWORD cbBuf, LPDWORD lpdwWritten) =
  139. BOOL WritePrinter(DWORD hPrinter, LPVOID pBuf, DWORD cbBuf, LPDWORD lpdwWritten)
  140. {
  141. errorcode = 0;
  142. }
  143. BOOL EndPagePrinter(DWORD hPrinter) =
  144. BOOL EndPagePrinter(DWORD hPrinter)
  145. {
  146. errorcode = 0;
  147. }
  148. BOOL EndDocPrinter(DWORD hPrinter) =
  149. BOOL EndDocPrinter(DWORD hPrinter)
  150. {
  151. errorcode = 0;
  152. }
  153. BOOL ClosePrinter(DWORD hPrinter) =
  154. BOOL ClosePrinter(DWORD hPrinter)
  155. {
  156. errorcode = 0;
  157. }
  158. BOOL AbortPrinter(DWORD hPrinter) =
  159. BOOL AbortPrinter(DWORD hPrinter)
  160. {
  161. errorcode = 0;
  162. }
  163. DWORD PrinterMessageBoxA(DWORD hPrinter, DWORD Error, DWORD hWnd, LPSTR pText,
  164. LPSTR pCaption, DWORD dwType) =
  165. DWORD PrinterMessageBoxA(DWORD hPrinter, DWORD Error, DWORD hWnd, LPSTR pText,
  166. LPSTR pCaption, DWORD dwType)
  167. {
  168. errorcode = 0;
  169. }
  170. DWORD ThkGetPrinterData(LPSTR lpPrinter, LPSTR pValueName, LPDWORD pType, LPBYTE bData, DWORD nSize, LPDWORD pcbNeeded) =
  171. DWORD ThkGetPrinterData(LPSTR lpPrinter, LPSTR pValueName, LPDWORD pType, LPBYTE bData, DWORD nSize, LPDWORD pcbNeeded)
  172. {
  173. errorcode = 0;
  174. }
  175. /* this is added for gdi to launch splexe32.exe */
  176. VOID RunSpoolExe() =
  177. VOID RunSpoolExe()
  178. {
  179. releasewin16lock = true; //This sucker calls WinExec.
  180. errorcode = 0;
  181. }
  182. /* this is added for gdi to clean up spooler ipc data for the process when */
  183. /* it terminates */
  184. DWORD ThkDetachSpooler(DWORD dwID) =
  185. DWORD ThkDetachSpooler(DWORD dwID)
  186. {
  187. errorcode = 0;
  188. }
  189. /* portions of the EMF system need to call PlayEnhMetaFile */
  190. /* The last parameter is an LPRECTL on both sides so no packing needed */
  191. BOOL PlayEnhMetaFile(HDC hdc, HANDLE hemf, LPSTR) =
  192. BOOL PlayEnhMetaFile(HDC hdc, HANDLE hemf, LPSTR)
  193. {
  194. errorcode = 0;
  195. }
  196. BOOL NoLockPlayEnhMetaFile(HDC hdc, HANDLE hemf, LPSTR) =
  197. BOOL NoLockPlayEnhMetaFile(HDC hdc, HANDLE hemf, LPSTR)
  198. {
  199. errorcode = 0;
  200. }
  201. BOOL gdiPlaySpoolStream(LPSTR, LPSTR, LPSTR, ULONG, ULONG, HDC) =
  202. BOOL gdiPlaySpoolStream(LPSTR, LPSTR, LPSTR, ULONG, ULONG, HDC)
  203. {
  204. errorcode = 0;
  205. }
  206. /* ---------------------------------------------------------------------- */
  207. /* */
  208. /* The Following Thunks Are for making Inverse color tables (INVCMAP.C) */
  209. /* */
  210. /* ---------------------------------------------------------------------- */
  211. BOOL MakeITable(LPBYTE, LPDWORD, INT) =
  212. BOOL MakeITable(LPBYTE, LPDWORD, INT)
  213. {
  214. }