/* Editor Settings: expandtabs and use 4 spaces for indentation * ex: set softtabstop=4 tabstop=8 expandtab shiftwidth=4: * */ /* * Copyright Likewise Software 2004-2008 * All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or (at * your option) any later version. * * This program 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 General Public License * for more details. You should have received a copy of the GNU General * Public License along with this program. If not, see * . * * LIKEWISE SOFTWARE MAKES THIS SOFTWARE AVAILABLE UNDER OTHER LICENSING * TERMS AS WELL. IF YOU HAVE ENTERED INTO A SEPARATE LICENSE AGREEMENT * WITH LIKEWISE SOFTWARE, THEN YOU MAY ELECT TO USE THE SOFTWARE UNDER THE * TERMS OF THAT SOFTWARE LICENSE AGREEMENT INSTEAD OF THE TERMS OF THE GNU * GENERAL PUBLIC LICENSE, NOTWITHSTANDING THE ABOVE NOTICE. IF YOU * HAVE QUESTIONS, OR WISH TO REQUEST A COPY OF THE ALTERNATE LICENSING * TERMS OFFERED BY LIKEWISE SOFTWARE, PLEASE CONTACT LIKEWISE SOFTWARE AT * license@likewisesoftware.com */ /* * Copyright (C) Likewise Software. All rights reserved. * * Module Name: * * sqliteapi.h * * Abstract: * * Registry * * LSA Server API (Private Header) * * Authors: Krishna Ganugapati (krishnag@likewisesoftware.com) * Sriram Nambakam (snambakam@likewisesoftware.com) * Marc Guy (mguy@likewisesoftware.com) */ #ifndef SQLITEAPI_H_ #define SQLITEAPI_H_ NTSTATUS SqliteCreateKeyEx( IN HANDLE Handle, IN HKEY hKey, IN PCWSTR pSubKey, IN DWORD Reserved, IN OPTIONAL PWSTR pClass, IN DWORD dwOptions, IN ACCESS_MASK AccessDesired, IN OPTIONAL PSECURITY_DESCRIPTOR_RELATIVE pSecDescRel, IN ULONG ulSecDescLen, OUT PHKEY phkResult, OUT OPTIONAL PDWORD pdwDisposition ); NTSTATUS SqliteOpenKeyEx( IN HANDLE Handle, IN HKEY hKey, IN OPTIONAL PCWSTR pwszSubKey, IN DWORD ulOptions, IN ACCESS_MASK AccessDesired, OUT PHKEY phkResult ); NTSTATUS SqliteOpenKeyEx_inDblock( IN HANDLE Handle, IN HKEY hKey, IN OPTIONAL PCWSTR pwszSubKey, IN DWORD ulOptions, IN ACCESS_MASK AccessDesired, OUT PHKEY phkResult ); VOID SqliteCloseKey( IN HKEY hKey ); NTSTATUS SqliteDeleteKey( IN HANDLE Handle, IN HKEY hKey, IN PCWSTR pSubKey ); NTSTATUS SqliteDeleteKey_inDblock( IN HANDLE Handle, IN HKEY hKey, IN PCWSTR pSubKey ); NTSTATUS SqliteEnumKeyEx( IN HANDLE Handle, IN HKEY hKey, IN DWORD dwIndex, OUT PWSTR pName, /*buffer to hold keyName*/ IN OUT PDWORD pcName,/*When the function returns, the variable receives the number of characters stored in the buffer,not including the terminating null character.*/ IN PDWORD pReserved, IN OUT PWSTR pClass, IN OUT OPTIONAL PDWORD pcClass, OUT PFILETIME pftLastWriteTime ); NTSTATUS SqliteEnumKeyEx_inDblock( IN HANDLE Handle, IN HKEY hKey, IN DWORD dwIndex, OUT PWSTR pName, /*buffer to hold keyName*/ IN OUT PDWORD pcName,/*When the function returns, the variable receives the number of characters stored in the buffer,not including the terminating null character.*/ IN PDWORD pReserved, IN OUT PWSTR pClass, IN OUT OPTIONAL PDWORD pcClass, OUT PFILETIME pftLastWriteTime ); NTSTATUS SqliteSetValueEx( IN HANDLE Handle, IN HKEY hKey, IN OPTIONAL PCWSTR pValueName, IN DWORD Reserved, IN DWORD dwType, IN const BYTE *pData, DWORD cbData ); NTSTATUS SqliteDeleteKeyValue( IN HANDLE Handle, IN HKEY hKey, IN OPTIONAL PCWSTR pSubKey, IN OPTIONAL PCWSTR pValueName ); NTSTATUS SqliteDeleteValue( IN HANDLE Handle, IN HKEY hKey, IN OPTIONAL PCWSTR pValueName ); NTSTATUS SqliteDeleteTree( HANDLE Handle, HKEY hKey, PCWSTR pSubKey ); NTSTATUS SqliteGetValue( IN HANDLE Handle, IN HKEY hKey, IN OPTIONAL PCWSTR pSubKey, IN OPTIONAL PCWSTR pValueName, IN OPTIONAL REG_DATA_TYPE_FLAGS Flags, OUT PDWORD pdwType, OUT OPTIONAL PBYTE pData, IN OUT OPTIONAL PDWORD pcbData ); NTSTATUS SqliteQueryInfoKey( IN HANDLE Handle, IN HKEY hKey, OUT PWSTR pClass, /*A pointer to a buffer that receives the user-defined class of the key. This parameter can be NULL.*/ IN OUT OPTIONAL PDWORD pcClass, IN PDWORD pReserved,/*This parameter is reserved and must be NULL.*/ OUT OPTIONAL PDWORD pcSubKeys, OUT OPTIONAL PDWORD pcMaxSubKeyLen, OUT OPTIONAL PDWORD pcMaxClassLen,/*implement this later*/ OUT OPTIONAL PDWORD pcValues, OUT OPTIONAL PDWORD pcMaxValueNameLen, OUT OPTIONAL PDWORD pcMaxValueLen, OUT OPTIONAL PDWORD pcbSecurityDescriptor, OUT OPTIONAL PFILETIME pftLastWriteTime/*implement this later*/ ); NTSTATUS SqliteEnumValue( IN HANDLE Handle, IN HKEY hKey, IN DWORD dwIndex, OUT PWSTR pValueName, /*buffer hold valueName*/ IN OUT PDWORD pcchValueName, /*input - buffer pValueName length*/ IN PDWORD pReserved, OUT OPTIONAL PDWORD pType, OUT OPTIONAL PBYTE pData,/*buffer hold value content*/ IN OUT OPTIONAL PDWORD pcbData /*input - buffer pData length*/ ); NTSTATUS SqliteSetKeySecurity( IN HANDLE hNtRegConnection, IN HKEY hKey, IN SECURITY_INFORMATION SecurityInformation, IN PSECURITY_DESCRIPTOR_RELATIVE pSecDescRel, IN ULONG ulSecDescRel ); NTSTATUS SqliteGetKeySecurity( IN HANDLE hNtRegConnection, IN HKEY hKey, IN SECURITY_INFORMATION SecurityInformation, IN OUT PSECURITY_DESCRIPTOR_RELATIVE pSecDescRel, IN OUT PULONG pulSecDescRelLen ); /* Obsolete API */ NTSTATUS SqliteQueryMultipleValues( IN HANDLE Handle, IN HKEY hKey, IN OUT PVALENT pVal_list, IN DWORD num_vals, OUT PWSTR pValue, OUT PDWORD pdwTotalsize ); #endif /* SQLITEAPI_H_ */