4

My company runs an old application written in delphi. A simple com server which serves some database for some computers. I have to run the server once in every computer to register the com interfaces and it have been working since the ancient days of whatever in windows xp. Using windows xp I have never had a single problem but in windows seven the class just won't register and no matter what I try(I tried exporting the register keys) when I open the client I will still get the error "Class not registered".

Any advice? Plz save my Christmas.

sky
  • 41
  • 4
  • 4
    [This](http://stackoverflow.com/a/3440419/960757) might save your Christmas :) – TLama Dec 20 '11 at 02:01
  • 1
    Windows 7 has elevated security. In fact, it has a whole new security layer that XP never had. When accessing things on the computer such as the Registry, you have to explicitly define how you intend to access it. For example, `Reg:= TRegistry.Create;` then write to it and get an error. But use `Reg:= TRegistry.Create(KEY_READ or KEY_WRITE);` and it works fine. This might also be part of your issue(s). – Jerry Dodge Dec 20 '11 at 03:17
  • 1
    possible duplicate of [Register 32 bit COM DLL to 64 bit Windows 7](http://stackoverflow.com/questions/3439845/register-32-bit-com-dll-to-64-bit-windows-7) – Ken White Dec 20 '11 at 03:43

1 Answers1

6

My COM servers, both EXEs and DLLs, are written in BCB6 (as opposed to Delphi) on 32-bit XP and they work just fine when installed on 64-bit Windows 7. You just have to make sure that you run their installation code from an elevated process, that's all. Open an instance of cmd.exe with the "Run as administrator" option, then navigate to your COM server's folder and run it with the /INSTALL parameter (for EXEs) or the 32-bit version of regsvr32.exe (for DLLs) from the WOW64 system folder.

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770