Hi
I'm trying to use the interrupt feature of the device but I don't appear to be able to initialise the interface using the code below
I get an error 87 from the call to DeviceIoControl. Could you please tell me where I'm going wrong Thanks
Code
- DWORD vl_IRQ = 7;
- DWORD vl_SysIntr;
- HANDLE vl_Event = CreateEvent(NULL, FALSE, FALSE, NULL);
- HANDLE vl_IOPort = CreateFile( _T("DIO1:"), GENERIC_WRITE | GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
- // Configure the interrupt
- if(DeviceIoControl(vl_IOPort, IOCTL_DIO_REQUEST_SYSINTR, &vl_IRQ, sizeof(DWORD), &vl_SysIntr, sizeof(DWORD), NULL, NULL ) )
- {
- if(InterruptInitialize(vl_SysIntr, vl_Event, NULL, 0 ))
- {
- InterruptDone(vl_SysIntr);
- }
- }