|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Mohammad Saleem (mohammad.saleem
MAMEA.SE)Date: Tue May 28 2002 - 00:52:14 CDT
Hi Vinoth,
I forgot to register my interface.
Efter registering now it works.
regards
/saleem
-----Original Message-----
From: Distributed COM-Based Code [mailto:DCOM
DISCUSS.MICROSOFT.COM]On
Behalf Of Vinoth Kumar B
Sent: Tuesday, May 28, 2002 5:36 AM
To: DCOM
DISCUSS.MICROSOFT.COM
Subject: Re: DCOM Registration problem
Hi saleem,
I am not sure whether u r registering ur interface marshallers
before ur calling the CoCreateInstance method..U need to register the
pointer to class factory before calling CoCreateInstance so that the
corresponding class object will be created by the class factory.Plz get back
to me if u need any piece of code regarding this.
If u have the corresponding proxy/stub dll then there is no need to
do it dynamically..
Vinoth
-----Original Message-----
From: Benoit LAVIGNE [mailto:Benoit.LAVIGNE
ELIXONLINE.COM]
Sent: Tuesday, May 28, 2002 2:44 AM
To: DCOM
DISCUSS.MICROSOFT.COM
Subject: Re: DCOM Registration problem
Don't forget the .rgs files must match the guid in the IDL.
Also, why bother removing and replacing. Just create a new ATL service
project and object and use the exact same names.
Then just copy idl file and implementation files and voila.
-----Original Message-----
From: Mohammad Saleem [mailto:mohammad.saleem
MAMEA.SE]
Sent: Monday, May 27, 2002 5:19 AM
To: DCOM
DISCUSS.MICROSOFT.COM
Subject: DCOM Registration problem
Hi all,
I sent a similar question earlier to this archive and got few responses but
still I have the same problem. May be it depends on that I did not succeed
to explain my problem clearly.
I try once again and hope some guru can help me to solve my problem.
What I want is to create a service to run remotely which uses my own
service.idl file.
First I want to test it locally and it doesn't work.
What I do is the following.
1. I create just an ATL wizard projekt (with name ATLService) choosing
"service" as type of application.
2. Create an ATL object say Foo(Insert->New ATL Object)
3. Remove Foo.cpp/.h from the projekt.
4. Add my own service.idl file to projekt.
5. Remove all occurences of CLSID_Foo and IID_Foo
6. Edit projekt created file ATLService.cpp
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_Foo, CFoo)
END_OBJECT_MAP()
to
BEGIN_OBJECT_MAP(ObjectMap)
OBJECT_ENTRY(CLSID_Control, CControl)
END_OBJECT_MAP()
where CLSID_Control DCOM class instance a client can create (defined i
service.idl)
7. Add my own service.idl file.
8. Compile
9. add dlldata.c, service_i.c,h/p_.c and again compile and link.
10. Edit ATLService.rc file as below
IDR_ATLCCSService1 REGISTRY MOVEABLE PURE "ATLService.rgs"
IDR_CONTROLCOMPUTERSERVICE REGISTRY DISCARDABLE
"ATLService.rgs"
1 TYPELIB "Debug\Service.tlb"
I get an ATLService.exe.
11. I run this exe file via VC++ debugger.
12. I run my test application and the following call succeed i.e. I get "hr
== 0"
hr =
CoCreateInstance(CLSID_Control,
NULL,
//CLSCTX_LOCAL_SERVER,
CLSCTX_ALL,
IID_IUnknown,
(VOID FAR **) &pUnk);
and all works fine (when running DCOM locally).
Now I want to run this ATLService.exe remotely and as service.
First I tried to run ATLService.exe remotely as an exe and not service.
After registering ATLService.exe (/RegServer) and *.dll on server and client
machine.
I run the client application I get
hr = 80040154 (class not registered error)
Now I tried to run as service locally.
I did the following
ATLService.exe /Service
and I can see my ATLService.exe is there in Services window (adminstrative
tools->Services)
a. Now I click start on ATLService Service.
b. I start my client application and I get
hr = 80040154 (class not registered error) i.e. the same error which I got
when I tried to run ATLService.exe remotely and which I could run
successfully locally.
Sure, I am missing something for registration between step 1-10.
Plz help me to solve my problem. Now I have been working on this problem a
couple of days without much success.
Ask, if something is not clear.
I am using winXP.
thanks
regard
/saleem
----------------------------------------------------------------
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
----------------------------------------------------------------
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 ]