From a3ff770ebda5a4e6b5ac136b877bf9daaa31697a Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Wed, 28 Sep 2005 21:43:54 +0000 Subject: [PATCH] add the vista application recovery functions to w32api and add their stubs to kernel32 svn path=/trunk/; revision=18141 --- reactos/lib/kernel32/k32.h | 1 + reactos/lib/kernel32/kernel32.def | 6 ++ reactos/lib/kernel32/kernel32.xml | 1 + reactos/lib/kernel32/misc/recovery.c | 117 +++++++++++++++++++++++++++ reactos/w32api/include/winbase.h | 22 +++++ 5 files changed, 147 insertions(+) create mode 100644 reactos/lib/kernel32/misc/recovery.c diff --git a/reactos/lib/kernel32/k32.h b/reactos/lib/kernel32/k32.h index f63d139e655..a977441fbd5 100755 --- a/reactos/lib/kernel32/k32.h +++ b/reactos/lib/kernel32/k32.h @@ -12,6 +12,7 @@ #define NTOS_MODE_USER #define _KERNEL32_ #include +#include #include /* CSRSS Header */ diff --git a/reactos/lib/kernel32/kernel32.def b/reactos/lib/kernel32/kernel32.def index 577691bf699..ff01be51dc4 100644 --- a/reactos/lib/kernel32/kernel32.def +++ b/reactos/lib/kernel32/kernel32.def @@ -278,6 +278,8 @@ FreeUserPhysicalPages@12 FreeVirtualBuffer@4 GenerateConsoleCtrlEvent@8 GetACP@0 +GetApplicationRecoveryCallback@12 +GetApplicationRestart@16 GetAtomNameA@12 GetAtomNameW@12 GetBinaryType@8=GetBinaryTypeA@8 @@ -714,6 +716,10 @@ ReadFile@20 ReadFileEx@20 ReadFileScatter@20 ReadProcessMemory@20 +RecoveryFinished@4 +RecoveryInProgress@4 +RegisterApplicationRecoveryCallback@8 +RegisterApplicationRestart@8 ;RegisterConsoleIME ;RegisterConsoleOS2 RegisterConsoleVDM@44 diff --git a/reactos/lib/kernel32/kernel32.xml b/reactos/lib/kernel32/kernel32.xml index c85f1010262..46186af2a3c 100644 --- a/reactos/lib/kernel32/kernel32.xml +++ b/reactos/lib/kernel32/kernel32.xml @@ -70,6 +70,7 @@ nls.c perfcnt.c profile.c + recovery.c res.c stubs.c sysinfo.c diff --git a/reactos/lib/kernel32/misc/recovery.c b/reactos/lib/kernel32/misc/recovery.c new file mode 100644 index 00000000000..510397a916f --- /dev/null +++ b/reactos/lib/kernel32/misc/recovery.c @@ -0,0 +1,117 @@ +/* + * ReactOS kernel + * Copyright (C) 2005 ReactOS Team + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ +/* $Id$ + * + * KERNEL32.DLL application recovery functions + * + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/kernel32/misc/recovery.c + * PURPOSE: Application Recovery functions + * PROGRAMMER: Thomas Weidenmueller + * + * UPDATE HISTORY: + * 10/28/2005 Created stubs (w3) + */ + +#include + +#define NDEBUG +#include "../include/debug.h" + +/* PUBLIC FUNCTIONS ***********************************************************/ + +/* + * @unimplemented + */ +HRESULT +WINAPI +GetApplicationRecoveryCallback(IN HANDLE hProcess, + OUT APPLICATION_RECOVERY_CALLBACK* pRecoveryCallback, + OUT PVOID* ppvParameter) +{ + UNIMPLEMENTED; + return E_FAIL; +} + + +/* + * @unimplemented + */ +HRESULT +WINAPI +GetApplicationRestart(IN HANDLE hProcess, + OUT PWSTR pwzCommandline OPTIONAL, + IN OUT PDWORD pcchSize, + OUT PDWORD pdwFlags OPTIONAL) +{ + UNIMPLEMENTED; + return E_FAIL; +} + + +/* + * @unimplemented + */ +VOID +WINAPI +RecoveryFinished(IN BOOL bSuccess) +{ + UNIMPLEMENTED; +} + + +/* + * @unimplemented + */ +HRESULT +WINAPI +RecoveryInProgress(OUT PBOOL pbCancelled) +{ + UNIMPLEMENTED; + return E_FAIL; +} + + +/* + * @unimplemented + */ +HRESULT +WINAPI +RegisterApplicationRecoveryCallback(IN APPLICATION_RECOVERY_CALLBACK pRecoveyCallback, + IN PVOID pvParameter OPTIONAL) +{ + UNIMPLEMENTED; + return E_FAIL; +} + + +/* + * @unimplemented + */ +HRESULT +WINAPI +RegisterApplicationRestart(IN PCWSTR pwzCommandline OPTIONAL, + IN DWORD dwFlags) +{ + UNIMPLEMENTED; + return E_FAIL; +} + +/* EOF */ diff --git a/reactos/w32api/include/winbase.h b/reactos/w32api/include/winbase.h index 61e3dbaa633..e3a2b0da007 100644 --- a/reactos/w32api/include/winbase.h +++ b/reactos/w32api/include/winbase.h @@ -517,6 +517,12 @@ extern "C" { #endif #define FLS_OUT_OF_INDEXES 0xFFFFFFFF #define STACK_SIZE_PARAM_IS_A_RESERVATION 0x00010000 +#if (_WIN32_WINNT >= 0x0600) +#define MAX_RESTART_CMD_LINE 0x800 +#define RESTART_CYCLICAL 0x1 +#define RESTART_NOTIFY_SOLUTION 0x2 +#define RESTART_NOTIFY_FAULT 0x4 +#endif #ifndef RC_INVOKED #ifndef _FILETIME_ @@ -1021,6 +1027,9 @@ typedef void(CALLBACK *PTIMERAPCROUTINE)(PVOID,DWORD,DWORD); #if (_WIN32_WINNT >= 0x0500) typedef void(CALLBACK *WAITORTIMERCALLBACK)(PVOID,BOOLEAN); #endif +#if (_WIN32_WINNT >= 0x0600) +typedef DWORD (WINAPI *APPLICATION_RECOVERY_CALLBACK)(PVOID); +#endif #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i))) /* Functions */ #ifndef UNDER_CE @@ -1299,6 +1308,10 @@ BOOL WINAPI FreeResource(HGLOBAL); PVOID WINAPI FreeSid(PSID); BOOL WINAPI GetAce(PACL,DWORD,LPVOID*); BOOL WINAPI GetAclInformation(PACL,PVOID,DWORD,ACL_INFORMATION_CLASS); +#if (_WIN32_WINNT >= 0x0600) +HRESULT WINAPI GetApplicationRecoveryCallback(HANDLE,APPLICATION_RECOVERY_CALLBACK*,PVOID*); +HRESULT WINAPI GetApplicationRestart(HANDLE,PWSTR,PDWORD,PDWORD); +#endif UINT WINAPI GetAtomNameA(ATOM,LPSTR,int); UINT WINAPI GetAtomNameW(ATOM,LPWSTR,int); BOOL WINAPI GetBinaryTypeA(LPCSTR,PDWORD); @@ -1599,6 +1612,9 @@ BOOL WINAPI IsProcessInJob(HANDLE,HANDLE,PBOOL); BOOL WINAPI IsProcessorFeaturePresent(DWORD); BOOL WINAPI IsSystemResumeAutomatic(void); BOOL WINAPI IsTextUnicode(PCVOID,int,LPINT); +#if (_WIN32_WINNT >= 0x0600) +BOOL WINAPI IsThreadAFiber(VOID); +#endif BOOL WINAPI IsValidAcl(PACL); BOOL WINAPI IsValidSecurityDescriptor(PSECURITY_DESCRIPTOR); BOOL WINAPI IsValidSid(PSID); @@ -1726,6 +1742,12 @@ BOOL WINAPI ReadFile(HANDLE,PVOID,DWORD,PDWORD,LPOVERLAPPED); BOOL WINAPI ReadFileEx(HANDLE,PVOID,DWORD,LPOVERLAPPED,LPOVERLAPPED_COMPLETION_ROUTINE); BOOL WINAPI ReadFileScatter(HANDLE,FILE_SEGMENT_ELEMENT*,DWORD,LPDWORD,LPOVERLAPPED); BOOL WINAPI ReadProcessMemory(HANDLE,PCVOID,PVOID,DWORD,PDWORD); +#if (_WIN32_WINNT >= 0x0600) +VOID WINAPI RecoveryFinished(BOOL); +HRESULT WINAPI RecoveryInProgress(OUT PBOOL); +HRESULT WINAPI RegisterApplicationRecoveryCallback(APPLICATION_RECOVERY_CALLBACK,PVOID); +HRESULT WINAPI RegisterApplicationRestart(PCWSTR,DWORD); +#endif HANDLE WINAPI RegisterEventSourceA (LPCSTR,LPCSTR); HANDLE WINAPI RegisterEventSourceW(LPCWSTR,LPCWSTR); #if (_WIN32_WINNT >= 0x0501)