Troubleshooting
Problem
Running a custom .NET Taskmaster action results in batch aborting with RRS log message "couldn't load needed object"
Symptom
Batch logging will state something similar to the following:
Error (385875972=hex:17000004). In CCom::Call: Couldn't load needed object: Datacap.Libraries.vScanSample.Actions into Datacap.Libraries. vScanSample.Actions instance [api source:]
Cause
This issue can occur if the .NET action components are not installed properly.
Resolving The Problem
Register the generated DLL in an appropriate path.
The following example applies when you use the vScanSample .NET template actions that available from the IBM Datacap Taskmaster Capture 8.0.1 Publication Library. When you compile the project, you generate new files, including interop DLL's: vScanSample.dll, vScanSample.tlb and vScanSample.pdb. Place vScanSample.dll into \Datacap\dcshared\NET and register it using regasm.exe and the /codebase flag:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>RegAsm.exe C:\Datacap\dcshared\NET\vScanSample.dll /codebase
Note: Datacap V9.0.0 and later versions use .NET Framework V4 to register DLLs.
Re-run the actions when finished to confirm the solution.
Note: If the problem persists with a more customized project then unregister the main DLL and place it into a sub-folder along with all other compiled components (interops, main DLL and TLB file). Re-register vScanSample.dll using regasm.exe and the /codebase flag before reprocessing; the set of files specific to the project can be isolated afterward.
If creating a custom module, check that it is COM visible in project properties (Make assembly COM-Visible) and that the class contains an appropriate constructor.
[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSZRWV","label":"IBM Datacap"},"Component":"Not Applicable","Platform":[{"code":"PF033","label":"Windows"}],"Version":"All versions","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Was this topic helpful?
Document Information
Modified date:
26 March 2020
UID
swg21570537