Altera_Forum
Honored Contributor
13 years agoDriver Crash Problem
I am running Windows XP and I am using Jungo WinDriver to access the Altera PCIe card. Whenever I try to run my software, I get a DLL not found error.
Tracing through the software, I found the problem to be when it tries to initialize the card at software startup. I used Jungo's Driver Wizard to create altera_lib.c DWORD ALTERA_CountCards (DWORD dwVendorID, DWORD dwDeviceID) { WD_VERSION ver; WD_PCI_SCAN_CARDS pciScan; HANDLE hWD = INVALID_HANDLE_VALUE; DWORD dwStatus; WD_LICENSE lic; ALTERA_ErrorString[0] = '\0'; hWD = WD_Open(); <--crash at this line // check if handle valid & version OK if (hWD==INVALID_HANDLE_VALUE) { sprintf( ALTERA_ErrorString, "Failed opening " WD_PROD_NAME " device\n"); return 0; } else { BZERO(lic); strcpy(lic.cLicense,ALTERA_DEFAULT_LICENSE_STRING); dwStatus = WD_License(hWD,&lic); if (WD_STATUS_SUCCESS !=dwStatus) { sprintf(ALTERA_ErrorString,"Could not register license\n"); return 0; } } I took the function above and commented out the entire body and progressively enabled each line until I got to the line indicated above. This calls into windrv.h and the entire program crashs. The card itself is working. I have some code in MATLAB that test writes to a register and that is working properly. What is causing the crash and how do I resolve it? Jason