Leaked source code of windows server 2003
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.

118 lines
6.8 KiB

  1. #include <windows.h>
  2. #include <ntverp.h>
  3. #define VER_FILETYPE VFT_DLL
  4. #define VER_FILESUBTYPE VFT2_UNKNOWN
  5. #define VER_FILEDESCRIPTION_STR "Cyclades-Z Enumerator Driver"
  6. #define VER_INTERNALNAME_STR "cyclad-z.sys"
  7. #define VER_ORIGINALFILENAME_STR "cyclad-z.sys"
  8. #define VER_LEGALCOPYRIGHT_YEARS "1997-2001"
  9. #define VER_LEGALCOPYRIGHT_STR "Copyright (C) Cyclades Corp. " VER_LEGALCOPYRIGHT_YEARS
  10. #define VER_FILEVERSION 1,0,18,0
  11. #define VER_FILEVERSION_STR "1.0.18.0"
  12. #include "common.ver"
  13. #include "log.rc"
  14. // History
  15. //
  16. // 1.0.18.0 07/06/01 Fix from DDK RC1: IoMarkIrpPending called when
  17. // Irp->PendingReturned set in the IoCompletion routine of Device
  18. // Power Irp.
  19. // 1.0.14.0 04/27/01 _WIN64 code removed. UINumber is always set to 0xFFFFFFFF
  20. // when IoGetDeviceProperty fails.
  21. // 1.0.13.0 04/25/01 Delete #defines for VER_COMPANYNAME_STR,
  22. // VER_PRODUCTNAME_STR, VER_PRODUCTVERSION and
  23. // VER_PRODUCTVERSION_STR to fix compilation
  24. // warnings.
  25. // Fix for Driver Verifier: dispatch handler was returning a
  26. // status that was inconsistent with the Irp's
  27. // IoStatus.Status field (IoStatus.Status = 00000002,
  28. // returned = 00000000) in IRP_MN_REMOVE_DEVICE.
  29. // Cycladz_KdPrint in AddDevice replaced by
  30. // Cycladz_KdPrint_Def.
  31. // Error status logged in CyzLogError in AddDevice.
  32. // 1.0.12.0 04/18/01 UINumber hardcoded to 0xFFFFFFFF for _WIN64
  33. // because IoGetDeviceProperty to get UINumber
  34. // is failing in 64-bit.
  35. // 1.0.11.0 04/16/01 Fix for Driver Verifier: IoMarkIrpPending required
  36. // when STATUS_PENDING returned.
  37. // 1.0.10.0 04/02/01 Just version change.
  38. // 1.0.9.0 03/19/01 Just version change.
  39. // 1.0.8.0 03/14/01 Changes for serenum from DDK 2416 (Whistler pre-Beta2)
  40. // to DDK 2446 (Whistler pre-Beta2) applied.
  41. // 1.0.7.0 03/12/01 Changes for serenum from DDK 2195 (Windows 2000) to DDK
  42. // 2416 (Whistler pre-Beta2) applied.
  43. // PdoData->HardwareIDs and PdoData->CompIDs freed using
  44. // CyclomyFreeUnicodeString instead RtlFreeUnicodeString.
  45. // PdoData->InstanceIDs and PdoData->DevDesc were not being
  46. // freed, so this was fixed.
  47. // Messages logged in case of AddDevice failure.
  48. // 1.0.6.0 03/12/01 Just version change.
  49. // 1.0.5.0 03/02/01 Child PDO BusNumber was changed from 0 to PCI UINumber
  50. // (slot number). This BusNumber is used by cyzport AddDevice.
  51. // 1.0.4.0 02/26/01 Just version change.
  52. // 1.0.3.0 02/21/01 Fix for mismatch configuration error when returning
  53. // from Standby: Z firmware load done only in the
  54. // work thread scheduled in the IoCompletion for Device
  55. // power Irp.
  56. // DDK 2416 serenum power.c changes applied to power.c.
  57. // pnp.c: Ze CPU stopped before IRP_MN_REMOVE_DEVICE is sent
  58. // to lower drivers; RemoveEvent waited before IoCallDriver.
  59. // 1.0.2.0 01/25/01 Driver built with Whistler DDK 2416.
  60. // 1.0.1.0 12/06/00 Driver built with Whistler DDK (Beta1).
  61. // 1.0.0.11 10/09/00 Added support to interrupt mode when POLL is not defined
  62. // during compilation time (in the sources file).
  63. // 1.0.0.10 09/20/00 Set DeviceState for PowerSystemSleeping1, PowerSystemSleeping2
  64. // and PowerSystemSleeping3 to PowerDeviceD3 to fix hang in
  65. // Standby.
  66. // 1.0.0.9 - None.
  67. // 1.0.0.8 08/15/00 Fix FDO IRP_MN_CANCEL_REMOVE_DEVICE to have a "return" in the
  68. // end instead of "break". This will avoid Fatal System Error
  69. // 0x000000d5 (DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL).
  70. // 1.0.0.7 - None.
  71. // 1.0.0.6 08/05/00 Save firmware version to the Registry, so that it can be
  72. // retrieved by cyyport.
  73. // 1.0.0.5 07/18/00 Apply all changes that were done in cyclom-y from version
  74. // 1.0.0.12 (y033100) to 1.0.0.27 (y071700).
  75. // Attached flag in PDO Extension set to FALSE during
  76. // PDO IRP_MN_SURPRISE_REMOVAL instead of FDO IRP_MN_REMOVE_DEVICE.
  77. // Add error log messages.
  78. // 1.0.0.4 03/29/00 Cycladz_ReenumerateDevices fixed to indicate that devices
  79. // are not Attached when actual numPorts < FdoData->NumPDOs.
  80. // Cycladz_PnPRemove() doesn't need to reset PdoData->Attached
  81. // because PdoData will be deleted.
  82. // 03/03/00 Add changes from serenum build 1946 to 2000:
  83. // - DeviceData->SystemWake and DeviceWake initialized to
  84. // PowerSystemUnspecified and PowerDeviceUnspecified in
  85. // Cycladz_AddDevice.
  86. // - nameLength returned by IoGetDeviceProperty checked for
  87. // non zero before returned status is checked.
  88. // - Call IoCompleteRequest in case status is
  89. // STATUS_UNSUCCESSFUL in FDO IRP_MN_QUERY_STOP_DEVICE.
  90. // - FDO IRP_MN_QUERY_DEVICE_RELATIONS calls IoCompleteRequest
  91. // in case of failure to allocate buffer for relations.
  92. // - Handle FDO IRP_MN_QUERY_CAPABILITIES to get SystemWake
  93. // and DeviceWake from lower drivers.
  94. // - Create SystemWake and DeviceWake fields in FDO_DEVICE_DATA.
  95. // - PDO IRP_MN_QUERY_CAPABILITIES sets SystemWake and
  96. // DeviceWake with values returned from FDO
  97. // IRP_MN_QUERY_CAPABILITIES.
  98. // - PDO IRP_MN_QUERY_ID sets status in each case of switch
  99. // instead of before switch.
  100. // - Cycladz_InternIoCtl just passes to lower drivers any
  101. // non recognized IoControlCode instead of returning
  102. // STATUS_INVALID_PARAMETER.
  103. // 1.0.0.3 03/01/00 Comment change.
  104. // 1.0.0.2 02/29/00 Use "event" local variable instead of allocating
  105. // pResFiltEvent from NonPagedPool during.
  106. // IRP_MN_FILTER_RESOURCE_REQUIREMENTS.
  107. // Comment change.
  108. // 1.0.0.1 02/28/00 Fix FDO IRP_MN_CANCEL_STOP_DEVICE: wait for lower drivers
  109. // to process this IRP before returning status.
  110. // Fix FDO IRP_MN_REMOVE_DEVICE: set Irp->IoStatus.Status
  111. // before calling lower drivers.
  112. // 1.0.0.0 02/11/00 Initial release.