PortableDeviceAPI 1.0 automation in NAV 6.0 R2

Theo_van_de_VenTheo_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!
Theo van de Ven
Technical Consultant | System Administrator

Rainbow Crossmedia BV
Bosmanskamp 63
4191MT Geldermalsen

Comments

Sign In or Register to comment.