VXI and VME

cancel
Showing results for 
Search instead for 
Did you mean: 

Abnormal Termination - InitVXIlibrary()

I have written a program in C++ which utilizes NI-VXI for the VXIpc-486 Model 500 controller Release Version 1.4

My program is being compiled in Borland C++ version 3.1 and calls on the functions WSrd and WSwrt as well as a few other word serial protocol functions and so I have #included both nivxi.h and ws.h and given it the path to the directory containing nivxidos.lib

The program compiled with no errors and appeared to run in the debugger but when I ran the executable I got this:

"This application has violated system integrity due to execution of an invalid instruction and will be terminated."

Returning to Borland I stepped through the program and found that the line, ret = InitVXIlibrary(); was causing the problem. The program would run up to this point but would exit upon executing this command. I tried placing a watch on ret but the function didn't even return anything, it just quits. ret is defined as an int16.

The pc is holding only 7424 K RAM and is operating in Windows 3.1 on top of DOS 6.22
0 Kudos
Message 1 of 8
(9,303 Views)
Let me check into this a bit for you. I don't know how much information we'll be able to dig up on such an old system, but let me check and see what we can find. You don't happen to have any kind of NI-SPY software that you could use on your system to catch your function calls, do you?

Logan S.
0 Kudos
Message 2 of 8
(9,288 Views)
I don't have NI-SPY, would that help?
0 Kudos
Message 3 of 8
(9,279 Views)
Now I'm getting a message on the user interface after trying to execute InitVXIlibrary():

Stack overflow!
Null pointer assignment
0 Kudos
Message 4 of 8
(9,278 Views)
Could you tell me more about your setup? Has it worked before? If so, what has changed? If this is a new setup, have you looked for example code to work from? The latest versions of NI-VXI ship with several C examples, but I'm not sure about the older versions. Have you tried simplifying your code to verify that NI-VXI has been installed successfully? Just a few questions, but hopefully they help us get this working.

Logan S.
0 Kudos
Message 5 of 8
(9,269 Views)
OK... I've written a simple program just to test the InitVXIlibrary function, it goes like this:

#define VXIDOS
#include
#include
#include

void main (void)
{
int16 ret;
printf ("Initalizing NIVXI library...");
ret = InitVXIlibrary();
printf ("Done.\n");
ret = CloseVXIlibrary();
}

After running the entire code the user interface displays this:

Initalizing NIVXI library...Null pointer assignment

The program never makes it past the InitVXIlibrary() function.
Do you think a reinstall would do the trick, I'll have to track down the disk but I know I have it.
0 Kudos
Message 6 of 8
(9,259 Views)
sorry... the #includes are ws.h, nivxi.h, and stdio.h
0 Kudos
Message 7 of 8
(9,260 Views)
Well, your method looks good as far as I can tell. Let's go back to your original post - you said you have a "VXIpc-486 Model 500 controller Release Version 1.4". Do you have a part number off that controller? something like 18####x-01? Also, has this set up to worked before? If so what has changed? Have you tried downloading the driver off NI's website and starting with a fresh copy? It could simply be there is some corruption in the file that you are accessing.

NI-VXI Version for DOS/Windows 3.1

Logan S.
0 Kudos
Message 8 of 8
(9,241 Views)