Subversion Repositories f9daq

Compare Revisions

Ignore whitespace Rev 41 → Rev 42

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