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.

131 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 2001 Microsoft Corporation
  3. Module Name:
  4. Precomp.h
  5. Abstract:
  6. Contains constants, function prototypes,
  7. structures, etc. used throughout the
  8. application
  9. Notes:
  10. Unicode only
  11. History:
  12. 05/04/2001 rparsons Created
  13. --*/
  14. #ifndef UNICODE
  15. #define UNICODE
  16. #endif
  17. #ifndef _X86_
  18. #define _X86_
  19. #endif
  20. #ifndef _UNICODE
  21. #define _UNICODE
  22. #endif
  23. #include <nt.h>
  24. #include <ntrtl.h>
  25. #include <nturtl.h>
  26. #include <windows.h>
  27. #include <process.h>
  28. #include <string.h>
  29. #include <commctrl.h>
  30. #include <shellapi.h>
  31. #include "resource.h"
  32. #define APP_NAME L"ShimViewer"
  33. #define APP_CLASS L"SHIMVIEW"
  34. #define WRITTEN_BY L"Written by rparsons"
  35. //#define PIPE_NAME L"\\Device\\NamedPipe\\ShimViewer"
  36. #define PIPE_NAME L"\\\\.\\pipe\\ShimViewer"
  37. #define ICON_NOTIFY 10101
  38. #define WM_NOTIFYICON (WM_APP+100)
  39. typedef struct _APPINFO {
  40. HWND hMainDlg; // main dialog handle
  41. HWND hWndList; // list view handle
  42. HINSTANCE hInstance; // main instance handle
  43. BOOL fOnTop; // flag for window position
  44. BOOL fMinimize; // flag for window placement
  45. BOOL fMonitor; // flag for monitoring messages
  46. UINT uThreadId; // receive thread identifier
  47. UINT uInstThreadId; // instance thread identifier
  48. } APPINFO, *PAPPINFO, *LPAPPINFO;
  49. LRESULT
  50. CALLBACK
  51. MainWndProc(
  52. IN HWND hWnd,
  53. IN UINT uMsg,
  54. IN WPARAM wParam,
  55. IN LPARAM lParam
  56. );
  57. BOOL
  58. AddIconToTray(
  59. IN HWND hWnd,
  60. IN HICON hIcon,
  61. IN LPCWSTR lpwTip
  62. );
  63. BOOL
  64. RemoveFromTray(
  65. IN HWND hWnd
  66. );
  67. BOOL
  68. DisplayMenu(
  69. IN HWND hWnd
  70. );
  71. DWORD
  72. pCreateNamedPipe(
  73. IN PCWSTR pwPipeName,
  74. OUT HANDLE *phPipe
  75. );
  76. BOOL
  77. CreateReceiveThread(
  78. IN VOID
  79. );
  80. UINT
  81. InstanceThread(
  82. IN VOID *pVoid
  83. );
  84. UINT
  85. CreatePipeAndWait(
  86. IN VOID *pVoid
  87. );
  88. void
  89. GetSavePositionInfo(
  90. IN BOOL fSave,
  91. IN OUT POINT *lppt
  92. );
  93. void
  94. GetSaveSettings(
  95. IN BOOL fSave
  96. );
  97. int
  98. InitListViewColumn(
  99. VOID
  100. );
  101. int
  102. AddListViewItem(
  103. IN LPWSTR lpwItemText
  104. );