Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

VB.NET - Access CW DAQ Library

Is there a way to access the CW Daq library functions
in vb.net without placing a control on a form?
Something like

Imports CWDAQControlsLib.CWDIOClass
'or
Imports AxCWDAQControlsLib.AxCWDIO

Public Class clsDAQ
Inherits CWDAQControlsLib.CWDIOClass
End Class

.....
Public mydaq As New CWDAQControlsLib.CWDIO()

.......
mydaq.Channels.Add("Channel1")

Curt
0 Kudos
Message 1 of 2
(6,084 Views)
Hi Curt,

By trying to dynamically load this control, you are sidestepping a few important steps.

First, This ActiveX control must have a certain number of initial references resolved before being used. This occurs automatically when the control is placed on your form. So you will see extensive errors when trying to call functions or set propertys for the control without first resolving these references. There is no published list of these references.

Secondly, you are bypassing the .NET environment's step of automated wrapper(s) generation for ActiveX components. You will notice that the CWDAQControlsLib and AxCWDAQControlsLib references are only visible in solution explorer after you add a control to the form. Without these wrapper DLL's, the
control is virtually useless in the .NET environment.

regards,
Eric Meyer
National Instruments
Message 2 of 2
(6,084 Views)