5 void BailOut (char * msg)
13 KeySet * myConfig = ksNew(0);
17 /* Open the Key Database */
18 if ((h = kdbOpen()) != 0)
19 BailOut ("Could not open Key Database");
21 /* Get myapps keyset */
22 if (kdbGetByName(h, myConfig, "/examples", 0 ) == -1)
23 BailOut ("Could not get Keys");
25 /* Find the key in the keyset */
26 if ((myKey = ksLookupByName (myConfig, "/examples/key", 0)) == NULL)
27 BailOut ("Could not Lookup Key");
29 /* Get the value of the key */
30 if ((myValue = (char*) keyValue (myKey)) == NULL)
31 BailOut ("Could not get Keyvalue");
33 /* Actually print the key */
34 printf ("%s\n", myValue);
35 /* Close the Key database */