[plt-scheme] `get-resource' change in Windows

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Oct 20 23:15:30 EDT 2002

While dealing with some reported problems with `get-resource' in
Windows XP, I've changed the interface slightly for extracting registry
values. Previously, only the "default" value associated with an entry
was available. Now, other values can be accessed as well. The `entry'
argument to `get-resource' is now an entry name is combined with a
value name, using backslash as a separator. (To get the default value,
use an empty value name.)

So, for example, the following expression gets a command line for
starting a browser:

 (let ([b (box "")])
   (get-resource "HKEY_CLASSES_ROOT" "htmlfile\\shell\\open\\command\\" b)
   (unbox b))

Previously, the trailing "\\" was not needed.

I'm not entirely certain that this backward incompability is a good
idea. Let me know if you think it isn't.


Posted on the users mailing list.