Using third party DLL / problem creating instance

tvandongen
Member Posts: 78
I need to make a form within NF, which will be used to send data to industrial printers. For this we have a demo version (full version, but not yet paid) to test if this is possible.
I also got an example of Visual Basic in which is detailed described how it can be done using COM / DCOM.
Problem is that I don't have experience with Visual Basic and never has done anything with COM / DCOM.
I have almost been able to get the sample program running using the Visual Basic editor from Word 2000. Got some minor problems but that I can solve, but when I compile only the declariation of the DLL's I don't get any error.
If I try to translate the functions to Navision, then I get an error on most of the automation servers I declare (some of the Automation Servers don't give the error). The error I get is "....Could not create an instance of the OLE control) at the moment I use the create(AUvariable) function.
I tried it on NF 2.60A (our current version) and on NF 3.60 (Cronus database, W1 version of this site), and got the same error on both situations.
If I try to manually add the DLL using Extra --> Custom Controls, Navision performes an illegal windows operation and closes. (maybe because the name of the DLL is CLCLIENT.EXE in stead of *.DLL or *.OCX???)
Does anybody know what is the best way of going further:
- Call my third party supplier and tell them their program is faulty (or at least missing some parts ?)
- Create a program in the Visual Basic editor of Word and call that with a macrofunction, which will be called from NF (how complex can we make it ?)
- Accept that I can't use these controls in NF in any way (really hate to do that)
- Any other suggestions ?
I also got an example of Visual Basic in which is detailed described how it can be done using COM / DCOM.
Problem is that I don't have experience with Visual Basic and never has done anything with COM / DCOM.
I have almost been able to get the sample program running using the Visual Basic editor from Word 2000. Got some minor problems but that I can solve, but when I compile only the declariation of the DLL's I don't get any error.
If I try to translate the functions to Navision, then I get an error on most of the automation servers I declare (some of the Automation Servers don't give the error). The error I get is "....Could not create an instance of the OLE control) at the moment I use the create(AUvariable) function.
I tried it on NF 2.60A (our current version) and on NF 3.60 (Cronus database, W1 version of this site), and got the same error on both situations.
If I try to manually add the DLL using Extra --> Custom Controls, Navision performes an illegal windows operation and closes. (maybe because the name of the DLL is CLCLIENT.EXE in stead of *.DLL or *.OCX???)
Does anybody know what is the best way of going further:
- Call my third party supplier and tell them their program is faulty (or at least missing some parts ?)
- Create a program in the Visual Basic editor of Word and call that with a macrofunction, which will be called from NF (how complex can we make it ?)
- Accept that I can't use these controls in NF in any way (really hate to do that)
- Any other suggestions ?
0
Comments
-
CLClIENT.exe is probably a DCOM automation library. Navision can't just use that as is. You need to create a wrapper.
This is best done in Visual Basic 6. Start an activx dll project. I reccomend you buy a book how to create an activx dll.In a world without Borders or Fences, who needs Windows and Gates?0 -
Hi
I Agree !
The best solution ist create an DLL or OCX (I prefer this option because has less conflicts with Navision).
I use this for create an communication componet to retrieve information from a Truck bascule (to weigh the truck, I don't know if "Bascule" is used in English but I don't find the translation from Spanish)
It work fine
Bye0 -
The word is familiar in dutchIn a world without Borders or Fences, who needs Windows and Gates?0
-
Janpieter,
Can you explain what a wrapper is ?
Do you know a good book for creating an activx dll. (Dutch if possible).
Thanks.0 -
A wrapper dll is a dll that enables in this case navision to communicate with a component navision is normally not able to communicate with.
Navision is a product with limitations so you have to build something between navision and the component so navision can use this component through the wrapper.
When you create a wrapper DLL you try to program the DLL with the exact same subroutines, properties and events and the same parameters then your component. The only thing those subroutines/properties/events do in your wrapper is pass the request to your component and backwards to navision.
I don't have references for books. I'm not a walkthrough guy. My source is MSDN but that is not in dutch and a not really a walkthrough. Though i think there have been written a lot of good books have a look at www.bol.com (oops are commercials allowed here :roll: ). Good Dutch books however i think are hard to find.
Jan-PieterIn a world without Borders or Fences, who needs Windows and Gates?0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K 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
- 320 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