|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Steve Swartz (stevesw
MICROSOFT.COM)Date: Mon Nov 05 2001 - 12:41:46 CST
In the meantime, you can do it by hand.
The moral equivalent of CoRegisterClassObject() for COM+ is this API:
STDAPI CoRegisterSurrogateEx (REFGUID rguidProcessID, void*
pUnused)
The first argument is the AppID of the server application you want to
support in your process. The second argument must be NULL. The return
code is pretty inscrutable: if it's not S_OK it's whatever internal HR
caused the call to fail.
In any process (including an NT Service), you use this by creating a
thread, initializing it, and then calling the API. The API "swallows"
the thread, meaning, it will not return until the COM+ application
completes its shutdown logic. The API does everything necessary to
register the process with COM+, so that all activations for components
in the server application will be directed to this process.
You can only call this API once within a process -- processes can only
host one COM+ Server App.
This works in Windows 2000, Windows XP, and Windows .NET Server. DllHost
is just a process that parses its command line and then calls this API.
-----Original Message-----
From: Robert Sedor [mailto:rsedor
HOTMAIL.COM]
Sent: Monday, November 05, 2001 9:19 AM
To: DCOM
DISCUSS.MICROSOFT.COM
Subject: Re: Creating NT service from COM+
Angela,
I don't know that Win2K does COM+ services, but XP COM+ 1.5 does.
The activation tab has a checkbox "Run application as NT Service. It
also has a Setup New Service button.
Additionally, there is the
ICOMAdminCatalog2.CreateServiceForApplication()
method.
And I think that there is an August SDK that has some better
information.
Rob
----- Original Message -----
From: "Angela Li" <Li.Angela
ORBITAL.COM>
To: <DCOM
DISCUSS.MICROSOFT.COM>
Sent: Monday, November 05, 2001 11:21 AM
Subject: Creating NT service from COM+
> From MSDN, I suppose to be able to configure a COM+ application to run
> as
an NT
> service. However, I can't find the right choices from the Component
Services
> tool. Under Activation table, there is no check box named "Run
application as
> NT service".
>
> I'm running Windows 2000 sp 2, with platform sdk Feb 2001 version.
>
> Thanks a lot.
>
> Angela Li
> Senior Scientist
> Transportation Management Systems
> Orbital Sciences Corp. 443-259-7334 (office)
> 7160 Riverwood Drive 443-742-8596 (cell)
> Columbia, MD 21046 li.angela
orbital.com
>
> ----------------------------------------------------------------
> Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
> contains important info. Save time, search the archives at
> http://discuss.microsoft.com/archives/index.html . To unsubscribe,
> mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
>
----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html . To unsubscribe,
mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]