Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting Soundcard
Message
De
15/12/1999 08:47:11
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Detecting Soundcard
Divers
Thread ID:
00303988
Message ID:
00303988
Vues:
67
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform