summaryrefslogtreecommitdiff
path: root/support/dktools/dk4wregt.h
blob: 8006e5a328c1b441d48dcfc2b801ec9f2bf03019 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
Copyright 2020, Dirk Krause. All rights reserved.
SPDX-License-Identifier:	BSD-3-Clause
*/

#ifndef DK4WREGT_H_INCLUDED
#define	DK4WREGT_H_INCLUDED	1

/**	@file	dk4wregt.h	Type definitions for Windows registry access.
*/

#ifndef	DK4CONF_H_INCLUDED
#if DK4_BUILDING_DKTOOLS4
#include "dk4conf.h"
#else
#include <dktools-4/dk4conf.h>
#endif
#endif

#if DK4_ON_WINDOWS

#ifndef WINDOWS_H_INCLUDED
#include <windows.h>
#define	WINDOWS_H_INCLUDED 1
#endif
#ifndef WINBASE_H_INCLUDED
#include <winbase.h>
#define	WINBASE_H_INCLUDED 1
#endif
#ifndef WINREG_H_INCLUDED
#include <winreg.h>
#define	WINREG_H_INCLUDED 1
#endif

#endif

/**	Key handle structure, useful data on Windows, dummy on others.
*/
typedef struct {
#if DK4_ON_WINDOWS
  HKEY	hk;	/**< The registry key handle. */
#else
  int	dummy;	/**< Dummy contents for non-Windows systems. */
#endif
} dk4_wreg_key_t;

#endif