wusa: Support wow64 architecture identifier.
[wine.git] / dlls / sfc_os / sfc_os.c
blob61614264c7739fe9eb421da30e0180bd8333625e
1 /*
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
21 #include <stdarg.h>
23 #include "windef.h"
24 #include "winbase.h"
25 #include "winerror.h"
26 #include "winreg.h"
27 #include "sfc.h"
28 #include "srrestoreptapi.h"
29 #include "wine/debug.h"
31 WINE_DEFAULT_DEBUG_CHANNEL(sfc);
33 /******************************************************************
34 * SfcGetNextProtectedFile [sfc_os.@]
36 BOOL WINAPI SfcGetNextProtectedFile(HANDLE handle, PROTECTED_FILE_DATA *data)
38 FIXME("%p %p\n", handle, data);
40 SetLastError(ERROR_NO_MORE_FILES);
41 return FALSE;
44 /******************************************************************
45 * SfcIsFileProtected [sfc_os.@]
47 * Check, if the given File is protected by the System
49 * PARAMS
50 * RpcHandle [I] This must be NULL
51 * ProtFileName [I] Filename with Path to check
53 * RETURNS
54 * Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND
55 * Success: TRUE, when the File is Protected
56 * FALSE with GetLastError() == ERROR_FILE_NOT_FOUND,
57 * when the File is not Protected
60 * BUGS
61 * We return always the Result for: "File is not Protected"
64 BOOL WINAPI SfcIsFileProtected(HANDLE RpcHandle, LPCWSTR ProtFileName)
66 static BOOL reported = FALSE;
68 if (reported) {
69 TRACE("(%p, %s) stub\n", RpcHandle, debugstr_w(ProtFileName));
71 else
73 FIXME("(%p, %s) stub\n", RpcHandle, debugstr_w(ProtFileName));
74 reported = TRUE;
77 SetLastError(ERROR_FILE_NOT_FOUND);
78 return FALSE;
81 /******************************************************************
82 * SfcIsKeyProtected [sfc_os.@]
84 * Check, if the given Registry Key is protected by the System
86 * PARAMS
87 * hKey [I] Handle to the root registry key
88 * lpSubKey [I] Name of the subkey to check
89 * samDesired [I] The Registry View to Examine (32 or 64 bit)
91 * RETURNS
92 * Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND
93 * Success: TRUE, when the Key is Protected
94 * FALSE with GetLastError() == ERROR_FILE_NOT_FOUND,
95 * when the Key is not Protected
98 BOOL WINAPI SfcIsKeyProtected(HKEY hKey, LPCWSTR lpSubKey, REGSAM samDesired)
100 static BOOL reported = FALSE;
102 if (reported) {
103 TRACE("(%p, %s) stub\n", hKey, debugstr_w(lpSubKey));
105 else
107 FIXME("(%p, %s) stub\n", hKey, debugstr_w(lpSubKey));
108 reported = TRUE;
111 if( !hKey ) {
112 SetLastError(ERROR_INVALID_HANDLE);
113 return FALSE;
116 SetLastError(ERROR_FILE_NOT_FOUND);
117 return FALSE;
120 DWORD WINAPI SfcConnectToServer(DWORD unknown)
122 FIXME("%lx\n", unknown);
123 return 0;
126 BOOL WINAPI SRSetRestorePointA(RESTOREPOINTINFOA *restorepoint, STATEMGRSTATUS *status)
128 FIXME("%p %p\n", restorepoint, status);
129 status->nStatus = ERROR_SUCCESS;
130 return FALSE;
133 BOOL WINAPI SRSetRestorePointW(RESTOREPOINTINFOW *restorepoint, STATEMGRSTATUS *status)
135 FIXME("%p %p\n", restorepoint, status);
136 status->nStatus = ERROR_SUCCESS;
137 return FALSE;