LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error when calling a Dll with point

Hi there,  I try to call  function with below function, somehow it doesn't work well.

I enclose vi in attachment, please check if any wrong when I create it, thanks in advance.

 

Function source:

=====================

MXEIO_Connect(
char * szIP,
WORD wPort,
DWORD dwTimeOut,
int * hConnection );

======================

 

Did I put wrong format in handle "hConnection"? I set it as a format " point" ,  return value, however, is still wrong .

0 Kudos
Message 1 of 6
(2,693 Views)

Did I put wrong format in handle "hConnection"? I set it as a format " point" ,

> return value, however, is still wrong .

 

Try "Signed Pointer-sized Integer" for data type.

Untitled.png

 

 

George Zou
0 Kudos
Message 2 of 6
(2,680 Views)

Thank you for your advice, I follow the change you advice and it doesn't work

 

the original function like below

========================================================

MXEIO_E1K_tpfConnect(char *, WORD, DWORD, int *, char *); 

======================================================= 

0 Kudos
Message 3 of 6
(2,637 Views)

Looks like you forgot the last parameter: char *

 

 

George Zou
0 Kudos
Message 4 of 6
(2,633 Views)

Because vi wrap a shell around the funtion with char.

 

I update VI according to original funtion, pls help to check, thanks

0 Kudos
Message 5 of 6
(2,630 Views)

Because vi wrap a shell around the funtion with char.

What?

 

Is the last parameter (password) an input ?

An empty password ?

You didn't provide enough info to determind if the calling convention should be stdcall or C.  Can you post the header file?

 

 

George Zou
0 Kudos
Message 6 of 6
(2,601 Views)