PortableDeviceAPI 1.0 automation in NAV 6.0 R2

Theo_van_de_Ven
Member Posts: 22
Hi,
For one of our customers I need to write a new codeunit that controls a camera attached to a NAV 6.0 R2 Windows Classic Client. I need to be able to take pictures and attach the picture taken to an Item in Navision. Previously this was done with a codeunit that used the WIA drivers. The NAV 6.0 R2 Windows Classic Client was running on Windows XP and the camera used was a Canon Powershot S3. This worked okay. After replacing the desktop with a Windows 7 Operating System this is no longer working.
I searched the web and found out that WIA drivers are no longer supported for Windows Vista and higher. You need to use the WPD drivers instead.
So I created a new codeunit. The only thing I did was to define a global variable of type automation with subtype being ''PortableDeviceApi 1.0 Type Library'.PortableDeviceManager'.
The following code is present in the codeunit:
IF ISCLEAR(GautPortableDeviceMgr) THEN
CREATE(GautPortableDeviceMgr,FALSE);
When I run the codeunit I get an Error 33 in module 35 errror.
If I do exactly the same in NAV 2013 R2 there are no errors.
Does anyone know if I should be able to use the PortableDeviceApi in NAV 6.0 R2 or is it only usable from NAV 7 and higher?
Also alternative solutions are more than welcome!
For one of our customers I need to write a new codeunit that controls a camera attached to a NAV 6.0 R2 Windows Classic Client. I need to be able to take pictures and attach the picture taken to an Item in Navision. Previously this was done with a codeunit that used the WIA drivers. The NAV 6.0 R2 Windows Classic Client was running on Windows XP and the camera used was a Canon Powershot S3. This worked okay. After replacing the desktop with a Windows 7 Operating System this is no longer working.
I searched the web and found out that WIA drivers are no longer supported for Windows Vista and higher. You need to use the WPD drivers instead.
So I created a new codeunit. The only thing I did was to define a global variable of type automation with subtype being ''PortableDeviceApi 1.0 Type Library'.PortableDeviceManager'.
The following code is present in the codeunit:
IF ISCLEAR(GautPortableDeviceMgr) THEN
CREATE(GautPortableDeviceMgr,FALSE);
When I run the codeunit I get an Error 33 in module 35 errror.
If I do exactly the same in NAV 2013 R2 there are no errors.
Does anyone know if I should be able to use the PortableDeviceApi in NAV 6.0 R2 or is it only usable from NAV 7 and higher?
Also alternative solutions are more than welcome!
Theo van de Ven
Technical Consultant | System Administrator
Rainbow Crossmedia BV
Bosmanskamp 63
4191MT Geldermalsen
Technical Consultant | System Administrator
Rainbow Crossmedia BV
Bosmanskamp 63
4191MT Geldermalsen
0
Comments
-
In the following post a suggestion is made to reinstall the client. You could give it a try.
http://www.mibuso.com/forum/viewtopic.php?t=3113
Tino Ruijs
Microsoft Dynamics NAV specialist0
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