1

Topic: Server DCOM is closed

Prompt who can that prompts that can happen. There is a communication between applications (both Delphi) through DCOM.  both machines Windows 10. DCOM it is adjusted. We work in the domain. The server - a normal Delphi application. The client is connected to the server. The server is launched. All exchange and remote control  as it is necessary. Or the server is already launched, the client  to it. The same situation. The client one. Then the client is closed. Through stable enough time - about 13 minutes the server is closed. It is necessary that it was not closed. At connection to the server in the client it is exposed AutoQuit: = false; Also at connection the client adds AddRef to the server, differently the server is closed  at  the client. At switch-off the client does Disconnect. Trace through regular places  applications (Close the principal form, etc.) And some similar places of result did not give, i.e. the server is closed passing them. Not clearly what part of the code  applications is fulfilled only. If the server is launched from under Delphi that closings does not happen. Whether there are ideas why application is closed through such time and why?

2

Re: Server DCOM is closed

Itself in   the link if it is necessary to you that you hung eternally. You can provide any method that such hanging server was closed.

3

Re: Server DCOM is closed

Hello, Temnikov, you wrote: T> Itself in   the link if it is necessary to you that you hung eternally. You can provide any method that such hanging server was closed. The link  both from within and outside - does not help. It is closed not right after closings of the client and through a time interval. If not  it is closed at once. The closing Ad hoc method is. In this case it is not involved.

4

Re: Server DCOM is closed

S> the Link  both from within and outside - does not help. Here it is strange, can  as that sees that the link internal on itself and upon it does not fulfill. Should not on idea be it. S> It is closed not right after closings of the client and through a time interval. Delay unload likely it is included. Variants: (Most ) Make  the client which will hang eternally and to hold the link, deliver in sheduler/in autoload. Make the client service Make the CATFISH the server service

5

Re: Server DCOM is closed

Hello, Temnikov, you wrote: S>> the Link  both from within and outside - does not help. T> here it is strange, can  as that sees that the link internal on itself and upon it does not fulfill. Should not on idea be it. S>> It is closed not right after closings of the client and through a time interval. T> Delay unload likely it is included. What is it? If that that I guess that why it is preempted at once if not  links under all same conditions? T> variants: T> (Most ) Make  the client which will hang eternally and to hold the link, deliver in sheduler/in autoload. T> make the client service T> Make the CATFISH the server service It is possible  only the first variant as the server - high-grade GUI application and should hang to show the information. Application normal, but at it it is possible to be connected  DCOM and to control. And here if to be connected - to be disconnected that it and happens.

6

Re: Server DCOM is closed

Hello, swame, you wrote: whether S> There are ideas why application is closed through such time and why? Something there  - just 2  for 6 minutes. Superfluous AddRef does not play a role - its server and waits.

7

Re: Server DCOM is closed

Hello, swame, you wrote: S> Then the client is closed. S> through stable enough time - about 13 minutes the server is closed. Outside it is impossible through DCOM to leave the hanging link. If to tear off the client at the open link that stub in the server 10-13 minutes continue to hang about these. And all this time it holds an object reference. When at last he solves that network connection is broken off it does Release and is closed. That the server was not closed at closing of the last client it is necessary to implement an appropriate method its logic.

8

Re: Server DCOM is closed

Hello, Lazar Beshkenadze, you wrote: > Hello, swame, you wrote: S>> Then the client is closed. S>> through stable enough time - about 13 minutes the server is closed. > Outside it is impossible through DCOM to leave the hanging link. If to tear off the client at the open link that stub in the server 10-13 minutes continue to hang about these. And all this time it holds an object reference. When at last he solves that network connection is broken off it does Release and is closed. > That the server was not closed at closing of the last client it is necessary to implement an appropriate method its logic. Thanks. And it is possible was more specific where this logic to implement? What that to correct with  servers or to try to imitate the connected client? The second as I understand it to launch special exe which will be connected to the server and will hang together with it. Or there are less bulky methods?

9

Re: Server DCOM is closed

Hello, swame, you wrote: >> That the server was not closed at closing of the last client it is necessary to implement an appropriate method its logic. S> thanks. And it is possible was more specific where this logic to implement? What that to correct with  servers or to try to imitate the connected client? S> the second as I understand it to launch special exe which will be connected to the server and will hang together with it. Or there are less bulky methods? If there is an access to initial texts of the server that certainly there is no need to fence the unnecessary client.

10

Re: Server DCOM is closed

> If there is an access to initial texts of the server that certainly there is no need to fence the unnecessary client. Access is, but I do not know where to dig inside RTL.

11

Re: Server DCOM is closed

Hello, swame, you wrote: >> If there is an access to initial texts of the server that certainly there is no need to fence the unnecessary client. S> access is, but I do not know where to dig inside RTL. What is RTL? If Run Time Library that it here not and. I did not work with Delphi and me there is no saying something defined but it is possible to dig from two sides. One method to search for logic on closing COM of object (or objects). In ATL it would be something of type of function FinalRelease. Most likely there it is possible to find logic on which starts application closing. The second method - to study actually a place where it is closed. If this window application to search for function PostQuitMessage if service - SetServiceStatus with parameter SERVICE_STOPPED.

