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
);
59 SetLastError(ERROR_NO_MORE_FILES
);
63 /******************************************************************
64 * SfcIsFileProtected [sfc_os.@]
66 * Check, if the given File is protected by the System
69 * RpcHandle [I] This must be NULL
70 * ProtFileName [I] Filename with Path to check
73 * Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND
74 * Success: TRUE, when the File is Protected
75 * FALSE with GetLastError() == ERROR_FILE_NOT_FOUND,
76 * when the File is not Protected
80 * We return always the Result for: "File is not Protected"
83 BOOL WINAPI
SfcIsFileProtected(HANDLE RpcHandle
, LPCWSTR ProtFileName
)
85 static BOOL reported
= FALSE
;
88 TRACE("(%p, %s) stub\n", RpcHandle
, debugstr_w(ProtFileName
));
92 FIXME("(%p, %s) stub\n", RpcHandle
, debugstr_w(ProtFileName
));
96 SetLastError(ERROR_FILE_NOT_FOUND
);
100 /******************************************************************
101 * SfcIsKeyProtected [sfc_os.@]
103 * Check, if the given Registry Key is protected by the System
106 * hKey [I] Handle to the root registry key
107 * lpSubKey [I] Name of the subkey to check
108 * samDesired [I] The Registry View to Examine (32 or 64 bit)
111 * Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND
112 * Success: TRUE, when the Key is Protected
113 * FALSE with GetLastError() == ERROR_FILE_NOT_FOUND,
114 * when the Key is not Protected
117 BOOL WINAPI
SfcIsKeyProtected(HKEY hKey
, LPCWSTR lpSubKey
, REGSAM samDesired
)
119 static BOOL reported
= FALSE
;
122 TRACE("(%p, %s) stub\n", hKey
, debugstr_w(lpSubKey
));
126 FIXME("(%p, %s) stub\n", hKey
, debugstr_w(lpSubKey
));
131 SetLastError(ERROR_INVALID_HANDLE
);
135 SetLastError(ERROR_FILE_NOT_FOUND
);
139 DWORD WINAPI
SfcConnectToServer(DWORD unknown
)
141 FIXME("%x\n", unknown
);
145 BOOL WINAPI
SRSetRestorePointA(RESTOREPOINTINFOA
*restorepoint
, STATEMGRSTATUS
*status
)
147 FIXME("%p %p\n", restorepoint
, status
);
148 status
->nStatus
= ERROR_SUCCESS
;
152 BOOL WINAPI
SRSetRestorePointW(RESTOREPOINTINFOW
*restorepoint
, STATEMGRSTATUS
*status
)
154 FIXME("%p %p\n", restorepoint
, status
);
155 status
->nStatus
= ERROR_SUCCESS
;