00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
#ifndef _USERSRV_
00017
#define _USERSRV_
00018
00019
#include <windows.h>
00020
#include <w32gdip.h>
00021
00022
00023
00024
00025
#ifndef RC_INVOKED // RC can't handle #pragmas
00026
#pragma warning(error:4101) // Unreferenced local variable
00027
#endif
00028
00029
#ifndef _USERKDX_
00030
#include <stddef.h>
00031
#include <w32gdip.h>
00032
#include <ddeml.h>
00033
#include "ddemlp.h"
00034
#include "winuserp.h"
00035
#include "winuserk.h"
00036
#include <dde.h>
00037
#include <ddetrack.h>
00038
#include "kbd.h"
00039
#include <wowuserp.h>
00040
#include <memory.h>
00041
#include <w32err.h>
00042
#include <string.h>
00043
#include "help.h"
00044
00045
#include "user.h"
00046
#include "cscall.h"
00047
#undef MONITOR
00048
00049
#include "strid.h"
00050
#include "csrmsg.h"
00051
#endif
00052
00053 typedef struct tagCTXHARDERRORINFO {
00054 CLIENT_ID
ClientId;
00055 ULONG
MessageId;
00056 LPWSTR
pTitle;
00057 LPWSTR
pMessage;
00058 ULONG
Style;
00059 ULONG
Timeout;
00060 ULONG
Response;
00061 PULONG
pResponse;
00062 HANDLE
hEvent;
00063 BOOLEAN
DoNotWait;
00064 struct tagCTXHARDERRORINFO *
pchiNext;
00065 }
CTXHARDERRORINFO, *
PCTXHARDERRORINFO;
00066
00067
00068
00069
00070 #define IDD_ENDTASK 10
00071 #define IDC_STATUSICON 0x100
00072 #define IDC_STATUSMSG 0x101
00073 #define IDC_STATUSCANCEL 0x102
00074 #define IDC_ENDNOW 0x103
00075
00076 #define IDI_CONSOLE 1
00077 #define ETD_XICON 10
00078 #define ETD_YICON 10
00079
00080 #define IDB_WARNING 0x200
00081
00082 #define IDT_CHECKAPPSTATE 0x300
00083 #define IDT_PROGRESS 0x301
00084
00085
00086
00087
00088 INT_PTR
APIENTRY EndTaskDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
00089 typedef struct _ENDDLGPARAMS {
00090 DWORD dwFlags;
00091 DWORD dwClientFlags;
00092 DWORD dwRet;
00093 UINT uStrId;
00094 PCSR_THREAD
pcsrt;
00095 LPARAM
lParam;
00096 DWORD dwCheckTimerCount;
00097 HBITMAP
hbmpWarning;
00098 RECT
rcWarning;
00099 HICON
hIcon;
00100 RECT
rcBar;
00101 RECT
rcProgress;
00102 int iProgressStop;
00103 int iProgressWidth;
00104 HBRUSH
hbrProgress;
00105 RECT
rcEndButton;
00106 }
ENDDLGPARAMS;
00107
00108
00109
00110 #define EDPF_NODLG 0x00000001
00111 #define EDPF_RESPONSE 0x00000002
00112 #define EDPF_HUNG 0x00000004
00113 #define EDPF_WAIT 0x00000008
00114 #define EDPF_INPUT 0x00000010
00115
00116
00117
00118 #define TSN_APPSAYSOK 1
00119 #define TSN_APPSAYSNOTOK 2
00120 #define TSN_USERSAYSKILL 3
00121 #define TSN_USERSAYSCANCEL 4
00122 #define TSN_NOWINDOW 5
00123
00124
00125
00126 extern HANDLE
ghModuleWin;
00127 extern DWORD gCmsHungAppTimeout;
00128 extern DWORD gCmsWaitToKillTimeout;
00129 extern DWORD gdwHungToKillCount;
00130 extern DWORD gdwServicesProcessId;
00131 extern DWORD gdwServicesWaitToKillTimeout;
00132 extern DWORD gdwProcessTerminateTimeout;
00133
00134
00135
00136
00137 typedef struct tagHARDERRORINFO {
00138 struct tagHARDERRORINFO *
phiNext;
00139 PCSR_THREAD
pthread;
00140 HANDLE
hEventHardError;
00141 PHARDERROR_MSG
pmsg;
00142 DWORD dwHEIFFlags;
00143 UNICODE_STRING
usText;
00144 UNICODE_STRING
usCaption;
00145 DWORD dwMBFlags;
00146 DWORD dwVDMParam0;
00147 DWORD dwVDMParam1;
00148 PCTXHARDERRORINFO pCtxHEInfo;
00149 }
HARDERRORINFO, *
PHARDERRORINFO;
00150
00151 #define HEIF_ACTIVE 0x00000001
00152 #define HEIF_NUKED 0x00000002
00153 #define HEIF_ALLOCATEDMSG 0x00000004
00154 #define HEIF_REPLIED 0x00000008
00155 #define HEIF_DEREFTHREAD 0x00000010
00156 #define HEIF_WRONGDESKTOP 0x00000020
00157 #define HEIF_SYSTEMERROR 0x00000040
00158 #define HEIF_VDMERROR 0x00000080
00159
00160
BOOL BoostHardError(ULONG_PTR dwProcessId, DWORD dwCode);
00161 #define BHE_ACTIVATE 0
00162 #define BHE_FORCE 1
00163 #define BHE_TEST 2
00164
DWORD ThreadShutdownNotify(DWORD dwClientFlags, ULONG_PTR dwThread, LPARAM lParam);
00165
00166
00167
00168
00169 typedef struct tagWMCSDATA {
00170 DWORD dwFlags;
00171 DWORD dwRet;
00172 }
WMCSDATA, *
PWMCSDATA;
00173
00174 #define WMCSD_IGNORE 0x00000001
00175 #define WMCSD_REPLY 0x00000002
00176 #define WMCSD_RECEIVED 0x00000004
00177
00178
00179
00180
BOOL CALLBACK
FindWindowFromThread (HWND hwnd, LPARAM lParam);
00181
00182
00183
00184
00185
00186
int InternalDoEndTaskDialog(TCHAR* pszTitle, HANDLE h,
int cSeconds);
00187
00188
#ifndef _USERKDX_
00189 LPWSTR
RtlLoadStringOrError(
00190 HANDLE hModule,
00191 UINT wID,
00192 LPWSTR lpDefault,
00193 PBOOL pAllocated,
00194 BOOL bAnsi
00195 );
00196 #define ServerLoadString(hmod, id, default, allocated)\
00197
RtlLoadStringOrError((hmod), (id), (default), (allocated), FALSE)
00198
#endif
00199
00200
00201 #define EnterCrit() RtlEnterCriticalSection(&gcsUserSrv)
00202 #define LeaveCrit() RtlLeaveCriticalSection(&gcsUserSrv)
00203
00204
00205
#ifdef FE_IME
00206
BOOL IsImeWindow( HWND hwnd );
00207
#endif
00208
00209
#include "globals.h"
00210
00211
#endif // !_USERSRV_