Guidance
指路人
g.yi.org
software / RapidQ / Examples / Devices / Sound Card / Get Sound Card Info.bas

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
     TYPE WaveInCaps
      ManufacturerID AS SHORT 'wMid
      ProductID AS SHORT 'wPid
      DriverVersion AS LONG 'MMVERSIONS vDriverVersion
      ProductName AS STRING * 32 'szPname[MAXPNAMELEN]
      Formats AS LONG
      Channels AS SHORT
      Reserved AS SHORT
     END TYPE

     DECLARE FUNCTION waveInGetNumDevs LIB "winmm" ALIAS "waveInGetNumDevs" () AS LONG
     DECLARE FUNCTION waveInGetDevCaps LIB "winmm.dll" ALIAS "waveInGetDevCapsA" _
      (uDeviceID AS LONG, lpCaps AS WAVEINCAPS, uSize AS LONG) AS LONG

     DIM Caps AS WaveInCaps
     DEFINT structSize
     structSize = SIZEOF (Caps)
     SHOWMESSAGE(STR$(structSize))
     waveInGetDevCaps 0, Caps, StructSize

     CREATE Form AS QFORM
      CAPTION = "Form1"
      Width = 320
      Height = 240
      Center
      CREATE Label1 AS QLABEL
       CAPTION = "NumDevs: " + STR$(waveInGetNumDevs)
       Left = 0
       Top = 0
       Width = 312
       Height = 20
       Transparent = 1
      END CREATE
      CREATE Label2 AS QLABEL
       CAPTION = "Manufacturer id: " + STR$(Caps.ManufacturerID)
       Left = 0
       Top = 21
       Width = 312
       Height = 20
       Transparent = 1
      END CREATE
      CREATE Label3 AS QLABEL
       CAPTION = "ProductID: " + STR$(Caps.ProductID)
       Left = 0
       Top = 42
       Width = 312
       Height = 20
       Transparent = 1
      END CREATE
      CREATE Label4 AS QLABEL
       CAPTION = "DriverVersion: " + STR$(Caps.DriverVersion)
       Left = 0
       Top = 63
       Width = 312
       Height = 20
       Transparent = 1
      END CREATE
      CREATE Label5 AS QLABEL
       CAPTION = "ProductName(1 To 32): " + Caps.ProductName
       Left = 0
       Top = 84
       Width = 312
       Height = 20
       Transparent = 1
      END CREATE
     END CREATE

     Form.SHOWMODAL
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Mon 2018-6-25  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-19 07:45:20