6
votes

I have a Delphi (2007) application which is just a standard exe, and I would like to add a COM interface to it. I already have a COM dll which exports several COM objects and this is working perfectly. However when I attempted to insert the COM logic from the dll (ie the "exports" and "{$R *.TLB}" and the relevant uses) into the EXE's dpr file it all compiles perfectly but refuses to register when I call regsvr32 myname.exe

I also tried creating an completely new VCLForms application and adding a AutomationObject to it via the IDE wizards but Delphi does not seem to want me to do that as no activex components are available.

Is it even possible to do what I attempting? If so, does anyone have any idea on what might be going wrong?

Thanks

2
Are you running on 64 bit Windows? Vista/7?David Heffernan
Yes, I am running Windows 7 64 bitSteve
Seems like you got your answer. My point was that on 64 bit Windows you have to work a little bit to get the 32 bit version of regsvr32. Of course I didn't twig that since this is an exe rather than a dll you don't need a separate program to host the code to do self-reg.David Heffernan

2 Answers

9
votes

I'm not sure regsvr32 works, you need to run the app.exe /regserver or app.exe /unregserver.

1
votes