11-07-2005 08:43 PM
11-08-2005 02:31 AM
I installed the N5530S software and am seeing the type-lib information through VB6. Now I could not find any driver help and, I have also found that it is *NOT* an IVI-COM driver but just a custom-made automation library exclusively designed for N5530S system. Of course the COM-access approach is almost the same as if IVI-COM though...
According to the object hierarchy of the N5530S Measuring Receiver library DLL (by seeing it through the VB6 Object Browser), the IAgilentMrTunedRFLevel interface must be queried through:
Application->Measurement->TunedRFLevel
Actually, you must:
(1)QueryInterface the IAgilentMrMeasurement interface through Application's get_Measurement() method's return
(2)QueryInterface the IAgilentMrTunedRFLevel interface through Measurement's get_TunedRFLevel() method's return
(3)then you can access any method of IAgilentMrTunedRFLevel interface.
You can't directly QueryInterface the IAgilentMrTunedRFLevel interface from Application.
Hope this helps.
Makoto
11-08-2005 02:39 AM - edited 11-08-2005 02:39 AM
For example, I check the QueryInterface relationship by VB6's SET statement, which invoked QueryInterface() behind the scene. The code of your problem is equivalent to the last SET statement in the following example. Sorry for writing VB6 equivalent code here instead of LabWindows/CVI code.
Dim app As New AgilentMrApplication
Dim m As IAgilentMrMeasurement
Dim t As IAgilentMrTunedRFLevel
' Succeeds for QueryInterface operation
Set m = app.Measurement
Set t = m.TunedRFLevel
' Generates Type-mismatch error (due to E_NOINTERFACE)
Set t = app
このメッセージは 11-08-2005 05:41 PMに Makoto が編集しています。
11-08-2005 03:03 AM
11-09-2005 12:54 AM