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.

140 lines
3.2 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: LPCFUS.h
  3. //
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. // This file contains structs for PORT_MESSAGE appends which are specific to
  7. // the bad application API.
  8. //
  9. // History: 2000-08-26 vtan created
  10. // 2000-10-12 vtan moved from DS to SHELL depot
  11. // --------------------------------------------------------------------------
  12. #ifndef _LPCFUS_
  13. #define _LPCFUS_
  14. #include <LPCGeneric.h>
  15. static const TCHAR FUS_PORT_NAME[] = L"\\FusApiPort";
  16. static const TCHAR FUS_CONNECTION_REQUEST[] = L"FusApiConnectionRequest";
  17. enum
  18. {
  19. API_BAM_QUERYRUNNING = 1,
  20. API_BAM_REGISTERRUNNING,
  21. API_BAM_QUERYUSERPERMISSION,
  22. API_BAM_TERMINATERUNNING,
  23. API_BAM_REQUESTSWITCHUSER = 1001,
  24. };
  25. typedef enum
  26. {
  27. BAM_TYPE_MINIMUM = 0,
  28. BAM_TYPE_UNKNOWN = BAM_TYPE_MINIMUM,
  29. BAM_TYPE_SECOND_INSTANCE_START,
  30. BAM_TYPE_SWITCH_USER,
  31. BAM_TYPE_SWITCH_TO_NEW_USER_WITH_RESTORE,
  32. BAM_TYPE_SWITCH_TO_NEW_USER,
  33. BAM_TYPE_MAXIMUM
  34. } BAM_TYPE;
  35. typedef struct
  36. {
  37. const WCHAR *pszImageName;
  38. int cchImageName;
  39. } API_BAM_QUERYRUNNING_IN;
  40. typedef struct
  41. {
  42. bool fResult;
  43. } API_BAM_QUERYRUNNING_OUT;
  44. typedef struct
  45. {
  46. const WCHAR *pszImageName;
  47. int cchImageName;
  48. DWORD dwProcessID;
  49. BAM_TYPE bamType;
  50. } API_BAM_REGISTERRUNNING_IN;
  51. typedef struct
  52. {
  53. } API_BAM_REGISTERRUNNING_OUT;
  54. typedef struct
  55. {
  56. const WCHAR *pszImageName;
  57. int cchImageName;
  58. WCHAR *pszUser;
  59. int cchUser;
  60. } API_BAM_QUERYUSERPERMISSION_IN;
  61. typedef struct
  62. {
  63. bool fCanShutdownApplication;
  64. } API_BAM_QUERYUSERPERMISSION_OUT;
  65. typedef struct
  66. {
  67. const WCHAR *pszImageName;
  68. int cchImageName;
  69. } API_BAM_TERMINATERUNNING_IN;
  70. typedef struct
  71. {
  72. bool fResult;
  73. } API_BAM_TERMINATERUNNING_OUT;
  74. typedef struct
  75. {
  76. } API_BAM_REQUESTSWITCHUSER_IN;
  77. typedef struct
  78. {
  79. bool fAllowSwitch;
  80. } API_BAM_REQUESTSWITCHUSER_OUT;
  81. typedef union
  82. {
  83. union
  84. {
  85. API_BAM_QUERYRUNNING_IN in;
  86. API_BAM_QUERYRUNNING_OUT out;
  87. } apiQueryRunning;
  88. union
  89. {
  90. API_BAM_REGISTERRUNNING_IN in;
  91. API_BAM_REGISTERRUNNING_OUT out;
  92. } apiRegisterRunning;
  93. union
  94. {
  95. API_BAM_QUERYUSERPERMISSION_IN in;
  96. API_BAM_QUERYUSERPERMISSION_OUT out;
  97. } apiQueryUserPermission;
  98. union
  99. {
  100. API_BAM_TERMINATERUNNING_IN in;
  101. API_BAM_TERMINATERUNNING_OUT out;
  102. } apiTerminateRunning;
  103. union
  104. {
  105. API_BAM_REQUESTSWITCHUSER_IN in;
  106. API_BAM_REQUESTSWITCHUSER_OUT out;
  107. } apiRequestSwitchUser;
  108. } API_BAM_SPECIFIC;
  109. typedef struct
  110. {
  111. API_GENERIC apiGeneric;
  112. API_BAM_SPECIFIC apiSpecific;
  113. } API_BAM, *PAPI_BAM;
  114. typedef struct
  115. {
  116. PORT_MESSAGE portMessage;
  117. API_BAM apiBAM;
  118. } FUSAPI_PORT_MESSAGE, *PFUSAPI_PORT_MESSAGE;
  119. #endif /* _LPCFUS_ */