This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Dll Registration

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

  • 0

    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

    SW Engineering(QA)  

    Although I am an OpenText employee, I am speaking for myself and not for OpenText.
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

  • 0 in reply to 

    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. 

  • 0  

    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?

  • 0 in reply to   

    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

  • 0   in reply to 

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

  • 0 in reply to   

    Thank you Rzack.