#include "precomp.h"
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ PRECOVERYDATA
◆ RECOVERYDATA
◆ BrowseFile()
Definition at line 344 of file propsheet_recovery.c.
346{
348 PWCHAR pszFilter =
L"Executable Files (*.exe;*.com;*.cmd;*.bat)\0*.exe;*.com;*.cmd;*.bat\0";
350
352
359
361 {
365 0,
367 }
368}
#define OFN_FILEMUSTEXIST
#define OFN_PATHMUSTEXIST
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
Referenced by RecoveryPageProc().
◆ GetServiceFailure()
Definition at line 94 of file propsheet_recovery.c.
96{
98 SC_HANDLE hManager =
NULL;
99 SC_HANDLE hService =
NULL;
101 DWORD cbBytesNeeded = 0;
102
106 if (hManager ==
NULL)
107 {
109 goto done;
110 }
111
113 if (hService ==
NULL)
114 {
116 goto done;
117 }
118
122 0,
123 &cbBytesNeeded))
124 {
125 if (cbBytesNeeded == 0)
126 {
128 goto done;
129 }
130 }
131
133 if (pServiceFailure ==
NULL)
134 {
137 goto done;
138 }
139
143 cbBytesNeeded,
144 &cbBytesNeeded))
145 {
147 goto done;
148 }
149
151
152done:
153 if (bResult ==
FALSE && pServiceFailure !=
NULL)
155
156 if (hService)
158
159 if (hManager)
161
162 return bResult;
163}
#define HeapFree(x, y, z)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
LPSERVICE_FAILURE_ACTIONS pServiceFailure
ENUM_SERVICE_STATUS_PROCESS * pService
#define SC_MANAGER_CONNECT
#define SERVICE_CONFIG_FAILURE_ACTIONS
#define QueryServiceConfig2
#define SERVICE_QUERY_CONFIG
Referenced by RecoveryPageProc().
◆ InitRecoveryPage()
static VOID InitRecoveryPage |
( |
HWND |
hwndDlg | ) |
|
|
static |
Definition at line 23 of file propsheet_recovery.c.
25{
28
30 {
33 id))
34 {
38 0,
40
44 0,
46
50 0,
52
54 }
55 }
56
60 0,
61 0);
62
66 0,
67 0);
68
72 0,
73 0);
74
78 0,
80
84 0,
86
89}
INT AllocAndLoadString(OUT LPTSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
#define IDC_SECOND_FAILURE
#define IDC_SUBSEQUENT_FAILURES
#define IDS_RESTART_COMPUTER
#define IDC_RESTART_TEXT1
#define IDC_RESTART_OPTIONS
#define IDC_FIRST_FAILURE
HLOCAL NTAPI LocalFree(HLOCAL hMem)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
Referenced by RecoveryPageProc().
◆ RecoveryPageProc()
Definition at line 441 of file propsheet_recovery.c.
446{
448
449
454
455 switch (uMsg)
456 {
459 if (pRecoveryData !=
NULL)
460 {
464
466
468
470 {
472 }
473 }
474 break;
475
477 if (pRecoveryData !=
NULL)
478 {
481
483 }
484 break;
485
488 {
493 {
497 }
498 break;
499
505 {
508 }
509 break;
510
513 {
516 }
517 break;
518
521 break;
522
524 break;
525 }
526 break;
527
530 {
533 {
536 }
537 break;
538 }
539 break;
540 }
541
543}
struct _SERVICEPROPSHEET * PSERVICEPROPSHEET
#define IDC_ADD_FAILCOUNT
#define IDC_BROWSE_PROGRAM
static VOID SetFailureActions(HWND hwndDlg)
static VOID BrowseFile(HWND hwndDlg)
static VOID ShowFailureActions(HWND hwndDlg, PRECOVERYDATA pRecoveryData)
static VOID InitRecoveryPage(HWND hwndDlg)
static BOOL GetServiceFailure(PRECOVERYDATA pRecoveryData)
static VOID UpdateFailureActions(HWND hwndDlg, PRECOVERYDATA pRecoveryData)
struct _RECOVERYDATA * PRECOVERYDATA
#define PropSheet_Changed(d, w)
HWND WINAPI GetParent(_In_ HWND)
Referenced by PropSheetThread().
◆ SetFailureActions()
static VOID SetFailureActions |
( |
HWND |
hwndDlg | ) |
|
|
static |
Definition at line 373 of file propsheet_recovery.c.
375{
381
382 ZeroMemory(&FailureActions,
sizeof(FailureActions));
383
384
386 {
388 id,
390 0,
391 0);
393 {
394 case 1:
395 bRestartService =
TRUE;
397 break;
398
399 case 2:
402 break;
403
404 case 3:
405 bRebootComputer =
TRUE;
407 break;
408 }
409 }
410
411 if (bRestartService)
412 {
413
414 }
415
416 if (bRunProgram)
417 {
418
419 }
420
421 if (bRebootComputer)
422 {
423
424 }
425
426
427#if 0
428typedef struct _SERVICE_FAILURE_ACTIONS {
435#endif
436}
SERVICE_FAILURE_ACTIONSA SERVICE_FAILURE_ACTIONS
LPSERVICE_FAILURE_ACTIONSA LPSERVICE_FAILURE_ACTIONS
Referenced by RecoveryPageProc().
◆ ShowFailureActions()
Definition at line 167 of file propsheet_recovery.c.
170{
172 PWSTR startPtr, endPtr;
175
177 {
179
181 {
184 break;
185
188
193 0,
195
198 break;
199
202
204 break;
205
208
211 break;
212 }
213
215 {
220 0);
221 }
222 }
223
228 0,
230
232 {
234
236 if (*startPtr ==
L'\"')
237 startPtr++;
238
239 endPtr =
wcschr(startPtr,
L'\"');
241 {
244 }
245 else
246 {
247 wcscpy(szBuffer, startPtr);
248 }
249
253 0,
255
257
259 {
260 startPtr = endPtr + 1;
262 startPtr++;
263
266 {
268 endPtr--;
269
272 }
273 else
274 {
275 wcscpy(szBuffer, startPtr);
276 }
277
281 0,
283
286 {
291 0);
292 }
293 }
294 }
295}
#define IDC_RESTART_TEXT2
GLuint GLsizei GLsizei * length
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
Referenced by RecoveryPageProc().
◆ UpdateFailureActions()
Definition at line 300 of file propsheet_recovery.c.
303{
308
310 {
312 id,
314 0,
315 0);
317 {
318 case 1:
319 bRestartService =
TRUE;
320 break;
321
322 case 2:
324 break;
325
326 case 3:
327 bRebootComputer =
TRUE;
328 break;
329 }
330 }
331
334
337
339}
Referenced by RecoveryPageProc().