sfc_os: Add stub for sfc_os.dll.

This commit is contained in:
Detlef Riekenberg 2007-01-16 20:35:06 +01:00 committed by Alexandre Julliard
parent 2319999a05
commit 161897e187
7 changed files with 105 additions and 1 deletions

View File

@ -340,6 +340,7 @@ ALL_MAKEFILES = \
dlls/setupapi/Makefile \
dlls/setupapi/tests/Makefile \
dlls/sfc/Makefile \
dlls/sfc_os/Makefile \
dlls/shdoclc/Makefile \
dlls/shdocvw/Makefile \
dlls/shdocvw/tests/Makefile \
@ -666,6 +667,7 @@ dlls/serialui/Makefile: dlls/serialui/Makefile.in dlls/Makedll.rules
dlls/setupapi/Makefile: dlls/setupapi/Makefile.in dlls/Makedll.rules
dlls/setupapi/tests/Makefile: dlls/setupapi/tests/Makefile.in dlls/Maketest.rules
dlls/sfc/Makefile: dlls/sfc/Makefile.in dlls/Makedll.rules
dlls/sfc_os/Makefile: dlls/sfc_os/Makefile.in dlls/Makedll.rules
dlls/shdoclc/Makefile: dlls/shdoclc/Makefile.in dlls/Makedll.rules
dlls/shdocvw/Makefile: dlls/shdocvw/Makefile.in dlls/Makedll.rules
dlls/shdocvw/tests/Makefile: dlls/shdocvw/tests/Makefile.in dlls/Maketest.rules

3
configure vendored

File diff suppressed because one or more lines are too long

View File

@ -1711,6 +1711,7 @@ dlls/serialui/Makefile
dlls/setupapi/Makefile
dlls/setupapi/tests/Makefile
dlls/sfc/Makefile
dlls/sfc_os/Makefile
dlls/shdoclc/Makefile
dlls/shdocvw/Makefile
dlls/shdocvw/tests/Makefile

View File

@ -153,6 +153,7 @@ BASEDIRS = \
serialui \
setupapi \
sfc \
sfc_os \
shdoclc \
shdocvw \
shell32 \

12
dlls/sfc_os/Makefile.in Normal file
View File

@ -0,0 +1,12 @@
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = sfc_os.dll
IMPORTS = kernel32
C_SRCS = sfc_os.c
@MAKE_DLL_RULES@
@DEPENDENCIES@ # everything below this line is overwritten by make depend

85
dlls/sfc_os/sfc_os.c Normal file
View File

@ -0,0 +1,85 @@
/*
* Implementation of the System File Checker (Windows File Protection)
*
* Copyright 2006 Detlef Riekenberg
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "sfc.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(sfc);
/******************************************************************
* DllMain
*/
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
TRACE("(%p, %d, %p)\n",hinstDLL, fdwReason, lpvReserved);
switch(fdwReason)
{
case DLL_WINE_PREATTACH:
return FALSE; /* prefer native version */
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls( hinstDLL );
break;
}
return TRUE;
}
/******************************************************************
* SfcIsFileProtected [sfc_os.@]
*
* Check, if the given File is protected by the System
*
* PARAMS
* RpcHandle [I] This must be NULL
* ProtFileName [I] Filename with Path to check
*
* RETURNS
* Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND
* Success: TRUE, when the File is Protected
* FALSE with GetLastError() == ERROR_FILE_NOT_FOUND,
* when the File is not Protected
*
*
* BUGS
* We return always the Result for: "File is not Protected"
*
*/
BOOL WINAPI SfcIsFileProtected(HANDLE RpcHandle, LPCWSTR ProtFileName)
{
static BOOL reported = FALSE;
if (reported) {
TRACE("(%p, %s) stub\n", RpcHandle, debugstr_w(ProtFileName));
}
else
{
FIXME("(%p, %s) stub\n", RpcHandle, debugstr_w(ProtFileName));
reported = TRUE;
}
SetLastError(ERROR_FILE_NOT_FOUND);
return FALSE;
}

2
dlls/sfc_os/sfc_os.spec Normal file
View File

@ -0,0 +1,2 @@
@ stub SfcGetNextProtectedFile
@ stdcall SfcIsFileProtected(ptr wstr)