Board index » delphi » Registering OLE Automation Server

Registering OLE Automation Server

I'm losing my mind attempting to get my OLE Server to register itself
in the Windows registry.

On the machine I developed the app on I was successfull in doing this.
I BELEIVE this happened because I used the /regserver Run parameter
during development.

However, on any machine that I install this app on, the app doesn't
register itself in the registry.  This is an out of process OLE
Server.

I believe the following to be extremely important.  The Delphi
documentation states that the following line of code should be used:

if Automation.ServerRegistration then Exit;

However, D2 complains...Undeclared Indentifer ServerRegistration.  I'm
a newbie to programming so a did what a friend told me and looked at
the unit's (OLEAuto.pas) source.  And yes I've included this unit in
my uses clause.

To my horror the TAutomation object did not appear to have a
ServerRegistration method.  This would appear to explain the
Undeclared Indentifer error.  Is this method required for the OLE
Server to register itself with the registry.  I ask the question
because, after commenting that line out, the app compiled and it was
registered.  (/regserver).

Of course I can't install Delphi on every machine that I want this app
on.  

PLEASE, PLEASE, PLEASE help...HOW DO YOU CREATE AN OUT OF PROCESS OLE
SERVER (.EXE) THAT WILL SUCCESSFULLY REGISTER ITSELF IN THE REGISTRY.

Any source and/or explanation would make you my hero for life

Thanks in advance,

Greg
ghod...@ipass.net

 

Re:Registering OLE Automation Server


R3JlZyA8Z2hvZGdlc0BpcGFzcy5uZXQ+IHdyb3RlIGluIGFydGljbGUgPDR2MnNjMiRqOGtAbmV3
cy5pcGFzcy5uZXQ+Li4uDQo+IEknbSBsb3NpbmcgbXkgbWluZCBhdHRlbXB0aW5nIHRvIGdldCBt
eSBPTEUgU2VydmVyIHRvIHJlZ2lzdGVyIGl0c2VsZg0KPiBpbiB0aGUgV2luZG93cyByZWdpc3Ry
eS4NCj4gDQo+IE9uIHRoZSBtYWNoaW5lIEkgZGV2ZWxvcGVkIHRoZSBhcHAgb24gSSB3YXMgc3Vj
Y2Vzc2Z1bGwgaW4gZG9pbmcgdGhpcy4NCj4gSSBCRUxFSVZFIHRoaXMgaGFwcGVuZWQgYmVjYXVz
ZSBJIHVzZWQgdGhlIC9yZWdzZXJ2ZXIgUnVuIHBhcmFtZXRlcg0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