Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

niSwitch.vb Warnings

I posted a question about the warnings I get in Measurement Studio v8.1.2 when writing an application using the niSwitch.vb wrapper.  For this application I'm writing now, I get 38 warnings:
 

Warning 1 XML comment parameter 'Instrument_Handle' does not match a parameter on the corresponding 'sub' statement. XML comment will be ignored. C:\Documents and Settings\georgep9164\My Documents\Visual Studio Projects\PXI Test\PXI Test\niSwitch.vb 85 8 PXI Test

 
When you look at the code in the niSwitch.vb module, you see:
 


'''
</param>

'''<param name="Instrument_Handle">

'''A particular NI-SWITCH session established with niSwitch_InitWithTopology, niSwitch_InitWithOptions, or niSwitch_init and used for all subsequent NI-SWITCH calls.

'''</param>

Public Sub New(ByVal Resource_Name As String, ByVal ID_Query As Boolean, ByVal Reset_Device As Boolean)

MyBase.New

Dim pInvokeResult As Integer = PInvoke.init(Resource_Name, System.Convert.ToUInt16(ID_Query), System.Convert.ToUInt16(Reset_Device), Me._handle)

PInvoke.TestForError(

Me._handle, pInvokeResult)

Me._disposed = false

End Sub


 

where the parameter Instrument_Handle is the 4th parameter specified in the XML doc's... yet the actual SUB declaration only has 3 arguments.

While these warnings do not appear to cause a problem in the application execution, they are annoying.  To the NI people who might read this... Can this be corrected?  What is the purpose of this 4th parameter?

I could go into niSwitch.vb and remove the 4th parameter from all the Sub declarations, but this is something that NI should clean up.

 

Thanks!

0 Kudos
Message 1 of 4
(3,173 Views)

I've now added the niDMM.vb wrapper module to my project so that I am using both the niSwitch and niDMM wrappers.  niDMM actually gives more warnings than the niSwitch wrapper.  Now I have so many warnings from the two wrappers that I'm now getting an "Warning 1 Maximum number of warnings has been exceeded. " warning.

I suppose that I could go into the two wrappers and edit out the 4th parameter, but I really do not want to modify the NO wrappers.  NI should be doing this themselves to correct the problem.

NI... How do we go about resolving this problem?

0 Kudos
Message 2 of 4
(3,167 Views)
Hi psgeorge,

I ran into the same behavior you did with the wrappers posted on the website. However, I then re-generated the wrappers using the Measurement Studio Instrument Driver Wizard and then the switch wrapper didn't have any warnings and the DMM wrapper just had 9 warnings. So your best bet is to rebuild the wrappers using that tool.  Refer to the help topic Calling Instrument Drivers from .NET Languages in the NI Measurement Studio Help. The fp files are located in the Program Files\IVI\Driver folder.

Hope this helps!

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 3 of 4
(3,156 Views)

Jonathan,

Thanks for the reply.  I will take a look at your approach.  I still will not be overly happy with the remaining warnings, but at least the number is more manageable.  I still believe that this issue should be looked at by NI and the problem corrected properly.  I think I'll make a support call.  I'll post here if I get a good answer.  Thanks again for your response!

0 Kudos
Message 4 of 4
(3,148 Views)