Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't find my USB-8451 in C

Hi

 

I'm simply trying to find the USB-8451 using this simple C code. But all I get back is "-301713", which corresponds to Invalid Parameter. Could someone please tell me what I'm doing wrong?

 

 

#include <windows.h>
#include <stdio.h>
#include <ni845x.h>

typedef unsigned int uint32;
typedef char         int8;
typedef long         int32;

int8 *pStatusString;
int32 status;
char *pFirstDevice;
uInt32 *pFindDeviceHandle;
uInt32 *pNumberFound;

int main(void)
{
	status = ni845xFindDevice(pFirstDevice,pFindDeviceHandle,pNumberFound);
	printf("Status: %d\n", status);

	getchar();
}

 

 

0 Kudos
Message 1 of 3
(3,684 Views)

Hi Did you get the answer?

I got the same question now:mansad:

0 Kudos
Message 2 of 3
(3,484 Views)

Hi I found out the question.

 

 

 

int32 status = 0;

char pFirstDevice[50];

uInt32 pFindDeviceHandle;

uInt32 pNumberFound;

 

status = ni845xFindDevice( pFirstDevice, &pFindDeviceHandle, &pNumberFound);

 

0 Kudos
Message 3 of 3
(3,478 Views)