summary refs log blame commit diff stats
path: root/src/common/chanopt.h
blob: 90ca86c337fcd0a1ca9a1a587c3fdd409d598d0b (plain) (tree)
1
2
3
4
5
6





                                                                                
int chanopt_command (session *sess, char *tbuf, char *word[], char *word_eol[]);
gboolean chanopt_is_set (unsigned int global, guint8 per_chan_setting);
gboolean chanopt_is_set_a (unsigned int global, guint8 per_chan_setting);
void chanopt_save_all (void);
void chanopt_save (session *sess);
void chanopt_load (session *sess);
class="w"> std::string& keydir, const std::string& key) { HKEY reg_key = NULL; DWORD type; DWORD nbytes; char* result = NULL; //HKEY_CURRENT_USER nbytes = 0; if ( RegOpenKeyEx ( base, keydir.c_str(), 0, KEY_QUERY_VALUE, &reg_key) == ERROR_SUCCESS && RegQueryValueEx (reg_key, key.c_str(), 0, &type, NULL, &nbytes) == ERROR_SUCCESS ) { result = (char*)malloc(nbytes + 1); RegQueryValueEx (reg_key, key.c_str(), 0, &type, (BYTE*)result, &nbytes); result[nbytes] = '\0'; } if (reg_key != NULL) RegCloseKey (reg_key); std::string ret = ""; if (result) { ret = result; } return ret; } void win32_set_registry_value_string(HKEY base, const std::string& keydir, const std::string& key, const std::string& value) { HKEY reg_key = NULL; DWORD nbytes; nbytes = value.length() + 1; if ( RegOpenKeyEx ( base, keydir.c_str(), 0, KEY_QUERY_VALUE, &reg_key) == ERROR_SUCCESS) { RegSetValueEx (reg_key, key.c_str(), 0, REG_SZ, (const BYTE*)(value.c_str()), nbytes); } if (reg_key != NULL) RegCloseKey (reg_key); } #endif