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.

92 lines
2.3 KiB

  1. //============================================================================
  2. // Copyright (c) 1996, Microsoft Corporation
  3. //
  4. // File: nthdr2.h
  5. //
  6. // History:
  7. // Abolade-Gbadegesin 04-02-96 Created.
  8. //
  9. // This file contains macros to hide differences in implementation
  10. // of the scripting between Win9x and Windows NT
  11. //============================================================================
  12. #ifndef _NTHDR2_H_
  13. #define _NTHDR2_H_
  14. //----------------------------------------------------------------------------
  15. // Struct: SCRIPTDATA
  16. //
  17. // The following structure is designed to be a subset of the TERMDLG struct
  18. // in terminal.c.
  19. //
  20. // The structure has fields whose names are the same as corresponding fields
  21. // in the TERMDLG struct. The only fields reproduced here are those which
  22. // pertain to the Win9x script-processing.
  23. //
  24. // This is done in order to minimize changes to the Win9x code, since
  25. // we can then pass the structure below to ReadIntoBuffer() and FindFormat(),
  26. // thankfully eliminating the need to edit the code for either function.
  27. //----------------------------------------------------------------------------
  28. #define SCRIPTDATA struct tagSCRIPTDATA
  29. SCRIPTDATA {
  30. //
  31. // Handle to script for this SCRIPTDATA,
  32. // and current timeout, if any
  33. //
  34. HANDLE hscript;
  35. DWORD dwTimeout;
  36. //
  37. // Send and receive buffers
  38. //
  39. BYTE pbReceiveBuf[SIZE_RecvBuffer];
  40. BYTE pbSendBuf[SIZE_SendBuffer];
  41. //
  42. // Current search position index
  43. //
  44. UINT ibCurFind;
  45. //
  46. // Pointer to tail of buffer (into which new data will be read)
  47. //
  48. UINT ibCurRead;
  49. //
  50. // Count of total bytes received since the session began
  51. //
  52. UINT cbReceiveMax;
  53. //
  54. // Variables containing the script-processing control information;
  55. // the scanner which reads the script file,
  56. // the parsed module-declaration containing the "main" procedure,
  57. // the script-execution handler control block,
  58. // and the script information (including the path)
  59. //
  60. SCANNER* pscanner;
  61. MODULEDECL* pmoduledecl;
  62. ASTEXEC* pastexec;
  63. SCRIPT script;
  64. };
  65. BOOL
  66. PRIVATE
  67. ReadIntoBuffer(
  68. IN SCRIPTDATA* pdata,
  69. OUT PDWORD pibStart,
  70. OUT PDWORD pcbRead
  71. );
  72. #endif // _NTHDR2_H_