12

Re: Server DCOM is closed

Hello, swame, you wrote: S> Through stable enough time - about 13 minutes the server is closed. S> it is necessary that it was not closed. S> trace through regular places  applications (Close the principal form, etc.) And some similar places of result did not give, i.e. the server is closed passing them. S> not clearly what part of the code  applications Is fulfilled only. S> if the server is launched from under Delphi that closings does not happen. Whether S> there are ideas why application is closed through such time and why? 13-minutes it most likely double time-out DCOM on the come off client. I.e. DCOM all the same understands that the last client died, without a difference as you twist counters, is simple through this time-out. Also completes the COM-server since it has nothing to do more - there are no clients. And as this logic in your case is implemented  delphi, most likely its horse-radish will change. Probably you would accept service? Programs which should not be closed, and should be launched together with system services are called. The problem can be that delphi (as far as I know) does not support creation DOM of services. At first did not make, and then hammered, as they say. Whom excites DCOM in 2016. Here the dude  the  for support of this business (like as 16 years). Can you will find useful (there also articles are on a subject)

13

Re: Server DCOM is closed

Hello, bnk, you wrote: bnk> Hello, swame, you wrote: S>> Through stable enough time - about 13 minutes the server is closed. S>> it is necessary that it was not closed. S>> trace through regular places  applications (Close the principal form, etc.) And some similar places of result did not give, i.e. the server is closed passing them. S>> not clearly what part of the code  applications Is fulfilled only. S>> if the server is launched from under Delphi that closings does not happen. Whether S>> there are ideas why application is closed through such time and why? bnk> 13-minutes it most likely double time-out DCOM on the come off client. I.e. DCOM all the same understands that the last client died, without a difference as you twist counters, is simple through this time-out. bnk> also completes the COM-server since it has nothing to do more - there are no clients. And as this logic in your case is implemented  delphi, most likely its horse-radish will change. bnk> probably you would accept service? bnk> programs which should not be closed, and should be launched together with system services are called. bnk> the problem can be that delphi (as far as I know) does not support creation DOM of services. bnk> At first did not make, and then hammered, as they say. Whom excites DCOM in 2016. Not, c does not go, as the server is intended for information display as it is described here http://swman.ru/content/view/71 Services we did, but here it does not approach. With DCOM we too  in favor of another RPC , but here support of the out-of-date version. It would be desirable to manage with small losses. bnk> here the dude  the  for support of this business (like as 16 years). Can you will find useful (there also articles are on a subject)

14

Re: Server DCOM is closed

Hello, Lazar Beshkenadze, you wrote: > Hello, swame, you wrote: >>> If there is an access to initial texts of the server that certainly there is no need to fence the unnecessary client. S>> access is, but I do not know where to dig inside RTL. > that such RTL? If Run Time Library that it here not and. > I did not work with Delphi and me there is no saying something defined but it is possible to dig from two sides. > One method to search for logic on closing COM of object (or objects). In ATL it would be something of type of function FinalRelease. Most likely there it is possible to find logic on which starts application closing. > the Second method - to study actually a place where it is closed. If this window application to search for function PostQuitMessage if service - SetServiceStatus with parameter SERVICE_STOPPED. I certainly tried it, the trouble in that that  is closed passing regular places in which application normally should come at regular end, and from those places where all the same  (finalization) any more it is not possible to untwist a stack.  what that rigid terminate process or halt. S>> Trace through regular places  (Close the principal form, etc.) and some similar places of result did not give application, i.e. the server is closed passing them.

15

Re: Server DCOM is closed

S> With DCOM we too  in favor of another RPC , but here support of the out-of-date version. It would be desirable to manage with small losses. Here already offered a variant with "". You launch the special client who holds an object reference of the server and pulls any method each 5 minutes. It is possible even a batnikom/script for example.

16

Re: Server DCOM is closed

Hello, swame, you wrote: S> And it is possible was more specific where this logic to implement? What that to correct with  servers or to try to imitate the connected client? S> the second as I understand it to launch special exe which will be connected to the server and will hang together with it. Or there are less bulky methods? The good logic is in IClassFactory in method LockServer, but it at creation, i.e. at start of the server by the client, and it and so works. As the server is launched independently on idea it should keep and not be completed at creation and destruction of the objects. At least, the server also can  itself through IClassFactory. LockServer and  at closing of the UI.

17

Re: Server DCOM is closed

Hello, Lazar Beshkenadze, you wrote: > Outside it is impossible through DCOM to leave the hanging link. There are standard possibilities of generation of the hanging link: method IClassFactory:: LockServer and object registration in ROT IRunningObjectTable:: Register.