WaE: C6011 Dereferencing NULL pointer warnings
[LibreOffice.git] / registry / inc / regapi.hxx
blob6d1ed00f532a7bf515fa4c296944dc28413d6138
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <rtl/ustring.h>
23 #include <registry/regtype.h>
24 #include <registry/regdllapi.h>
26 /** This function opens the specified key.
28 @param hKey identifies a currently open key. The key which will be opened by this function
29 is a subkey of the key identified by hKey
30 @param keyName points to a null terminated string specifying the name of a key.
31 @param phOpenKey points to a variable that receives the handle of the opened key.
32 The memory to store this variable will be allocated and will be freed by the function
33 reg_closeKey. If the function fails, phNewKey is NULL.
34 @return REG_NO_ERROR if succeeds else an error code.
36 REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openKey(RegKeyHandle hKey,
37 rtl_uString* keyName,
38 RegKeyHandle* phOpenKey);
41 /** This function closes the specified key.
43 @param hKey identifies a currently open key which will be closed by this function.
44 The memory of the variable specifying the key will be freed.
45 @return REG_NO_ERROR if succeeds else an error code.
47 REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_closeKey(RegKeyHandle hKey);
50 /** This function opens the root key of a registry.
52 @param hRegistry identifies a currently open registry whose rootKey will be returned.
53 @param phRootKey points to a handle of the open root key if the function succeeds otherwise NULL.
54 @return REG_NO_ERROR if succeeds else an error code.
56 REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openRootKey(RegHandle hRegistry,
57 RegKeyHandle* phRootKey);
60 /** This function opens a registry with the specified name. in readonly mode.
62 @param registryName points to a null terminated string specifying the name of the registry.
63 @param phRegistry points to a handle of the opened registry if the function succeeds otherwise NULL.
64 @return REG_NO_ERROR if succeeds else an error code.
66 REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_openRegistry(rtl_uString* registryName,
67 RegHandle* phRegistry);
70 /** This function closes a registry.
72 @param hRegistry identifies a currently open registry which should be closed.
73 @return REG_NO_ERROR if succeeds else an error code.
75 REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_closeRegistry(RegHandle hRegistry);
78 /** This function reports the complete registry information of a key and all of its subkeys.
80 All information which are available (keynames, value types, values, ...)
81 will be printed to stdout for report issues only.
82 @param hKey identifies a currently open key which content will be reported.
83 @return REG_NO_ERROR if succeeds else an error code.
85 REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_dumpRegistry(RegKeyHandle hKey);
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */