42,8 → 42,6 |
#include <pcivme_ni_NT.h> |
#include <Klist.h> |
|
#include <stdio.h> |
FILE *vmefp; |
//------------------------------------------------------------------------------------------- |
// DEFINES |
// |
102,9 → 100,9 |
char *ptr = buffer; |
|
if (cszDeviceName == NULL) |
strcpy_s(buffer, 255 , DEFDEVICENAME); |
strcpy(buffer, DEFDEVICENAME); |
else |
strcpy_s(buffer, 255 , cszDeviceName); |
strcpy(buffer, cszDeviceName); |
|
while (*ptr) ptr++; |
|
131,9 → 129,8 |
{ |
OPEN_PATH *open_path; |
DWORD DIOC_count; // count of returned bytes of DeviceIoControl |
DWORD result = 0; |
vmefp = fopen("pcivme_ni.log","w"); |
fprintf(vmefp, "VMEinitNT\n"); |
DWORD result; |
|
if (liPathList == NULL) // create a list to hold the paths and its variables |
{ |
liPathList = List_Create(); |
177,15 → 174,11 |
NULL, |
0, |
&DIOC_count, |
NULL); |
|
NULL); |
|
if (!result) |
{ |
|
result = GetLastError(); |
fprintf(vmefp, "DeviceIoControl result=%d\n", result); |
fclose(vmefp); |
CloseHandle(open_path->nHandle); |
removeListElement(open_path); |
return result; |
197,10 → 190,7 |
} |
else |
{ |
|
result = GetLastError(); |
fprintf(vmefp, "CreateFile error result=%d %s\n", result, DeviceName(cszDeviceName, nVMEMM)); |
fclose(vmefp); |
removeListElement(open_path); |
return result; |
} |