Subj : Re: Win-98 Registry To : borland.public.cpp.borlandcpp From : Bruce Salzman Date : Mon May 17 2004 12:56 pm > Anyone know a good source of info about accessing the registry (Borland > 5.02, Win-98SE) with example code. I'm fairly good at Borland CPP > generally, but have never tried accessing the regiistry before. Seems > difficult! > > Hope this is the right place, I got no response from OWL so > that must have been the wrong place! While not part of OWL, the "Borland WinSys Library" does define registry classes (\include\winsys\registry.h). Look at winsys.hlp. You can do stuff like this: char buff[256]; char value[512]; uint32 size, type; TRegKey my_key(TRegKey::GetClassesRoot(), "MyClass\\MyKey"); size = sizeof(value); type = REG_SZ; memset(buff, 0, sizeof(buff)); int index = 0; while (my_key.EnumKey(index, buff, sizeof(buff)) == ERROR_SUCCESS){ index++; TRegKey key(my_key, buff); value[0] = 0; size = sizeof(value); if (key.QueryValue("VALUE1", &type, (uint8*)value, &size) == ERROR_SUCCESS){ strcpy(value, "another value"); size = lstrlen(value); type = REG_SZ; key.SetValue("VALUE2", type, (uint8*)value, size); } } HTH, Bruce .