PDA

View Full Version : Cannot get data from (default) registry key value


Jeff_Rossiter
12-27-2003, 03:40 AM
Hi All

Using Registry.GetValue I can get data from other REG_SZ values (ThreadingModel) in a sub key (InprocServer32) but not from the "(Default)" value.

Will appreciate help - there must be a simple explanation.

Thanks

Brett
12-29-2003, 12:57 PM
Just send through an empty string to get the default value of the key:

strData = Registry.GetValue(HKEY_CLASSES_ROOT,".am5","");
Dialog.Message("Result",strData);

Jeff_Rossiter
12-30-2003, 05:00 AM
Works like a charm!

Thanks, Brett