From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

VirtualBench

cancel
Showing results for 
Search instead for 
Did you mean: 

protection fault in VirtualBench C-API on niVB_xxx_Close

I use the C-API 17 with a VB-8054 in a Win10 environment. When I try to finally clean up I use

 

   /* Clean up the handles that were initialized. */
   if( dmmHandle != NULL ){
   
   		niVB_DMM_Close(dmmHandle);
   }

   if( psHandle != NULL ){
   
   		niVB_PS_Close(psHandle);
   }
   
   if( libHandle != NULL ){
   
		niVB_Finalize(libHandle);
   }

For the two niVB_ _Close calls I get a protection fault in spite of a valid handle.

0 Kudos
Message 1 of 3
(3,252 Views)

Hi Tklosa,

 

do still have problems with the close calls?

Can you provide more information, what exactly you want to do?

 

Best

0 Kudos
Message 2 of 3
(3,140 Views)

Well, what I try to do is to close the connection to one of the meters inside VirtualBench. This is recommended as far as I see from the examples. Btw, there is not more documentation available. So, writing software using the VirtualBench C-Lib is often a guessing game.

 

However, when I call  the close routine with a valid handle, I get a protection fault in return. For the moment I have commented out this call. I did not observe any contentions when I close the program without closing the interface.

 

Would be good if the VirtualBench could be integrated in CVI as it is done for many other systems.

 

Thanks, Thomas.

 

0 Kudos
Message 3 of 3
(3,135 Views)