2 * Implementation of the System File Checker (Windows File Protection)
4 * Copyright 2006 Detlef Riekenberg
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
28 #include "srrestoreptapi.h"
29 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(sfc
);
33 /******************************************************************
36 BOOL WINAPI
DllMain(HINSTANCE hinstDLL
, DWORD fdwReason
, LPVOID lpvReserved
)
38 TRACE("(%p, %d, %p)\n",hinstDLL
, fdwReason
, lpvReserved
);
42 case DLL_WINE_PREATTACH
:
43 return FALSE
; /* prefer native version */
45 case DLL_PROCESS_ATTACH
:
46 DisableThreadLibraryCalls( hinstDLL
);
52 /******************************************************************
53 * SfcGetNextProtectedFile [sfc_os.@]
55 BOOL WINAPI
SfcGetNextProtectedFile(HANDLE handle
, PROTECTED_FILE_DATA
*data
)
57 FIXME("%p %p\n", handle
, data
);
61 /******************************************************************
62 * SfcIsFileProtected [sfc_os.@]
64 * Check, if the given File is protected by the System
67 * RpcHandle [I] This must be NULL
68 * ProtFileName [I] Filename with Path to check
71 * Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND
72 * Success: TRUE, when the File is Protected
73 * FALSE with GetLastError() == ERROR_FILE_NOT_FOUND,
74 * when the File is not Protected
78 * We return always the Result for: "File is not Protected"
81 BOOL WINAPI
SfcIsFileProtected(HANDLE RpcHandle
, LPCWSTR ProtFileName
)
83 static BOOL reported
= FALSE
;
86 TRACE("(%p, %s) stub\n", RpcHandle
, debugstr_w(ProtFileName
));
90 FIXME("(%p, %s) stub\n", RpcHandle
, debugstr_w(ProtFileName
));
94 SetLastError(ERROR_FILE_NOT_FOUND
);
98 /******************************************************************
99 * SfcIsKeyProtected [sfc_os.@]
101 * Check, if the given Registry Key is protected by the System
104 * hKey [I] Handle to the root registry key
105 * lpSubKey [I] Name of the subkey to check
106 * samDesired [I] The Registry View to Examine (32 or 64 bit)
109 * Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND
110 * Success: TRUE, when the Key is Protected
111 * FALSE with GetLastError() == ERROR_FILE_NOT_FOUND,
112 * when the Key is not Protected
115 BOOL WINAPI
SfcIsKeyProtected(HKEY hKey
, LPCWSTR lpSubKey
, REGSAM samDesired
)
117 static BOOL reported
= FALSE
;
120 TRACE("(%p, %s) stub\n", hKey
, debugstr_w(lpSubKey
));
124 FIXME("(%p, %s) stub\n", hKey
, debugstr_w(lpSubKey
));
129 SetLastError(ERROR_INVALID_HANDLE
);
133 SetLastError(ERROR_FILE_NOT_FOUND
);
137 DWORD WINAPI
SfcConnectToServer(DWORD unknown
)
139 FIXME("%x\n", unknown
);
143 BOOL WINAPI
SRSetRestorePointA(RESTOREPOINTINFOA
*restorepoint
, STATEMGRSTATUS
*status
)
145 FIXME("%p %p\n", restorepoint
, status
);
146 status
->nStatus
= ERROR_SUCCESS
;
150 BOOL WINAPI
SRSetRestorePointW(RESTOREPOINTINFOW
*restorepoint
, STATEMGRSTATUS
*status
)
152 FIXME("%p %p\n", restorepoint
, status
);
153 status
->nStatus
= ERROR_SUCCESS
;