00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef WINDOWSREGISTRY_H
00020 #define WINDOWSREGISTRY_H
00021
00022 #include "pandabase.h"
00023
00024
00025 #ifdef WIN32_VC
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 class EXPCL_PANDAEXPRESS WindowsRegistry {
00036 PUBLISHED:
00037 static bool set_string_value(const string &key, const string &name,
00038 const string &value);
00039 static bool set_int_value(const string &key, const string &name, int value);
00040
00041 enum Type {
00042 T_none,
00043 T_int,
00044 T_string,
00045 };
00046 static Type get_key_type(const string &key, const string &name);
00047 static string get_string_value(const string &key, const string &name,
00048 const string &default_value);
00049 static int get_int_value(const string &key, const string &name,
00050 int default_value);
00051
00052 private:
00053 static bool do_set(const string &key, const string &name,
00054 int data_type, const void *data, int data_length);
00055 static bool do_get(const string &key, const string &name,
00056 int &data_type, string &data);
00057 static string format_message(int error_code);
00058 };
00059
00060 #endif // WIN32_VC
00061
00062 #endif