LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dllimport with different DLLs does not work

Background:
I have two LabView projects to create two different libraries. This two libs I have imported to a
VB.NET /C#.NET application via
 
<DllImport("D:\outgoing\LabView\GetPer\data\GetPer.dll", CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Sub GetPer(ByVal PathToBinary() as Char, _
                                             other parameters ...)
End Sub
 
<DllImport("D:\outgoing\LabView\BS0.1\data\bs0.1.dll", CallingConvention:=CallingConvention.Cdecl)> _
Public Shared Sub BS011(ByVal RootDirectory() as Char, _
                                             other parameters ..., ByRef ErrorCode as Long)
End Sub
 
When I start my .NET application and call Function GetPer or BS011 it is working like expected. Also calling one of these function
several times is working fine.
 
BUT: If I have called one function e.g. GetPer then the other function e.g. BS011 returns immediately without working properly and other way around.
The underlaying vi's does not depend on each other.
 
 
Question:
Is there some option needed during creation of the libraries inside application builder (some special termination command?)?
 
Thanks in advance - and, yes it's urgent! 😉
 
markus
0 Kudos
Message 1 of 2
(2,461 Views)

Hello Markus,

pleas try to realize the following "troubleshooting". I want to find out if the written wrongdoing came from the dll´s or from the integratin of the dll´s in .NET! To check this please try to work with your dll´s in LabVIEW. Try it in a simple code and tell me if the same behviour occures.

In my opinion, the way you realized the programming it must work, but perhaps we overlooked something. And so we have to walk this way. Try to find out if the problem is the dll by itself or the implementing in .NET.

Best wishes

Jan Kniewasser

Applications Engineer

National Instruments

Jan Kniewasser | Applications Engineer | Tel.: +49 89 7413130 | Fax: +49 89 7146035

»
0 Kudos
Message 2 of 2
(2,445 Views)