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.

86 lines
3.5 KiB

  1. #include "hpsclfam.gsd" // include the operating script
  2. function BOOL IntializeDeviceProperties()
  3. {
  4. if(MODEL == "Hewlett-Packard ScanJet 6100C")
  5. {
  6. // Initialize valid resolution array
  7. LONG ValidResolutions[7];
  8. ValidResolutions[0] = 75;
  9. ValidResolutions[1] = 100;
  10. ValidResolutions[2] = 150;
  11. ValidResolutions[3] = 200;
  12. ValidResolutions[4] = 300;
  13. ValidResolutions[5] = 600;
  14. ValidResolutions[6] = 1200;
  15. DeviceProperty.SetValidList(XRESOLUTION,ValidResolutions);
  16. DeviceProperty.SetValidList(YRESOLUTION,ValidResolutions);
  17. DeviceProperty.SetValidRange(XPOSITION,0,2549,2549,1);
  18. DeviceProperty.SetCurrentValue(XPOSITION,0);
  19. DeviceProperty.SetValidRange(YPOSITION,0,4199,4199,1);
  20. DeviceProperty.SetCurrentValue(YPOSITION,0);
  21. DeviceProperty.SetValidRange(XEXTENT,1,2550,1,1);
  22. DeviceProperty.SetCurrentValue(XEXTENT,2550);
  23. DeviceProperty.SetValidRange(YEXTENT,1,4200,1,1);
  24. DeviceProperty.SetCurrentValue(YEXTENT,4200);
  25. }
  26. else
  27. {
  28. // Initialize valid resolution array
  29. LONG ValidResolutions[6];
  30. ValidResolutions[0] = 75;
  31. ValidResolutions[1] = 100;
  32. ValidResolutions[2] = 150;
  33. ValidResolutions[3] = 200;
  34. ValidResolutions[4] = 300;
  35. ValidResolutions[5] = 600;
  36. DeviceProperty.SetValidList(XRESOLUTION,ValidResolutions);
  37. DeviceProperty.SetValidList(YRESOLUTION,ValidResolutions);
  38. DeviceProperty.SetValidRange(XPOSITION,0,2549,2549,1);
  39. DeviceProperty.SetCurrentValue(XPOSITION,0);
  40. DeviceProperty.SetValidRange(YPOSITION,0,3506,3506,1);
  41. DeviceProperty.SetCurrentValue(YPOSITION,0);
  42. DeviceProperty.SetValidRange(XEXTENT,1,2550,1,1);
  43. DeviceProperty.SetCurrentValue(XEXTENT,2550);
  44. DeviceProperty.SetValidRange(YEXTENT,1,3507,1,1);
  45. DeviceProperty.SetCurrentValue(YEXTENT,3507);
  46. }
  47. // common property settings
  48. DeviceProperty.SetCurrentValue(XRESOLUTION, 150);
  49. DeviceProperty.SetCurrentValue(YRESOLUTION, 150);
  50. DeviceProperty.SetValidRange(BRIGHTNESS,-127,127,32,1);
  51. DeviceProperty.SetCurrentValue(BRIGHTNESS,32);
  52. DeviceProperty.SetValidRange(CONTRAST,-127,127,12,1);
  53. DeviceProperty.SetCurrentValue(CONTRAST,12);
  54. // Initialize valid data type array
  55. LONG ValidDataTypes[3];
  56. ValidDataTypes[0] = 0; // WIA_DATA_THRESHOLD
  57. ValidDataTypes[1] = 2; // WIA_DATA_GRAYSCALE
  58. ValidDataTypes[2] = 3; // WIA_DATA_COLOR
  59. DeviceProperty.SetValidList(DATATYPE,ValidDataTypes)
  60. DeviceProperty.SetCurrentValue(DATATYPE,2)
  61. DeviceProperty.SetCurrentValue(BITDEPTH,8)
  62. DeviceProperty.SetCurrentValue(NEGATIVE,1)
  63. DeviceProperty.SetCurrentValue(PIXELORDER,0)
  64. DeviceProperty.SetCurrentValue(PIXELFORMAT,1)
  65. DeviceProperty.SetCurrentValue(BEDWIDTH,8500)
  66. DeviceProperty.SetCurrentValue(BEDHEIGHT,11693)
  67. DeviceProperty.SetCurrentValue(OPTICALX,300)
  68. DeviceProperty.SetCurrentValue(OPTICALY,300)
  69. DeviceProperty.SetCurrentValue(ADFSUPPORT,0)
  70. DeviceProperty.SetCurrentValue(TPASUPPORT,0)
  71. DeviceProperty.SetCurrentValue(ADFWIDTH,0)
  72. DeviceProperty.SetCurrentValue(ADFHEIGHT,0)
  73. DeviceProperty.SetCurrentValue(ADFVJUSTIFY,0)
  74. DeviceProperty.SetCurrentValue(ADFHJUSTIFY,0)
  75. DeviceProperty.SetCurrentValue(ADFMAXPAGES,30)
  76. DeviceProperty.SetCurrentValue(FIRMWAREVER,"1.02a")
  77. return TRUE;
  78. }