Skip to main content

CoCreateInstance failed for AcuToNet.IAcuToNet

  • February 23, 2012
  • 5 replies
  • 0 views

[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

5 replies

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • February 23, 2012

[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

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


  • Author
  • Rocketeer
  • 19312 replies
  • February 24, 2012

[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

Hi shjerpe

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

Regards
Steen

  • Author
  • Rocketeer
  • 19312 replies
  • February 24, 2012

[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

Hi shjerpe

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

Regards
Steen

  • Author
  • Rocketeer
  • 19312 replies
  • February 24, 2012

[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

Hi shjerpe

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

Regards
Steen

Stephen Hjerpe
  • Participating Frequently
  • 1100 replies
  • February 24, 2012

[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

Please try this:

regasm20acu /register portal.dll