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.

74 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. pos.h
  5. Abstract: Control Panel Applet for OLE POS Devices
  6. Author:
  7. Karan Mehra [t-karanm]
  8. Environment:
  9. Win32 mode
  10. Revision History:
  11. --*/
  12. #ifndef __POS_H__
  13. #define __POS_H__
  14. #include <windows.h>
  15. #include <commctrl.h>
  16. #include <cpl.h>
  17. #include <dbt.h>
  18. #include <malloc.h>
  19. #include <stdio.h>
  20. #include <string.h>
  21. #include "resource.h"
  22. /*
  23. * Definitions
  24. */
  25. #define MUTEX_NAME TEXT("$$$MS_PointOfSale_Cpl$$$")
  26. #define NAME_COLUMN 0
  27. #define PORT_COLUMN 1
  28. #define MAX_CPL_PAGES 1
  29. #define BUFFER_SIZE 64
  30. #define SERIALCOMM TEXT("Hardware\\DeviceMap\\SerialComm")
  31. #define POS_HELP_FILE TEXT("pos.hlp")
  32. #define IOCTL_INDEX 0x0800
  33. #define IOCTL_SERIAL_QUERY_DEVICE_NAME CTL_CODE(FILE_DEVICE_SERIAL_PORT, IOCTL_INDEX + 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
  34. /*
  35. * Global Variables
  36. */
  37. HINSTANCE ghInstance;
  38. INT gDeviceCount;
  39. HDEVNOTIFY ghNotify;
  40. extern CONST DWORD gaPosHelpIds[];
  41. /*
  42. * Function Prototypes
  43. */
  44. BOOL WINAPI DllMain(HINSTANCE hinstDLL, ULONG uReason, LPVOID lpvReserved);
  45. LONG APIENTRY CPlApplet(HWND hwndCPl, UINT uMsg, LONG lParam1, LONG lParam2);
  46. VOID OpenPOSPropertySheet(HWND hwndCPl);
  47. BOOL CALLBACK DevicesDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
  48. BOOL InitializeDevicesDlg(HWND hwndDlg, BOOL bFirstTime);
  49. VOID InsertColumn(HWND hwndListCtrl, INT iCol, UINT uMsg, INT iWidth);
  50. BOOL InitializeImageList(HWND hwndListCtrl);
  51. BOOL FillListViewItems(HWND hwndListCtrl);
  52. BOOL AddItem(HWND hwndListCtrl, INT iItem, LPTSTR pszName, LPTSTR pszPort);
  53. VOID DisplayErrorMessage();
  54. BOOL QueryPrettyName(LPTSTR pszName, LPTSTR pszPort);
  55. VOID MoveOK(HWND hParentWnd);
  56. VOID LaunchTroubleShooter();
  57. #endif