Highlighted
Absent Member.
Absent Member.
2298 views

CoCreateInstance failed for AcuToNet.IAcuToNet

[Migrated content. Thread originally posted on 23 February 2012]

Hi

I have a poblem calling a .NET DLL from within AcuCobol at a customer. I have the exacpt same .DLL and extend programs running on my laptop - works fine.

At the customer I've installed the extend 8.1.2.1 version in the directory C:\Program Files\AcuCorp\Acucbl812. In the same directory I have the netevents.ini file. It contains one line:

D:\Lessor4\System\LifLevel

My .acu programs is located i d:\lessor4\system\liflevel where my .dll also is located.

In the same directory as my programs, I have the portal.xml file. It contains:

<?xml version="1.0" encoding="utf-8" ?><FILESPEC><Assembly>Portal</Assembly> <Module>Portal.dll</Module> <StrongName/><Version>1.0.0.0</Version> <Culture>neutral</Culture> <FilePath>Portal.dll</FilePath> </FILESPEC>

The create statement in my program looks like this:

CREATE "@Portal" NAMESPACE IS "Lessor" CLASS-NAME IS "LifProxy" FILE-PATH IS "d:\lessor4\system\liflevel\portal.xml" HANDLE IS ASSEMBLY-HANDLE.

When executing the CREATE statement, I get an exception. The error description from the call to c$excepinfo gives the error CoCreateInstance failed for AcuToNet.IAcuToNet

Anyone who can help me move on here ?

Regards Steen

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CoCreateInstance failed for AcuToNet.IAcuToNet

Hi Steen,

I believe you need to run this on your customer's machine:

regasm20acu /register /codebase AcuToNet.dll

A Guide to Interoperating with ACUCOBOL-GT
Version 9.0.1 Chapter 5: Working With .NET Assemblies > 5.5 Calling .NET from COBOL > 5.5.1 Using .NET assemblies in COBOL > 5.5.1.2 CoCreate Instance Failed Error

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: CoCreateInstance failed for AcuToNet.IAcuToNet

Hi shjerpe

I did runt the regasm20acu /register /codebase AcuToNet.dll command, but that didn't help 😕

Regards
Steen
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: CoCreateInstance failed for AcuToNet.IAcuToNet

Please try this:

regasm20acu /register portal.dll
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.