In using implimens this process into an application, I noticed the following line:
ret = RegSetValue&(lphKey, "shellopencommand", REG_SZ, sKeyValue, MAX_PATH)
did not properly register the association. I am using Windows 98 and had to change the above line to:
ret = RegSetValue&(lphKey, "shell\open\command", REG_SZ, sKeyValue, MAX_PATH)
to get it to work properly.