NJLangley / csharptest-net

Automatically exported from code.google.com/p/csharptest-net
0 stars 0 forks source link

Make static members of Server API static #28

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When I close or dispose sever API I kill all host. But I have instance and want 
to close only it. Current stop listening should be internal and called on 
Process.Exit.
I spent 2 days of debugging with current API.

Original issue reported on code.google.com by asd.and....@gmail.com on 25 Feb 2013 at 11:24

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have several AppDomains an my code hosted in Excel, when I will shutdown all 
services, will it will fail all native code and other AppDomains?...

Original comment by asd.and....@gmail.com on 26 Feb 2013 at 8:07

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Should use 
Specifying the RPC_IF_AUTOLISTEN flags marks the interface as an auto-listen 
interface. The run time begins listening for calls as soon as the interface is 
registered, and stops listening when the interface is unregistered. A call to 
RpcServerUnregisterIf for this interface will wait for the completion of all 
pending calls on this interface. Calls to RpcServerListen and 
RpcMgmtStopServerListening will not affect the interface, nor will a call to 
RpcServerUnregisterIf with IfSpec == NULL. This allows a DLL to register RPC 
interfaces or remove them from the registry without changing the main 
application's RPC state.

Original comment by asd.and....@gmail.com on 26 Feb 2013 at 4:41

GoogleCodeExporter commented 8 years ago
I will refactor RPC towards this approach because it is more .NET like (WCF, 
Remoting) and does not conflicts with host (being it Excel, custom, Windows 
Service or IIS).

Original comment by asd.and....@gmail.com on 26 Feb 2013 at 4:45

GoogleCodeExporter commented 8 years ago
Intresting, let me know if you got this working. I'm not familiar with 
RPC_IF_AUTOLISTEN and don't know the ins and outs of it.  

I suspect your issue is in the use of how you are listening on multiple 
interfaces.  Each instance of RpcServerApi should call StartListening and 
dispose/StopListing.  This should increment/decrement the Semaphore in the 
UsageCounter instance.  I know this works across app-domains; however, I have 
not tried it in the Excel/Office environment.  Let me know if this solves the 
issue.

Original comment by Grig...@gmail.com on 26 Jan 2014 at 6:40

GoogleCodeExporter commented 8 years ago
Issue 27 has been merged into this issue.

Original comment by Grig...@gmail.com on 26 Jan 2014 at 6:41