Changeset 205


Ignore:
Timestamp:
11/04/09 06:52:49 (2 years ago)
Author:
mickem
Message:

tried boost::asio in the NRPECLient and split settings to a new file (reduces build time)

Location:
trunk
Files:
6 added
28 edited

Legend:

Unmodified
Added
Removed
  • trunk/AutoBuild.h

    r202 r205  
    33// change the FALSE to TRUE for autoincrement of build number 
    44#define INCREMENT_VERSION TRUE 
    5 #define FILEVER        0,4,0,21 
    6 #define PRODUCTVER     0,4,0,21 
    7 #define STRFILEVER     _T("0.4.0.21") 
    8 #define STRPRODUCTVER  _T("0.4.0.21") 
     5#define FILEVER        0,4,0,33 
     6#define PRODUCTVER     0,4,0,33 
     7#define STRFILEVER     _T("0.4.0.33") 
     8#define STRPRODUCTVER  _T("0.4.0.33") 
    99#define STRPRODUCTDATE  _T("2009-11-01") 
    1010#endif // AUTOBUILD_H 
  • trunk/NSClient++-2005.sln

    r204 r205  
    465465    {6F55C9BF-57F6-4A15-A058-C83A52F539EE}.Debug|Mixed Platforms.Build.0 = Debug|x64 
    466466    {6F55C9BF-57F6-4A15-A058-C83A52F539EE}.Debug|Win32.ActiveCfg = Debug|Win32 
    467     {6F55C9BF-57F6-4A15-A058-C83A52F539EE}.Debug|Win32.Build.0 = Debug|Win32 
    468467    {6F55C9BF-57F6-4A15-A058-C83A52F539EE}.Debug|x64.ActiveCfg = Debug|x64 
    469468    {6F55C9BF-57F6-4A15-A058-C83A52F539EE}.Debug|x64.Build.0 = Debug|x64 
     
    485484    {26B84883-BE52-40E6-9BEE-55AD056D5751}.Debug|Mixed Platforms.Build.0 = Debug|x64 
    486485    {26B84883-BE52-40E6-9BEE-55AD056D5751}.Debug|Win32.ActiveCfg = Debug|Win32 
    487     {26B84883-BE52-40E6-9BEE-55AD056D5751}.Debug|Win32.Build.0 = Debug|Win32 
    488486    {26B84883-BE52-40E6-9BEE-55AD056D5751}.Debug|x64.ActiveCfg = Debug|x64 
    489487    {26B84883-BE52-40E6-9BEE-55AD056D5751}.Debug|x64.Build.0 = Debug|x64 
  • trunk/include/NSCHelper.h

    r202 r205  
    418418 
    419419#define SETTINGS_MAKE_NAME(key) \ 
    420   std::wstring(settings::key ## _PATH + _T(".") + settings::key) 
     420  std::wstring(setting_keys::key ## _PATH + _T(".") + setting_keys::key) 
    421421 
    422422#define SETTINGS_GET_STRING(key) \ 
    423   NSCModuleHelper::getSettingsString(settings::key ## _PATH, settings::key, settings::key ## _DEFAULT) 
     423  NSCModuleHelper::getSettingsString(setting_keys::key ## _PATH, setting_keys::key, setting_keys::key ## _DEFAULT) 
    424424#define SETTINGS_GET_INT(key) \ 
    425   NSCModuleHelper::getSettingsInt(settings::key ## _PATH, settings::key, settings::key ## _DEFAULT) 
     425  NSCModuleHelper::getSettingsInt(setting_keys::key ## _PATH, setting_keys::key, setting_keys::key ## _DEFAULT) 
    426426#define SETTINGS_GET_BOOL(key) \ 
    427   NSCModuleHelper::getSettingsInt(settings::key ## _PATH, settings::key, settings::key ## _DEFAULT) 
     427  NSCModuleHelper::getSettingsInt(setting_keys::key ## _PATH, setting_keys::key, setting_keys::key ## _DEFAULT) 
    428428 
    429429#define SETTINGS_GET_STRING_FALLBACK(key, fallback) \ 
    430   NSCModuleHelper::getSettingsString(settings::key ## _PATH, settings::key, NSCModuleHelper::getSettingsString(settings::fallback ## _PATH, settings::fallback, settings::fallback ## _DEFAULT)) 
     430  NSCModuleHelper::getSettingsString(setting_keys::key ## _PATH, setting_keys::key, NSCModuleHelper::getSettingsString(setting_keys::fallback ## _PATH, setting_keys::fallback, setting_keys::fallback ## _DEFAULT)) 
    431431#define SETTINGS_GET_INT_FALLBACK(key, fallback) \ 
    432   NSCModuleHelper::getSettingsInt(settings::key ## _PATH, settings::key, NSCModuleHelper::getSettingsInt(settings::fallback ## _PATH, settings::fallback, settings::fallback ## _DEFAULT)) 
     432  NSCModuleHelper::getSettingsInt(setting_keys::key ## _PATH, setting_keys::key, NSCModuleHelper::getSettingsInt(setting_keys::fallback ## _PATH, setting_keys::fallback, setting_keys::fallback ## _DEFAULT)) 
    433433#define SETTINGS_GET_BOOL_FALLBACK(key, fallback) \ 
    434   NSCModuleHelper::getSettingsInt(settings::key ## _PATH, settings::key, NSCModuleHelper::getSettingsInt(settings::fallback ## _PATH, settings::fallback, settings::fallback ## _DEFAULT)) 
     434  NSCModuleHelper::getSettingsInt(setting_keys::key ## _PATH, setting_keys::key, NSCModuleHelper::getSettingsInt(setting_keys::fallback ## _PATH, setting_keys::fallback, setting_keys::fallback ## _DEFAULT)) 
    435435 
    436436#define SETTINGS_REG_KEY_S(key) \ 
    437   NSCModuleHelper::settings_register_key(settings::key ## _PATH, settings::key, NSCAPI::key_string, settings::key ## _TITLE, settings::key ## _DESC, settings::key ## _DEFAULT, settings::key ## _ADVANCED); 
     437  NSCModuleHelper::settings_register_key(setting_keys::key ## _PATH, setting_keys::key, NSCAPI::key_string, setting_keys::key ## _TITLE, setting_keys::key ## _DESC, setting_keys::key ## _DEFAULT, setting_keys::key ## _ADVANCED); 
    438438#define SETTINGS_REG_KEY_I(key) \ 
    439   NSCModuleHelper::settings_register_key(settings::key ## _PATH, settings::key, NSCAPI::key_integer, settings::key ## _TITLE, settings::key ## _DESC, strEx::itos(settings::key ## _DEFAULT), settings::key ## _ADVANCED); 
     439  NSCModuleHelper::settings_register_key(setting_keys::key ## _PATH, setting_keys::key, NSCAPI::key_integer, setting_keys::key ## _TITLE, setting_keys::key ## _DESC, strEx::itos(setting_keys::key ## _DEFAULT), setting_keys::key ## _ADVANCED); 
    440440#define SETTINGS_REG_KEY_B(key) \ 
    441   NSCModuleHelper::settings_register_key(settings::key ## _PATH, settings::key, NSCAPI::key_integer, settings::key ## _TITLE, settings::key ## _DESC, settings::key ## _DEFAULT==1?_T("1"):_T("0"), settings::key ## _ADVANCED); 
     441  NSCModuleHelper::settings_register_key(setting_keys::key ## _PATH, setting_keys::key, NSCAPI::key_integer, setting_keys::key ## _TITLE, setting_keys::key ## _DESC, setting_keys::key ## _DEFAULT==1?_T("1"):_T("0"), setting_keys::key ## _ADVANCED); 
    442442#define SETTINGS_REG_PATH(key) \ 
    443   NSCModuleHelper::settings_register_path(settings::key ## _PATH, settings::key ## _TITLE, settings::key ## _DESC, settings::key ## _ADVANCED); 
     443  NSCModuleHelper::settings_register_path(setting_keys::key ## _PATH, setting_keys::key ## _TITLE, setting_keys::key ## _DESC, setting_keys::key ## _ADVANCED); 
  • trunk/include/config.h

    r202 r205  
    2424#include <tchar.h>  
    2525#include <string> 
     26#include <settings/macros.h> 
    2627// Application Name 
    2728#define SZAPPNAME _T("NSClient++") 
     
    7172#define CHECK_ALL _T("CheckAll") 
    7273#define CHECK_ALL_OTHERS _T("CheckAllOthers") 
    73  
    74 #define DEFINE_SETTING_S(name, path, key, value) \ 
    75   const std::wstring name ## _PATH = _T(path); \ 
    76   const std::wstring name = _T(key); \ 
    77   const std::wstring name ## _DEFAULT = _T(value); 
    78 #define NSCLIENT_SETTINGS_SYSTRAY_EXE _T("systray_exe") 
    79 #define NSCLIENT_SETTINGS_SYSTRAY_EXE_DEFAULT _T("nstray.exe") 
    80  
    81 #define DEFINE_PATH(name, path) \ 
    82   const std::wstring name ## _PATH = _T(path); 
    83  
    84 #define DEFINE_SETTING_I(name, path, key, value) \ 
    85   const std::wstring name ## _PATH = _T(path); \ 
    86   const std::wstring name = _T(key); \ 
    87   const long long name ## _DEFAULT = value; 
    88  
    89 #define DEFINE_SETTING_B(name, path, key, value) \ 
    90   const std::wstring name ## _PATH = _T(path); \ 
    91   const std::wstring name = _T(key); \ 
    92   const bool name ## _DEFAULT = value; 
    93  
    94 #define DESCRIBE_SETTING(name, title, description) \ 
    95   const std::wstring name ## _TITLE = _T(title); \ 
    96   const std::wstring name ## _DESC = _T(description); \ 
    97   const bool name ## _ADVANCED = false; 
    98  
    99 #define DESCRIBE_SETTING_ADVANCED(name, title, description) \ 
    100   const std::wstring name ## _TITLE = _T(title); \ 
    101   const std::wstring name ## _DESC = _T(description); \ 
    102   const bool name ## _ADVANCED = true; 
    103  
    104 #define SETTINGS_KEY(key) \ 
    105   settings::key ## _PATH, settings::key, settings::key ## _DEFAULT 
    106  
    107 #define SETTINGS_REG_KEY_S_GEN(key, type) \ 
    108   settings::key ## _PATH, settings::key, type, settings::key ## _TITLE, settings::key ## _DESC, settings::key ## _DEFAULT, settings::key ## _ADVANCED 
    109 #define SETTINGS_REG_KEY_I_GEN(key, type) \ 
    110   settings::key ## _PATH, settings::key, type, settings::key ## _TITLE, settings::key ## _DESC, strEx::itos(settings::key ## _DEFAULT), settings::key ## _ADVANCED 
    111 #define SETTINGS_REG_KEY_B_GEN(key, type) \ 
    112   settings::key ## _PATH, settings::key, type, settings::key ## _TITLE, settings::key ## _DESC, settings::key ## _DEFAULT==1?_T("1"):_T("0"), settings::key ## _ADVANCED 
    113 #define SETTINGS_REG_PATH_GEN(key) \ 
    114   settings::key ## _PATH, settings::key ## _TITLE, settings::key ## _DESC, settings::key ## _ADVANCED 
    115  
    116  
    117 #define GENERIC_KEY_ALLOWED_HOSTS "allowed hosts" 
    118 #define GENERIC_KEY_BIND_TO "bind to" 
    119 #define GENERIC_KEY_SOCK_READ_TIMEOUT "socket read timeout" 
    120 #define GENERIC_KEY_SOCK_LISTENQUE "socket queue size" 
    121 #define GENERIC_KEY_SOCK_CACHE_ALLOWED "allowed hosts caching" 
    122 #define GENERIC_KEY_PWD_MASTER_KEY "master key" 
    123 #define GENERIC_KEY_PWD "password" 
    124 #define GENERIC_KEY_OBFUSCATED_PWD "obfuscated password" 
    125 #define GENERIC_KEY_USE_SSL "use ssl" 
    126  
    127 namespace settings { 
    128  
    129 #define DEFAULT_PROTOCOL_SECTION "/protocols/default" 
    130 #define NSCLIENT_SECTION "/protocols/NSClient" 
    131 #define NRPE_SECTION_PROTOCOL "/protocols/NRPE" 
    132 #define DEFAULT_SECTION "/settings" 
    133 #define NRPE_SECTION "/settings/NRPE" 
    134 #define NRPE_CLIENT_HANDLER_SECTION "/settings/NRPE/client/handlers" 
    135 #define NRPE_SECTION_HANDLERS "/settings/NRPE/Handlers" 
    136 #define MAIN_MODULES_SECTION _T("/modules") 
    137 #define EVENT_LOG_SECTION "/settings/eventlog" 
    138 #define EXTSCRIPT_SECTION "/settings/external scripts" 
    139 #define EXTSCRIPT_SCRIPT_SECTION "/settings/external scripts/scripts" 
    140 #define EXTSCRIPT_ALIAS_SECTION "/settings/external scripts/alias" 
    141 #define CHECK_SYSTEM_SECTION "/settings/system" 
    142 #define CHECK_SYSTEM_COUNTERS_SECTION "/settings/system/PDH counters" 
    143 #define CHECK_SYSTEM_SERVICES_SECTION "/settings/system/services" 
    144 #define NSCA_SECTION "/settings/NSCA" 
    145 #define NSCA_SERVER_SECTION "/settings/NSCA/server" 
    146 #define NSCA_CMD_SECTION "/settings/NSCA/server/commands" 
    147 #define TASK_SCHED_SECTION "/settings/Task Scheduler" 
    148 #define LUA_SECTION "/settings/Lua/script" 
    149 #define LOG_SECTION "/settings/log" 
    150  
    151   // NSClient Setting headlines 
    152   namespace nsclient { 
    153     DEFINE_PATH(SECTION, NSCLIENT_SECTION); 
    154     DESCRIBE_SETTING(SECTION, "NSCLIENT SECTION", "Section for NSClient (NSClientListsner.dll) (check_nt) protocol options."); 
    155  
    156     DEFINE_SETTING_S(ALLOWED_HOSTS, NSCLIENT_SECTION, GENERIC_KEY_ALLOWED_HOSTS, ""); 
    157     DESCRIBE_SETTING(ALLOWED_HOSTS, "ALLOWED HOST ADDRESSES", "This is a comma-delimited list of IP address of hosts that are allowed to talk to NSClient deamon. If you leave this blank the global version will be used instead."); 
    158  
    159     DEFINE_SETTING_I(PORT, NSCLIENT_SECTION, "port", 12489); 
    160     DESCRIBE_SETTING(PORT, "NSCLIENT PORT NUMBER", "This is the port the NSClientListener.dll will listen to."); 
    161  
    162     DEFINE_SETTING_S(BINDADDR, NSCLIENT_SECTION, GENERIC_KEY_BIND_TO, ""); 
    163     DESCRIBE_SETTING(BINDADDR, "BIND TO ADDRESS", "Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname. Leaving this blank will bind to all avalible IP adresses."); 
    164  
    165     DEFINE_SETTING_I(READ_TIMEOUT, NSCLIENT_SECTION, GENERIC_KEY_SOCK_READ_TIMEOUT, 30); 
    166     DESCRIBE_SETTING(READ_TIMEOUT, "SOCKET TIMEOUT", "Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out."); 
    167  
    168     DEFINE_SETTING_I(LISTENQUE, NSCLIENT_SECTION, GENERIC_KEY_SOCK_LISTENQUE, 0); 
    169     DESCRIBE_SETTING_ADVANCED(LISTENQUE, "LISTEN QUEUE", "Number of sockets to queue before starting to refuse new incoming connections. This can be used to tweak the amount of simultaneous sockets that the server accepts."); 
    170  
    171     DEFINE_SETTING_S(VERSION, NSCLIENT_SECTION, "version", "auto"); 
    172     DESCRIBE_SETTING(VERSION, "VERSION", "The version number to return for the CLIENTVERSION check (useful to \"simulate\" an old/different version of the client, auto will be generated from the compiled version string inside NSClient++"); 
    173  
    174     DEFINE_SETTING_B(CACHE_ALLOWED, NSCLIENT_SECTION, GENERIC_KEY_SOCK_CACHE_ALLOWED, false); 
    175     DESCRIBE_SETTING_ADVANCED(CACHE_ALLOWED, "ALLOWED HOSTS CACHING", "Used to cache looked up hosts if you check dynamic/changing hosts set this to false."); 
    176  
    177     DEFINE_SETTING_S(MASTER_KEY, NSCLIENT_SECTION, GENERIC_KEY_PWD_MASTER_KEY, "This is a secret key that you should change"); 
    178     DESCRIBE_SETTING(MASTER_KEY, "MASTER KEY", "The secret \"key\" used when (de)obfuscating passwords."); 
    179  
    180     DEFINE_SETTING_S(PWD, NSCLIENT_SECTION, GENERIC_KEY_PWD, ""); 
    181     DESCRIBE_SETTING(PWD, "PASSWORD", "This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly."); 
    182  
    183     DEFINE_SETTING_S(OBFUSCATED_PWD, NSCLIENT_SECTION, GENERIC_KEY_OBFUSCATED_PWD, ""); 
    184     DESCRIBE_SETTING(OBFUSCATED_PWD, "OBFUSCATED PASSWORD", "This is the same as the password option but here you can store the password in an obfuscated manner. *NOTICE* obfuscation is *NOT* the same as encryption, someone with access to this file can still figure out the password. Its just a bit harder to do it at first glance."); 
    185  
    186     DEFINE_SETTING_S(SYSTRAY_EXE, NSCLIENT_SECTION, "systray_exe", "nstray.exe"); 
    187     DESCRIBE_SETTING(SYSTRAY_EXE, "TODO", "TODO"); 
    188   } 
    189  
    190   // NSClient Setting headlines 
    191   namespace nrpe { 
    192     DEFINE_PATH(SECTION, NRPE_SECTION_PROTOCOL); 
    193     DESCRIBE_SETTING(SECTION, "NRPE SECTION", "Section for NRPE (NRPEListener.dll) (check_nrpe) protocol options."); 
    194  
    195      
    196     DEFINE_PATH(CH_SECTION, NRPE_CLIENT_HANDLER_SECTION); 
    197     DESCRIBE_SETTING(CH_SECTION, "CLIENT HANDLER SECTION", "..."); 
    198  
    199     DEFINE_SETTING_S(ALLOWED_HOSTS, NRPE_SECTION_PROTOCOL, GENERIC_KEY_ALLOWED_HOSTS, ""); 
    200     DESCRIBE_SETTING(ALLOWED_HOSTS, "ALLOWED HOST ADDRESSES", "This is a comma-delimited list of IP address of hosts that are allowed to talk to NSClient deamon. If you leave this blank the global version will be used instead."); 
    201  
    202     DEFINE_SETTING_I(PORT, NRPE_SECTION_PROTOCOL, "port", 5666); 
    203     DESCRIBE_SETTING(PORT, "NSCLIENT PORT NUMBER", "This is the port the NSClientListener.dll will listen to."); 
    204  
    205     DEFINE_SETTING_S(BINDADDR, NRPE_SECTION_PROTOCOL, GENERIC_KEY_BIND_TO, ""); 
    206     DESCRIBE_SETTING(BINDADDR, "BIND TO ADDRESS", "Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname. Leaving this blank will bind to all avalible IP adresses."); 
    207  
    208     DEFINE_SETTING_I(READ_TIMEOUT, NRPE_SECTION_PROTOCOL, GENERIC_KEY_SOCK_READ_TIMEOUT, 30); 
    209     DESCRIBE_SETTING(READ_TIMEOUT, "SOCKET TIMEOUT", "Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out."); 
    210  
    211     DEFINE_SETTING_I(LISTENQUE, NRPE_SECTION_PROTOCOL, GENERIC_KEY_SOCK_LISTENQUE, 0); 
    212     DESCRIBE_SETTING_ADVANCED(LISTENQUE, "LISTEN QUEUE", "Number of sockets to queue before starting to refuse new incoming connections. This can be used to tweak the amount of simultaneous sockets that the server accepts."); 
    213  
    214     DEFINE_SETTING_B(CACHE_ALLOWED, NRPE_SECTION_PROTOCOL, GENERIC_KEY_SOCK_CACHE_ALLOWED, false); 
    215     DESCRIBE_SETTING_ADVANCED(CACHE_ALLOWED, "ALLOWED HOSTS CACHING", "Used to cache looked up hosts if you check dynamic/changing hosts set this to false."); 
    216  
    217     DEFINE_SETTING_B(KEYUSE_SSL, NRPE_SECTION_PROTOCOL, GENERIC_KEY_USE_SSL, true); 
    218     DESCRIBE_SETTING(KEYUSE_SSL, "USE SSL SOCKET", "This option controls if SSL should be used on the socket."); 
    219  
    220     DEFINE_SETTING_I(PAYLOAD_LENGTH, NRPE_SECTION_PROTOCOL, "payload length", 1024); 
    221     DESCRIBE_SETTING_ADVANCED(PAYLOAD_LENGTH, "PAYLOAD LENGTH", "Length of payload to/from the NRPE agent. This is a hard specific value so you have to \"configure\" (read recompile) your NRPE agent to use the same value for it to work."); 
    222  
    223     DEFINE_SETTING_B(ALLOW_PERFDATA, NRPE_SECTION, "performance data", true); 
    224     DESCRIBE_SETTING_ADVANCED(ALLOW_PERFDATA, "PERFORMANCE DATA", "Send performance data back to nagios (set this to 0 to remove all performance data)."); 
    225  
    226     DEFINE_SETTING_S(SCRIPT_PATH, NRPE_SECTION, "script path", ""); 
    227     DESCRIBE_SETTING_ADVANCED(SCRIPT_PATH, "SCRIPT DIRECTORY", "Load all scripts in a directory and use them as commands. Probably dangerous but usefull if you have loads of scripts :)"); 
    228  
    229     DEFINE_SETTING_I(CMD_TIMEOUT, NRPE_SECTION, "command timeout", 60); 
    230     DESCRIBE_SETTING(CMD_TIMEOUT, "COMMAND TIMEOUT", "This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off."); 
    231  
    232     DEFINE_SETTING_B(ALLOW_ARGS, NRPE_SECTION, "allow arguments", false); 
    233     DESCRIBE_SETTING(ALLOW_ARGS, "COMMAND ARGUMENT PROCESSING", "This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed."); 
    234  
    235     DEFINE_SETTING_B(ALLOW_NASTY, NRPE_SECTION, "allow nasy characters", false); 
    236     DESCRIBE_SETTING(ALLOW_NASTY, "COMMAND ALLOW NASTY META CHARS", "This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'\"\\[]{}) characters in arguments."); 
    237  
    238     DEFINE_PATH(SECTION_HANDLERS, NRPE_SECTION_HANDLERS); 
    239     DESCRIBE_SETTING(SECTION_HANDLERS, "NRPE COMMAND DEFINITIONS -- DEPRECATED", "Command definitions that this daemon will run (it will also run all internal commands such as those from ther ExternalScriptModule)."); 
    240  
    241   } 
    242  
    243   namespace settings_def { 
    244     DEFINE_SETTING_B(COMPATIBLITY, DEFAULT_SECTION, "compatiblity 0.3", true); 
    245     DESCRIBE_SETTING(COMPATIBLITY, "COMPATIBLE SETTINGS SYSTEM", "Allow reading old settings files from 0.3.x versions."); 
    246  
    247     DEFINE_SETTING_I(PAYLOAD_LEN, DEFAULT_SECTION, "payload length", 4096); 
    248     DESCRIBE_SETTING(PAYLOAD_LEN, "PAYLOAD LENGTH", "..."); 
    249  
    250     DEFINE_SETTING_B(SHARED_SESSION, DEFAULT_SECTION, "shared session", true); 
    251     DESCRIBE_SETTING(SHARED_SESSION, "SHARED SESSION", "TODO"); 
    252  
    253   } 
    254  
    255   namespace shared_session { 
    256     DEFINE_SETTING_S(SYSTRAY_EXE, DEFAULT_SECTION, "tray", ""); 
    257     DESCRIBE_SETTING(SYSTRAY_EXE, "SYSTEM TRAY EXE", "TODO"); 
    258      
    259   } 
    260  
    261   namespace protocol_def { 
    262     DEFINE_SETTING_S(ALLOWED_HOSTS, DEFAULT_PROTOCOL_SECTION, GENERIC_KEY_ALLOWED_HOSTS, ""); 
    263     DESCRIBE_SETTING(ALLOWED_HOSTS, "ALLOWED HOST ADDRESSES", "This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons. If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password). The syntax is host or ip/mask so 192.168.0.0/24 will allow anyone on that subnet access"); 
    264  
    265     DEFINE_SETTING_B(CACHE_ALLOWED, DEFAULT_PROTOCOL_SECTION, GENERIC_KEY_SOCK_CACHE_ALLOWED, false); 
    266     DESCRIBE_SETTING_ADVANCED(CACHE_ALLOWED, "ALLOWED HOSTS CACHING", "Used to cache looked up hosts if you check dynamic/changing hosts set this to false."); 
    267  
    268     DEFINE_SETTING_S(MASTER_KEY, DEFAULT_PROTOCOL_SECTION, GENERIC_KEY_PWD_MASTER_KEY, "This is a secret key that you should change"); 
    269     DESCRIBE_SETTING(MASTER_KEY, "MASTER KEY", "The secret \"key\" used when (de)obfuscating passwords."); 
    270  
    271     DEFINE_SETTING_S(PWD, DEFAULT_PROTOCOL_SECTION, GENERIC_KEY_PWD, ""); 
    272     DESCRIBE_SETTING(PWD, "PASSWORD", "This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly."); 
    273  
    274     DEFINE_SETTING_S(OBFUSCATED_PWD, DEFAULT_PROTOCOL_SECTION, GENERIC_KEY_OBFUSCATED_PWD, ""); 
    275     DESCRIBE_SETTING(OBFUSCATED_PWD, "OBFUSCATED PASSWORD", "This is the same as the password option but here you can store the password in an obfuscated manner. *NOTICE* obfuscation is *NOT* the same as encryption, someone with access to this file can still figure out the password. Its just a bit harder to do it at first glance."); 
    276   } 
    277   namespace event_log { 
    278     DEFINE_PATH(SECTION, EVENT_LOG_SECTION); 
    279     DESCRIBE_SETTING(SECTION, "EVENT LOG SECTION", "Section for the EventLog Checker (CHeckEventLog.dll)."); 
    280  
    281     DEFINE_SETTING_B(DEBUG_KEY, EVENT_LOG_SECTION, "debug", false); 
    282     DESCRIBE_SETTING_ADVANCED(DEBUG_KEY, "DEBUG", "Log all \"hits\" and \"misses\" on the eventlog filter chain, useful for debugging eventlog checks but very very very noisy so you don't want to accidentally set this on a real machine."); 
    283  
    284     DEFINE_SETTING_B(LOOKUP_NAMES, EVENT_LOG_SECTION, "lookup_names", false); 
    285     DESCRIBE_SETTING_ADVANCED(LOOKUP_NAMES, "TODO", "TODO"); 
    286  
    287     DEFINE_SETTING_S(SYNTAX, EVENT_LOG_SECTION, "syntax", ""); 
    288     DESCRIBE_SETTING(SYNTAX, "SYNTAX", "Set this to use a specific syntax string for all commands (that don't specify one)."); 
    289  
    290     DEFINE_SETTING_I(BUFFER_SIZE, EVENT_LOG_SECTION, "buffer_size", 4096); 
    291     DESCRIBE_SETTING(BUFFER_SIZE, "BUFFER SIZE", "The size of the bugfer to use when getting messages this affects the speed and maximum size of messages you can recieve."); 
    292   } 
    293  
    294   namespace external_scripts { 
    295     DEFINE_PATH(SECTION, EXTSCRIPT_SECTION); 
    296     DESCRIBE_SETTING(SECTION, "EXTERNAL SCRIPT SECTION", "Section for external scripts (CheckExternalScripts.dll)."); 
    297  
    298     DEFINE_SETTING_I(TIMEOUT, EXTSCRIPT_SECTION, "timeout", 60); 
    299     DESCRIBE_SETTING(TIMEOUT, "COMMAND TIMEOUT", "The maximum time in seconds that a command can execute. (if more then this execution will be aborted). NOTICE this only affects external commands not internal ones."); 
    300  
    301     DEFINE_SETTING_B(ALLOW_ARGS, EXTSCRIPT_SECTION, "allow arguments", false); 
    302     DESCRIBE_SETTING(ALLOW_ARGS, "COMMAND ARGUMENT PROCESSING", "This option determines whether or not the we will allow clients to specify arguments to commands that are executed."); 
    303  
    304     DEFINE_SETTING_B(ALLOW_NASTY, EXTSCRIPT_SECTION, "allow nasy characters", false); 
    305     DESCRIBE_SETTING(ALLOW_NASTY, "COMMAND ALLOW NASTY META CHARS", "This option determines whether or not the we will allow clients to specify nasty (as in |`&><'\"\\[]{}) characters in arguments."); 
    306  
    307     DEFINE_SETTING_S(SCRIPT_PATH, EXTSCRIPT_SECTION, "script path", ""); 
    308     DESCRIBE_SETTING_ADVANCED(SCRIPT_PATH, "SCRIPT DIRECTORY", "Load all scripts in a directory and use them as commands. Probably dangerous but usefull if you have loads of scripts :)"); 
    309  
    310     DEFINE_PATH(SCRIPT_SECTION, EXTSCRIPT_SCRIPT_SECTION); 
    311     DESCRIBE_SETTING(SCRIPT_SECTION, "EXTERNAL SCRIPT SCRIPTS SECTION", "A list of scripts available to run from the CheckExternalScripts module. Syntax is: <command>=<script> <arguments> for instance:"); 
    312  
    313     DEFINE_PATH(ALIAS_SECTION, EXTSCRIPT_ALIAS_SECTION); 
    314     DESCRIBE_SETTING(ALIAS_SECTION, "EXTERNAL SCRIPT ALIAS SECTION", "Works like the \"inject\" concept of NRPE scripts module. But in short a list of aliases available. An alias is an internal command that has been \"wrapped\" (to add arguments). Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)"); 
    315   } 
    316  
    317   namespace check_system { 
    318  
    319     DEFINE_PATH(SECTION, CHECK_SYSTEM_SECTION); 
    320     DESCRIBE_SETTING(SECTION, "SYSTEM", "Section for system checks and system settings."); 
    321  
    322     DEFINE_SETTING_S(PROC_ENUM, CHECK_SYSTEM_SECTION, "process enumeration method", "auto"); 
    323     DESCRIBE_SETTING_ADVANCED(PROC_ENUM, "COMMAND TIMEOUT", "Set the PROCESS enumeration method (auto, TOOLHELP or PSAPI)"); 
    324     const std::wstring PROC_ENUM_PSAPI = _T("PSAPI"); 
    325     const std::wstring PROC_ENUM_TH = _T("TOOLHELP"); 
    326  
    327     DEFINE_SETTING_S(CPU_METHOD, CHECK_SYSTEM_SECTION, "method", "PDH_AUTO"); 
    328     DESCRIBE_SETTING_ADVANCED(CPU_METHOD, "CPU METHOD", "Set this to false to disable auto detect (counters.defs) PDH language and OS version."); 
    329     const std::wstring CPU_METHOD_PDH_MANUAL = _T("PDH_MANUAL"); 
    330     const std::wstring CPU_METHOD_PDH_AUTO = _T("PDH_AUTO"); 
    331     const std::wstring CPU_METHOD_PDH_NO_INDEX = _T("PDH_NO_INDEX"); 
    332  
    333     DEFINE_SETTING_S(BUFFER_SIZE, CHECK_SYSTEM_SECTION, "buffer size", "1h"); 
    334     DESCRIBE_SETTING(BUFFER_SIZE, "BUFFER SIZE", "  The time to store CPU load data."); 
    335  
    336     DEFINE_SETTING_I(INTERVALL, CHECK_SYSTEM_SECTION, "interval", 10); 
    337     DESCRIBE_SETTING_ADVANCED(INTERVALL, "CHECK INTERVAL", "Time between checks in 1/10 of seconds."); 
    338  
    339     DEFINE_SETTING_S(FORCE_LANGUAGE, CHECK_SYSTEM_SECTION, "locale", "auto"); 
    340     DESCRIBE_SETTING_ADVANCED(FORCE_LANGUAGE, "FORCE LOCALE", "Set this to a locale ID if you want to force auto-detection of counters from that locale."); 
    341      
    342     DEFINE_PATH(COUNTERS_SECTION, CHECK_SYSTEM_COUNTERS_SECTION); 
    343     DESCRIBE_SETTING_ADVANCED(COUNTERS_SECTION, "PDH COUNTERS", "Section to define PDH counters to use"); 
    344  
    345     DEFINE_SETTING_S(PDH_MEM_CMT_LIM, CHECK_SYSTEM_COUNTERS_SECTION, "memory commit limit", "\\Memory\\Commit Limit"); 
    346     DESCRIBE_SETTING_ADVANCED(PDH_MEM_CMT_LIM, "PDH COUNTER", "Counter to use to check upper memory limit."); 
    347  
    348     DEFINE_SETTING_S(PDH_MEM_CMT_BYT, CHECK_SYSTEM_COUNTERS_SECTION, "memory commit byte", "\\Memory\\Committed Bytes"); 
    349     DESCRIBE_SETTING_ADVANCED(PDH_MEM_CMT_BYT, "PDH COUNTER", "Counter to use to check current memory usage."); 
    350  
    351     DEFINE_SETTING_S(PDH_SYSUP, CHECK_SYSTEM_COUNTERS_SECTION, "system uptime", "\\System\\System Up Time"); 
    352     DESCRIBE_SETTING_ADVANCED(PDH_SYSUP, "PDH COUNTER", "Counter to use to check the uptime of the system."); 
    353  
    354     DEFINE_SETTING_S(PDH_CPU, CHECK_SYSTEM_COUNTERS_SECTION, "processor time", "\\Processor(_total)\\% Processor Time"); 
    355     DESCRIBE_SETTING_ADVANCED(PDH_CPU, "PDH COUNTER", "Counter to use for CPU load."); 
    356  
    357     DEFINE_PATH(SERVICES_SECTION, CHECK_SYSTEM_SERVICES_SECTION); 
    358     DESCRIBE_SETTING_ADVANCED(SERVICES_SECTION, "SERVICE CHECKS", "Section to define service checks to use"); 
    359  
    360     DEFINE_SETTING_S(SVC_BOOT_START, CHECK_SYSTEM_SERVICES_SECTION, "SERVICE_BOOT_START", "ignored"); 
    361     DESCRIBE_SETTING_ADVANCED(SVC_BOOT_START, "SERVICE_BOOT_START SERVICE CHECK", "Set how to handle services set to SERVICE_BOOT_START state when checking all services"); 
    362  
    363     DEFINE_SETTING_S(SVC_SYSTEM_START, CHECK_SYSTEM_SERVICES_SECTION, "SERVICE_SYSTEM_START", "ignored"); 
    364     DESCRIBE_SETTING_ADVANCED(SVC_SYSTEM_START, "SERVICE_BOOT_START SERVICE CHECK", "Set how to handle services set to SERVICE_BOOT_START state when checking all services"); 
    365  
    366     DEFINE_SETTING_S(SVC_AUTO_START, CHECK_SYSTEM_SERVICES_SECTION, "SERVICE_AUTO_START", "started"); 
    367     DESCRIBE_SETTING_ADVANCED(SVC_AUTO_START, "SERVICE_BOOT_START SERVICE CHECK", "Set how to handle services set to SERVICE_BOOT_START state when checking all services"); 
    368  
    369     DEFINE_SETTING_S(SVC_DEMAND_START, CHECK_SYSTEM_SERVICES_SECTION, "SERVICE_DEMAND_START", "ignored"); 
    370     DESCRIBE_SETTING_ADVANCED(SVC_DEMAND_START, "SERVICE_BOOT_START SERVICE CHECK", "Set how to handle services set to SERVICE_BOOT_START state when checking all services"); 
    371  
    372     DEFINE_SETTING_S(SVC_DISABLED, CHECK_SYSTEM_SERVICES_SECTION, "SERVICE_DISABLED", "stopped"); 
    373     DESCRIBE_SETTING_ADVANCED(SVC_DISABLED, "SERVICE_BOOT_START SERVICE CHECK", "Set how to handle services set to SERVICE_BOOT_START state when checking all services"); 
    374  
    375  
    376   } 
    377  
    378   namespace nsca { 
    379     DEFINE_PATH(SECTION, NSCA_SECTION); 
    380     DESCRIBE_SETTING(SECTION, "NSCA SECTION", "Section for NSCA passive check module."); 
    381  
    382     DEFINE_SETTING_I(INTERVAL, NSCA_SECTION, "interval", 60); 
    383     DESCRIBE_SETTING(INTERVAL, "COMMAND TIMEOUT", "Time in seconds between each report back to the server (cant as of yet be set individually so this is for all \"checks\")"); 
    384  
    385     DEFINE_SETTING_S(HOSTNAME, NSCA_SECTION, "hostname", ""); 
    386     DESCRIBE_SETTING_ADVANCED(HOSTNAME, "LOCAL HOSTNAME", "The host name of this host if set to blank (default) the windows name of the computer will be used."); 
    387  
    388     DEFINE_PATH(SERVER_SECTION, NSCA_SERVER_SECTION); 
    389     DESCRIBE_SETTING(SERVER_SECTION, "NSCA SERVER SECTION", "Configure the NSCA server to report to"); 
    390  
    391     DEFINE_SETTING_S(SERVER_HOST, NSCA_SERVER_SECTION, "host", "unknown-host"); 
    392     DESCRIBE_SETTING(SERVER_HOST, "NSCA SERVER", "The NSCA/Nagios(?) server to report results to."); 
    393  
    394     DEFINE_SETTING_I(SERVER_PORT, NSCA_SERVER_SECTION, "port", 5667); 
    395     DESCRIBE_SETTING(SERVER_PORT, "NSCA PORT", "The NSCA server port"); 
    396  
    397     DEFINE_SETTING_I(ENCRYPTION, NSCA_SERVER_SECTION, "encryption method", 1); 
    398     DESCRIBE_SETTING(ENCRYPTION, "NSCA ENCRYPTION", "Number corresponding to the various encryption algorithms (see the wiki). Has to be the same as the server or it wont work at all."); 
    399  
    400     DEFINE_SETTING_S(PASSWORD, NSCA_SERVER_SECTION, "password", ""); 
    401     DESCRIBE_SETTING(PASSWORD, "NSCA PASSWORD", "The password to use. Again has to be the same as the server or it wont work at all."); 
    402  
    403     DEFINE_SETTING_I(THREADS, NSCA_SECTION, "debug threads", 1); 
    404     DESCRIBE_SETTING_ADVANCED(THREADS, "DEBUG OPTION (THREADS)", "Number of threads to run, no reason to change this really (unless you want to stress test something)"); 
    405  
    406     DEFINE_SETTING_B(CACHE_HOST, NSCA_SECTION, "cache hostname", false); 
    407     DESCRIBE_SETTING_ADVANCED(CACHE_HOST, "CACHE HOSTNAME", "???"); 
    408  
    409     DEFINE_PATH(CMD_SECTION, NSCA_CMD_SECTION); 
    410     DESCRIBE_SETTING(CMD_SECTION, "NSCA COMMAND SECTION", "Commands to check and report to the NSCA server"); 
    411  
    412     DEFINE_SETTING_S(REPORT_MODE, NSCA_SERVER_SECTION, "report", "all"); 
    413     DESCRIBE_SETTING(REPORT_MODE, "REPORT MODE", "What to report to the server (any of the following: all, critical, warning, unknown, ok)"); 
    414  
    415     DEFINE_SETTING_S(TIME_DELTA_DEFAULT, NSCA_SECTION, "delay", "0"); 
    416     DESCRIBE_SETTING(TIME_DELTA_DEFAULT, "TODO", "TODO"); 
    417      
    418     DEFINE_SETTING_I(PAYLOAD_LENGTH, NSCA_SECTION, "payload length", 512); 
    419     DESCRIBE_SETTING_ADVANCED(PAYLOAD_LENGTH, "PAYLOAD LENGTH", "Length of payload to/from the NSCA agent. This is a hard specific value so you have to \"configure\" (read recompile) your NSCA server to use the same value for it to work."); 
    420  
    421     DEFINE_SETTING_I(READ_TIMEOUT, NSCA_SERVER_SECTION, GENERIC_KEY_SOCK_READ_TIMEOUT, 30); 
    422     DESCRIBE_SETTING(READ_TIMEOUT, "SOCKET TIMEOUT", "Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out."); 
    423  
    424   } 
    425  
    426   namespace task_scheduler { 
    427     DEFINE_PATH(SECTION, TASK_SCHED_SECTION); 
    428     DESCRIBE_SETTING_ADVANCED(SECTION, "TASK SCHEDULER", "???"); 
    429  
    430     DEFINE_SETTING_S(SYNTAX, TASK_SCHED_SECTION, "syntax", "%title% last run: %most-recent-run-time% (%exit-code%)"); 
    431     DESCRIBE_SETTING_ADVANCED(SYNTAX, "SYNTAX", "Set this to use a specific syntax string for all commands (that don't specify one)"); 
    432   } 
    433  
    434   namespace lua { 
    435     DEFINE_PATH(SECTION, LUA_SECTION); 
    436     DESCRIBE_SETTING_ADVANCED(SECTION, "LUA SECTION", "A list of LUA script to load at startup. In difference to \"external checks\" all LUA scripts are loaded at startup. Names have no meaning since the script (on boot) submit which commands are available and tie that to various functions."); 
    437   } 
    438  
    439   namespace log { 
    440     DEFINE_PATH(SECTION, LOG_SECTION); 
    441     DESCRIBE_SETTING_ADVANCED(SECTION, "LOG SECTION", "Configure loggning properties."); 
    442  
    443     DEFINE_SETTING_S(FILENAME, LOG_SECTION, "file", "nsclient.log"); 
    444     DESCRIBE_SETTING_ADVANCED(FILENAME, "SYNTAX", "The file to write log data to. If no directory is used this is relative to the NSClient++ binary."); 
    445  
    446     DEFINE_SETTING_S(ROOT, LOG_SECTION, "root", "auto"); 
    447     DESCRIBE_SETTING_ADVANCED(ROOT, "TODO", "TODO"); 
    448  
    449     DEFINE_SETTING_S(DATEMASK, LOG_SECTION, "date format", "%Y-%m-%d %H:%M:%S"); 
    450     DESCRIBE_SETTING_ADVANCED(DATEMASK, "DATEMASK", "The date format used when logging to a file."); 
    451  
    452     DEFINE_SETTING_B(DEBUG_LOG, LOG_SECTION, "debug", false); 
    453     DESCRIBE_SETTING_ADVANCED(DEBUG_LOG, "DEBUG LOGGING", "Enable debug logging can help track down errors and find problems but will impact overall perfoamnce negativly."); 
    454   } 
    455 } 
    45674 
    45775// Check System Settings 
  • trunk/include/settings/Settings.h

    r202 r205  
    2424#include <string> 
    2525#include <map> 
     26#include <Mutex.h> 
    2627#define BUFF_LEN 4096 
    2728 
  • trunk/include/settings/settings_old.hpp

    r202 r205  
    1616    OLDSettings(Settings::SettingsCore *core, std::wstring context) :Settings::SettingsInterfaceImpl(core, context) { 
    1717      add_mapping(MAIN_MODULES_SECTION, MAIN_MODULES_SECTION_OLD); 
    18       add_mapping(settings::settings_def::PAYLOAD_LEN_PATH, settings::settings_def::PAYLOAD_LEN, MAIN_SECTION_TITLE, MAIN_STRING_LENGTH); 
     18      add_mapping(setting_keys::settings_def::PAYLOAD_LEN_PATH, setting_keys::settings_def::PAYLOAD_LEN, MAIN_SECTION_TITLE, MAIN_STRING_LENGTH); 
    1919 
    2020#define SETTINGS_MAP_KEY_A(name, section, key) \ 
    21   add_mapping(settings::name ## _PATH, settings::name, section, key); 
     21  add_mapping(setting_keys::name ## _PATH, setting_keys::name, section, key); 
    2222#define SETTINGS_MAP_SECTION_A(name, section) \ 
    23   add_mapping(settings::name ## _PATH, section); 
     23  add_mapping(setting_keys::name ## _PATH, section); 
    2424 
    2525 
     
    4343#define LOG_FILENAME _T("file")  
    4444#define LOG_DATEMASK _T("date_mask") 
    45       NSC_DEBUG_MSG(_T("Using compatibility mode in: LOGGING module")); 
    4645 
    4746      SETTINGS_MAP_KEY_A(log::FILENAME, LOG_SECTION_TITLE, LOG_FILENAME); 
     
    141140      if (it == sections_.end()) 
    142141        return path_new; 
     142      get_core()->get_logger()->debug(__FILEW__, __LINE__, _T("Mapping: ") + path_new + _T(" to ") + (*it).second); 
    143143      return (*it).second; 
    144144    } 
     
    392392    /// @author mickem 
    393393    virtual void get_real_keys(std::wstring path, string_list &list) { 
     394      std::wstring mapped_path = map_path(path); 
     395      int_read_section(mapped_path, list); 
    394396      /* 
    395       std::wstring mapped_path = get_core()->reverse_map_path(path); 
    396       int_read_section(path, list); 
    397397      Settings::SettingsCore::mapped_key_list_type mapped_keys = get_core()->find_maped_keys(path); 
    398398      for (Settings::SettingsCore::mapped_key_list_type::const_iterator cit = mapped_keys.begin(); cit != mapped_keys.end(); ++cit) { 
     
    414414    } 
    415415    void int_read_section(std::wstring section, string_list &list, unsigned int bufferLength = BUFF_LEN) { 
     416      get_core()->get_logger()->debug(__FILEW__, __LINE__, _T("Reading (OLD) section: ") + section); 
    416417      // @TODO this is not correct! 
    417       std::wstring mapped = map_path(section); 
    418418      TCHAR* buffer = new TCHAR[bufferLength+1]; 
    419419      if (buffer == NULL) 
    420420        throw SettingsException(_T("getSections:: Failed to allocate memory for buffer!")); 
    421       unsigned int count = GetPrivateProfileSection(mapped.c_str(), buffer, bufferLength, get_file_name().c_str()); 
     421      unsigned int count = GetPrivateProfileSection(section.c_str(), buffer, bufferLength, get_file_name().c_str()); 
    422422      if (count == bufferLength-2) { 
    423423        delete [] buffer; 
  • trunk/include/strEx.h

    r201 r205  
    634634#endif 
    635635} 
     636 
     637 
     638#include <string> 
     639#include <locale> 
     640 
     641#include <boost/lexical_cast.hpp> 
     642 
     643namespace boost 
     644{ 
     645  template<> 
     646  inline std::wstring lexical_cast<std::wstring, std::string>(const std::string& arg) 
     647  { 
     648    std::wstring result; 
     649    std::locale loc; 
     650    for(unsigned int i= 0; i < arg.size(); ++i) 
     651    { 
     652      result += std::use_facet<std::ctype<wchar_t> >(loc).widen(arg[i]); 
     653    } 
     654    return result; 
     655  } 
     656 
     657  template<> 
     658  inline std::string lexical_cast<std::string, std::wstring>(const std::wstring& arg) 
     659  { 
     660    std::string result; 
     661    std::locale loc; 
     662    for(unsigned int i= 0; i < arg.size(); ++i) 
     663    { 
     664      result += std::use_facet<std::ctype<wchar_t> >(loc).narrow(arg[i]); 
     665    } 
     666    return result; 
     667  } 
     668} 
     669 
  • trunk/modules/CheckDisk/CheckDisk-2005.vcproj

    r201 r205  
    345345    </Configuration> 
    346346    <Configuration 
    347       Name="Distribution|Win32" 
    348       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    349       IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    350       ConfigurationType="2" 
    351       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    352       CharacterSet="1" 
    353       > 
    354       <Tool 
    355         Name="VCPreBuildEventTool" 
    356       /> 
    357       <Tool 
    358         Name="VCCustomBuildTool" 
    359       /> 
    360       <Tool 
    361         Name="VCXMLDataGeneratorTool" 
    362       /> 
    363       <Tool 
    364         Name="VCWebServiceProxyGeneratorTool" 
    365       /> 
    366       <Tool 
    367         Name="VCMIDLTool" 
    368       /> 
    369       <Tool 
    370         Name="VCCLCompilerTool" 
    371         AdditionalIncludeDirectories="../include;../../include" 
    372         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;USE_BOOST" 
    373         RuntimeLibrary="0" 
    374         UsePrecompiledHeader="2" 
    375         WarningLevel="3" 
    376         Detect64BitPortabilityProblems="false" 
    377         DebugInformationFormat="3" 
    378       /> 
    379       <Tool 
    380         Name="VCManagedResourceCompilerTool" 
    381       /> 
    382       <Tool 
    383         Name="VCResourceCompilerTool" 
    384       /> 
    385       <Tool 
    386         Name="VCPreLinkEventTool" 
    387       /> 
    388       <Tool 
    389         Name="VCLinkerTool" 
    390         OutputFile="$(OutDir)\$(ProjectName).dll" 
    391         LinkIncremental="1" 
    392         ModuleDefinitionFile="CheckDisk.def" 
    393         GenerateDebugInformation="false" 
    394         SubSystem="2" 
    395         OptimizeReferences="2" 
    396         EnableCOMDATFolding="2" 
    397         ImportLibrary="$(OutDir)/CheckDisk.lib" 
    398         TargetMachine="1" 
    399       /> 
    400       <Tool 
    401         Name="VCALinkTool" 
    402       /> 
    403       <Tool 
    404         Name="VCManifestTool" 
    405       /> 
    406       <Tool 
    407         Name="VCXDCMakeTool" 
    408       /> 
    409       <Tool 
    410         Name="VCBscMakeTool" 
    411       /> 
    412       <Tool 
    413         Name="VCFxCopTool" 
    414       /> 
    415       <Tool 
    416         Name="VCAppVerifierTool" 
    417       /> 
    418       <Tool 
    419         Name="VCWebDeploymentTool" 
    420       /> 
    421       <Tool 
    422         Name="VCPostBuildEventTool" 
    423       /> 
    424     </Configuration> 
    425     <Configuration 
    426347      Name="Distribution|x64" 
    427348      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     
    630551        EnableCOMDATFolding="2" 
    631552        TargetMachine="17" 
    632       /> 
    633       <Tool 
    634         Name="VCALinkTool" 
    635       /> 
    636       <Tool 
    637         Name="VCManifestTool" 
    638       /> 
    639       <Tool 
    640         Name="VCXDCMakeTool" 
    641       /> 
    642       <Tool 
    643         Name="VCBscMakeTool" 
    644       /> 
    645       <Tool 
    646         Name="VCFxCopTool" 
    647       /> 
    648       <Tool 
    649         Name="VCAppVerifierTool" 
    650       /> 
    651       <Tool 
    652         Name="VCWebDeploymentTool" 
    653       /> 
    654       <Tool 
    655         Name="VCPostBuildEventTool" 
    656       /> 
    657     </Configuration> 
    658     <Configuration 
    659       Name="Debug-MemCheck|Win32" 
    660       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    661       IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    662       ConfigurationType="2" 
    663       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    664       CharacterSet="1" 
    665       > 
    666       <Tool 
    667         Name="VCPreBuildEventTool" 
    668       /> 
    669       <Tool 
    670         Name="VCCustomBuildTool" 
    671       /> 
    672       <Tool 
    673         Name="VCXMLDataGeneratorTool" 
    674       /> 
    675       <Tool 
    676         Name="VCWebServiceProxyGeneratorTool" 
    677       /> 
    678       <Tool 
    679         Name="VCMIDLTool" 
    680       /> 
    681       <Tool 
    682         Name="VCCLCompilerTool" 
    683         Optimization="0" 
    684         AdditionalIncludeDirectories="../include;../../include" 
    685         PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;MEMCHECK" 
    686         MinimalRebuild="true" 
    687         BasicRuntimeChecks="3" 
    688         RuntimeLibrary="3" 
    689         UsePrecompiledHeader="2" 
    690         WarningLevel="3" 
    691         Detect64BitPortabilityProblems="false" 
    692         DebugInformationFormat="4" 
    693       /> 
    694       <Tool 
    695         Name="VCManagedResourceCompilerTool" 
    696       /> 
    697       <Tool 
    698         Name="VCResourceCompilerTool" 
    699       /> 
    700       <Tool 
    701         Name="VCPreLinkEventTool" 
    702       /> 
    703       <Tool 
    704         Name="VCLinkerTool" 
    705         OutputFile="$(OutDir)\$(ProjectName).dll" 
    706         LinkIncremental="2" 
    707         ModuleDefinitionFile="CheckDisk.def" 
    708         GenerateDebugInformation="true" 
    709         ProgramDatabaseFile="$(OutDir)/CheckDisk.pdb" 
    710         SubSystem="2" 
    711         ImportLibrary="$(OutDir)/CheckDisk.lib" 
    712         TargetMachine="1" 
    713553      /> 
    714554      <Tool 
     
    793633        ImportLibrary="$(OutDir)/CheckDisk.lib" 
    794634        TargetMachine="17" 
    795       /> 
    796       <Tool 
    797         Name="VCALinkTool" 
    798       /> 
    799       <Tool 
    800         Name="VCManifestTool" 
    801       /> 
    802       <Tool 
    803         Name="VCXDCMakeTool" 
    804       /> 
    805       <Tool 
    806         Name="VCBscMakeTool" 
    807       /> 
    808       <Tool 
    809         Name="VCFxCopTool" 
    810       /> 
    811       <Tool 
    812         Name="VCAppVerifierTool" 
    813       /> 
    814       <Tool 
    815         Name="VCWebDeploymentTool" 
    816       /> 
    817       <Tool 
    818         Name="VCPostBuildEventTool" 
    819       /> 
    820     </Configuration> 
    821     <Configuration 
    822       Name="OP5|Win32" 
    823       OutputDirectory="$(SolutionDir)$(ConfigurationName)" 
    824       IntermediateDirectory="$(ConfigurationName)" 
    825       ConfigurationType="2" 
    826       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    827       CharacterSet="1" 
    828       > 
    829       <Tool 
    830         Name="VCPreBuildEventTool" 
    831       /> 
    832       <Tool 
    833         Name="VCCustomBuildTool" 
    834       /> 
    835       <Tool 
    836         Name="VCXMLDataGeneratorTool" 
    837       /> 
    838       <Tool 
    839         Name="VCWebServiceProxyGeneratorTool" 
    840       /> 
    841       <Tool 
    842         Name="VCMIDLTool" 
    843       /> 
    844       <Tool 
    845         Name="VCCLCompilerTool" 
    846         AdditionalIncludeDirectories="../include;../../include" 
    847         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;USE_BOOST" 
    848         UsePrecompiledHeader="2" 
    849         WarningLevel="3" 
    850         DebugInformationFormat="3" 
    851       /> 
    852       <Tool 
    853         Name="VCManagedResourceCompilerTool" 
    854       /> 
    855       <Tool 
    856         Name="VCResourceCompilerTool" 
    857       /> 
    858       <Tool 
    859         Name="VCPreLinkEventTool" 
    860       /> 
    861       <Tool 
    862         Name="VCLinkerTool" 
    863         OutputFile="$(OutDir)\$(ProjectName).dll" 
    864         LinkIncremental="1" 
    865         ModuleDefinitionFile="CheckDisk.def" 
    866         GenerateDebugInformation="false" 
    867         SubSystem="2" 
    868         OptimizeReferences="2" 
    869         EnableCOMDATFolding="2" 
    870         TargetMachine="1" 
    871635      /> 
    872636      <Tool 
     
    14191183        </FileConfiguration> 
    14201184        <FileConfiguration 
    1421           Name="Distribution|Win32" 
    1422           > 
    1423           <Tool 
    1424             Name="VCCLCompilerTool" 
    1425             UsePrecompiledHeader="0" 
    1426             PrecompiledHeaderThrough="" 
    1427           /> 
    1428         </FileConfiguration> 
    1429         <FileConfiguration 
    14301185          Name="Distribution|x64" 
    14311186          > 
     
    14551210        </FileConfiguration> 
    14561211        <FileConfiguration 
    1457           Name="Debug-MemCheck|Win32" 
    1458           > 
    1459           <Tool 
    1460             Name="VCCLCompilerTool" 
    1461             UsePrecompiledHeader="0" 
    1462             PrecompiledHeaderThrough="" 
    1463           /> 
    1464         </FileConfiguration> 
    1465         <FileConfiguration 
    14661212          Name="Debug-MemCheck|x64" 
    1467           > 
    1468           <Tool 
    1469             Name="VCCLCompilerTool" 
    1470             UsePrecompiledHeader="0" 
    1471             PrecompiledHeaderThrough="" 
    1472           /> 
    1473         </FileConfiguration> 
    1474         <FileConfiguration 
    1475           Name="OP5|Win32" 
    14761213          > 
    14771214          <Tool 
     
    15801317        </FileConfiguration> 
    15811318        <FileConfiguration 
    1582           Name="Distribution|Win32" 
    1583           > 
    1584           <Tool 
    1585             Name="VCCLCompilerTool" 
    1586             UsePrecompiledHeader="0" 
    1587             PrecompiledHeaderThrough="" 
    1588           /> 
    1589         </FileConfiguration> 
    1590         <FileConfiguration 
    15911319          Name="Distribution|x64" 
    15921320          > 
     
    16161344        </FileConfiguration> 
    16171345        <FileConfiguration 
    1618           Name="Debug-MemCheck|Win32" 
    1619           > 
    1620           <Tool 
    1621             Name="VCCLCompilerTool" 
    1622             UsePrecompiledHeader="0" 
    1623             PrecompiledHeaderThrough="" 
    1624           /> 
    1625         </FileConfiguration> 
    1626         <FileConfiguration 
    16271346          Name="Debug-MemCheck|x64" 
    1628           > 
    1629           <Tool 
    1630             Name="VCCLCompilerTool" 
    1631             UsePrecompiledHeader="0" 
    1632             PrecompiledHeaderThrough="" 
    1633           /> 
    1634         </FileConfiguration> 
    1635         <FileConfiguration 
    1636           Name="OP5|Win32" 
    16371347          > 
    16381348          <Tool 
     
    17331443        </FileConfiguration> 
    17341444        <FileConfiguration 
    1735           Name="Distribution|Win32" 
     1445          Name="Distribution|x64" 
    17361446          > 
    17371447          <Tool 
     
    17411451        </FileConfiguration> 
    17421452        <FileConfiguration 
    1743           Name="Distribution|x64" 
     1453          Name="Nightly|Win32" 
    17441454          > 
    17451455          <Tool 
     
    17491459        </FileConfiguration> 
    17501460        <FileConfiguration 
    1751           Name="Nightly|Win32" 
     1461          Name="Nightly|x64" 
    17521462          > 
    17531463          <Tool 
     
    17571467        </FileConfiguration> 
    17581468        <FileConfiguration 
    1759           Name="Nightly|x64" 
    1760           > 
    1761           <Tool 
    1762             Name="VCCLCompilerTool" 
    1763             UsePrecompiledHeader="1" 
    1764           /> 
    1765         </FileConfiguration> 
    1766         <FileConfiguration 
    1767           Name="Debug-MemCheck|Win32" 
    1768           > 
    1769           <Tool 
    1770             Name="VCCLCompilerTool" 
    1771             UsePrecompiledHeader="1" 
    1772           /> 
    1773         </FileConfiguration> 
    1774         <FileConfiguration 
    17751469          Name="Debug-MemCheck|x64" 
    1776           > 
    1777           <Tool 
    1778             Name="VCCLCompilerTool" 
    1779             UsePrecompiledHeader="1" 
    1780           /> 
    1781         </FileConfiguration> 
    1782         <FileConfiguration 
    1783           Name="OP5|Win32" 
    17841470          > 
    17851471          <Tool 
     
    18771563        </FileConfiguration> 
    18781564        <FileConfiguration 
    1879           Name="Distribution|Win32" 
    1880           > 
    1881           <Tool 
    1882             Name="VCCLCompilerTool" 
    1883             UsePrecompiledHeader="0" 
    1884             PrecompiledHeaderThrough="" 
    1885           /> 
    1886         </FileConfiguration> 
    1887         <FileConfiguration 
    18881565          Name="Distribution|x64" 
    18891566          > 
     
    19131590        </FileConfiguration> 
    19141591        <FileConfiguration 
    1915           Name="Debug-MemCheck|Win32" 
    1916           > 
    1917           <Tool 
    1918             Name="VCCLCompilerTool" 
    1919             UsePrecompiledHeader="0" 
    1920             PrecompiledHeaderThrough="" 
    1921           /> 
    1922         </FileConfiguration> 
    1923         <FileConfiguration 
    19241592          Name="Debug-MemCheck|x64" 
    1925           > 
    1926           <Tool 
    1927             Name="VCCLCompilerTool" 
    1928             UsePrecompiledHeader="0" 
    1929             PrecompiledHeaderThrough="" 
    1930           /> 
    1931         </FileConfiguration> 
    1932         <FileConfiguration 
    1933           Name="OP5|Win32" 
    19341593          > 
    19351594          <Tool 
  • trunk/modules/CheckEventLog/CheckEventLog-2005.vcproj

    r201 r205  
    349349    </Configuration> 
    350350    <Configuration 
    351       Name="Distribution|Win32" 
    352       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    353       IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    354       ConfigurationType="2" 
    355       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    356       CharacterSet="1" 
    357       > 
    358       <Tool 
    359         Name="VCPreBuildEventTool" 
    360         ExcludedFromBuild="true" 
    361       /> 
    362       <Tool 
    363         Name="VCCustomBuildTool" 
    364       /> 
    365       <Tool 
    366         Name="VCXMLDataGeneratorTool" 
    367       /> 
    368       <Tool 
    369         Name="VCWebServiceProxyGeneratorTool" 
    370       /> 
    371       <Tool 
    372         Name="VCMIDLTool" 
    373       /> 
    374       <Tool 
    375         Name="VCCLCompilerTool" 
    376         AdditionalIncludeDirectories="../include;../../include" 
    377         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;USE_BOOST" 
    378         RuntimeLibrary="0" 
    379         UsePrecompiledHeader="2" 
    380         WarningLevel="3" 
    381         Detect64BitPortabilityProblems="false" 
    382         DebugInformationFormat="3" 
    383       /> 
    384       <Tool 
    385         Name="VCManagedResourceCompilerTool" 
    386       /> 
    387       <Tool 
    388         Name="VCResourceCompilerTool" 
    389       /> 
    390       <Tool 
    391         Name="VCPreLinkEventTool" 
    392       /> 
    393       <Tool 
    394         Name="VCLinkerTool" 
    395         OutputFile="$(OutDir)\$(ProjectName).dll" 
    396         LinkIncremental="1" 
    397         ModuleDefinitionFile="CheckEventLog.def" 
    398         GenerateDebugInformation="false" 
    399         SubSystem="2" 
    400         OptimizeReferences="2" 
    401         EnableCOMDATFolding="2" 
    402         ImportLibrary="$(OutDir)/CheckEventLog.lib" 
    403         TargetMachine="1" 
    404       /> 
    405       <Tool 
    406         Name="VCALinkTool" 
    407       /> 
    408       <Tool 
    409         Name="VCManifestTool" 
    410       /> 
    411       <Tool 
    412         Name="VCXDCMakeTool" 
    413       /> 
    414       <Tool 
    415         Name="VCBscMakeTool" 
    416       /> 
    417       <Tool 
    418         Name="VCFxCopTool" 
    419       /> 
    420       <Tool 
    421         Name="VCAppVerifierTool" 
    422       /> 
    423       <Tool 
    424         Name="VCWebDeploymentTool" 
    425       /> 
    426       <Tool 
    427         Name="VCPostBuildEventTool" 
    428       /> 
    429     </Configuration> 
    430     <Configuration 
    431351      Name="Distribution|x64" 
    432352      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     
    636556        EnableCOMDATFolding="2" 
    637557        TargetMachine="17" 
    638       /> 
    639       <Tool 
    640         Name="VCALinkTool" 
    641       /> 
    642       <Tool 
    643         Name="VCManifestTool" 
    644       /> 
    645       <Tool 
    646         Name="VCXDCMakeTool" 
    647       /> 
    648       <Tool 
    649         Name="VCBscMakeTool" 
    650       /> 
    651       <Tool 
    652         Name="VCFxCopTool" 
    653       /> 
    654       <Tool 
    655         Name="VCAppVerifierTool" 
    656       /> 
    657       <Tool 
    658         Name="VCWebDeploymentTool" 
    659       /> 
    660       <Tool 
    661         Name="VCPostBuildEventTool" 
    662       /> 
    663     </Configuration> 
    664     <Configuration 
    665       Name="Debug-MemCheck|Win32" 
    666       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    667       IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    668       ConfigurationType="2" 
    669       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    670       CharacterSet="1" 
    671       > 
    672       <Tool 
    673         Name="VCPreBuildEventTool" 
    674         ExcludedFromBuild="true" 
    675       /> 
    676       <Tool 
    677         Name="VCCustomBuildTool" 
    678       /> 
    679       <Tool 
    680         Name="VCXMLDataGeneratorTool" 
    681       /> 
    682       <Tool 
    683         Name="VCWebServiceProxyGeneratorTool" 
    684       /> 
    685       <Tool 
    686         Name="VCMIDLTool" 
    687       /> 
    688       <Tool 
    689         Name="VCCLCompilerTool" 
    690         Optimization="0" 
    691         AdditionalIncludeDirectories="../include;../../include" 
    692         PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;MEMCHECK" 
    693         MinimalRebuild="true" 
    694         BasicRuntimeChecks="3" 
    695         RuntimeLibrary="3" 
    696         UsePrecompiledHeader="2" 
    697         WarningLevel="3" 
    698         Detect64BitPortabilityProblems="false" 
    699         DebugInformationFormat="4" 
    700       /> 
    701       <Tool 
    702         Name="VCManagedResourceCompilerTool" 
    703       /> 
    704       <Tool 
    705         Name="VCResourceCompilerTool" 
    706       /> 
    707       <Tool 
    708         Name="VCPreLinkEventTool" 
    709       /> 
    710       <Tool 
    711         Name="VCLinkerTool" 
    712         OutputFile="$(OutDir)\$(ProjectName).dll" 
    713         LinkIncremental="2" 
    714         ModuleDefinitionFile="CheckEventLog.def" 
    715         GenerateDebugInformation="true" 
    716         ProgramDatabaseFile="$(OutDir)/CheckEventLog.pdb" 
    717         SubSystem="2" 
    718         ImportLibrary="$(OutDir)/CheckEventLog.lib" 
    719         TargetMachine="1" 
    720558      /> 
    721559      <Tool 
     
    801639        ImportLibrary="$(OutDir)/CheckEventLog.lib" 
    802640        TargetMachine="17" 
    803       /> 
    804       <Tool 
    805         Name="VCALinkTool" 
    806       /> 
    807       <Tool 
    808         Name="VCManifestTool" 
    809       /> 
    810       <Tool 
    811         Name="VCXDCMakeTool" 
    812       /> 
    813       <Tool 
    814         Name="VCBscMakeTool" 
    815       /> 
    816       <Tool 
    817         Name="VCFxCopTool" 
    818       /> 
    819       <Tool 
    820         Name="VCAppVerifierTool" 
    821       /> 
    822       <Tool 
    823         Name="VCWebDeploymentTool" 
    824       /> 
    825       <Tool 
    826         Name="VCPostBuildEventTool" 
    827       /> 
    828     </Configuration> 
    829     <Configuration 
    830       Name="OP5|Win32" 
    831       OutputDirectory="$(SolutionDir)$(ConfigurationName)" 
    832       IntermediateDirectory="$(ConfigurationName)" 
    833       ConfigurationType="2" 
    834       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    835       CharacterSet="1" 
    836       > 
    837       <Tool 
    838         Name="VCPreBuildEventTool" 
    839         ExcludedFromBuild="true" 
    840       /> 
    841       <Tool 
    842         Name="VCCustomBuildTool" 
    843       /> 
    844       <Tool 
    845         Name="VCXMLDataGeneratorTool" 
    846       /> 
    847       <Tool 
    848         Name="VCWebServiceProxyGeneratorTool" 
    849       /> 
    850       <Tool 
    851         Name="VCMIDLTool" 
    852       /> 
    853       <Tool 
    854         Name="VCCLCompilerTool" 
    855         AdditionalIncludeDirectories="../include;../../include" 
    856         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;USE_BOOST" 
    857         UsePrecompiledHeader="2" 
    858         WarningLevel="3" 
    859         DebugInformationFormat="3" 
    860       /> 
    861       <Tool 
    862         Name="VCManagedResourceCompilerTool" 
    863       /> 
    864       <Tool 
    865         Name="VCResourceCompilerTool" 
    866       /> 
    867       <Tool 
    868         Name="VCPreLinkEventTool" 
    869       /> 
    870       <Tool 
    871         Name="VCLinkerTool" 
    872         OutputFile="$(OutDir)\$(ProjectName).dll" 
    873         LinkIncremental="1" 
    874         ModuleDefinitionFile="CheckEventLog.def" 
    875         SubSystem="2" 
    876         OptimizeReferences="2" 
    877         EnableCOMDATFolding="2" 
    878         TargetMachine="1" 
    879641      /> 
    880642      <Tool 
     
    14331195        </FileConfiguration> 
    14341196        <FileConfiguration 
    1435           Name="Distribution|Win32" 
    1436           > 
    1437           <Tool 
    1438             Name="VCCLCompilerTool" 
    1439             UsePrecompiledHeader="0" 
    1440             PrecompiledHeaderThrough="" 
    1441           /> 
    1442         </FileConfiguration> 
    1443         <FileConfiguration 
    14441197          Name="Distribution|x64" 
    14451198          > 
     
    14691222        </FileConfiguration> 
    14701223        <FileConfiguration 
    1471           Name="Debug-MemCheck|Win32" 
    1472           > 
    1473           <Tool 
    1474             Name="VCCLCompilerTool" 
    1475             UsePrecompiledHeader="0" 
    1476             PrecompiledHeaderThrough="" 
    1477           /> 
    1478         </FileConfiguration> 
    1479         <FileConfiguration 
    14801224          Name="Debug-MemCheck|x64" 
    1481           > 
    1482           <Tool 
    1483             Name="VCCLCompilerTool" 
    1484             UsePrecompiledHeader="0" 
    1485             PrecompiledHeaderThrough="" 
    1486           /> 
    1487         </FileConfiguration> 
    1488         <FileConfiguration 
    1489           Name="OP5|Win32" 
    14901225          > 
    14911226          <Tool 
     
    15941329        </FileConfiguration> 
    15951330        <FileConfiguration 
    1596           Name="Distribution|Win32" 
    1597           > 
    1598           <Tool 
    1599             Name="VCCLCompilerTool" 
    1600             UsePrecompiledHeader="0" 
    1601             PrecompiledHeaderThrough="" 
    1602           /> 
    1603         </FileConfiguration> 
    1604         <FileConfiguration 
    16051331          Name="Distribution|x64" 
    16061332          > 
     
    16301356        </FileConfiguration> 
    16311357        <FileConfiguration 
    1632           Name="Debug-MemCheck|Win32" 
    1633           > 
    1634           <Tool 
    1635             Name="VCCLCompilerTool" 
    1636             UsePrecompiledHeader="0" 
    1637             PrecompiledHeaderThrough="" 
    1638           /> 
    1639         </FileConfiguration> 
    1640         <FileConfiguration 
    16411358          Name="Debug-MemCheck|x64" 
    1642           > 
    1643           <Tool 
    1644             Name="VCCLCompilerTool" 
    1645             UsePrecompiledHeader="0" 
    1646             PrecompiledHeaderThrough="" 
    1647           /> 
    1648         </FileConfiguration> 
    1649         <FileConfiguration 
    1650           Name="OP5|Win32" 
    16511359          > 
    16521360          <Tool 
     
    17471455        </FileConfiguration> 
    17481456        <FileConfiguration 
    1749           Name="Distribution|Win32" 
     1457          Name="Distribution|x64" 
    17501458          > 
    17511459          <Tool 
     
    17551463        </FileConfiguration> 
    17561464        <FileConfiguration 
    1757           Name="Distribution|x64" 
     1465          Name="Nightly|Win32" 
    17581466          > 
    17591467          <Tool 
     
    17631471        </FileConfiguration> 
    17641472        <FileConfiguration 
    1765           Name="Nightly|Win32" 
     1473          Name="Nightly|x64" 
    17661474          > 
    17671475          <Tool 
     
    17711479        </FileConfiguration> 
    17721480        <FileConfiguration 
    1773           Name="Nightly|x64" 
    1774           > 
    1775           <Tool 
    1776             Name="VCCLCompilerTool" 
    1777             UsePrecompiledHeader="1" 
    1778           /> 
    1779         </FileConfiguration> 
    1780         <FileConfiguration 
    1781           Name="Debug-MemCheck|Win32" 
    1782           > 
    1783           <Tool 
    1784             Name="VCCLCompilerTool" 
    1785             UsePrecompiledHeader="1" 
    1786           /> 
    1787         </FileConfiguration> 
    1788         <FileConfiguration 
    17891481          Name="Debug-MemCheck|x64" 
    1790           > 
    1791           <Tool 
    1792             Name="VCCLCompilerTool" 
    1793             UsePrecompiledHeader="1" 
    1794           /> 
    1795         </FileConfiguration> 
    1796         <FileConfiguration 
    1797           Name="OP5|Win32" 
    17981482          > 
    17991483          <Tool 
     
    18911575        </FileConfiguration> 
    18921576        <FileConfiguration 
    1893           Name="Distribution|Win32" 
    1894           > 
    1895           <Tool 
    1896             Name="VCCLCompilerTool" 
    1897             UsePrecompiledHeader="0" 
    1898             PrecompiledHeaderThrough="" 
    1899           /> 
    1900         </FileConfiguration> 
    1901         <FileConfiguration 
    19021577          Name="Distribution|x64" 
    19031578          > 
     
    19271602        </FileConfiguration> 
    19281603        <FileConfiguration 
    1929           Name="Debug-MemCheck|Win32" 
    1930           > 
    1931           <Tool 
    1932             Name="VCCLCompilerTool" 
    1933             UsePrecompiledHeader="0" 
    1934             PrecompiledHeaderThrough="" 
    1935           /> 
    1936         </FileConfiguration> 
    1937         <FileConfiguration 
    19381604          Name="Debug-MemCheck|x64" 
    1939           > 
    1940           <Tool 
    1941             Name="VCCLCompilerTool" 
    1942             UsePrecompiledHeader="0" 
    1943             PrecompiledHeaderThrough="" 
    1944           /> 
    1945         </FileConfiguration> 
    1946         <FileConfiguration 
    1947           Name="OP5|Win32" 
    19481605          > 
    19491606          <Tool 
  • trunk/modules/CheckEventLog/CheckEventLog.cpp

    r202 r205  
    3030#include <map> 
    3131#include <vector> 
     32#include <config.h> 
    3233 
    3334CheckEventLog gCheckEventLog; 
     
    633634        if (err == ERROR_INSUFFICIENT_BUFFER) { 
    634635          if (!buffer_error_reported) { 
    635             NSC_LOG_ERROR_STD(_T("EvenlogBuffer is too small change the value of ") + settings::event_log::BUFFER_SIZE + _T("=") + strEx::itos(dwNeeded+1) + _T(" under [EventLog] in nsc.ini : ") + error::lookup::last_error(err)); 
     636            NSC_LOG_ERROR_STD(_T("EvenlogBuffer is too small change the value of ") + setting_keys::event_log::BUFFER_SIZE + _T("=") + strEx::itos(dwNeeded+1) + _T(" under [EventLog] in nsc.ini : ") + error::lookup::last_error(err)); 
    636637            buffer_error_reported = true; 
    637638          } 
     
    741742    DWORD err = GetLastError(); 
    742743    if (err == ERROR_INSUFFICIENT_BUFFER) { 
    743       NSC_LOG_ERROR_STD(_T("EvenlogBuffer is too small (set the value of ") + settings::event_log::BUFFER_SIZE_TITLE + _T("): ") + error::lookup::last_error(err)); 
    744       message = std::wstring(_T("EvenlogBuffer is too small (set the value of ")) + settings::event_log::BUFFER_SIZE_TITLE + _T("): ") + error::lookup::last_error(err); 
     744      NSC_LOG_ERROR_STD(_T("EvenlogBuffer is too small (set the value of ") + setting_keys::event_log::BUFFER_SIZE_TITLE + _T("): ") + error::lookup::last_error(err)); 
     745      message = std::wstring(_T("EvenlogBuffer is too small (set the value of ")) + setting_keys::event_log::BUFFER_SIZE_TITLE + _T("): ") + error::lookup::last_error(err); 
    745746      return NSCAPI::returnUNKNOWN; 
    746747    } else if (err != ERROR_HANDLE_EOF) { 
  • trunk/modules/CheckEventLog/CheckEventLog.h

    r201 r205  
    2121NSC_WRAPPERS_MAIN(); 
    2222 
    23 #include <config.h> 
     23#include <settings/macros.h> 
    2424#include <strEx.h> 
    2525#include <utils.h> 
  • trunk/modules/CheckExternalScripts/CheckExternalScripts.cpp

    r202 r205  
    2323#include <strEx.h> 
    2424#include <time.h> 
    25 #include <config.h> 
     25#include <settings/macros.h> 
    2626#include <msvc_wrappers.h> 
    2727#include <file_helpers.hpp> 
     28#include <config.h> 
    2829 
    2930CheckExternalScripts gCheckExternalScripts; 
     
    8081  allowNasty_ = SETTINGS_GET_BOOL(nrpe::ALLOW_NASTY); 
    8182  std::list<std::wstring>::const_iterator it; 
    82   std::list<std::wstring> commands = NSCModuleHelper::getSettingsSection(settings::external_scripts::SCRIPT_SECTION_PATH); 
     83  std::list<std::wstring> commands = NSCModuleHelper::getSettingsSection(setting_keys::external_scripts::SCRIPT_SECTION_PATH); 
    8384  for (it = commands.begin(); it != commands.end(); ++it) { 
    8485    if ((*it).empty()) 
    8586      continue; 
    86     std::wstring s = NSCModuleHelper::getSettingsString(settings::external_scripts::SCRIPT_SECTION_PATH, (*it), _T("")); 
     87    std::wstring s = NSCModuleHelper::getSettingsString(setting_keys::external_scripts::SCRIPT_SECTION_PATH, (*it), _T("")); 
    8788    if (s.empty()) { 
    8889      NSC_LOG_ERROR_STD(_T("Invalid command definition: ") + (*it)); 
     
    9394  } 
    9495 
    95   commands = NSCModuleHelper::getSettingsSection(settings::external_scripts::ALIAS_SECTION_PATH); 
     96  commands = NSCModuleHelper::getSettingsSection(setting_keys::external_scripts::ALIAS_SECTION_PATH); 
    9697  for (it = commands.begin(); it != commands.end(); ++it) { 
    9798    if ((*it).empty()) 
    9899      continue; 
    99     std::wstring s = NSCModuleHelper::getSettingsString(settings::external_scripts::ALIAS_SECTION_PATH, (*it), _T("")); 
     100    std::wstring s = NSCModuleHelper::getSettingsString(setting_keys::external_scripts::ALIAS_SECTION_PATH, (*it), _T("")); 
    100101    if (s.empty()) { 
    101102      NSC_LOG_ERROR_STD(_T("Invalid command definition: ") + (*it)); 
  • trunk/modules/CheckExternalScripts/stdafx.h

    r101 r205  
    2828#include <functional> 
    2929 
    30 #include <config.h> 
    3130#include <utils.h> 
    3231 
  • trunk/modules/CheckHelpers/CheckHelpers-2005.vcproj

    r201 r205  
    345345    </Configuration> 
    346346    <Configuration 
    347       Name="Distribution|Win32" 
    348       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    349       IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    350       ConfigurationType="2" 
    351       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    352       CharacterSet="1" 
    353       > 
    354       <Tool 
    355         Name="VCPreBuildEventTool" 
    356       /> 
    357       <Tool 
    358         Name="VCCustomBuildTool" 
    359       /> 
    360       <Tool 
    361         Name="VCXMLDataGeneratorTool" 
    362       /> 
    363       <Tool 
    364         Name="VCWebServiceProxyGeneratorTool" 
    365       /> 
    366       <Tool 
    367         Name="VCMIDLTool" 
    368       /> 
    369       <Tool 
    370         Name="VCCLCompilerTool" 
    371         AdditionalIncludeDirectories="../include;../../include" 
    372         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" 
    373         RuntimeLibrary="0" 
    374         UsePrecompiledHeader="2" 
    375         WarningLevel="3" 
    376         Detect64BitPortabilityProblems="false" 
    377         DebugInformationFormat="3" 
    378       /> 
    379       <Tool 
    380         Name="VCManagedResourceCompilerTool" 
    381       /> 
    382       <Tool 
    383         Name="VCResourceCompilerTool" 
    384       /> 
    385       <Tool 
    386         Name="VCPreLinkEventTool" 
    387       /> 
    388       <Tool 
    389         Name="VCLinkerTool" 
    390         OutputFile="$(OutDir)\$(ProjectName).dll" 
    391         LinkIncremental="1" 
    392         ModuleDefinitionFile="CheckHelpers.def" 
    393         GenerateDebugInformation="false" 
    394         SubSystem="2" 
    395         OptimizeReferences="2" 
    396         EnableCOMDATFolding="2" 
    397         ImportLibrary="$(OutDir)/CheckDisk.lib" 
    398         TargetMachine="1" 
    399       /> 
    400       <Tool 
    401         Name="VCALinkTool" 
    402       /> 
    403       <Tool 
    404         Name="VCManifestTool" 
    405       /> 
    406       <Tool 
    407         Name="VCXDCMakeTool" 
    408       /> 
    409       <Tool 
    410         Name="VCBscMakeTool" 
    411       /> 
    412       <Tool 
    413         Name="VCFxCopTool" 
    414       /> 
    415       <Tool 
    416         Name="VCAppVerifierTool" 
    417       /> 
    418       <Tool 
    419         Name="VCWebDeploymentTool" 
    420       /> 
    421       <Tool 
    422         Name="VCPostBuildEventTool" 
    423       /> 
    424     </Configuration> 
    425     <Configuration 
    426347      Name="Distribution|x64" 
    427348      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     
    630551        EnableCOMDATFolding="2" 
    631552        TargetMachine="17" 
    632       /> 
    633       <Tool 
    634         Name="VCALinkTool" 
    635       /> 
    636       <Tool 
    637         Name="VCManifestTool" 
    638       /> 
    639       <Tool 
    640         Name="VCXDCMakeTool" 
    641       /> 
    642       <Tool 
    643         Name="VCBscMakeTool" 
    644       /> 
    645       <Tool 
    646         Name="VCFxCopTool" 
    647       /> 
    648       <Tool 
    649         Name="VCAppVerifierTool" 
    650       /> 
    651       <Tool 
    652         Name="VCWebDeploymentTool" 
    653       /> 
    654       <Tool 
    655         Name="VCPostBuildEventTool" 
    656       /> 
    657     </Configuration> 
    658     <Configuration 
    659       Name="Debug-MemCheck|Win32" 
    660       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    661       IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    662       ConfigurationType="2" 
    663       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    664       CharacterSet="1" 
    665       > 
    666       <Tool 
    667         Name="VCPreBuildEventTool" 
    668       /> 
    669       <Tool 
    670         Name="VCCustomBuildTool" 
    671       /> 
    672       <Tool 
    673         Name="VCXMLDataGeneratorTool" 
    674       /> 
    675       <Tool 
    676         Name="VCWebServiceProxyGeneratorTool" 
    677       /> 
    678       <Tool 
    679         Name="VCMIDLTool" 
    680       /> 
    681       <Tool 
    682         Name="VCCLCompilerTool" 
    683         Optimization="0" 
    684         AdditionalIncludeDirectories="../include;../../include" 
    685         PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;MEMCHECK" 
    686         MinimalRebuild="true" 
    687         BasicRuntimeChecks="3" 
    688         RuntimeLibrary="3" 
    689         UsePrecompiledHeader="2" 
    690         WarningLevel="3" 
    691         Detect64BitPortabilityProblems="false" 
    692         DebugInformationFormat="4" 
    693       /> 
    694       <Tool 
    695         Name="VCManagedResourceCompilerTool" 
    696       /> 
    697       <Tool 
    698         Name="VCResourceCompilerTool" 
    699       /> 
    700       <Tool 
    701         Name="VCPreLinkEventTool" 
    702       /> 
    703       <Tool 
    704         Name="VCLinkerTool" 
    705         OutputFile="$(OutDir)\$(ProjectName).dll" 
    706         LinkIncremental="2" 
    707         ModuleDefinitionFile="CheckHelpers.def" 
    708         GenerateDebugInformation="true" 
    709         ProgramDatabaseFile="$(OutDir)/CheckDisk.pdb" 
    710         SubSystem="2" 
    711         ImportLibrary="$(OutDir)/CheckHelpers.lib" 
    712         TargetMachine="1" 
    713553      /> 
    714554      <Tool 
     
    793633        ImportLibrary="$(OutDir)/CheckDisk.lib" 
    794634        TargetMachine="17" 
    795       /> 
    796       <Tool 
    797         Name="VCALinkTool" 
    798       /> 
    799       <Tool 
    800         Name="VCManifestTool" 
    801       /> 
    802       <Tool 
    803         Name="VCXDCMakeTool" 
    804       /> 
    805       <Tool 
    806         Name="VCBscMakeTool" 
    807       /> 
    808       <Tool 
    809         Name="VCFxCopTool" 
    810       /> 
    811       <Tool 
    812         Name="VCAppVerifierTool" 
    813       /> 
    814       <Tool 
    815         Name="VCWebDeploymentTool" 
    816       /> 
    817       <Tool 
    818         Name="VCPostBuildEventTool" 
    819       /> 
    820     </Configuration> 
    821     <Configuration 
    822       Name="OP5|Win32" 
    823       OutputDirectory="$(SolutionDir)$(ConfigurationName)" 
    824       IntermediateDirectory="$(ConfigurationName)" 
    825       ConfigurationType="2" 
    826       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    827       CharacterSet="1" 
    828       > 
    829       <Tool 
    830         Name="VCPreBuildEventTool" 
    831       /> 
    832       <Tool 
    833         Name="VCCustomBuildTool" 
    834       /> 
    835       <Tool 
    836         Name="VCXMLDataGeneratorTool" 
    837       /> 
    838       <Tool 
    839         Name="VCWebServiceProxyGeneratorTool" 
    840       /> 
    841       <Tool 
    842         Name="VCMIDLTool" 
    843       /> 
    844       <Tool 
    845         Name="VCCLCompilerTool" 
    846         AdditionalIncludeDirectories="../include;../../include" 
    847         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS" 
    848         UsePrecompiledHeader="2" 
    849         WarningLevel="3" 
    850         DebugInformationFormat="3" 
    851       /> 
    852       <Tool 
    853         Name="VCManagedResourceCompilerTool" 
    854       /> 
    855       <Tool 
    856         Name="VCResourceCompilerTool" 
    857       /> 
    858       <Tool 
    859         Name="VCPreLinkEventTool" 
    860       /> 
    861       <Tool 
    862         Name="VCLinkerTool" 
    863         OutputFile="$(OutDir)\$(ProjectName).dll" 
    864         LinkIncremental="1" 
    865         ModuleDefinitionFile="CheckHelpers.def" 
    866         GenerateDebugInformation="false" 
    867         SubSystem="2" 
    868         OptimizeReferences="2" 
    869         EnableCOMDATFolding="2" 
    870         TargetMachine="1" 
    871635      /> 
    872636      <Tool 
     
    14201184        </FileConfiguration> 
    14211185        <FileConfiguration 
    1422           Name="Distribution|Win32" 
    1423           > 
    1424           <Tool 
    1425             Name="VCCLCompilerTool" 
    1426             UsePrecompiledHeader="0" 
    1427             PrecompiledHeaderThrough="" 
    1428           /> 
    1429         </FileConfiguration> 
    1430         <FileConfiguration 
    14311186          Name="Distribution|x64" 
    14321187          > 
     
    14561211        </FileConfiguration> 
    14571212        <FileConfiguration 
    1458           Name="Debug-MemCheck|Win32" 
    1459           > 
    1460           <Tool 
    1461             Name="VCCLCompilerTool" 
    1462             UsePrecompiledHeader="0" 
    1463             PrecompiledHeaderThrough="" 
    1464           /> 
    1465         </FileConfiguration> 
    1466         <FileConfiguration 
    14671213          Name="Debug-MemCheck|x64" 
    1468           > 
    1469           <Tool 
    1470             Name="VCCLCompilerTool" 
    1471             UsePrecompiledHeader="0" 
    1472             PrecompiledHeaderThrough="" 
    1473           /> 
    1474         </FileConfiguration> 
    1475         <FileConfiguration 
    1476           Name="OP5|Win32" 
    14771214          > 
    14781215          <Tool 
     
    15851322        </FileConfiguration> 
    15861323        <FileConfiguration 
    1587           Name="Distribution|Win32" 
    1588           > 
    1589           <Tool 
    1590             Name="VCCLCompilerTool" 
    1591             UsePrecompiledHeader="0" 
    1592             PrecompiledHeaderThrough="" 
    1593           /> 
    1594         </FileConfiguration> 
    1595         <FileConfiguration 
    15961324          Name="Distribution|x64" 
    15971325          > 
     
    16211349        </FileConfiguration> 
    16221350        <FileConfiguration 
    1623           Name="Debug-MemCheck|Win32" 
    1624           > 
    1625           <Tool 
    1626             Name="VCCLCompilerTool" 
    1627             UsePrecompiledHeader="0" 
    1628             PrecompiledHeaderThrough="" 
    1629           /> 
    1630         </FileConfiguration> 
    1631         <FileConfiguration 
    16321351          Name="Debug-MemCheck|x64" 
    1633           > 
    1634           <Tool 
    1635             Name="VCCLCompilerTool" 
    1636             UsePrecompiledHeader="0" 
    1637             PrecompiledHeaderThrough="" 
    1638           /> 
    1639         </FileConfiguration> 
    1640         <FileConfiguration 
    1641           Name="OP5|Win32" 
    16421352          > 
    16431353          <Tool 
     
    17381448        </FileConfiguration> 
    17391449        <FileConfiguration 
    1740           Name="Distribution|Win32" 
     1450          Name="Distribution|x64" 
    17411451          > 
    17421452          <Tool 
     
    17461456        </FileConfiguration> 
    17471457        <FileConfiguration 
    1748           Name="Distribution|x64" 
     1458          Name="Nightly|Win32" 
    17491459          > 
    17501460          <Tool 
     
    17541464        </FileConfiguration> 
    17551465        <FileConfiguration 
    1756           Name="Nightly|Win32" 
     1466          Name="Nightly|x64" 
    17571467          > 
    17581468          <Tool 
     
    17621472        </FileConfiguration> 
    17631473        <FileConfiguration 
    1764           Name="Nightly|x64" 
    1765           > 
    1766           <Tool 
    1767             Name="VCCLCompilerTool" 
    1768             UsePrecompiledHeader="1" 
    1769           /> 
    1770         </FileConfiguration> 
    1771         <FileConfiguration 
    1772           Name="Debug-MemCheck|Win32" 
    1773           > 
    1774           <Tool 
    1775             Name="VCCLCompilerTool" 
    1776             UsePrecompiledHeader="1" 
    1777           /> 
    1778         </FileConfiguration> 
    1779         <FileConfiguration 
    17801474          Name="Debug-MemCheck|x64" 
    1781           > 
    1782           <Tool 
    1783             Name="VCCLCompilerTool" 
    1784             UsePrecompiledHeader="1" 
    1785           /> 
    1786         </FileConfiguration> 
    1787         <FileConfiguration 
    1788           Name="OP5|Win32" 
    17891475          > 
    17901476          <Tool 
     
    18821568        </FileConfiguration> 
    18831569        <FileConfiguration 
    1884           Name="Distribution|Win32" 
    1885           > 
    1886           <Tool 
    1887             Name="VCCLCompilerTool" 
    1888             UsePrecompiledHeader="0" 
    1889             PrecompiledHeaderThrough="" 
    1890           /> 
    1891         </FileConfiguration> 
    1892         <FileConfiguration 
    18931570          Name="Distribution|x64" 
    18941571          > 
     
    19181595        </FileConfiguration> 
    19191596        <FileConfiguration 
    1920           Name="Debug-MemCheck|Win32" 
    1921           > 
    1922           <Tool 
    1923             Name="VCCLCompilerTool" 
    1924             UsePrecompiledHeader="0" 
    1925             PrecompiledHeaderThrough="" 
    1926           /> 
    1927         </FileConfiguration> 
    1928         <FileConfiguration 
    19291597          Name="Debug-MemCheck|x64" 
    1930           > 
    1931           <Tool 
    1932             Name="VCCLCompilerTool" 
    1933             UsePrecompiledHeader="0" 
    1934             PrecompiledHeaderThrough="" 
    1935           /> 
    1936         </FileConfiguration> 
    1937         <FileConfiguration 
    1938           Name="OP5|Win32" 
    19391598          > 
    19401599          <Tool 
  • trunk/modules/CheckSystem/CheckSystem-2005.vcproj

    r201 r205  
    349349    </Configuration> 
    350350    <Configuration 
    351       Name="Distribution|Win32" 
    352       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    353       IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    354       ConfigurationType="2" 
    355       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    356       CharacterSet="1" 
    357       > 
    358       <Tool 
    359         Name="VCPreBuildEventTool" 
    360       /> 
    361       <Tool 
    362         Name="VCCustomBuildTool" 
    363       /> 
    364       <Tool 
    365         Name="VCXMLDataGeneratorTool" 
    366       /> 
    367       <Tool 
    368         Name="VCWebServiceProxyGeneratorTool" 
    369       /> 
    370       <Tool 
    371         Name="VCMIDLTool" 
    372       /> 
    373       <Tool 
    374         Name="VCCLCompilerTool" 
    375         AdditionalIncludeDirectories="../../include" 
    376         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;USE_BOOST" 
    377         RuntimeLibrary="0" 
    378         UsePrecompiledHeader="2" 
    379         WarningLevel="3" 
    380         Detect64BitPortabilityProblems="false" 
    381         DebugInformationFormat="3" 
    382       /> 
    383       <Tool 
    384         Name="VCManagedResourceCompilerTool" 
    385       /> 
    386       <Tool 
    387         Name="VCResourceCompilerTool" 
    388       /> 
    389       <Tool 
    390         Name="VCPreLinkEventTool" 
    391       /> 
    392       <Tool 
    393         Name="VCLinkerTool" 
    394         AdditionalDependencies="Pdh.lib" 
    395         OutputFile="$(OutDir)\$(ProjectName).dll" 
    396         LinkIncremental="1" 
    397         ModuleDefinitionFile="CheckSystem.def" 
    398         GenerateDebugInformation="false" 
    399         SubSystem="2" 
    400         OptimizeReferences="2" 
    401         EnableCOMDATFolding="2" 
    402         ImportLibrary="$(OutDir)/CheckSystem.lib" 
    403         TargetMachine="1" 
    404       /> 
    405       <Tool 
    406         Name="VCALinkTool" 
    407       /> 
    408       <Tool 
    409         Name="VCManifestTool" 
    410       /> 
    411       <Tool 
    412         Name="VCXDCMakeTool" 
    413       /> 
    414       <Tool 
    415         Name="VCBscMakeTool" 
    416       /> 
    417       <Tool 
    418         Name="VCFxCopTool" 
    419       /> 
    420       <Tool 
    421         Name="VCAppVerifierTool" 
    422       /> 
    423       <Tool 
    424         Name="VCWebDeploymentTool" 
    425       /> 
    426       <Tool 
    427         Name="VCPostBuildEventTool" 
    428       /> 
    429     </Configuration> 
    430     <Configuration 
    431351      Name="Distribution|x64" 
    432352      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     
    665585    </Configuration> 
    666586    <Configuration 
    667       Name="Debug-MemCheck|Win32" 
    668       OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    669       IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    670       ConfigurationType="2" 
    671       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    672       CharacterSet="1" 
    673       > 
    674       <Tool 
    675         Name="VCPreBuildEventTool" 
    676       /> 
    677       <Tool 
    678         Name="VCCustomBuildTool" 
    679       /> 
    680       <Tool 
    681         Name="VCXMLDataGeneratorTool" 
    682       /> 
    683       <Tool 
    684         Name="VCWebServiceProxyGeneratorTool" 
    685       /> 
    686       <Tool 
    687         Name="VCMIDLTool" 
    688       /> 
    689       <Tool 
    690         Name="VCCLCompilerTool" 
    691         Optimization="0" 
    692         AdditionalIncludeDirectories="../include;../../include" 
    693         PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;MEMCHECK" 
    694         MinimalRebuild="true" 
    695         BasicRuntimeChecks="3" 
    696         RuntimeLibrary="3" 
    697         UsePrecompiledHeader="2" 
    698         WarningLevel="3" 
    699         Detect64BitPortabilityProblems="false" 
    700         DebugInformationFormat="4" 
    701       /> 
    702       <Tool 
    703         Name="VCManagedResourceCompilerTool" 
    704       /> 
    705       <Tool 
    706         Name="VCResourceCompilerTool" 
    707       /> 
    708       <Tool 
    709         Name="VCPreLinkEventTool" 
    710       /> 
    711       <Tool 
    712         Name="VCLinkerTool" 
    713         AdditionalDependencies="Pdh.lib" 
    714         OutputFile="$(OutDir)\$(ProjectName).dll" 
    715         LinkIncremental="2" 
    716         ModuleDefinitionFile="CheckSystem.def" 
    717         GenerateDebugInformation="true" 
    718         ProgramDatabaseFile="$(OutDir)/CheckSystem.pdb" 
    719         SubSystem="2" 
    720         ImportLibrary="$(OutDir)/CheckSystem.lib" 
    721         TargetMachine="1" 
    722       /> 
    723       <Tool 
    724         Name="VCALinkTool" 
    725       /> 
    726       <Tool 
    727         Name="VCManifestTool" 
    728       /> 
    729       <Tool 
    730         Name="VCXDCMakeTool" 
    731       /> 
    732       <Tool 
    733         Name="VCBscMakeTool" 
    734       /> 
    735       <Tool 
    736         Name="VCFxCopTool" 
    737       /> 
    738       <Tool 
    739         Name="VCAppVerifierTool" 
    740       /> 
    741       <Tool 
    742         Name="VCWebDeploymentTool" 
    743       /> 
    744       <Tool 
    745         Name="VCPostBuildEventTool" 
    746       /> 
    747     </Configuration> 
    748     <Configuration 
    749587      Name="Debug-MemCheck|x64" 
    750588      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     
    803641        ImportLibrary="$(OutDir)/CheckSystem.lib" 
    804642        TargetMachine="17" 
    805       /> 
    806       <Tool 
    807         Name="VCALinkTool" 
    808       /> 
    809       <Tool 
    810         Name="VCManifestTool" 
    811       /> 
    812       <Tool 
    813         Name="VCXDCMakeTool" 
    814       /> 
    815       <Tool 
    816         Name="VCBscMakeTool" 
    817       /> 
    818       <Tool 
    819         Name="VCFxCopTool" 
    820       /> 
    821       <Tool 
    822         Name="VCAppVerifierTool" 
    823       /> 
    824       <Tool 
    825         Name="VCWebDeploymentTool" 
    826       /> 
    827       <Tool 
    828         Name="VCPostBuildEventTool" 
    829       /> 
    830     </Configuration> 
    831     <Configuration 
    832       Name="OP5|Win32" 
    833       OutputDirectory="$(SolutionDir)$(ConfigurationName)" 
    834       IntermediateDirectory="$(ConfigurationName)" 
    835       ConfigurationType="2" 
    836       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    837       CharacterSet="1" 
    838       > 
    839       <Tool 
    840         Name="VCPreBuildEventTool" 
    841       /> 
    842       <Tool 
    843         Name="VCCustomBuildTool" 
    844       /> 
    845       <Tool 
    846         Name="VCXMLDataGeneratorTool" 
    847       /> 
    848       <Tool 
    849         Name="VCWebServiceProxyGeneratorTool" 
    850       /> 
    851       <Tool 
    852         Name="VCMIDLTool" 
    853       /> 
    854       <Tool 
    855         Name="VCCLCompilerTool" 
    856         AdditionalIncludeDirectories="../../include" 
    857         PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;USE_BOOST" 
    858         UsePrecompiledHeader="2" 
    859         WarningLevel="3" 
    860         DebugInformationFormat="3" 
    861       /> 
    862       <Tool 
    863         Name="VCManagedResourceCompilerTool" 
    864       /> 
    865       <Tool 
    866         Name="VCResourceCompilerTool" 
    867       /> 
    868       <Tool 
    869         Name="VCPreLinkEventTool" 
    870       /> 
    871       <Tool 
    872         Name="VCLinkerTool" 
    873         AdditionalDependencies="Pdh.lib" 
    874         OutputFile="$(OutDir)\$(ProjectName).dll" 
    875         LinkIncremental="1" 
    876         ModuleDefinitionFile="CheckSystem.def" 
    877         GenerateDebugInformation="false" 
    878         SubSystem="2" 
    879         OptimizeReferences="2" 
    880         EnableCOMDATFolding="2" 
    881         TargetMachine="1" 
    882643      /> 
    883644      <Tool 
     
    14371198        </FileConfiguration> 
    14381199        <FileConfiguration 
    1439           Name="Distribution|Win32" 
    1440           > 
    1441           <Tool 
    1442             Name="VCCLCompilerTool" 
    1443             UsePrecompiledHeader="0" 
    1444             PrecompiledHeaderThrough="" 
    1445           /> 
    1446         </FileConfiguration> 
    1447         <FileConfiguration 
    14481200          Name="Distribution|x64" 
    14491201          > 
     
    14731225        </FileConfiguration> 
    14741226        <FileConfiguration 
    1475           Name="Debug-MemCheck|Win32" 
    1476           > 
    1477           <Tool 
    1478             Name="VCCLCompilerTool" 
    1479             UsePrecompiledHeader="0" 
    1480             PrecompiledHeaderThrough="" 
    1481           /> 
    1482         </FileConfiguration> 
    1483         <FileConfiguration 
    14841227          Name="Debug-MemCheck|x64" 
    14851228          > 
     
    14911234        </FileConfiguration> 
    14921235        <FileConfiguration 
    1493           Name="OP5|Win32" 
    1494           > 
    1495           <Tool 
    1496             Name="VCCLCompilerTool" 
    1497             UsePrecompiledHeader="0" 
    1498             PrecompiledHeaderThrough="" 
    1499           /> 
    1500         </FileConfiguration> 
    1501         <FileConfiguration 
    15021236          Name="OP5|x64" 
    15031237          > 
     
    16021336        </FileConfiguration> 
    16031337        <FileConfiguration 
    1604           Name="Distribution|Win32" 
    1605           > 
    1606           <Tool 
    1607             Name="VCCLCompilerTool" 
    1608             UsePrecompiledHeader="0" 
    1609             PrecompiledHeaderThrough="" 
    1610           /> 
    1611         </FileConfiguration> 
    1612         <FileConfiguration 
    16131338          Name="Distribution|x64" 
    16141339          > 
     
    16381363        </FileConfiguration> 
    16391364        <FileConfiguration 
    1640           Name="Debug-MemCheck|Win32" 
    1641           > 
    1642           <Tool 
    1643             Name="VCCLCompilerTool" 
    1644             UsePrecompiledHeader="0" 
    1645             PrecompiledHeaderThrough="" 
    1646           /> 
    1647         </FileConfiguration> 
    1648         <FileConfiguration 
    16491365          Name="Debug-MemCheck|x64" 
    16501366          > 
     
    16561372        </FileConfiguration> 
    16571373        <FileConfiguration 
    1658           Name="OP5|Win32" 
    1659           > 
    1660           <Tool 
    1661             Name="VCCLCompilerTool" 
    1662             UsePrecompiledHeader="0" 
    1663             PrecompiledHeaderThrough="" 
    1664           /> 
    1665         </FileConfiguration> 
    1666         <FileConfiguration 
    16671374          Name="OP5|x64" 
    16681375          > 
     
    17591466        </FileConfiguration> 
    17601467        <FileConfiguration 
    1761           Name="Distribution|Win32" 
    1762           > 
    1763           <Tool 
    1764             Name="VCCLCompilerTool" 
    1765             UsePrecompiledHeader="0" 
    1766             PrecompiledHeaderThrough="" 
    1767           /> 
    1768         </FileConfiguration> 
    1769         <FileConfiguration 
    17701468          Name="Distribution|x64" 
    17711469          > 
     
    17951493        </FileConfiguration> 
    17961494        <FileConfiguration 
    1797           Name="Debug-MemCheck|Win32" 
    1798           > 
    1799           <Tool 
    1800             Name="VCCLCompilerTool" 
    1801             UsePrecompiledHeader="0" 
    1802             PrecompiledHeaderThrough="" 
    1803           /> 
    1804         </FileConfiguration> 
    1805         <FileConfiguration 
    18061495          Name="Debug-MemCheck|x64" 
    18071496          > 
     
    18131502        </FileConfiguration> 
    18141503        <FileConfiguration 
    1815           Name="OP5|Win32" 
    1816           > 
    1817           <Tool 
    1818             Name="VCCLCompilerTool" 
    1819             UsePrecompiledHeader="0" 
    1820             PrecompiledHeaderThrough="" 
    1821           /> 
    1822         </FileConfiguration> 
    1823         <FileConfiguration 
    18241504          Name="OP5|x64" 
    18251505          > 
     
    19161596        </FileConfiguration> 
    19171597        <FileConfiguration 
    1918           Name="Distribution|Win32" 
    1919           > 
    1920           <Tool 
    1921             Name="VCCLCompilerTool" 
    1922             UsePrecompiledHeader="0" 
    1923             PrecompiledHeaderThrough="" 
    1924           /> 
    1925         </FileConfiguration> 
    1926         <FileConfiguration 
    19271598          Name="Distribution|x64" 
    19281599          > 
     
    19521623        </FileConfiguration> 
    19531624        <FileConfiguration 
    1954           Name="Debug-MemCheck|Win32" 
    1955           > 
    1956           <Tool 
    1957             Name="VCCLCompilerTool" 
    1958             UsePrecompiledHeader="0" 
    1959             PrecompiledHeaderThrough="" 
    1960           /> 
    1961         </FileConfiguration> 
    1962         <FileConfiguration 
    19631625          Name="Debug-MemCheck|x64" 
    19641626          > 
     
    19701632        </FileConfiguration> 
    19711633        <FileConfiguration 
    1972           Name="OP5|Win32" 
    1973           > 
    1974           <Tool 
    1975             Name="VCCLCompilerTool" 
    1976             UsePrecompiledHeader="0" 
    1977             PrecompiledHeaderThrough="" 
    1978           /> 
    1979         </FileConfiguration> 
    1980         <FileConfiguration 
    19811634          Name="OP5|x64" 
    19821635          > 
     
    20731726        </FileConfiguration> 
    20741727        <FileConfiguration 
    2075           Name="Distribution|Win32" 
    2076           > 
    2077           <Tool 
    2078             Name="VCCLCompilerTool" 
    2079             UsePrecompiledHeader="0" 
    2080           /> 
    2081         </FileConfiguration> 
    2082         <FileConfiguration 
    20831728          Name="Distribution|x64" 
    20841729          > 
     
    21051750        </FileConfiguration> 
    21061751        <FileConfiguration 
    2107           Name="Debug-MemCheck|Win32" 
    2108           > 
    2109           <Tool 
    2110             Name="VCCLCompilerTool" 
    2111             UsePrecompiledHeader="0" 
    2112           /> 
    2113         </FileConfiguration> 
    2114         <FileConfiguration 
    21151752          Name="Debug-MemCheck|x64" 
    21161753          > 
     
    21211758        </FileConfiguration> 
    21221759        <FileConfiguration 
    2123           Name="OP5|Win32" 
    2124           > 
    2125           <Tool 
    2126             Name="VCCLCompilerTool" 
    2127             UsePrecompiledHeader="0" 
    2128           /> 
    2129         </FileConfiguration> 
    2130         <FileConfiguration 
    21311760          Name="OP5|x64" 
    21321761          > 
     
    21731802        </FileConfiguration> 
    21741803        <FileConfiguration 
    2175           Name="Distribution|Win32" 
     1804          Name="Distribution|x64" 
    21761805          > 
    21771806          <Tool 
     
    21811810        </FileConfiguration> 
    21821811        <FileConfiguration 
     1812          Name="Nightly|Win32" 
     1813          > 
     1814          <Tool 
     1815            Name="VCCLCompilerTool" 
     1816            UsePrecompiledHeader="1" 
     1817          /> 
     1818        </FileConfiguration> 
     1819        <FileConfiguration 
     1820          Name="Nightly|x64" 
     1821          > 
     1822          <Tool 
     1823            Name="VCCLCompilerTool" 
     1824            UsePrecompiledHeader="1" 
     1825          /> 
     1826        </FileConfiguration> 
     1827        <FileConfiguration 
     1828          Name="Debug-MemCheck|x64" 
     1829          > 
     1830          <Tool 
     1831            Name="VCCLCompilerTool" 
     1832            UsePrecompiledHeader="1" 
     1833          /> 
     1834        </FileConfiguration> 
     1835        <FileConfiguration 
     1836          Name="OP5|x64" 
     1837          > 
     1838          <Tool 
     1839            Name="VCCLCompilerTool" 
     1840            UsePrecompiledHeader="1" 
     1841          /> 
     1842        </FileConfiguration> 
     1843        <FileConfiguration 
     1844          Name="Debug|Itanium" 
     1845          > 
     1846          <Tool 
     1847            Name="VCCLCompilerTool" 
     1848            UsePrecompiledHeader="1" 
     1849          /> 
     1850        </FileConfiguration> 
     1851        <FileConfiguration 
     1852          Name="Release|Itanium" 
     1853          > 
     1854          <Tool 
     1855            Name="VCCLCompilerTool" 
     1856            UsePrecompiledHeader="1" 
     1857          /> 
     1858        </FileConfiguration> 
     1859        <FileConfiguration 
     1860          Name="Distribution|Itanium" 
     1861          > 
     1862          <Tool 
     1863            Name="VCCLCompilerTool" 
     1864            UsePrecompiledHeader="1" 
     1865          /> 
     1866        </FileConfiguration> 
     1867        <FileConfiguration 
     1868          Name="Nightly|Itanium" 
     1869          > 
     1870          <Tool 
     1871            Name="VCCLCompilerTool" 
     1872            UsePrecompiledHeader="1" 
     1873          /> 
     1874        </FileConfiguration> 
     1875        <FileConfiguration 
     1876          Name="Debug-MemCheck|Itanium" 
     1877          > 
     1878          <Tool 
     1879            Name="VCCLCompilerTool" 
     1880            UsePrecompiledHeader="1" 
     1881          /> 
     1882        </FileConfiguration> 
     1883      </File> 
     1884      <File 
     1885        RelativePath="..\..\include\sysinfo.cpp" 
     1886        > 
     1887        <FileConfiguration 
     1888          Name="Debug|Win32" 
     1889          > 
     1890          <Tool 
     1891            Name="VCCLCompilerTool" 
     1892            UsePrecompiledHeader="0" 
     1893          /> 
     1894        </FileConfiguration> 
     1895        <FileConfiguration 
     1896          Name="Debug|x64" 
     1897          > 
     1898          <Tool 
     1899            Name="VCCLCompilerTool" 
     1900            UsePrecompiledHeader="0" 
     1901          /> 
     1902        </FileConfiguration> 
     1903        <FileConfiguration 
     1904          Name="Release|Win32" 
     1905          > 
     1906          <Tool 
     1907            Name="VCCLCompilerTool" 
     1908            UsePrecompiledHeader="0" 
     1909          /> 
     1910        </FileConfiguration> 
     1911        <FileConfiguration 
     1912          Name="Release|x64" 
     1913          > 
     1914          <Tool 
     1915            Name="VCCLCompilerTool" 
     1916            UsePrecompiledHeader="0" 
     1917          /> 
     1918        </FileConfiguration> 
     1919        <FileConfiguration 
    21831920          Name="Distribution|x64" 
    21841921          > 
    21851922          <Tool 
    21861923            Name="VCCLCompilerTool" 
    2187             UsePrecompiledHeader="1" 
     1924            UsePrecompiledHeader="0" 
    21881925          /> 
    21891926        </FileConfiguration> 
     
    21931930          <Tool 
    21941931            Name="VCCLCompilerTool" 
    2195             UsePrecompiledHeader="1" 
     1932            UsePrecompiledHeader="0" 
    21961933          /> 
    21971934        </FileConfiguration> 
     
    22011938          <Tool 
    22021939            Name="VCCLCompilerTool" 
    2203             UsePrecompiledHeader="1" 
    2204           /> 
    2205         </FileConfiguration> 
    2206         <FileConfiguration 
    2207           Name="Debug-MemCheck|Win32" 
    2208           > 
    2209           <Tool 
    2210             Name="VCCLCompilerTool" 
    2211             UsePrecompiledHeader="1" 
     1940            UsePrecompiledHeader="0" 
    22121941          /> 
    22131942        </FileConfiguration> 
     
    22171946          <Tool 
    22181947            Name="VCCLCompilerTool" 
    2219             UsePrecompiledHeader="1" 
    2220           /> 
    2221         </FileConfiguration> 
    2222         <FileConfiguration 
    2223           Name="OP5|Win32" 
    2224           > 
    2225           <Tool 
    2226             Name="VCCLCompilerTool" 
    2227             UsePrecompiledHeader="1" 
     1948            UsePrecompiledHeader="0" 
    22281949          /> 
    22291950        </FileConfiguration> 
     
    22331954          <Tool 
    22341955            Name="VCCLCompilerTool" 
    2235             UsePrecompiledHeader="1" 
    2236           /> 
    2237         </FileConfiguration> 
    2238         <FileConfiguration 
    2239           Name="Debug|Itanium" 
    2240           > 
    2241           <Tool 
    2242             Name="VCCLCompilerTool" 
    2243             UsePrecompiledHeader="1" 
    2244           /> 
    2245         </FileConfiguration> 
    2246         <FileConfiguration 
    2247           Name="Release|Itanium" 
    2248           > 
    2249           <Tool 
    2250             Name="VCCLCompilerTool" 
    2251             UsePrecompiledHeader="1" 
    2252           /> 
    2253         </FileConfiguration> 
    2254         <FileConfiguration 
    2255           Name="Distribution|Itanium" 
    2256           > 
    2257           <Tool 
    2258             Name="VCCLCompilerTool" 
    2259             UsePrecompiledHeader="1" 
    2260           /> 
    2261         </FileConfiguration> 
    2262         <FileConfiguration 
    2263           Name="Nightly|Itanium" 
    2264           > 
    2265           <Tool 
    2266             Name="VCCLCompilerTool" 
    2267             UsePrecompiledHeader="1" 
    2268           /> 
    2269         </FileConfiguration> 
    2270         <FileConfiguration 
    2271           Name="Debug-MemCheck|Itanium" 
    2272           > 
    2273           <Tool 
    2274             Name="VCCLCompilerTool" 
    2275             UsePrecompiledHeader="1" 
    2276           /> 
    2277         </FileConfiguration> 
    2278       </File> 
    2279       <File 
    2280         RelativePath="..\..\include\sysinfo.cpp" 
     1956            UsePrecompiledHeader="0" 
     1957          /> 
     1958        </FileConfiguration> 
     1959      </File> 
     1960      <File 
     1961        RelativePath="..\..\include\utils.cpp" 
    22811962        > 
    22821963        <FileConfiguration 
     
    22861967            Name="VCCLCompilerTool" 
    22871968            UsePrecompiledHeader="0" 
     1969            PrecompiledHeaderThrough="" 
    22881970          /> 
    22891971        </FileConfiguration> 
     
    22941976            Name="VCCLCompilerTool" 
    22951977            UsePrecompiledHeader="0" 
     1978            PrecompiledHeaderThrough="" 
    22961979          /> 
    22971980        </FileConfiguration> 
     
    23021985            Name="VCCLCompilerTool" 
    23031986            UsePrecompiledHeader="0" 
     1987            PrecompiledHeaderThrough="" 
    23041988          /> 
    23051989        </FileConfiguration> 
     
    23101994            Name="VCCLCompilerTool" 
    23111995            UsePrecompiledHeader="0" 
    2312           /> 
    2313         </FileConfiguration> 
    2314         <FileConfiguration 
    2315           Name="Distribution|Win32" 
    2316           > 
    2317           <Tool 
    2318             Name="VCCLCompilerTool" 
    2319             UsePrecompiledHeader="0" 
     1996            PrecompiledHeaderThrough="" 
    23201997          /> 
    23211998        </FileConfiguration> 
     
    23262003            Name="VCCLCompilerTool" 
    23272004            UsePrecompiledHeader="0" 
     2005            PrecompiledHeaderThrough="" 
    23282006          /> 
    23292007        </FileConfiguration> 
     
    23342012            Name="VCCLCompilerTool" 
    23352013            UsePrecompiledHeader="0" 
     2014            PrecompiledHeaderThrough="" 
    23362015          /> 
    23372016        </FileConfiguration> 
     
    23422021            Name="VCCLCompilerTool" 
    23432022            UsePrecompiledHeader="0" 
    2344           /> 
    2345         </FileConfiguration> 
    2346         <FileConfiguration 
    2347           Name="Debug-MemCheck|Win32" 
    2348           > 
    2349           <Tool 
    2350             Name="VCCLCompilerTool" 
    2351             UsePrecompiledHeader="0" 
     2023            PrecompiledHeaderThrough="" 
    23522024          /> 
    23532025        </FileConfiguration> 
    23542026        <FileConfiguration 
    23552027          Name="Debug-MemCheck|x64" 
    2356           > 
    2357           <Tool 
    2358             Name="VCCLCompilerTool" 
    2359             UsePrecompiledHeader="0" 
    2360           /> 
    2361         </FileConfiguration> 
    2362         <FileConfiguration 
    2363           Name="OP5|Win32" 
    2364           > 
    2365           <Tool 
    2366             Name="VCCLCompilerTool" 
    2367             UsePrecompiledHeader="0" 
    2368           /> 
    2369         </FileConfiguration> 
    2370         <FileConfiguration 
    2371           Name="OP5|x64" 
    2372           > 
    2373           <Tool 
    2374             Name="VCCLCompilerTool" 
    2375             UsePrecompiledHeader="0" 
    2376           /> 
    2377         </FileConfiguration> 
    2378       </File> 
    2379       <File 
    2380         RelativePath="..\..\include\utils.cpp" 
    2381         > 
    2382         <FileConfiguration 
    2383           Name="Debug|Win32" 
    2384           > 
    2385           <Tool 
    2386             Name="VCCLCompilerTool" 
    2387             UsePrecompiledHeader="0" 
    2388             PrecompiledHeaderThrough="" 
    2389           /> 
    2390         </FileConfiguration> 
    2391         <FileConfiguration 
    2392           Name="Debug|x64" 
    2393           > 
    2394           <Tool 
    2395             Name="VCCLCompilerTool" 
    2396             UsePrecompiledHeader="0" 
    2397             PrecompiledHeaderThrough="" 
    2398           /> 
    2399         </FileConfiguration> 
    2400         <FileConfiguration 
    2401           Name="Release|Win32" 
    2402           > 
    2403           <Tool 
    2404             Name="VCCLCompilerTool" 
    2405             UsePrecompiledHeader="0" 
    2406             PrecompiledHeaderThrough="" 
    2407           /> 
    2408         </FileConfiguration> 
    2409         <FileConfiguration 
    2410           Name="Release|x64" 
    2411           > 
    2412           <Tool 
    2413             Name="VCCLCompilerTool" 
    2414             UsePrecompiledHeader="0" 
    2415             PrecompiledHeaderThrough="" 
    2416           /> 
    2417         </FileConfiguration> 
    2418         <FileConfiguration 
    2419           Name="Distribution|Win32" 
    2420           > 
    2421           <Tool 
    2422             Name="VCCLCompilerTool" 
    2423             UsePrecompiledHeader="0" 
    2424             PrecompiledHeaderThrough="" 
    2425           /> 
    2426         </FileConfiguration> 
    2427         <FileConfiguration 
    2428           Name="Distribution|x64" 
    2429           > 
    2430           <Tool 
    2431             Name="VCCLCompilerTool" 
    2432             UsePrecompiledHeader="0" 
    2433             PrecompiledHeaderThrough="" 
    2434           /> 
    2435         </FileConfiguration> 
    2436         <FileConfiguration 
    2437           Name="Nightly|Win32" 
    2438           > 
    2439           <Tool 
    2440             Name="VCCLCompilerTool" 
    2441             UsePrecompiledHeader="0" 
    2442             PrecompiledHeaderThrough="" 
    2443           /> 
    2444         </FileConfiguration> 
    2445         <FileConfiguration 
    2446           Name="Nightly|x64" 
    2447           > 
    2448           <Tool 
    2449             Name="VCCLCompilerTool" 
    2450             UsePrecompiledHeader="0" 
    2451             PrecompiledHeaderThrough="" 
    2452           /> 
    2453         </FileConfiguration> 
    2454         <FileConfiguration 
    2455           Name="Debug-MemCheck|Win32" 
    2456           > 
    2457           <Tool 
    2458             Name="VCCLCompilerTool" 
    2459             UsePrecompiledHeader="0" 
    2460             PrecompiledHeaderThrough="" 
    2461           /> 
    2462         </FileConfiguration> 
    2463         <FileConfiguration 
    2464           Name="Debug-MemCheck|x64" 
    2465           > 
    2466           <Tool 
    2467             Name="VCCLCompilerTool" 
    2468             UsePrecompiledHeader="0" 
    2469             PrecompiledHeaderThrough="" 
    2470           /> 
    2471         </FileConfiguration> 
    2472         <FileConfiguration 
    2473           Name="OP5|Win32" 
    24742028          > 
    24752029          <Tool 
  • trunk/modules/CheckSystem/PDHCollector.cpp

    r202 r205  
    4141  std::wstring method = SETTINGS_GET_STRING(check_system::CPU_METHOD); 
    4242 
    43   if (method == settings::check_system::CPU_METHOD_PDH_MANUAL) { 
     43  if (method == setting_keys::check_system::CPU_METHOD_PDH_MANUAL) { 
    4444    NSC_DEBUG_MSG_STD(_T("Autodetect disabled from nsc.ini via: ") + SETTINGS_MAKE_NAME(check_system::CPU_METHOD)); 
    4545    return false; 
     
    8181      section = _T("0x") + section.substr(section.length()-4); 
    8282    } 
    83     if (bUseIndex&&(method==settings::check_system::CPU_METHOD_PDH_NO_INDEX)) { 
     83    if (bUseIndex&&(method==setting_keys::check_system::CPU_METHOD_PDH_NO_INDEX)) { 
    8484      NSC_DEBUG_MSG_STD(_T("We wanted to use index but were forced not to use them due to: ") + SETTINGS_MAKE_NAME(check_system::CPU_METHOD)); 
    8585      bUseIndex = false; 
  • trunk/modules/FileLogger/FileLogger.cpp

    r202 r205  
    7373    file_ = SETTINGS_GET_STRING(log::FILENAME); 
    7474    if (file_.empty()) 
    75       file_ = settings::log::FILENAME_DEFAULT; 
     75      file_ = setting_keys::log::FILENAME_DEFAULT; 
    7676    if (file_.find(_T("\\")) == std::wstring::npos) { 
    7777      std::wstring root = getFolder(SETTINGS_GET_STRING(log::ROOT)); 
  • trunk/modules/NRPEClient/NRPEClient-2005.vcproj

    r201 r205  
    4949        Optimization="0" 
    5050        AdditionalIncludeDirectories="../include;../../include" 
    51         PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_STLP_USE_NEWALLOC;_STLP_DEBUG=1;_CRT_SECURE_NO_DEPRECATE;USE_SSL" 
     51        PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;USE_SSL;USE_BOOST" 
    5252        MinimalRebuild="true" 
    5353        BasicRuntimeChecks="3" 
  • trunk/modules/NRPEClient/NRPEClient.cpp

    r202 r205  
    5050  try { 
    5151    SETTINGS_REG_PATH(nrpe::CH_SECTION); 
    52     commands = NSCModuleHelper::getSettingsSection(settings::nrpe::CH_SECTION_PATH); 
     52    commands = NSCModuleHelper::getSettingsSection(setting_keys::nrpe::CH_SECTION_PATH); 
    5353  } catch (NSCModuleHelper::NSCMHExcpetion &e) { 
    5454    NSC_LOG_ERROR_STD(_T("Failed to register command: ") + e.msg_); 
     
    5858  for (std::list<std::wstring>::const_iterator it = commands.begin(); it != commands.end(); ++it) { 
    5959    NSC_DEBUG_MSG_STD(*it); 
    60     std::wstring s = NSCModuleHelper::getSettingsString(settings::nrpe::CH_SECTION_PATH, (*it), _T("")); 
     60    std::wstring s = NSCModuleHelper::getSettingsString(setting_keys::nrpe::CH_SECTION_PATH, (*it), _T("")); 
    6161    if (s.empty()) { 
    6262      NSC_LOG_ERROR_STD(_T("Invalid NRPE-client entry: ") + (*it)); 
     
    185185} 
    186186#endif 
     187 
     188using boost::asio::ip::tcp; 
     189 
    187190int NRPEClient::commandLineExec(const TCHAR* command, const unsigned int argLen, TCHAR** args) { 
    188191#ifndef USE_BOOST 
     
    260263NRPEPacket NRPEClient::send_nossl(std::wstring host, int port, int timeout, NRPEPacket packet) 
    261264{ 
     265  boost::asio::io_service io_service; 
     266  tcp::resolver resolver(io_service); 
     267  tcp::resolver::query query("127.0.0.1", boost::lexical_cast<std::string>(port)); 
     268 
     269  tcp::resolver::iterator endpoint_iterator = resolver.resolve(query); 
     270  tcp::resolver::iterator end; 
     271 
     272  tcp::socket socket(io_service); 
     273  boost::system::error_code error = boost::asio::error::host_not_found; 
     274  while (error && endpoint_iterator != end) 
     275  { 
     276    tcp::resolver::endpoint_type ep = *endpoint_iterator; 
     277    NSC_DEBUG_MSG_STD(_T("Connectiing to: ") + boost::lexical_cast<std::wstring>(ep.address().to_string()) + _T(":") + boost::lexical_cast<std::wstring>(ep.port())) 
     278    socket.close(); 
     279    socket.connect(*endpoint_iterator++, error); 
     280  } 
     281  if (error) 
     282    throw boost::system::system_error(error); 
     283 
     284  for (;;) 
     285  { 
     286    std::vector<char> buf(packet.getBufferLength()); 
     287    boost::system::error_code error; 
     288 
     289    size_t len = socket.write_some(boost::asio::buffer(packet.getBuffer(), packet.getBufferLength()), error); 
     290 
     291    len = socket.read_some(boost::asio::buffer(buf), error); 
     292 
     293    if (error == boost::asio::error::eof) 
     294      break; // Connection closed cleanly by peer. 
     295    else if (error) 
     296      throw boost::system::system_error(error); // Some other error. 
     297    packet.readFrom(&buf[0], buf.size()); 
     298  } 
     299 
     300 
     301 
     302/* 
    262303  simpleSocket::Socket socket(true); 
    263304  socket.connect(host, port); 
     
    266307  socket.readAll(buffer); 
    267308  packet.readFrom(buffer.getBuffer(), buffer.getLength()); 
     309  */ 
    268310  return packet; 
    269311} 
  • trunk/modules/NRPEClient/stdafx.h

    r108 r205  
    2121#pragma once 
    2222 
     23#define _WIN32_WINNT 0x0400 
     24 
    2325#define WIN32_LEAN_AND_MEAN   // Exclude rarely-used stuff from Windows headers 
    2426// Windows Header Files: 
    2527#include <windows.h> 
     28#include <winsock2.h> 
    2629 
    2730#include <string> 
     
    3437#include <NSCHelper.h> 
    3538 
     39#include <boost/array.hpp> 
     40#include <boost/asio.hpp> 
     41 
    3642#ifdef MEMCHECK 
    3743#include <vld.h> 
  • trunk/modules/NRPEListener/NRPEListener.cpp

    r202 r205  
    102102    NSC_DEBUG_MSG_STD(_T("Non-standard buffer length (hope you have recompiled check_nrpe changing #define MAX_PACKETBUFFER_LENGTH = ") + strEx::itos(buffer_length_)); 
    103103  NSC_DEBUG_MSG_STD(_T("Loading all commands (from NRPE)")); 
    104   std::list<std::wstring> commands = NSCModuleHelper::getSettingsSection(settings::nrpe::SECTION_HANDLERS_PATH); 
     104  std::list<std::wstring> commands = NSCModuleHelper::getSettingsSection(setting_keys::nrpe::SECTION_HANDLERS_PATH); 
    105105  std::list<std::wstring>::const_iterator it; 
    106106  for (it = commands.begin(); it != commands.end(); ++it) { 
     
    113113      command_name = (*it); 
    114114    } 
    115     std::wstring s = NSCModuleHelper::getSettingsString(settings::nrpe::SECTION_HANDLERS_PATH, (*it), _T("")); 
     115    std::wstring s = NSCModuleHelper::getSettingsString(setting_keys::nrpe::SECTION_HANDLERS_PATH, (*it), _T("")); 
    116116    if (command_name.empty() || s.empty()) { 
    117117      NSC_LOG_ERROR_STD(_T("Invalid command definition: ") + (*it)); 
  • trunk/release-build.bat

    r202 r205  
    1818if "%1" == "w32" set w32=1 
    1919if "%1" == "x64" set x64=1 
     20if "%1" == "ia64" set ia64=1 
    2021if "%1" == "hdr" set hdr=1 
    2122if "%1" == "src" set hdr=1 
     
    6768rem call build.bat runtime-link=static variant=release architecture=ia64 --library-path=%TARGET_LIB_IA64_DIR% 
    6869 
     70if not "%ia64%" == "1" goto no_build_ia64 
     71call :build_one address-model=64 architecture=ia64 variant=release debug-symbols=on debug-store=database --build-type=complete "--library-path=%TARGET_LIB_IA64_DIR%" "--with-psdk-lib=%PLATTFORM_SDK_LIB_IA64%" 
     72IF DEFINED _ERROR goto :error 
     73:no_build_ia64 
     74 
    6975 
    7076if not "%upload%" == "1" goto no_build_upload 
  • trunk/service

    • Property svn:ignore
      •  

        old new  
        11win32 
        22*.user 
         3NSC.ini 
  • trunk/service/Jamfile

    r203 r205  
    2424  NSClient++.cpp 
    2525  NSCPlugin.cpp 
     26  core_api.cpp 
     27  settings_manager_impl.cpp 
    2628  ../include/NSCHelper.cpp 
    2729  ../include/arrayBuffer.cpp 
  • trunk/service/NSCPlugin.cpp

    r202 r205  
    2222#include "NSClient++.h" 
    2323#include <error.hpp> 
     24#include "core_api.h" 
    2425/** 
    2526 * Default c-tor 
     
    124125  hModule_ = LoadLibrary(file_.c_str()); 
    125126  if (!hModule_) 
    126     throw NSPluginException(file_, _T("Could not load library: ") + error::lookup::last_error()); 
     127    throw NSPluginException(file_, _T("Could not load library: ") + error::lookup::last_error() + _T(" for file: ") + file_); 
    127128  loadRemoteProcs_(); 
    128129  bLoaded_ = true; 
  • trunk/service/NSClient++-2005.vcproj

    r204 r205  
    2424    <Configuration 
    2525      Name="Release|Win32" 
    26       OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     26      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    2727      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    2828      ConfigurationType="1" 
     
    126126    <Configuration 
    127127      Name="Release|x64" 
    128       OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     128      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    129129      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    130130      ConfigurationType="1" 
     
    226226    <Configuration 
    227227      Name="Debug|Win32" 
    228       OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     228      OutputDirectory="..\$(PlatformName)\$(ConfigurationName)" 
    229229      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    230230      ConfigurationType="1" 
    231       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
    232231      UseOfMFC="0" 
    233232      ATLMinimizesCRunTimeLibraryUsage="false" 
     
    284283        Name="VCLinkerTool" 
    285284        AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib Userenv.lib" 
    286         OutputFile="$(OutDir)\$(ProjectName).exe" 
     285        OutputFile="$(OutDir)\NSClient++.exe" 
    287286        LinkIncremental="1" 
    288287        SuppressStartupBanner="true" 
     
    320319    <Configuration 
    321320      Name="Debug|x64" 
    322       OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     321      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    323322      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    324323      ConfigurationType="1" 
     
    415414    <Configuration 
    416415      Name="Distribution|Win32" 
    417       IntermediateDirectory="$(ConfigurationName)" 
     416      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     417      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    418418      ConfigurationType="1" 
    419419      > 
     
    447447      <Tool 
    448448        Name="VCLinkerTool" 
     449        OutputFile="$(OutDir)\$(ProjectName).exe" 
    449450      /> 
    450451      <Tool 
     
    475476    <Configuration 
    476477      Name="Distribution|x64" 
    477       OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     478      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    478479      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    479480      ConfigurationType="1" 
     
    578579    <Configuration 
    579580      Name="Nightly|Win32" 
    580       OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     581      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    581582      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    582583      ConfigurationType="1" 
     
    673674    <Configuration 
    674675      Name="Nightly|x64" 
    675       OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     676      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    676677      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    677678      ConfigurationType="1" 
     
    767768    <Configuration 
    768769      Name="Debug-MemCheck|Win32" 
    769       IntermediateDirectory="$(ConfigurationName)" 
     770      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     771      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    770772      ConfigurationType="1" 
    771773      > 
     
    799801      <Tool 
    800802        Name="VCLinkerTool" 
     803        OutputFile="$(OutDir)\$(ProjectName).exe" 
    801804      /> 
    802805      <Tool 
     
    827830    <Configuration 
    828831      Name="Debug-MemCheck|x64" 
    829       OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
     832      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
    830833      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    831834      ConfigurationType="1" 
     
    922925    <Configuration 
    923926      Name="OP5|Win32" 
    924       IntermediateDirectory="$(ConfigurationName)" 
     927      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     928      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    925929      ConfigurationType="1" 
    926930      > 
     
    954958      <Tool 
    955959        Name="VCLinkerTool" 
     960        OutputFile="$(OutDir)\$(ProjectName).exe" 
    956961      /> 
    957962      <Tool 
     
    982987    <Configuration 
    983988      Name="OP5|x64" 
    984       OutputDirectory="$(PlatformName)\$(ConfigurationName)" 
    985       IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" 
     989      OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)\modules" 
     990      IntermediateDirectory="$(SolutionDir)\tmp\$(PlatformName)\$(ConfigurationName)\$(ProjectName)" 
    986991      ConfigurationType="1" 
    987992      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" 
     
    18241829      </File> 
    18251830      <File 
     1831        RelativePath=".\core_api.cpp" 
     1832        > 
     1833      </File> 
     1834      <File 
    18261835        RelativePath="..\include\NSCHelper.cpp" 
    18271836        > 
     
    20782087          /> 
    20792088        </FileConfiguration> 
     2089      </File> 
     2090      <File 
     2091        RelativePath=".\settings_manager_impl.cpp" 
     2092        > 
    20802093      </File> 
    20812094      <File 
     
    23782391      </File> 
    23792392      <File 
     2393        RelativePath=".\core_api.h" 
     2394        > 
     2395      </File> 
     2396      <File 
    23802397        RelativePath=".\include\error.hpp" 
    23812398        > 
     
    24342451      </File> 
    24352452      <File 
    2436         RelativePath=".\include\settings\Settings.h" 
    2437         > 
    2438       </File> 
    2439       <File 
    2440         RelativePath=".\include\settings\settings_ini.hpp" 
    2441         > 
    2442       </File> 
    2443       <File 
    2444         RelativePath=".\include\settings\settings_old.hpp" 
    2445         > 
    2446       </File> 
    2447       <File 
    2448         RelativePath=".\include\settings\settings_registry.hpp" 
     2453        RelativePath=".\setting_keys.h" 
     2454        > 
     2455      </File> 
     2456      <File 
     2457        RelativePath="..\include\settings\Settings.h" 
     2458        > 
     2459      </File> 
     2460      <File 
     2461        RelativePath="..\include\settings\settings_ini.hpp" 
     2462        > 
     2463      </File> 
     2464      <File 
     2465        RelativePath=".\settings_logger_impl.hpp" 
     2466        > 
     2467      </File> 
     2468      <File 
     2469        RelativePath=".\settings_manager_impl.h" 
     2470        > 
     2471      </File> 
     2472      <File 
     2473        RelativePath="..\include\settings\settings_old.hpp" 
     2474        > 
     2475      </File> 
     2476      <File 
     2477        RelativePath="..\include\settings\settings_registry.hpp" 
    24492478        > 
    24502479      </File> 
     
    24772506        > 
    24782507      </File> 
     2508      <Filter 
     2509        Name="NewFilter1" 
     2510        Filter="settings" 
     2511        > 
     2512      </Filter> 
    24792513    </Filter> 
    24802514    <Filter 
     
    25032537        <FileConfiguration 
    25042538          Name="Debug|Win32" 
     2539          ExcludedFromBuild="true" 
    25052540          > 
    25062541          <Tool 
  • trunk/service/NSClient++.cpp

    r202 r205  
    1919#include <charEx.h> 
    2020#include <Socket.h> 
    21 #include <b64/b64.h> 
    2221#include <config.h> 
    2322#include <msvc_wrappers.h> 
     
    2827#include <crtdbg.h> 
    2928//#endif 
    30 #include <settings/settings_ini.hpp> 
    31 #include <settings/settings_registry.hpp> 
    32 #include <settings/settings_old.hpp> 
    3329#include <Userenv.h> 
    3430#include <remote_processes.hpp> 
    3531#include <Lmcons.h> 
     32#include "core_api.h" 
     33#include "settings_manager_impl.h" 
     34#include <settings/macros.h> 
    3635 
    3736NSClient mainClient(SZSERVICENAME); // Global core instance. 
    3837bool g_bConsoleLog = false; 
    3938 
     39#define SETTINGS_GET_BOOL_CORE(key) \ 
     40  settings_manager::get_settings()->get_bool(setting_keys::key ## _PATH, setting_keys::key, setting_keys::key ## _DEFAULT) 
     41 
     42#define SETTINGS_GET_STRING_CORE(key) \ 
     43  settings_manager::get_settings()->get_string(setting_keys::key ## _PATH, setting_keys::key, setting_keys::key ## _DEFAULT) 
     44/* 
     45#define SETTINGS_SET_STRING_CORE(key, value) \ 
     46  Settings::get_settings()->set_string(setting_keys::key ## _PATH, setting_keys::key, value); 
     47*/ 
    4048/** 
    4149 * START OF Tray starter MERGE HELPER 
     
    7179 
    7280  static bool start(DWORD dwSessionId) { 
    73     std::wstring program = mainClient.getBasePath() +  _T("\\") + SETTINGS_GET_STRING(nsclient::SYSTRAY_EXE); 
     81    std::wstring program = mainClient.getBasePath() +  _T("\\") +  
     82      SETTINGS_GET_STRING_CORE(settings_def::SYSTRAY_EXE); 
    7483    std::wstring cmdln = _T("\"") + program + _T("\" -channel __") + strEx::itos(dwSessionId) + _T("__"); 
    7584    return tray_starter::startTrayHelper(dwSessionId, program, cmdln); 
     
    186195} 
    187196 
    188 class NSC_logger : public Settings::LoggerInterface { 
    189 public: 
    190   ////////////////////////////////////////////////////////////////////////// 
    191   /// Log an ERROR message. 
    192   /// 
    193   /// @param file the file where the event happened 
    194   /// @param line the line where the event happened 
    195   /// @param message the message to log 
    196   /// 
    197   /// @author mickem 
    198   void err(std::wstring file, int line, std::wstring message) { 
    199     NSAPIMessage(NSCAPI::error, file.c_str(), line, message.c_str()); 
    200   } 
    201   ////////////////////////////////////////////////////////////////////////// 
    202   /// Log an WARNING message. 
    203   /// 
    204   /// @param file the file where the event happened 
    205   /// @param line the line where the event happened 
    206   /// @param message the message to log 
    207   /// 
    208   /// @author mickem 
    209   void warn(std::wstring file, int line, std::wstring message) { 
    210     NSAPIMessage(NSCAPI::warning, file.c_str(), line, message.c_str()); 
    211   } 
    212   ////////////////////////////////////////////////////////////////////////// 
    213   /// Log an INFO message. 
    214   /// 
    215   /// @param file the file where the event happened 
    216   /// @param line the line where the event happened 
    217   /// @param message the message to log 
    218   /// 
    219   /// @author mickem 
    220   void info(std::wstring file, int line, std::wstring message) { 
    221     NSAPIMessage(NSCAPI::log, file.c_str(), line, message.c_str()); 
    222   } 
    223   ////////////////////////////////////////////////////////////////////////// 
    224   /// Log an DEBUG message. 
    225   /// 
    226   /// @param file the file where the event happened 
    227   /// @param line the line where the event happened 
    228   /// @param message the message to log 
    229   /// 
    230   /// @author mickem 
    231   void debug(std::wstring file, int line, std::wstring message) { 
    232     NSAPIMessage(NSCAPI::debug, file.c_str(), line, message.c_str()); 
    233   } 
    234 }; 
    235  
    236 #define SETTINGS_GET_BOOL(key) \ 
    237   settings_manager::get_settings()->get_bool(settings::key ## _PATH, settings::key, settings::key ## _DEFAULT) 
    238  
    239 namespace settings_manager { 
    240   class NSCSettingsImpl : public Settings::SettingsHandlerImpl { 
    241   private: 
    242     std::wstring boot_; 
    243     bool old_; 
    244   public: 
    245     NSCSettingsImpl() : old_(false) {} 
    246     ////////////////////////////////////////////////////////////////////////// 
    247     /// Get a string form the boot file. 
    248     /// 
    249     /// @param section section to read a value from. 
    250     /// @param key the key to read. 
    251     /// @param def a default value. 
    252     /// @return the value of the key or the default value. 
    253     /// 
    254     /// @author mickem 
    255     std::wstring get_boot_string(std::wstring section, std::wstring key, std::wstring def) { 
    256       TCHAR* buffer = new TCHAR[1024]; 
    257       GetPrivateProfileString(section.c_str(), key.c_str(), def.c_str(), buffer, 1023, boot_.c_str()); 
    258       std::wstring ret = buffer; 
    259       delete [] buffer; 
    260       return ret; 
    261     } 
    262     ////////////////////////////////////////////////////////////////////////// 
    263     /// Boot the settings subsystem from the given file (boot.ini). 
    264     /// 
    265     /// @param file the file to use when booting. 
    266     /// 
    267     /// @author mickem 
    268     void boot(std::wstring file = _T("boot.ini")) { 
    269       boot_ = get_base() + _T("\\") + file; 
    270       std::wstring subsystem = get_boot_string(_T("settings"), _T("type"), _T("old")); 
    271       get_logger()->debug(__FILEW__, __LINE__, _T("Trying to boot: ") + subsystem); 
    272       settings_type type = string_to_type(subsystem); 
    273       std::wstring context = get_boot_string(_T("settings"), _T("context"), subsystem); 
    274       Settings::SettingsInterface *impl = create_instance(type, context); 
    275       if (impl == NULL) 
    276         throw Settings::SettingsException(_T("Could not create settings instance: ") + subsystem); 
    277       add_type_impl(type, create_instance(type, context)); 
    278       set_type(type); 
    279       if (old_) 
    280         get()->set_bool(settings::settings_def::COMPATIBLITY_PATH, settings::settings_def::COMPATIBLITY, true); 
    281     } 
    282     ////////////////////////////////////////////////////////////////////////// 
    283     /// Create an instance of a given type. 
    284     /// Used internally to create instances of various settings types. 
    285     /// 
    286     /// @param type the type to create 
    287     /// @param context the context to use 
    288     /// @return a new instance of given type. 
    289     /// 
    290     /// @author mickem 
    291     Settings::SettingsInterface* create_instance(settings_type type, std::wstring context) { 
    292       get_logger()->debug(__FILEW__, __LINE__, _T("Trying to create: ") + SettingsCore::type_to_string(type) + _T(": ") + context); 
    293       if (type == SettingsCore::old_ini_file) { 
    294         old_ = true; 
    295         return new Settings::OLDSettings(this, context); 
    296       }  
    297       if (type == SettingsCore::ini_file) 
    298         return new Settings::INISettings(this, context); 
    299       if (type == SettingsCore::registry) 
    300         return new Settings::REGSettings(this, context); 
    301       throw SettingsException(_T("Undefined settings type: ") + SettingsCore::type_to_string(type)); 
    302     } 
    303  
    304   }; 
    305  
    306   typedef Singleton<NSCSettingsImpl> SettingsHandler; 
    307  
    308   // Alias to make handling "compatible" with old syntax 
    309   Settings::SettingsInterface* get_settings() { 
    310     return SettingsHandler::getInstance()->get(); 
    311   } 
    312   Settings::SettingsCore* get_core() { 
    313     return SettingsHandler::getInstance(); 
    314   } 
    315   void destroy_settings() { 
    316     SettingsHandler::destroyInstance(); 
    317   } 
    318  
    319  
    320   bool init_settings() { 
    321     try { 
    322       get_core()->set_logger(new NSC_logger()); 
    323       get_core()->set_base(mainClient.getBasePath()); 
    324       get_core()->boot(_T("boot.ini")); 
    325       get_core()->register_key(SETTINGS_REG_KEY_I_GEN(settings_def::PAYLOAD_LEN, Settings::SettingsCore::key_integer)); 
    326       get_core()->register_key(SETTINGS_REG_KEY_S_GEN(protocol_def::ALLOWED_HOSTS, Settings::SettingsCore::key_string)); 
    327       get_core()->register_key(SETTINGS_REG_KEY_B_GEN(protocol_def::CACHE_ALLOWED, Settings::SettingsCore::key_bool)); 
    328       get_core()->register_key(SETTINGS_REG_KEY_S_GEN(protocol_def::MASTER_KEY, Settings::SettingsCore::key_string)); 
    329       get_core()->register_key(SETTINGS_REG_KEY_S_GEN(protocol_def::PWD, Settings::SettingsCore::key_string)); 
    330       get_core()->register_key(SETTINGS_REG_KEY_S_GEN(protocol_def::OBFUSCATED_PWD, Settings::SettingsCore::key_string)); 
    331  
    332     } catch (SettingsException e) { 
    333       LOG_CRITICAL_STD(_T("Failed to initialize settings: ") + e.getError()); 
    334       return false; 
    335     } catch (...) { 
    336       LOG_CRITICAL(_T("FATAL ERROR IN SETTINGS SUBSYTEM")); 
    337       return false; 
    338     } 
    339     return true; 
    340   } 
    341  
    342 } 
    343  
    344 #define SETTINGS_GET_STRING(key) \ 
    345   Settings::get_settings()->get_string(key ## _PATH, key, key ## _DEFAULT) 
    346 #define SETTINGS_SET_STRING(key, value) \ 
    347   Settings::get_settings()->set_string(key ## _PATH, key, value); 
    348197 
    349198/** 
     
    442291      g_bConsoleLog = true; 
    443292      std::wstring password; 
    444       if (!settings_manager::init_settings()) { 
     293      if (!settings_manager::init_settings(mainClient.getBasePath())) { 
    445294        std::wcout << _T("Could not find settings") << std::endl;; 
    446295        return 1; 
     
    888737bool NSClientT::initCore(bool boot) { 
    889738  LOG_MESSAGE(_T("Attempting to start NSCLient++ - " SZVERSION)); 
    890   if (!settings_manager::init_settings()) { 
     739  if (!settings_manager::init_settings(getBasePath())) { 
    891740    return false; 
    892741  } 
     
    895744      settings_manager::get_settings()->set_int(_T("log"), _T("debug"), 1); 
    896745      settings_manager::get_settings()->set_int(_T("Settings"), _T("shared_Session"), 1); 
    897     enable_shared_session_ = SETTINGS_GET_BOOL(settings_def::SHARED_SESSION); 
     746    enable_shared_session_ = SETTINGS_GET_BOOL_CORE(settings_def::SHARED_SESSION); 
    898747  } catch (SettingsException e) { 
    899748    LOG_ERROR_STD(_T("Could not find settings: ") + e.getMessage()); 
     
    963812      Settings::string_list list = settings_manager::get_settings()->get_keys(MAIN_MODULES_SECTION); 
    964813      for (Settings::string_list::const_iterator cit = list.begin(); cit != list.end(); ++cit) { 
     814        LOG_DEBUG_STD(_T("Processing plugin: " + *cit)); 
    965815        try { 
    966816          if (settings_manager::get_settings()->get_string(MAIN_MODULES_SECTION, *cit) == _T("disabled")) { 
     
    13951245    } catch (SettingsException &e) { 
    13961246      LOG_DEBUG_STD(_T("Failed to get length: ") + e.getMessage()); 
    1397       return settings::settings_def::PAYLOAD_LEN_DEFAULT; 
     1247      return setting_keys::settings_def::PAYLOAD_LEN_DEFAULT; 
    13981248    } catch (...) { 
    13991249      LOG_ERROR(_T("Failed to get length: :(")); 
    1400       return settings::settings_def::PAYLOAD_LEN_DEFAULT; 
     1250      return setting_keys::settings_def::PAYLOAD_LEN_DEFAULT; 
    14011251    } 
    14021252  } 
     
    15281378bool NSClientT::logDebug() { 
    15291379  if (debug_ == log_unknown) { 
     1380    debug_ = log_looking; 
    15301381    try { 
    15311382      if (settings_manager::get_settings()->get_int(_T("log"), _T("debug"), 0) == 1) 
     
    15361387      return true; 
    15371388    } 
    1538   } 
     1389  } else if (debug_ == log_looking)  
     1390    return true; 
    15391391  return (debug_ == log_debug); 
    15401392} 
     
    15531405 */ 
    15541406void NSClientT::reportMessage(int msgType, const TCHAR* file, const int line, std::wstring message) { 
     1407  strEx::replace(message, _T("\n"), _T(" ")); 
     1408  strEx::replace(message, _T("\r"), _T(" ")); 
    15551409  if ((msgType == NSCAPI::debug)&&(!logDebug())) { 
    15561410    return; 
     
    16591513 
    16601514 
    1661 NSCAPI::errorReturn NSAPIGetSettingsString(const TCHAR* section, const TCHAR* key, const TCHAR* defaultValue, TCHAR* buffer, unsigned int bufLen) { 
    1662   try { 
    1663     return NSCHelper::wrapReturnString(buffer, bufLen, settings_manager::get_settings()->get_string(section, key, defaultValue), NSCAPI::isSuccess); 
    1664   } catch (...) { 
    1665     LOG_ERROR_STD(_T("Failed to getString: ") + key); 
    1666     return NSCAPI::hasFailed; 
    1667   } 
    1668 } 
    1669 int NSAPIGetSettingsInt(const TCHAR* section, const TCHAR* key, int defaultValue) { 
    1670   try { 
    1671     return settings_manager::get_settings()->get_int(section, key, defaultValue); 
    1672   } catch (SettingsException e) { 
    1673     LOG_ERROR_STD(_T("Failed to set settings file") + e.getMessage()); 
    1674     return defaultValue; 
    1675   } 
    1676 } 
    1677 NSCAPI::errorReturn NSAPIGetBasePath(TCHAR*buffer, unsigned int bufLen) { 
    1678   return NSCHelper::wrapReturnString(buffer, bufLen, mainClient.getBasePath(), NSCAPI::isSuccess); 
    1679 } 
    1680 NSCAPI::errorReturn NSAPIGetApplicationName(TCHAR*buffer, unsigned int bufLen) { 
    1681   return NSCHelper::wrapReturnString(buffer, bufLen, SZAPPNAME, NSCAPI::isSuccess); 
    1682 } 
    1683 NSCAPI::errorReturn NSAPIGetApplicationVersionStr(TCHAR*buffer, unsigned int bufLen) { 
    1684   return NSCHelper::wrapReturnString(buffer, bufLen, SZVERSION, NSCAPI::isSuccess); 
    1685 } 
    1686 void NSAPIMessage(int msgType, const TCHAR* file, const int line, const TCHAR* message) { 
    1687   mainClient.reportMessage(msgType, file, line, message); 
    1688 } 
    1689 void NSAPIStopServer(void) { 
    1690   serviceControll::StopNoWait(SZSERVICENAME); 
    1691 } 
    1692 NSCAPI::nagiosReturn NSAPIInject(const TCHAR* command, const unsigned int argLen, TCHAR **argument, TCHAR *returnMessageBuffer, unsigned int returnMessageBufferLen, TCHAR *returnPerfBuffer, unsigned int returnPerfBufferLen) { 
    1693   return mainClient.injectRAW(command, argLen, argument, returnMessageBuffer, returnMessageBufferLen, returnPerfBuffer, returnPerfBufferLen); 
    1694 } 
    1695 NSCAPI::errorReturn NSAPIGetSettingsSection(const TCHAR* section, TCHAR*** aBuffer, unsigned int * bufLen) { 
    1696   try { 
    1697     unsigned int len = 0; 
    1698     *aBuffer = arrayBuffer::list2arrayBuffer(settings_manager::get_settings()->get_keys(section), len); 
    1699     *bufLen = len; 
    1700     return NSCAPI::isSuccess; 
    1701   } catch (SettingsException e) { 
    1702     LOG_ERROR_STD(_T("Failed to get section: ") + e.getMessage()); 
    1703   } catch (...) { 
    1704     LOG_ERROR_STD(_T("Failed to getSection: ") + section); 
    1705   } 
    1706   return NSCAPI::hasFailed; 
    1707 } 
    1708 NSCAPI::errorReturn NSAPIReleaseSettingsSectionBuffer(TCHAR*** aBuffer, unsigned int * bufLen) { 
    1709   arrayBuffer::destroyArrayBuffer(*aBuffer, *bufLen); 
    1710   *bufLen = 0; 
    1711   *aBuffer = NULL; 
    1712   return NSCAPI::isSuccess; 
    1713 } 
    1714  
    1715 NSCAPI::boolReturn NSAPICheckLogMessages(int messageType) { 
    1716   if (mainClient.logDebug()) 
    1717     return NSCAPI::istrue; 
    1718   return NSCAPI::isfalse; 
    1719 } 
    1720  
    17211515std::wstring Encrypt(std::wstring str, unsigned int algorithm) { 
    17221516  unsigned int len = 0; 
     
    17461540} 
    17471541 
    1748 NSCAPI::errorReturn NSAPIEncrypt(unsigned int algorithm, const TCHAR* inBuffer, unsigned int inBufLen, TCHAR* outBuf, unsigned int *outBufLen) { 
    1749   if (algorithm != NSCAPI::xor) { 
    1750     LOG_ERROR(_T("Unknown algortihm requested.")); 
    1751     return NSCAPI::hasFailed; 
    1752   } 
    1753   std::wstring key = settings_manager::get_settings()->get_string(SETTINGS_KEY(protocol_def::MASTER_KEY)); 
    1754   int tcharInBufLen = 0; 
    1755   char *c = charEx::tchar_to_char(inBuffer, inBufLen, tcharInBufLen); 
    1756   std::wstring::size_type j=0; 
    1757   for (int i=0;i<tcharInBufLen;i++,j++) { 
    1758     if (j > key.size()) 
    1759       j = 0; 
    1760     c[i] ^= key[j]; 
    1761   } 
    1762   size_t cOutBufLen = b64::b64_encode(reinterpret_cast<void*>(c), tcharInBufLen, NULL, NULL); 
    1763   if (!outBuf) { 
    1764     *outBufLen = static_cast<unsigned int>(cOutBufLen*2); // TODO: Guessing wildly here but no proper way to tell without a lot of extra work 
    1765     return NSCAPI::isSuccess; 
    1766   } 
    1767   char *cOutBuf = new char[cOutBufLen+1]; 
    1768   size_t len = b64::b64_encode(reinterpret_cast<void*>(c), tcharInBufLen, cOutBuf, cOutBufLen); 
    1769   delete [] c; 
    1770   if (len == 0) { 
    1771     LOG_ERROR(_T("Invalid out buffer length.")); 
    1772     return NSCAPI::isInvalidBufferLen; 
    1773   } 
    1774   int realOutLen; 
    1775   TCHAR *realOut = charEx::char_to_tchar(cOutBuf, cOutBufLen, realOutLen); 
    1776   if (static_cast<unsigned int>(realOutLen) >= *outBufLen) { 
    1777     LOG_ERROR_STD(_T("Invalid out buffer length: ") + strEx::itos(realOutLen) + _T(" was needed but only ") + strEx::itos(*outBufLen) + _T(" was allocated.")); 
    1778     return NSCAPI::isInvalidBufferLen; 
    1779   } 
    1780   wcsncpy_s(outBuf, *outBufLen, realOut, realOutLen); 
    1781   delete [] realOut; 
    1782   outBuf[realOutLen] = 0; 
    1783   *outBufLen = static_cast<unsigned int>(realOutLen); 
    1784   return NSCAPI::isSuccess; 
    1785 } 
    1786  
    1787 NSCAPI::errorReturn NSAPIDecrypt(unsigned int algorithm, const TCHAR* inBuffer, unsigned int inBufLen, TCHAR* outBuf, unsigned int *outBufLen) { 
    1788   if (algorithm != NSCAPI::xor) { 
    1789     LOG_ERROR(_T("Unknown algortihm requested.")); 
    1790     return NSCAPI::hasFailed; 
    1791   } 
    1792   int inBufLenC = 0; 
    1793   char *inBufferC = charEx::tchar_to_char(inBuffer, inBufLen, inBufLenC); 
    1794   size_t cOutLen =  b64::b64_decode(inBufferC, inBufLenC, NULL, NULL); 
    1795   if (!outBuf) { 
    1796     *outBufLen = static_cast<unsigned int>(cOutLen*2); // TODO: Guessing wildly here but no proper way to tell without a lot of extra work 
    1797     return NSCAPI::isSuccess; 
    1798   } 
    1799   char *cOutBuf = new char[cOutLen+1]; 
    1800   size_t len = b64::b64_decode(inBufferC, inBufLenC, reinterpret_cast<void*>(cOutBuf), cOutLen); 
    1801   delete [] inBufferC; 
    1802   if (len == 0) { 
    1803     LOG_ERROR(_T("Invalid out buffer length.")); 
    1804     return NSCAPI::isInvalidBufferLen; 
    1805   } 
    1806   int realOutLen; 
    1807  
    1808   std::wstring key = settings_manager::get_settings()->get_string(SETTINGS_KEY(protocol_def::MASTER_KEY)); 
    1809   std::wstring::size_type j=0; 
    1810   for (int i=0;i<cOutLen;i++,j++) { 
    1811     if (j > key.size()) 
    1812       j = 0; 
    1813     cOutBuf[i] ^= key[j]; 
    1814   } 
    1815  
    1816   TCHAR *realOut = charEx::char_to_tchar(cOutBuf, cOutLen, realOutLen); 
    1817   if (static_cast<unsigned int>(realOutLen) >= *outBufLen) { 
    1818     LOG_ERROR_STD(_T("Invalid out buffer length: ") + strEx::itos(realOutLen) + _T(" was needed but only ") + strEx::itos(*outBufLen) + _T(" was allocated.")); 
    1819     return NSCAPI::isInvalidBufferLen; 
    1820   } 
    1821   wcsncpy_s(outBuf, *outBufLen, realOut, realOutLen); 
    1822   delete [] realOut; 
    1823   outBuf[realOutLen] = 0; 
    1824   *outBufLen = static_cast<unsigned int>(realOutLen); 
    1825   return NSCAPI::isSuccess; 
    1826 } 
    1827  
    1828 NSCAPI::errorReturn NSAPISetSettingsString(const TCHAR* section, const TCHAR* key, const TCHAR* value) { 
    1829   try { 
    1830     settings_manager::get_settings()->set_string(section, key, value); 
    1831   } catch (...) { 
    1832     LOG_ERROR_STD(_T("Failed to setString: ") + key); 
    1833     return NSCAPI::hasFailed; 
    1834   } 
    1835   return NSCAPI::isSuccess; 
    1836 } 
    1837 NSCAPI::errorReturn NSAPISetSettingsInt(const TCHAR* section, const TCHAR* key, int value) { 
    1838   try { 
    1839     settings_manager::get_settings()->set_int(section, key, value); 
    1840   } catch (...) { 
    1841     LOG_ERROR_STD(_T("Failed to setInt: ") + key); 
    1842     return NSCAPI::hasFailed; 
    1843   } 
    1844   return NSCAPI::isSuccess; 
    1845 } 
    1846 NSCAPI::errorReturn NSAPIWriteSettings(int type) { 
    1847   try { 
    1848     if (type == NSCAPI::settings_registry) 
    1849       settings_manager::get_core()->migrate_to(Settings::SettingsCore::registry); 
    1850     else if (type == NSCAPI::settings_inifile) 
    1851       settings_manager::get_core()->migrate_to(Settings::SettingsCore::ini_file); 
    1852     else 
    1853       settings_manager::get_settings()->save(); 
    1854   } catch (SettingsException e) { 
    1855     LOG_ERROR_STD(_T("Failed to write settings: ") + e.getMessage()); 
    1856     return NSCAPI::hasFailed; 
    1857   } catch (...) { 
    1858     LOG_ERROR_STD(_T("Failed to write settings")); 
    1859     return NSCAPI::hasFailed; 
    1860   } 
    1861   return NSCAPI::isSuccess; 
    1862 } 
    1863 NSCAPI::errorReturn NSAPIReadSettings(int type) { 
    1864   try { 
    1865     if (type == NSCAPI::settings_registry) 
    1866       settings_manager::get_core()->migrate_from(Settings::SettingsCore::registry); 
    1867     else if (type == NSCAPI::settings_inifile) 
    1868       settings_manager::get_core()->migrate_from(Settings::SettingsCore::ini_file); 
    1869     else 
    1870       settings_manager::get_settings()->reload(); 
    1871   } catch (SettingsException e) { 
    1872     LOG_ERROR_STD(_T("Failed to read settings: ") + e.getMessage()); 
    1873     return NSCAPI::hasFailed; 
    1874   } catch (...) { 
    1875     LOG_ERROR_STD(_T("Failed to read settings")); 
    1876     return NSCAPI::hasFailed; 
    1877   } 
    1878   return NSCAPI::isSuccess; 
    1879 } 
    1880 NSCAPI::errorReturn NSAPIRehash(int flag) { 
    1881   return NSCAPI::hasFailed; 
    1882 } 
    1883 NSCAPI::errorReturn NSAPIDescribeCommand(const TCHAR* command, TCHAR* buffer, unsigned int bufLen) { 
    1884   return NSCHelper::wrapReturnString(buffer, bufLen, mainClient.describeCommand(command), NSCAPI::isSuccess); 
    1885 } 
    1886 NSCAPI::errorReturn NSAPIGetAllCommandNames(arrayBuffer::arrayBuffer* aBuffer, unsigned int *bufLen) { 
    1887   unsigned int len = 0; 
    1888   *aBuffer = arrayBuffer::list2arrayBuffer(mainClient.getAllCommandNames(), len); 
    1889   *bufLen = len; 
    1890   return NSCAPI::isSuccess; 
    1891 } 
    1892 NSCAPI::errorReturn NSAPIReleaseAllCommandNamessBuffer(TCHAR*** aBuffer, unsigned int * bufLen) { 
    1893   arrayBuffer::destroyArrayBuffer(*aBuffer, *bufLen); 
    1894   *bufLen = 0; 
    1895   *aBuffer = NULL; 
    1896   return NSCAPI::isSuccess; 
    1897 } 
    1898 NSCAPI::errorReturn NSAPIRegisterCommand(const TCHAR* cmd,const TCHAR* desc) { 
    1899   mainClient.registerCommand(cmd, desc); 
    1900   return NSCAPI::isSuccess; 
    1901 } 
    1902 NSCAPI::errorReturn NSAPISettingsRegKey(const TCHAR* path, const TCHAR* key, int type, const TCHAR* title, const TCHAR* description, const TCHAR* defVal, int advanced) { 
    1903   try { 
    1904     if (type == NSCAPI::key_string) 
    1905       settings_manager::get_core()->register_key(path, key, Settings::SettingsCore::key_string, title, description, defVal, advanced); 
    1906     if (type == NSCAPI::key_bool) 
    1907       settings_manager::get_core()->register_key(path, key, Settings::SettingsCore::key_bool, title, description, defVal, advanced); 
    1908     if (type == NSCAPI::key_integer) 
    1909       settings_manager::get_core()->register_key(path, key, Settings::SettingsCore::key_integer, title, description, defVal, advanced); 
    1910     return NSCAPI::hasFailed; 
    1911   } catch (SettingsException e) { 
    1912     LOG_ERROR_STD(_T("Failed register key: ") + e.getMessage()); 
    1913     return NSCAPI::hasFailed; 
    1914   } catch (...) { 
    1915     LOG_ERROR_STD(_T("Failed register key")); 
    1916     return NSCAPI::hasFailed; 
    1917   } 
    1918   return NSCAPI::isSuccess; 
    1919 } 
    1920  
    1921  
    1922 NSCAPI::errorReturn NSAPISettingsRegPath(const TCHAR* path, const TCHAR* title, const TCHAR* description, int advanced) { 
    1923   try { 
    1924     settings_manager::get_core()->register_path(path, title, description, advanced); 
    1925   } catch (SettingsException e) { 
    1926     LOG_ERROR_STD(_T("Failed register path: ") + e.getMessage()); 
    1927     return NSCAPI::hasFailed; 
    1928   } catch (...) { 
    1929     LOG_ERROR_STD(_T("Failed register path")); 
    1930     return NSCAPI::hasFailed; 
    1931   } 
    1932   return NSCAPI::isSuccess; 
    1933 } 
    1934  
    1935 //int wmain(int argc, TCHAR* argv[], TCHAR* envp[]) 
    1936 TCHAR* copyString(const std::wstring &str) { 
    1937   int sz = str.size(); 
    1938   TCHAR *tc = new TCHAR[sz+2]; 
    1939   wcsncpy_s(tc, sz+1, str.c_str(), sz); 
    1940   return tc; 
    1941 } 
    1942 NSCAPI::errorReturn NSAPIGetPluginList(int *len, NSCAPI::plugin_info *list[]) { 
    1943   NSClientT::plugin_info_list plugList= mainClient.get_all_plugins(); 
    1944   *len = plugList.size(); 
    1945  
    1946   *list = new NSCAPI::plugin_info[*len+1]; 
    1947   int i=0; 
    1948   for(NSClientT::plugin_info_list::const_iterator cit = plugList.begin(); cit != plugList.end(); ++cit,i++) { 
    1949     (*list)[i].dll = copyString((*cit).dll); 
    1950     (*list)[i].name = copyString((*cit).name); 
    1951     (*list)[i].version = copyString((*cit).version); 
    1952     (*list)[i].description = copyString((*cit).description); 
    1953   } 
    1954   return NSCAPI::isSuccess; 
    1955 } 
    1956 NSCAPI::errorReturn NSAPIReleasePluginList(int len, NSCAPI::plugin_info *list[]) { 
    1957   for (int i=0;i<len;i++) { 
    1958     delete [] (*list)[i].dll; 
    1959     delete [] (*list)[i].name; 
    1960     delete [] (*list)[i].version; 
    1961     delete [] (*list)[i].description; 
    1962   } 
    1963   delete [] *list; 
    1964   return NSCAPI::isSuccess; 
    1965 } 
    1966  
    1967  
    1968 NSCAPI::errorReturn NSAPISettingsSave(void) { 
    1969   try { 
    1970     settings_manager::get_settings()->save(); 
    1971   } catch (SettingsException e) { 
    1972     LOG_ERROR_STD(_T("Failed to save: ") + e.getMessage()); 
    1973     return NSCAPI::hasFailed; 
    1974   } catch (...) { 
    1975     LOG_ERROR_STD(_T("Failed to save")); 
    1976     return NSCAPI::hasFailed; 
    1977   } 
    1978   return NSCAPI::isSuccess; 
    1979 } 
    1980  
    1981  
    1982  
    1983 LPVOID NSAPILoader(TCHAR*buffer) { 
    1984   if (_wcsicmp(buffer, _T("NSAPIGetApplicationName")) == 0) 
    1985     return &NSAPIGetApplicationName; 
    1986   if (_wcsicmp(buffer, _T("NSAPIGetApplicationVersionStr")) == 0) 
    1987     return &NSAPIGetApplicationVersionStr; 
    1988   if (_wcsicmp(buffer, _T("NSAPIGetSettingsString")) == 0) 
    1989     return &NSAPIGetSettingsString; 
    1990   if (_wcsicmp(buffer, _T("NSAPIGetSettingsSection")) == 0) 
    1991     return &NSAPIGetSettingsSection; 
    1992   if (_wcsicmp(buffer, _T("NSAPIReleaseSettingsSectionBuffer")) == 0) 
    1993     return &NSAPIReleaseSettingsSectionBuffer; 
    1994   if (_wcsicmp(buffer, _T("NSAPIGetSettingsInt")) == 0) 
    1995     return &NSAPIGetSettingsInt; 
    1996   if (_wcsicmp(buffer, _T("NSAPIMessage")) == 0) 
    1997     return &NSAPIMessage; 
    1998   if (_wcsicmp(buffer, _T("NSAPIStopServer")) == 0) 
    1999     return &NSAPIStopServer; 
    2000   if (_wcsicmp(buffer, _T("NSAPIInject")) == 0) 
    2001     return &NSAPIInject; 
    2002   if (_wcsicmp(buffer, _T("NSAPIGetBasePath")) == 0) 
    2003     return &NSAPIGetBasePath; 
    2004   if (_wcsicmp(buffer, _T("NSAPICheckLogMessages")) == 0) 
    2005     return &NSAPICheckLogMessages; 
    2006   if (_wcsicmp(buffer, _T("NSAPIEncrypt")) == 0) 
    2007     return &NSAPIEncrypt; 
    2008   if (_wcsicmp(buffer, _T("NSAPIDecrypt")) == 0) 
    2009     return &NSAPIDecrypt; 
    2010   if (_wcsicmp(buffer, _T("NSAPISetSettingsString")) == 0) 
    2011     return &NSAPISetSettingsString; 
    2012   if (_wcsicmp(buffer, _T("NSAPISetSettingsInt")) == 0) 
    2013     return &NSAPISetSettingsInt; 
    2014   if (_wcsicmp(buffer, _T("NSAPIWriteSettings")) == 0) 
    2015     return &NSAPIWriteSettings; 
    2016   if (_wcsicmp(buffer, _T("NSAPIReadSettings")) == 0) 
    2017     return &NSAPIReadSettings; 
    2018   if (_wcsicmp(buffer, _T("NSAPIRehash")) == 0) 
    2019     return &NSAPIRehash; 
    2020   if (_wcsicmp(buffer, _T("NSAPIDescribeCommand")) == 0) 
    2021     return &NSAPIDescribeCommand; 
    2022   if (_wcsicmp(buffer, _T("NSAPIGetAllCommandNames")) == 0) 
    2023     return &NSAPIGetAllCommandNames; 
    2024   if (_wcsicmp(buffer, _T("NSAPIReleaseAllCommandNamessBuffer")) == 0) 
    2025     return &NSAPIReleaseAllCommandNamessBuffer; 
    2026   if (_wcsicmp(buffer, _T("NSAPIRegisterCommand")) == 0) 
    2027     return &NSAPIRegisterCommand; 
    2028   if (_wcsicmp(buffer, _T("NSAPISettingsRegKey")) == 0) 
    2029     return &NSAPISettingsRegKey; 
    2030   if (_wcsicmp(buffer, _T("NSAPISettingsRegPath")) == 0) 
    2031     return &NSAPISettingsRegPath; 
    2032   if (_wcsicmp(buffer, _T("NSAPIGetPluginList")) == 0) 
    2033     return &NSAPIGetPluginList; 
    2034   if (_wcsicmp(buffer, _T("NSAPIReleasePluginList")) == 0) 
    2035     return &NSAPIReleasePluginList; 
    2036   if (_wcsicmp(buffer, _T("NSAPISettingsSave")) == 0) 
    2037     return &NSAPISettingsSave; 
    2038  
    2039   LOG_ERROR_STD(_T("Function not found: ") + buffer); 
    2040   return NULL; 
    2041 } 
    2042  
    2043  
     1542 
  • trunk/service/NSClient++.h

    r202 r205  
    3131#include <com_helpers.hpp> 
    3232#include <nsclient_session.hpp> 
     33 
    3334 
    3435/** 
     
    103104  MutexRW  m_mutexRWcmdDescriptions; 
    104105  cmdMap cmdDescriptions_; 
    105   typedef enum log_status {log_unknown, log_debug, log_nodebug }; 
     106  typedef enum log_status {log_unknown, log_looking, log_debug, log_nodebug }; 
    106107  log_status debug_; 
    107108  com_helper::initialize_com com_helper_; 
     
    181182typedef service_helper::NTService<NSClientT> NSClient; 
    182183 
     184extern NSClient mainClient; // Global core instance forward declaration. 
     185 
    183186 
    184187std::wstring Encrypt(std::wstring str, unsigned int algorithm = NSCAPI::xor); 
    185188std::wstring Decrypt(std::wstring str, unsigned int algorithm = NSCAPI::xor); 
    186  
    187 ////////////////////////////////////////////////////////////////////////// 
    188 // Various NSAPI callback functions (available for plug-ins to make calls back to the core. 
    189 // <b>NOTICE</b> No threading is allowed so technically every thread is responsible for marshaling things back.  
    190 // Though I think this is not the case at the moment. 
    191 // 
    192  
    193 LPVOID NSAPILoader(TCHAR*buffer); 
    194 NSCAPI::errorReturn NSAPIGetApplicationName(TCHAR*buffer, unsigned int bufLen); 
    195 NSCAPI::errorReturn NSAPIGetBasePath(TCHAR*buffer, unsigned int bufLen); 
    196 NSCAPI::errorReturn NSAPIGetApplicationVersionStr(TCHAR*buffer, unsigned int bufLen); 
    197 NSCAPI::errorReturn NSAPIGetSettingsString(const TCHAR* section, const TCHAR* key, const TCHAR* defaultValue, TCHAR* buffer, unsigned int bufLen); 
    198 int NSAPIGetSettingsInt(const TCHAR* section, const TCHAR* key, int defaultValue); 
    199 void NSAPIMessage(int msgType, const TCHAR* file, const int line, const TCHAR* message); 
    200 void NSAPIStopServer(void); 
    201 NSCAPI::nagiosReturn NSAPIInject(const TCHAR* command, const unsigned int argLen, TCHAR **argument, TCHAR *returnMessageBuffer, unsigned int returnMessageBufferLen, TCHAR *returnPerfBuffer, unsigned int returnPerfBufferLen); 
    202 NSCAPI::errorReturn NSAPIGetSettingsSection(const TCHAR*, TCHAR***, unsigned int *); 
    203 NSCAPI::errorReturn NSAPIReleaseSettingsSectionBuffer(TCHAR*** aBuffer, unsigned int * bufLen); 
    204 NSCAPI::boolReturn NSAPICheckLogMessages(int messageType); 
    205 NSCAPI::errorReturn NSAPIEncrypt(unsigned int algorithm, const TCHAR* inBuffer, unsigned int inBufLen, TCHAR* outBuf, unsigned int *outBufLen); 
    206 NSCAPI::errorReturn NSAPIDecrypt(unsigned int algorithm, const TCHAR* inBuffer, unsigned int inBufLen, TCHAR* outBuf, unsigned int *outBufLen); 
    207 NSCAPI::errorReturn NSAPISetSettingsString(const TCHAR* section, const TCHAR* key, const TCHAR* value); 
    208 NSCAPI::errorReturn NSAPISetSettingsInt(const TCHAR* section, const TCHAR* key, int value); 
    209 NSCAPI::errorReturn NSAPIWriteSettings(int type); 
    210 NSCAPI::errorReturn NSAPIReadSettings(int type); 
    211 NSCAPI::errorReturn NSAPIRehash(int flag); 
    212 NSCAPI::errorReturn NSAPIDescribeCommand(const TCHAR*,TCHAR*,unsigned int); 
    213 NSCAPI::errorReturn NSAPIGetAllCommandNames(TCHAR***, unsigned int *); 
    214 NSCAPI::errorReturn NSAPIReleaseAllCommandNamessBuffer(TCHAR***, unsigned int *); 
    215 NSCAPI::errorReturn NSAPIRegisterCommand(const TCHAR*,const TCHAR*); 
    216 NSCAPI::errorReturn NSAPISettingsRegKey(const TCHAR*, const TCHAR*, int, const TCHAR*, const TCHAR*, const TCHAR*, int); 
    217 NSCAPI::errorReturn NSAPISettingsRegPath(const TCHAR*, const TCHAR*, const TCHAR*, int); 
    218 NSCAPI::errorReturn NSAPIGetPluginList(int*, NSCAPI::plugin_info*[]); 
    219 NSCAPI::errorReturn NSAPIReleasePluginList(int,NSCAPI::plugin_info*[]); 
    220 NSCAPI::errorReturn NSAPISettingsSave(void); 
    221  
    222189 
    223190////////////////////////////////////////////////////////////////////////// 
Note: See TracChangeset for help on using the changeset viewer.