Module: wine Branch: master Commit: 7dbe9a6728064172a9d9edac484f90c421156785 URL: http://source.winehq.org/git/wine.git/?a=commit;h=7dbe9a6728064172a9d9edac48...
Author: Glenn Wurster gwurster@scs.carleton.ca Date: Fri Jun 1 16:10:02 2007 -0400
sfc_os: Add stub implementation for SfcIsKeyProtected.
---
dlls/sfc/sfc.spec | 1 + dlls/sfc_os/sfc_os.c | 39 +++++++++++++++++++++++++++++++++++++++ dlls/sfc_os/sfc_os.spec | 1 + 3 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/dlls/sfc/sfc.spec b/dlls/sfc/sfc.spec index 20d0da5..8afb515 100644 --- a/dlls/sfc/sfc.spec +++ b/dlls/sfc/sfc.spec @@ -1,2 +1,3 @@ @ stub SfcGetNextProtectedFile @ stdcall SfcIsFileProtected(ptr wstr) sfc_os.SfcIsFileProtected +@ stdcall SfcIsKeyProtected(long wstr long) sfc_os.SfcIsKeyProtected diff --git a/dlls/sfc_os/sfc_os.c b/dlls/sfc_os/sfc_os.c index 070eea7..5805342 100644 --- a/dlls/sfc_os/sfc_os.c +++ b/dlls/sfc_os/sfc_os.c @@ -84,3 +84,42 @@ BOOL WINAPI SfcIsFileProtected(HANDLE RpcHandle, LPCWSTR ProtFileName) SetLastError(ERROR_FILE_NOT_FOUND); return FALSE; } + +/****************************************************************** + * SfcIsKeyProtected [sfc_os.@] + * + * Check, if the given Registry Key is protected by the System + * + * PARAMS + * hKey [I] Handle to the root registry key + * lpSubKey [I] Name of the subkey to check + * samDesired [I] The Registry View to Examine (32 or 64 bit) + * + * RETURNS + * Failure: FALSE with GetLastError() != ERROR_FILE_NOT_FOUND + * Success: TRUE, when the Key is Protected + * FALSE with GetLastError() == ERROR_FILE_NOT_FOUND, + * when the Key is not Protected + * + */ +BOOL WINAPI SfcIsKeyProtected(HKEY hKey, LPCWSTR lpSubKey, REGSAM samDesired) +{ + static BOOL reported = FALSE; + + if (reported) { + TRACE("(%p, %s) stub\n", hKey, debugstr_w(lpSubKey)); + } + else + { + FIXME("(%p, %s) stub\n", hKey, debugstr_w(lpSubKey)); + reported = TRUE; + } + + if( !hKey ) { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + + SetLastError(ERROR_FILE_NOT_FOUND); + return FALSE; +} diff --git a/dlls/sfc_os/sfc_os.spec b/dlls/sfc_os/sfc_os.spec index bd71d4d..1edcb83 100644 --- a/dlls/sfc_os/sfc_os.spec +++ b/dlls/sfc_os/sfc_os.spec @@ -1,2 +1,3 @@ @ stub SfcGetNextProtectedFile @ stdcall SfcIsFileProtected(ptr wstr) +@ stdcall SfcIsKeyProtected(long wstr long)