NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand callling a x64 complied .net dll

Hi,

 

I 'm having troubls calling this DLL,

 

The .net DLL consists of 'DLL import' calls,so the only way i get it work is by compling it with target cpu-x64

 

is ther any simple way to callmy x64 .net DLL from teststand sequence file ??

 

Thanks,

 

0 Kudos
Message 1 of 9
(4,681 Views)

You said:

 

"The .net DLL consists of 'DLL import' calls,so the only way i get it work is by compling it with target cpu-x64"

 

Having to compile as x64 does not logically follow from consisting of dll imports unless those dll imports are for a 64-bit dll. Is that the case?

 

If so I recommend you sign up for the TestStand 2014 beta (which has a 64-bit version):

 

http://forums.ni.com/t5/NI-TestStand/Announcing-the-TestStand-2014-Beta-Program/td-p/2801646

 

On the Windows OS you can only call dlls of a different bitness by hosting such dlls in a separate process and using interprocess communication to make calls between processes. There are many ways to do so, for example, .NET remoting and COM are two possible ways.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 9
(4,656 Views)

Hi dug ,

 

yes,probabely this is the reasson, by the way the dll I import is of NI USB 8451 spi adaptor...

 

 

 

also tried this workaround :http://digital.ni.com/public.nsf/allkb/6E93F273FF350D7E86257996006CBBEC?OpenDocument

 

but i wasnt able to replace 'examplex64.dll' with my x64 dll

 

maybe this should be my solution??

 

 

I will aprriate your quick response..(telephone support has no solutions for me 😞 

 

Thanks,

0 Kudos
Message 3 of 9
(4,642 Views)

 

This is the dll I use : "Ni845x.dll" 

 

0 Kudos
Message 4 of 9
(4,641 Views)

I am not familiar with that dll so do not know its bitness. Yes, the link you posted is a good one for how to call 64-bit dlls from TestStand.

 

If you have visual studio you can run the command line tool:

 

dumpbin /headers mydll.dll | more

 

and see if you see something like the following:

 

FILE HEADER VALUES
            8664 machine (x64)

 

But assuming that dll is an instrument driver dll, I'd be very surprised if there wasn't a 32-bit version of the dll somewhere as well. Often there is both a 32-bit and 64-bit version of such dlls. Perhaps you would have better luck determining that by posting on one of the hardware forums.

 

-Doug

0 Kudos
Message 5 of 9
(4,628 Views)

how can i replace the dll in the example(link) with my x64 dll ?

 

 

 

 

0 Kudos
Message 6 of 9
(4,626 Views)

yes. dumpbin shows it's a 64 bit dll !!

 

so what can i do ?

0 Kudos
Message 7 of 9
(4,601 Views)

@dkjsf77 wrote:

yes. dumpbin shows it's a 64 bit dll !!

 

so what can i do ?


1) Are you sure there isn't a 32-bit version of that dll available? I'd be surprised if there wasn't. The transition to 64-bit is a slow one. In the meantime many things are released with both 32-bit and 64-bit versions.

 

2) If you are sure there is no 32-bit version available then look at the examples in link you posted. It should be possible to call it out of process by following one of those examples.

 

Hope this helps,

-Doug

0 Kudos
Message 8 of 9
(4,598 Views)

found a 32 bit version, 

Solved.

0 Kudos
Message 9 of 9
(4,592 Views)