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
3.1 KiB

  1. #include "resource.h"
  2. #include "stdafx.h"
  3. #include <winfax.h>
  4. extern CComModule _Module;
  5. BSTR GetQueueStatus(DWORD QueueStatus)
  6. {
  7. WCHAR szQueueStatus[100];
  8. szQueueStatus[0] = (WCHAR)'\0';
  9. DWORD ResourceID;
  10. if (QueueStatus & JS_INPROGRESS) {
  11. ResourceID = IDS_JOB_INPROGRESS;
  12. } else if (QueueStatus & JS_DELETING) {
  13. ResourceID = IDS_JOB_DELETING;
  14. } else if (QueueStatus & JS_FAILED) {
  15. ResourceID = IDS_JOB_FAILED;
  16. } else if (QueueStatus & JS_PAUSED) {
  17. ResourceID = IDS_JOB_PAUSED;
  18. } else if (QueueStatus == JS_PENDING) {
  19. ResourceID = IDS_JOB_PENDING;
  20. } else
  21. ResourceID = IDS_JOB_UNKNOWN;
  22. LoadString(_Module.GetModuleInstance(),ResourceID,szQueueStatus,100);
  23. return SysAllocString(szQueueStatus);
  24. }
  25. BSTR GetDeviceStatus(DWORD DeviceStatus)
  26. {
  27. WCHAR szDeviceStatus[100];
  28. szDeviceStatus[0] = (WCHAR)'\0';
  29. DWORD ResourceID;
  30. if (DeviceStatus == FPS_DIALING) {
  31. ResourceID = IDS_DEVICE_DIALING;
  32. } else if (DeviceStatus == FPS_SENDING) {
  33. ResourceID = IDS_DEVICE_SENDING;
  34. } else if (DeviceStatus == FPS_RECEIVING) {
  35. ResourceID = IDS_DEVICE_RECEIVING;
  36. } else if (DeviceStatus == FPS_COMPLETED) {
  37. ResourceID = IDS_DEVICE_COMPLETED;
  38. } else if (DeviceStatus == FPS_HANDLED) {
  39. ResourceID = IDS_DEVICE_HANDLED;
  40. } else if (DeviceStatus == FPS_UNAVAILABLE) {
  41. ResourceID = IDS_DEVICE_UNAVAILABLE;
  42. } else if (DeviceStatus == FPS_BUSY) {
  43. ResourceID = IDS_DEVICE_BUSY;
  44. } else if (DeviceStatus == FPS_NO_ANSWER) {
  45. ResourceID = IDS_DEVICE_NOANSWER;
  46. } else if (DeviceStatus == FPS_BAD_ADDRESS) {
  47. ResourceID = IDS_DEVICE_BADADDRESS;
  48. } else if (DeviceStatus == FPS_NO_DIAL_TONE) {
  49. ResourceID = IDS_DEVICE_NODIALTONE;
  50. } else if (DeviceStatus == FPS_DISCONNECTED) {
  51. ResourceID = IDS_DEVICE_DISCONNECTED;
  52. } else if (DeviceStatus == FPS_FATAL_ERROR) {
  53. ResourceID = IDS_DEVICE_FATALERROR;
  54. } else if (DeviceStatus == FPS_NOT_FAX_CALL) {
  55. ResourceID = IDS_DEVICE_NOTFAXCALL;
  56. } else if (DeviceStatus == FPS_CALL_DELAYED) {
  57. ResourceID = IDS_DEVICE_CALLDELAYED;
  58. } else if (DeviceStatus == FPS_CALL_BLACKLISTED) {
  59. ResourceID = IDS_DEVICE_BLACKLISTED;
  60. } else if (DeviceStatus == FPS_INITIALIZING) {
  61. ResourceID = IDS_DEVICE_INITIALIZING;
  62. } else if (DeviceStatus == FPS_OFFLINE) {
  63. ResourceID = IDS_DEVICE_OFFLINE;
  64. } else if (DeviceStatus == FPS_RINGING) {
  65. ResourceID = IDS_DEVICE_RINGING;
  66. } else if (DeviceStatus == FPS_AVAILABLE) {
  67. ResourceID = IDS_DEVICE_AVAILABLE;
  68. } else if (DeviceStatus == FPS_ABORTING) {
  69. ResourceID = IDS_DEVICE_ABORTING;
  70. } else if (DeviceStatus == FPS_ROUTING) {
  71. ResourceID = IDS_DEVICE_ROUTING;
  72. } else if (DeviceStatus == FPS_ANSWERED) {
  73. ResourceID = IDS_DEVICE_ANSWERED;
  74. } else {
  75. ResourceID = IDS_DEVICE_UNKNOWN;
  76. }
  77. LoadString(_Module.GetModuleInstance(),ResourceID,szDeviceStatus,100);
  78. return SysAllocString(szDeviceStatus);
  79. }