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.

60 lines
2.1 KiB

  1. /***************************************************************************************************
  2. **
  3. ** MODULE: IOCTL.H
  4. **
  5. **
  6. ** DESCRIPTION:
  7. **
  8. **
  9. ** AUTHOR: Daniel Dean.
  10. **
  11. **
  12. **
  13. ** CREATED:
  14. **
  15. **
  16. **
  17. **
  18. ** (C) C O P Y R I G H T D A N I E L D E A N 1 9 9 6.
  19. ***************************************************************************************************/
  20. #ifndef __IOCTL_H__
  21. #define __IOCTL_H__
  22. #define NUMBER_SIZE 4
  23. #define CHANNEL_STRING_ONE " Channel["
  24. #define CHANNEL_STRING_TWO "] = 0x"
  25. #define CHANNEL_STRING_THREE "\r\n"
  26. #define END_STRING(p,m) {ULONG Count; for(Count = 0; Count < m; Count++) if(p[0] != '\0') p++;}
  27. #define CHANNELDESC_STRING \
  28. "size = %x\r\ntype = %x\r\ntypeValue = %x\r\nUsage.index = %x\r\nUsage.page = %x\r\nDesignator.designator = %x\r\nDesignator.desFlags = %x\r\nStringLength = %x\r\nString = %s\r\nUnit.unit = %x\r\nUnit.exponent = %x\r\nExtent.integer = %x\r\nExtent.logicalmin = %x\r\nExtent.logicalmax = %x\r\nExtent.physicalmin = %x\r\nExtent.physicalmax = %x\r\n"
  29. #define DEVICEDESC_STRING \
  30. "DeviceDesc.size = 0x%x\r\nDeviceDesc.packetsize = 0x%x\r\nDeviceDesc.queuesize = 0x%x\r\nDeviceDesc.PortDesc.Usage.index = 0x%x\r\nDeviceDesc.PortDesc.Usage.page = 0x%x\r\nDeviceDesc.PortDesc.systemtype = 0x%x\r\nDeviceDesc.PortDesc.devicenamesize = 0x%x\r\nDeviceDesc.PortDesc.oemnamesize = 0x%x\r\nDeviceDesc.PortDesc.extrainfo = 0x%x\r\nDeviceDesc.PortDesc.versionnumber = 0x%x\r\nDeviceDesc.PortDesc.vendorid = 0x%x\r\nDeviceName = %s\r\n"
  31. typedef struct _READTHREAD
  32. {
  33. HWND hEditWin;
  34. ULONG ThisThread;
  35. ULONG Size;
  36. HANDLE hDevice;
  37. HANDLE hWnd;
  38. } READTHREAD, * PREADTHREAD;
  39. LPARAM IOCTLChannelDesc(HWND hWnd);
  40. LPARAM IOCTLDeviceDesc(HWND hWnd);
  41. LPARAM IOCTLEnableDisable(HWND hWnd, ULONG EnableDisable);
  42. LPARAM IOCTLRead(HWND hWnd);
  43. LPARAM IOCTLWrite(HWND hWnd);
  44. LPARAM IOCTLStop(HWND hWnd);
  45. ULONG QueryDeviceDataSize(HWND hWnd);
  46. //TESTING!!
  47. VOID CALLBACK ReadWatch(HWND hWnd, UINT uMsg, UINT TimerID, DWORD dwTime);
  48. //ULONG CALLBACK ReadWatch(PREADTHREAD pThreadData);
  49. #endif // __IOCTL_H__