02-17-2011 03:01 PM
I'm trying to construct a Win API call to waveOutGetDevCaps using Call Library Function Node. I know it is possible, but I don't know how to configure the Function Node object.
Here is the VB6 declaration:
Declare Function waveOutGetDevCaps Lib "winmm.dll" Alias "waveOutGetDevCapsA" _
(ByVal uDeviceID As Long, _
lpCaps As WAVEOUTCAPS, _
ByVal uSize As Long) As Long
'/////////////////////////////////////////////////////////////////////////////////////////////
' This Windows API function retrieves the capabilities of a given waveform-audio output device.
' The function uses the following parameters:
' uDeviceID- a long value identifying the waveform-audio output device.
' lpCaps- the user defined variable with information about the capabilities of the device.
' uSize- the size of the user-defined variable used to store information about the
' capabilities of the device.
'////////////////////////////////////////////////////////////////////////////////////////////
lpCaps/WAVEOUTCAPS type is the problem. I don't know how to replicate it in LabView.
This data type has to go in on the lpCaps input to the Call Library Function Node.
Type WAVEOUTCAPS
'///////////////////////////////////////////////////////////////////////////////////////////
' The WAVEOUTCAPS user-defined variable describes the capabilities of a waveform-audio
' output device.
'///////////////////////////////////////////////////////////////////////////////////////////
wMid As Integer ' Manufacturer identifier for the device driver for
' the device. Manufacturer identifiers are defined
' in Manufacturer and Product Identifiers in the
' Platform SDK product documentation.
wPid As Integer ' Product identifier for the device. Product
' identifiers are defined in Manufacturer and Product
' Identifiers in the Platform SDK product documentation.
vDriverVersion As Long ' Version number of the device driver for the device.
' The high-order byte is the major version number, and
' the low-order byte is the minor version number.
szPname As String * MAXPNAMELEN ' Product name in a null-terminated string.
dwFormats As Long ' Standard formats that are supported. See the Platform
' SDK product documentation for more information.
wChannels As Integer ' 1 if the device supports mono or 2 if the device supports
' stereo output.
dwSupport As Long ' Optional functionality supported by the device. See the
' Platform SDK product documentation for more information.
End Type
Thanks,
Noel
02-18-2011 10:14 AM
Noel
What is the type of data being passed in IpCaps? I believe you need a header file to determine this. You may also want to check out this
http://decibel.ni.com/content/docs/DOC-2030
http://zone.ni.com/devzone/cda/epd/p/id/4935
02-21-2011 03:24 PM
You can also see some other peoples response to a similar question here:
this one deals with the same API
http://forums.ni.com/t5/LabVIEW/waveout-dll-help/m-p/287559
Let me know if that works 🙂 happy presidents day!