Highlighted
New Member.
1785 views

Invalid Class String CO_E_CLASSSTRING error after new OS install

My working environment: a new install of Windows 10, extend 10.0.0, Visual Studio 2013, .NET Framework 4, 64-bit OS but coding for 32-bit, executing from AcuBench.

I have been working with this particular project since September.  I have a Visual Studio project that is called from COBOL.  It was working fine, until a couple of weeks ago.  I had been running Windows 7 upgraded to Windows 10.  My hard drive had problems, and I had to wipe it and reinstall everything, so now I have a clean install of Windows 10.  My data files were saved, so I was able to copy them back into my working environment.  Since the rebuild, I have gotten the dreaded "Invalid Class String" error. 

I had previously built the AmortControl sample project, because it has objects similar to what I was trying to do in my project.  It also had been working fine in my former environment.  So as a test, I rebuilt AmortControl, and it also has the error occur now.  This leads me to think that I don't have something set correctly in my environment.  I have tried running RegAsm20acu, RegAsm40acu, and Marshal.  None of these had any effect in getting rid of the error.  I have found information on these EXE files only in this forum, and most of that is way before Windows 10 and extend 10.0.0.  The AmortControl DLLs are copied into Micro Focus\extend 10.0.0\AcuGT\bin where the runtime is.  Note that I rebuilt/recompiled the source files for AmortControl, in both the former environment and the current.

Has anyone had a similar experience, but figured out how to get past the error?

0 Likes
5 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Invalid Class String CO_E_CLASSSTRING error after new OS install

Just to verify, you tried both of these:
\acucbl\bin\marshal.exe /RegServer
regasm20acu /register /codebase AcuToNet.dll

0 Likes
Highlighted
New Member.

RE: Invalid Class String CO_E_CLASSSTRING error after new OS install

Yes, sort of. I was not able to run regasm20acu. I got an error message saying that the DLL was not a valid .NET assembly--nothing was loaded. So I ran regasm40acu, and that was successful--the output said the types were loaded. However, it did not eliminate the invalid class string error when running my project, or the AmortControl project. For half a second, I thought that I might not have NET Framework 2 enabled, due to the rebuild. But I checked the registry, and it is there, as well as 3.5 and 4.
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Invalid Class String CO_E_CLASSSTRING error after new OS install

Is the amortcontrol.dl in the runtime bin directory?
0 Likes
Highlighted
New Member.

RE: Invalid Class String CO_E_CLASSSTRING error after new OS install

Yes it is, and the AmortControl.UserControl1.dll which was generated by NetDefGen. In fact, AmortControl does run, but throws the invalid class string error when COBOL inquires NET for a property value. I am able to enter the loan parameters of the months, loan amount, and percentage rate. I can click the Calculate button, and the listview of the payment, interest, etc. displays. Then when the program gets to the point of updating the boxes across the bottom, it needs to get that information from the NET properties, and the invalid class string error message displays with the line number of the first inquire statement in the COBOL program.
0 Likes
Highlighted
New Member.

RE: Invalid Class String CO_E_CLASSSTRING error after new OS install

So I was talking to a coworker who is in Tech Support. He is responsible for making sure the projects run on the computers in that department. He said that he was able to get rid of the error by running these as stated by shjerpe:

\acucbl\bin\marshal.exe /RegServer
regasm20acu /register /codebase AcuToNet.dll

I told him I ran regasm40acu instead, and he said he did too. EXCEPT IN REVERSE ORDER! And when he ran regasm40acu FIRST and marshal SECOND on my computer, the errors disappeared, and the data is now being passed correctly between NET and COBOL. I hope this helps someone else, since marshal isn't even mentioned in the documentation for extend 10.0.0, and I never came across anything suggesting that there was a specific order for execution. Running them as listed above didn't work for me. Running regasm**acu FIRST, and marshal SECOND did work for me.
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.