How to use external dll in nav 2013?
arcull
Member Posts: 191
Hi there. I would like to know what are the options of using external dlls in from NAV 2013. I have 3 cases:
1) a single classic dll with public symbols exported
2) a classic dll with corespoding import library file
3) a dll which is a com object (the ones we registered as automations in previous versions of NAV)
So the question are:
1) Can I call a dll method via dotnet interop (s sample code would be very nice)?
2) If the dll has a method which shows some gui interface, how will this run on service tier? It should run on client somehow...
Much thanks for your help.
1) a single classic dll with public symbols exported
2) a classic dll with corespoding import library file
3) a dll which is a com object (the ones we registered as automations in previous versions of NAV)
So the question are:
1) Can I call a dll method via dotnet interop (s sample code would be very nice)?
2) If the dll has a method which shows some gui interface, how will this run on service tier? It should run on client somehow...
Much thanks for your help.
0
Comments
-
Hi @arcull
1. yes you can for example look here http://www.dynamics.is/?p=1297
2. no, if the dll includes gui it must be used on pages and therefore is not available to the server http://www.dynamics.is/?p=1311________________________________
Gunnar Gestsson
Microsoft Certified IT Professional
Dynamics NAV MVP
http://www.dynamics.is
http://Objects4NAV.com0 -
Thanks thegunzo, but if I'm not wrong the link for dll usage you provided, is using a dedicated add-in dll like http://msdn.microsoft.com/en-us/library/dd983804.aspx. Suppose I have a third party classical dll with public symbols exported, how do I use it? Much thanks again.0
-
According to MSDN you can create and use any .dll file by either registering it as a Global Library or by just putting it in the installation folder of NAV.
I've tried it myself and seems to be working (no SN signing needed or anything).
Here is a detailed guideline on how to do this:
MSDN .NET Guide0 -
Thanks Bloodsteel, but this is again an example of .net dll usage. What if I have C++ standard library not dotnet based, how do I used it in NAV? Much thanks again.0
-
NAV does not support use of native dlls. You can use native COM objects on the client but it's strongly recommended to use managed code only. If you have an unmanaged dll, you can wrap this dll into a managed assembly using pinvoke and load the managed interface using the DotNet object type. Please notice that the use of unmanged dll's tends to add instability to the system and you can risk that your application will be unstable. External components using any kind of GUI are not supported on the server. If custom GUI is required, the interface should be implemented using the Client extensibility add-in system that ensures a proper UI interaction with the NAV client._________________
Niels-Henrik Sejthen
Senior Software Developer
Microsoft Dynamics NAV
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.0 -
Thanks nhsejth for clarifying this. So the only option that remains is to write a wrapper dll in dotnet for the native dll I have, but I can forget about displaying any gui
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions