I have a LotusScript agent that runs after new mail arrives. The agent returns:
err 208 Cannot create automation object
when enabled on the server, but runs fine when changed to run from the menu on selected docs using the Notes client.
Dim oImage As Variant
Dim oProcess As Variant
Dim lngH As Long, lngW As Long
'Build the object -- works from Notes client but not from server agent...
Set oImage = CreateObject("WIA.ImageFile")
'load it
oImage.LoadFile sFileName
lngH = oImage.Height
lngW = oimage.Width
The error occurs when trying to CreateObject("WIA.ImageFile")
The wiaaut.dll file resides in the domino\data directory -- as well as the notes\data directory. I am not sure if or how any permissions may need to be set.
The LotusScript agent is signed with an ID listed in a Group in the Domino Directory that is listed in the Server doc to
Sign or run unrestricted methods and operations
And the Security for the agent is set to
- Allow restricted operations with full administrator rights.
This signing ID is working well with other agents performing restricted operations.
I think the error is specific to the WIA object. Any thoughts?
If it runs in the client, it must be using a 32 bit DLL (as per the comment by @FruitySoup). That same DLL can't work from 64 bit code.
Also, createObject relies on registry entries. AFAIK, dropping it in the data directories shouldn't actually make any difference. On my 64 bit machine, registry entries are found in HKEY_CLASSES_ROOT\WIA.ImageFile, HKEY_LOCAL_MACHINE\ SOFTWARE\Classes\WIA.ImageFile, HKEY_CLASSES_ROOT\Wow6432Node\CLSID{long id here}\InProcServer32. Those keys pretty clearly indicate that it is 32 bit software.