Couple of event questions

Couple of questions regarding events (am using Delphi).

My server has quite a few event sinks. I’ve got an issue where one of them is throwing an access violation on the client when the event is received.
Specifically, it’s occuring in uROEventReceiver.pas, in TROEventReceiver.Execute, on the line:
aTarget.GetInterface(IInterface, l_intf);

I’ve clearly done something wrong here as my other sinks work fine but I can’t for the life of me figure out what. Any ideas what could cause this error?

Secondly, the single TROEventReceiver component in my client app has a ServiceName property. What should this be set to as I have a lot of services in my server, most of which generate events via their own sinks?

Thanks.

Nevermind, I found it.

I’d added the new EID_ to the first parameter of RegisterEventHandlers but neglected to add a form reference to the second parameter so the event was registered but going nowhere.

Still curious about the ServiceName property though.

2 Likes

Hi,

ServiceName is used for initializing message that will be sent to server-side, for example

aMessage.InitializeRequestMessage(aChannel, const_RemObjects, ServiceName, const_GetEventsData)

since GetEventsData is a method of TRORemoteDataModule you have to specify ServiceName otherwise Remoting SDK can’t create service instance and call this method.

So can this be any service in my server?

Hi,

in general - yes.
better to use usual service and not login one

Ok thanks. It all appears to work using the random service I have in there currently so will leave it alone. Was just curious.