Adding interface to local server 
Author Message
 Adding interface to local server

Hi,

I have created a local server which has 2 interfaces. When I add a new
interface to this server (I use Microsoft Visual C++), and call
CoCreateInstance() for this interface from a test program, I get
HRESULT 0x80040154 (REGDB_E_CLASSNOTREG). The old interfaces still work
fine.

I managed to work around this problem by removing the interface again,
adding a new interface, and copying the functions defined earlier back
into the (new) coclass.

Any idea what the problem is when I first add the interface?

Thanks for any help,
R. Moolenaar

Sent via Deja.com
http://www.*-*-*.com/



Mon, 28 Jul 2003 00:40:20 GMT  
 Adding interface to local server
You have to rebuild and reregister the proxy/stub DLL.

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> Hi,

> I have created a local server which has 2 interfaces. When I add a new
> interface to this server (I use Microsoft Visual C++), and call
> CoCreateInstance() for this interface from a test program, I get
> HRESULT 0x80040154 (REGDB_E_CLASSNOTREG). The old interfaces still work
> fine.

> I managed to work around this problem by removing the interface again,
> adding a new interface, and copying the functions defined earlier back
> into the (new) coclass.

> Any idea what the problem is when I first add the interface?

> Thanks for any help,
> R. Moolenaar

> Sent via Deja.com
> http://www.deja.com/



Mon, 28 Jul 2003 10:14:41 GMT  
 Adding interface to local server
Thanks,

But the proxy/stub dll was rebuilt and (re)registered. Are there any
other possibilities?

R. Moolenaar

Quote:

> You have to rebuild and reregister the proxy/stub DLL.

> --
> =====================================
> Alexander Nickolov
> Microsoft MVP [VC], MCSD

> MVP VC FAQ: http://www.mvps.org/vcfaq
> =====================================


> > Hi,

> > I have created a local server which has 2 interfaces. When I add a
new
> > interface to this server (I use Microsoft Visual C++), and call
> > CoCreateInstance() for this interface from a test program, I get
> > HRESULT 0x80040154 (REGDB_E_CLASSNOTREG). The old interfaces still
work
> > fine.

> > I managed to work around this problem by removing the interface
again,
> > adding a new interface, and copying the functions defined earlier
back
> > into the (new) coclass.

> > Any idea what the problem is when I first add the interface?

> > Thanks for any help,
> > R. Moolenaar

Sent via Deja.com
http://www.deja.com/


Mon, 28 Jul 2003 18:33:09 GMT  
 Adding interface to local server
I found the solution in an old post in newsgroup
microsoft.public.vc.activex.templatelib by Scott Rabon (10/15/1999).
The CLSID in the .rgs file did not match the CLSID of the object in
the .idl file. Since I added the interface using the ATL object wizard,
I assume the problem is there. Perhaps a small bug (I'm using Visual
Studio 6.0 sp4)?

R. Moolenaar

Quote:

> Thanks,

> But the proxy/stub dll was rebuilt and (re)registered. Are there any
> other possibilities?

> R. Moolenaar


> > You have to rebuild and reregister the proxy/stub DLL.

> > --
> > =====================================
> > Alexander Nickolov
> > Microsoft MVP [VC], MCSD

> > MVP VC FAQ: http://www.mvps.org/vcfaq
> > =====================================


> > > Hi,

> > > I have created a local server which has 2 interfaces. When I add a
> new
> > > interface to this server (I use Microsoft Visual C++), and call
> > > CoCreateInstance() for this interface from a test program, I get
> > > HRESULT 0x80040154 (REGDB_E_CLASSNOTREG). The old interfaces still
> work
> > > fine.

> > > I managed to work around this problem by removing the interface
> again,
> > > adding a new interface, and copying the functions defined earlier
> back
> > > into the (new) coclass.

> > > Any idea what the problem is when I first add the interface?

> > > Thanks for any help,
> > > R. Moolenaar

> Sent via Deja.com
> http://www.deja.com/

Sent via Deja.com
http://www.deja.com/


Tue, 29 Jul 2003 17:59:35 GMT  
 Adding interface to local server
One of the many. And it seems the SPs never fix the wizards...

--
=====================================
Alexander Nickolov
Microsoft MVP [VC], MCSD

MVP VC FAQ: http://www.mvps.org/vcfaq
=====================================


Quote:
> I found the solution in an old post in newsgroup
> microsoft.public.vc.activex.templatelib by Scott Rabon (10/15/1999).
> The CLSID in the .rgs file did not match the CLSID of the object in
> the .idl file. Since I added the interface using the ATL object wizard,
> I assume the problem is there. Perhaps a small bug (I'm using Visual
> Studio 6.0 sp4)?

> R. Moolenaar


> > Thanks,

> > But the proxy/stub dll was rebuilt and (re)registered. Are there any
> > other possibilities?

> > R. Moolenaar


> > > You have to rebuild and reregister the proxy/stub DLL.

> > > --
> > > =====================================
> > > Alexander Nickolov
> > > Microsoft MVP [VC], MCSD

> > > MVP VC FAQ: http://www.mvps.org/vcfaq
> > > =====================================


> > > > Hi,

> > > > I have created a local server which has 2 interfaces. When I add a
> > new
> > > > interface to this server (I use Microsoft Visual C++), and call
> > > > CoCreateInstance() for this interface from a test program, I get
> > > > HRESULT 0x80040154 (REGDB_E_CLASSNOTREG). The old interfaces still
> > work
> > > > fine.

> > > > I managed to work around this problem by removing the interface
> > again,
> > > > adding a new interface, and copying the functions defined earlier
> > back
> > > > into the (new) coclass.

> > > > Any idea what the problem is when I first add the interface?

> > > > Thanks for any help,
> > > > R. Moolenaar

> > Sent via Deja.com
> > http://www.deja.com/

> Sent via Deja.com
> http://www.deja.com/



Wed, 30 Jul 2003 06:52:01 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. ATL local server implementing 2 interfaces derrived from IUnknown

2. Passing Interface pointer from local server to MFC app

3. Local Server OK BUT Local Service FAILED

4. Starting an inproc server as a local server using a DLL Surrogate

5. Local Com Server and CGI in NT Server

6. Using enum as a return value in a custom [local] interface method

7. How to get multiple IP-Addresses of the local-host (for two network-interfaces)

8. Web References on Local Server?

9. Searching for local servers

10. Service or Local server

11. ATL local server shutdown question

12. How to debug a local server

 

 
Powered by phpBB® Forum Software