From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Exception has been thrown by the target of an invocation

Solved!
Go to solution

Hi All,

 

While i am facing following issue :

32 bit vision dll in labview (2015) 32bit in Window7 64 bit (OS Laptop) - No Error

 

32 bit vision dll in labview (2015) 32bit in Window7 64 bit (OS PC) - Exception has been thrown by the target of an invocation

 

Regards,

Saran

Message 1 of 6
(61,643 Views)

I don't understand the problem.  Here's what I think you are saying, but I must be missing something:

  • You have a Desktop PC and a Laptop PC, both with the same version of Windows 7 installed (Windows 7, 64-bit).  I'm assuming both are running the same "level" of Windows, e.g. Windows 7 Pro (or Enterprise, or Home).
  • You have LabVIEW 2015 (32-bit) and the requisite Toolboxes and Drivers installed on both PCs.
  • You are trying to run the same LabVIEW code on both PCs.  Note it is not clear if you are running code from within the LabVIEW Development System or are trying to run a built Application (.exe).

Under the above assumptions, you should have a similar response on both machines (unless, of course, the Laptop is running with 1GB of memory, or something silly like that).  Since your response is different, one or more of my assumptions is wrong.  Please clarify and provide more information (like a more detailed Error Message), maybe even some code for us to test ...

 

Bob Schor

0 Kudos
Message 2 of 6
(61,607 Views)

Hi Bob,

thanks for quick response,

1.

I have created 32bit c# .net dll using visual studio, then I am using it in 32 bit labview 2015 in my Laptop no execrations errors,

working fine !!

 

2. But if I use the same dll in desktop PC with same labview 2015 32 bit .the .net interface in labview shows "Exception has been thrown by target invocation "

(Note : it is working fine with 64bit labview)

 

ACTUALLY I AM GETTING SAME RESPONSE WHILE I AM USING SAME DLL IN VISUAL STUDIO .

 

 

Thats why I am looking is there any setting in PC i need to set /configure ?

 

Thanks

saran

0 Kudos
Message 3 of 6
(61,590 Views)

+  Note : if I create 64bit dll in visual studio and use it in labview 64bit means No error in that Desktop PC !!

0 Kudos
Message 4 of 6
(61,589 Views)
Solution
Accepted by topic author SaranVenkateshS

Do you have both 32-bit and 64-bit LabVIEW installed on your Desktop machine?  

 

I've not tried building DLLs in Visual Studio, so am not 100% certain whether 32-bit LabVIEW "expects" 32-bit or 64-bit external DLLs when running on a 64-bit system.  You might try the slightly-illogical pairing of your LabVIEW code, developed with 32-bit LabVIEW, and the DLL developed with 64-bit VS.

 

Are both the Laptop and Desktop running the same OS?  What OS?  And what "flavor" (e.g. Windows 7 Pro x64, SP1, or Windows 10 Home, Anniversary)?

 

Bob Schor

0 Kudos
Message 5 of 6
(61,581 Views)
Solution
Accepted by topic author SaranVenkateshS

Hi Bob,

My industrial desktop PC has the problem. it is not allowing me to use 32bit Vision DLL and LabVIEW in that 64bit Windows 7 PC.

So I have decided to use 64bit DLL and Labview and its working fine.

 

Note: I tried to follow the following method still having issue 

http://help.cognex.com/Content/KB_Topics/VisionPro/Programming/3948.htm

 

Thank you so much,

 

Saran.

 

 

 

0 Kudos
Message 6 of 6
(61,571 Views)