I'm trying to use Registry.vcx from the file section to detect whether a soundcard is installed on a given system, to allow me to play a wave file during heads-down data entry. I looked at the HKey_Local_Machine hive and located a soundcard using the following code snipet:
#DEFINE HKEY_LOCAL_MACHINE -2147483646
#define key_wave_msinfo "system\currentcontrolset\control\mediaresources\Wave\"
set classlib to "c:\winreuse\v1.0\classes\registry.vcx"
lcSomedata = ""
oReg = CreateObject("Registry")
lnError = oReg.GetRegKey("",@lcsomedata,KEY_WAVE_MSINFO,HKEY_LOCAL_MACHINE)
lcSomeData returns "Audio"; lnError = 0
if I use the following instruction:
oReg.GetRegKey("driver",@lcsomedata,KEY_WAVE_MSINFO,HKEY_LOCAL_MACHINE)
lcSomeData returns ""; lnError = 2
if I use the following code:
#define key_wave_msinfo "system\currentcontrolset\control\mediaresources\Wave\es1869.drv<0001>"
oReg.GetRegKey("driver",@lcsomedata,KEY_WAVE_MSINFO,HKEY_LOCAL_MACHINE)
lcSomeData returns "es1869.drv"; lnError = 0
In RegEdit, there is a folder shown below Wave which on 1 machine is es1869 and on another sb16????? with pertinent info available.
On a Win98 system without a soundcard, there is NO folder below Wave.
My question, is "How can I return the name of the folder below \WAVE"?
TIA
Mike