Skip to main content

Hello,

When I tried to register a custom-made dll from cmd, the dll got registered successfully.
However, when I try to register the same dll using a Acucobol program, the process is not successful. (Didn't display any
exception). The command I used was
C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\Regasm.exe E:\\SWRUN\\ACUCORP\\BIN\\test.dll /tlb: test.tlb

Please advise.

Thanks,

Aji Cherian

Hello,

When I tried to register a custom-made dll from cmd, the dll got registered successfully.
However, when I try to register the same dll using a Acucobol program, the process is not successful. (Didn't display any
exception). The command I used was
C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\Regasm.exe E:\\SWRUN\\ACUCORP\\BIN\\test.dll /tlb: test.tlb

Please advise.

Thanks,

Aji Cherian

When you used cmd - was the dll on the E: drive?  If the dll is already registered, why are you using a runtime to register it?

I don't think you can use a shared drive to host the dll - there's lot of Windows security - and trusted applications - you should be able to copy it to a local directory and register it there (and you might need to do so as Admin).

See stackoverflow.com/.../can-i-install-net-com-library-located-on-a-network-shared-folder


When you used cmd - was the dll on the E: drive?  If the dll is already registered, why are you using a runtime to register it?

I don't think you can use a shared drive to host the dll - there's lot of Windows security - and trusted applications - you should be able to copy it to a local directory and register it there (and you might need to do so as Admin).

See stackoverflow.com/.../can-i-install-net-com-library-located-on-a-network-shared-folder

Thanks for the reply. The DLL is on the E: drive. On the development system, I registered it manually as Admin. However, I intend to automate the registration process on the customer system by using an AcuCobol program. 


Hello,

When I tried to register a custom-made dll from cmd, the dll got registered successfully.
However, when I try to register the same dll using a Acucobol program, the process is not successful. (Didn't display any
exception). The command I used was
C:\\windows\\Microsoft.NET\\Framework\\v4.0.30319\\Regasm.exe E:\\SWRUN\\ACUCORP\\BIN\\test.dll /tlb: test.tlb

Please advise.

Thanks,

Aji Cherian

Hello Aji,

I would like to clarify some points, if you don't mind. You have created a dll with a tlb, and are trying to register that dll with .NET. When you invoke regasm.exe from a command prompt, the dll is successfully registered (and you can see that using some .NET tools, presumably). But when you CALL SYSTEM using "...\\regasm.exe ..." from within a COBOL program, you don't get any error message, and the dll is not registered. Is that correct?

What is the exact CALL statement you are making from your COBOL program? Are the command prompt and the COBOL program running with the same privileges? In other words, you aren't running cmd.exe as Administrator, but wrun32.exe as some other user, right?


Hello Aji,

I would like to clarify some points, if you don't mind. You have created a dll with a tlb, and are trying to register that dll with .NET. When you invoke regasm.exe from a command prompt, the dll is successfully registered (and you can see that using some .NET tools, presumably). But when you CALL SYSTEM using "...\\regasm.exe ..." from within a COBOL program, you don't get any error message, and the dll is not registered. Is that correct?

What is the exact CALL statement you are making from your COBOL program? Are the command prompt and the COBOL program running with the same privileges? In other words, you aren't running cmd.exe as Administrator, but wrun32.exe as some other user, right?

Hi rzack,

Thanks for the reply. You understood my issue correctly.  I executed the following lines using 'Run as administrator' and got a return value for ws-reg-tally2 as 100. (I executed the unregister command before registering the dll).

STRING  "C:\\Windows\\Microsoft.NET\\Framework\\" DELIMITED BY SIZE
                            "v4.0.30319\\Regasm.exe "            DELIMITED BY SIZE
                            "E:\\swrun\\acucorp\\bin\\MyTest.dll" DELIMITED BY SIZE
                             "/tlb: MyTest.tlb"                            DELIMITED BY SIZE
                             INTO WS-REG-CMD-LINE.

CALL "C$SYSTEM" USING WS-REG-CMD-LINE, 224 GIVING WS-REG-TALLY2.

Thanks,

Aji Cherian


Hi rzack,

Thanks for the reply. You understood my issue correctly.  I executed the following lines using 'Run as administrator' and got a return value for ws-reg-tally2 as 100. (I executed the unregister command before registering the dll).

STRING  "C:\\Windows\\Microsoft.NET\\Framework\\" DELIMITED BY SIZE
                            "v4.0.30319\\Regasm.exe "            DELIMITED BY SIZE
                            "E:\\swrun\\acucorp\\bin\\MyTest.dll" DELIMITED BY SIZE
                             "/tlb: MyTest.tlb"                            DELIMITED BY SIZE
                             INTO WS-REG-CMD-LINE.

CALL "C$SYSTEM" USING WS-REG-CMD-LINE, 224 GIVING WS-REG-TALLY2.

Thanks,

Aji Cherian

This looks to me like it should work. You should raise a defect with support.


This looks to me like it should work. You should raise a defect with support.

Thank you Rzack.