Calling COM+ objects from a Windows Service in .NET
- From: "Francis Brown" <x@xxx>
- Date: Wed, 21 Jun 2006 20:47:50 +0200
I'm rewriting one of our Windows Service previously written in C++ in .NET.
The service is calling COM objects in a COM+ server application on the same
machine (no call occurs from COM+ to my service). The Service is running
under the LocalSystem account.
When running the service, the C++ code used is :
CSecurityDescriptor sd;
sd.InitializeFromThreadToken();
hr = CoInitializeSecurity(sd, -1, NULL, NULL,
RPC_C_AUTHN_LEVEL_PKT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE,
NULL);
_ASSERTE(SUCCEEDED(hr));
hr = _Module.RegisterClassObjects(CLSCTX_LOCAL_SERVER |
CLSCTX_REMOTE_SERVER, REGCLS_MULTIPLEUSE);
_ASSERTE(SUCCEEDED(hr));
Do I have to write the same code in my new .NET service ? How do I achieve
this in .NET ?
Christian
.
- Follow-Ups:
- Re: Calling COM+ objects from a Windows Service in .NET
- From: paulgyro
- Re: Calling COM+ objects from a Windows Service in .NET
- Prev by Date: Re: Stack prob. Setting callback in native dll.
- Next by Date: Re: Stack prob. Setting callback in native dll.
- Previous by thread: Listview flickering and performance problem
- Next by thread: Re: Calling COM+ objects from a Windows Service in .NET
- Index(es):
Relevant Pages
|
Loading