Highlighted
Contributor.
Contributor.
795 views

AcuGTClass - error in .Initialize()

[Migrated content. Thread originally posted on 14 March 2012]

Hello!

We have for a time used AcuGTClass to call one of our Cobol program from C#. This is working, and is in use at customers place. I have also had it up and running earlier.

Since last time, I have reformatted my machine, from Windows Vista 32-bit to Windows 7 64-bit.
We have also changed AcuCobol, now we run on version 9.1.0. Earlier I ran on 8.1.3.

Creating the class (m_acuCobol = new AcuGTClass();) runs correct. No error, and it reflects the path to the runtime / AcuGt.exe from GENESIS_HOME (I guess).

But when executing the initialization (int result = m_acuCobol.Initialize(ref initParamsObject); ) it returns the error code -2147023170.
initParamsObject holds the parameters to the start, and is:
"-c C:\temp\POS\acuconfPOS.txt -y PosToVc"
I have checked that AcuGt.exe is in fact in the folder that is reflected in the class. I have checked that the config file really is in the folder specified in "initParamsObject". I have also checked that the CODE_PREFIX in the config file is correct. And, of course, I have checked that "PosToVc" in fact is in the path specified in CODE_PREFIX.

As mentioned, this have worked before.
What is wrong now?

I would be grateful for tips here.

Regards Dagl
0 Likes
2 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: AcuGTClass - error in .Initialize()

I am not sure what the issue is, however since you went from a 32 bit to 64 bit machine, here is what I would checkout: On the 32 bit machine the runtime would be in C:\Program Files whereas on the 64 bit machine, the 32 bit runtime is in C:\Program Files .... one other difference I can think of, in the 9.x series the licenses are located in C:\ProgramData ... you may weant to copy the appropriate runtime license to the 9.x bin directory and see if that resolves the issue. There are different licenses for the 32 bit runtime and the 64 bit runtime so make sure you are using the one you want and that you have a valid license for it.
0 Likes
Highlighted
Contributor.
Contributor.

RE: AcuGTClass - error in .Initialize()

I dont know what have happened. But I did some changes, and suddenly it worked.
I can share my experiences:

When debugging in C# code, I noticed that the property "Full Name" for the object (AcuGtClass) had a path to the latest installed Acu version. That is, for my case, 9.1.0.
But the .dll file that once was created, and that is referenced, is in version 8.1.0. I thought this was strange. I then tried to delete the reference, and add the 9.1.0 version instead. But this was a completely different class, with different properties and methods.

I registered a Acu version 8.1.0 on my machine again. I had the files there, but it was not installed. Then, I removed the new reference and added a reference to the 8.1.0 version of the COM object. Then I built, and then the property "Full name" was pointing to mye 8.1.0 version again. Then, it worked.

I get a bit worried over this, of two reasons:
1. if installing the new version makes the reference point to the new path, and the dll still is the old, this could cause problems for our customers.
2. The class for the COM object of version 9.1.0 seems to be different than the prevoius. This means that the C# code must be rewritten.

I have not presented this two matters for AcuCobol support team yet, as I have not had the time. But if they get confirmed, I think I have a problem....

Regards
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.