2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
9 #ifndef _FS2_REGISTRY_HEADER_FILE
10 #define _FS2_REGISTRY_HEADER_FILE
14 // ------------------------------------------------------------------------------------------------------------
15 // REGISTRY DEFINES/VARS
19 extern const char *Osreg_company_name;
20 extern const char *Osreg_class_name;
21 extern const char *Osreg_app_name;
22 extern const char *Osreg_title;
24 // ------------------------------------------------------------------------------------------------------------
29 // initialize the registry. setup default keys to use
30 void os_init_registry_stuff(const char *company, const char *app, const char *version);
32 // Removes a value from to the INI file. Passing
33 // name=NULL will delete the section.
34 void os_config_remove( const char *section, const char *name );
36 // Writes a string to the registry
37 void os_config_write_string( const char *section, const char *name, const char *value );
39 // same as previous function except we don't use the application name to build up the keyname
40 void os_config_write_string2( const char *section, const char *name, const char *value );
42 // Writes an unsigned int to the INI file.
43 void os_config_write_uint( const char *section, const char *name, unsigned int value );
45 // Reads a string from the INI file. If default is passed,
46 // and the string isn't found, returns ptr to default otherwise
47 // returns NULL; Copy the return value somewhere before
48 // calling os_read_string again, because it might reuse the
50 const char * os_config_read_string( const char *section, const char *name, const char *default_value=NULL );
52 // same as previous function except we don't use the application name to build up the keyname
53 const char * os_config_read_string2( const char *section, const char *name, const char *default_value=NULL );
55 // Reads a string from the INI file. Default_value must
56 // be passed, and if 'name' isn't found, then returns default_value
57 unsigned int os_config_read_uint( const char *section, const char *name, unsigned int default_value );
59 // uses Ex versions of Windows registry functions
60 const char * os_config_read_string_ex( const char *keyname, const char *name, const char *default_value );