Calling Windows API function from Navision?

NavDev
Member Posts: 21
hi experts,
is it possible to call Windows API functions from Navision code. If so, a code example would be very welcome.
thanks in advance,
NavDev
is it possible to call Windows API functions from Navision code. If so, a code example would be very welcome.
thanks in advance,
NavDev
0
Comments
-
No you cant call API calls directly from within Navision.
Howerver you can use ActiveX DLL functions from Navision so if you want to make API calls you can create an ActiveX wrapper to achieve this.In a world without Borders or Fences, who needs Windows and Gates?0 -
thanks janpieter for your fast reply!
is there a sample for such an ActiveX wrapper (sourcecode)? we used to have a DLL (programmed in Delphi) called from MS Word that performed specific tasks and then returned a textstring to MS Word. this shall now be done in Navision. I want to reuse the old DLL but - for being new to Navision - have no idea how to do it there.
your help would be appreciated.0 -
I think you can find more info on automation.
Do a search on automation or activex in this or other (4GL languages) forums and im sure you will find plenty of info. There are lot of books as well. Look for a walkthrough that will get you going the fastest.
It is a bit much to explain everything about automation here.In a world without Borders or Fences, who needs Windows and Gates?0 -
you are absolutely right. thanks! hope I'll find my way through it.
kind regards,
NavDev0 -
Well, one last question:
I succeeded in creating the OCX and it works fine when dropped on a Access Basic, VBA or VB form.
However, when assigning a Navision OCX-variable to my OCX and subsequently trying to save the code unit, Navision crashes completely. Are there any limitations to the use of OCX in Navision?
cheers,
NavDev0 -
Hi
I created some OCX in VB6 and it works fine.
An advice: Use the OCX only as a Function or procedure container. If you create the OCX with properties, you can have some compiling errors (I had some problems with the standard properties of VB6).
Bye0 -
hmm cant recall simular problems but i only use activex dll not OCX.In 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