🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: microsoft.public.vc.activextemplatelib
1 messages
1 total messages Started by David Morgenlender Wed, 23 Sep 1998 00:00
How convert Dual Interface -> Custom Interface in ATL?
#8
Author: David Morgenlender
Date: Wed, 23 Sep 1998 00:00
60 lines
2907 bytes
I'm developing a inproc (DLL) server using VC++ 5.  This had been working with
dual interfaces.  I recently changed the interfaces from dual to custom.
However, now the client cannont access the server interfaces.

Here's how I determined what to change when switching from dual interface to
custom interface:  I created 2 apps with the ATL Wizard, with the only
difference being the interface type.  I compared them.  I made the following
changes to my server, based upon the difference:

.IDL:

	Removed "object" & "dual" from each interface definition.
	Changed IDispatch to IUnknown for each interface definition.
	Removed the "id(n)" at the beginning of each method def.

ClassName.H:

	Changed each:
		"public IDispatchImpl<Interface Name>"
	    to:
		"public InterfaceName"

	Removed the following line:
		"COM_INTERFACE_ENTRY2( ... IDispatch ...)

ClassName.RGS:

	Removed the following line:
		"ForceRemove 'Progammable'"



Did I do this correctly?


Since I changed all interfaces to custom, I get the following HRESULT when
invoking CoCreateInstance() from a client, and *ppv is left as null:

	E_FAIL (0x80004005)

I've invoked CoCreateInstance() using both CLSCTX_SERVER & CLSCTX_INPROC_SERVER,
with the same results.

I only made the .RGS change after I had already encountered the error;  the
change made no difference.  I also tried using RegSvr32 to undefine the server.
In each case I rebuilt the app to insure the server was registered.  I check the
registry under ROOT to be sure the server is listed appropriately.

I traced through DllGetClassObject() on the server.  It returns without error &
with a non-null *ppv.

The app is being developed using Borland C++ Builder 3.  Everything is running
under Win95.

Any suggestions for what the problem may be, or how to debug this???

=======================================================
Dave Morgenlender
e-mail: dmorgen@alum.mit.edu
=======================================================
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads