1

I am using com .dll within my Delphi application. for this I registered my com .dll using regsvr32.exe .dll name command. It registered fine and then i converted this com .dll to type library (.tlb pas file).

So now I am using this .tlb pas file to communicate com object. .tlb file gave me wrapper class for communicate with dll.

This all works fine in my machine because dll registered in my machine. But when i put my application on another machine then it throws error like 'Class not registered'.

How I can registered .dll or perticuler class in another machine. We can not registered .dll as manually as i did on my machine for all machines.

please let me know how I can register .dll or coclass pragmatically.

8
  • 1
    That's what installer should do.
    – Victoria
    Oct 4, 2017 at 6:04
  • Either register the class, or use registration free com Oct 4, 2017 at 8:03
  • Yes , i use inno set up installer to install my delphi application. But I really donot know How can i register .dll using inno set up. If I add this dll file in inno set up it only put on perticuler path ,it wil not register.
    – Ankush
    Oct 4, 2017 at 8:12
  • Inno installer can be programmed in a Delphi-like language. You can do a lot. Oct 4, 2017 at 10:38
  • 1
    Just set the "regserver" flag for your file in your script. Inno also has "RegisterServer" and "RegisterTypeLibrary" procedures. If you wonder the answer to your question anyway, you should call "DllRegisterServer" from your library. Oct 4, 2017 at 16:25

1 Answer 1

0

you can pack com.dll with package installation and in installing progress copy the com.dll file to "C:\Windows\system32" Programmatically

To Register it : ShellExecute(handle, 'open', 'C:\Windows\system\Regsvr32.exe', '/S com.dll', nil, SW_SHOWMINIMIZED);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.