Re: How to registere Com classes of MFC/ATL support application
- From: "doublemaster007@xxxxxxxxx" <doublemaster007@xxxxxxxxx>
- Date: Wed, 20 Feb 2008 21:56:36 -0800 (PST)
On Feb 20, 9:11 pm, "Brian Muth" <bm...@xxxxxxxx> wrote:
<doublemaster...@xxxxxxxxx> wrote in messagenews:5f155070-4049-4698-bc5f-3ba54eee7ff3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Feb 20, 3:54 am, "Brian Muth" <bm...@xxxxxxxx> wrote:
<doublemaster...@xxxxxxxxx> wrote in messagenews:6588f83c-87ef-4c6f-88db-78b246a1f36d@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have a MFC Dilog based apllication with 'spport ATL'. i have
projectname.idl file in the project solution, which declares some
interfaces and coclasses.. Problem is how to register this calsses?
I can create the object using CCOmObject::Createinstance which doesnt
require any CLSID_XXX,,, but CCOMQIPtr failes..saying that class not
registered.. i tried manually registering the exe..still classes are
not registered..OLEVIEWER doesnt show up the interfaces or classes...
please help me..
I'm wondering if you want it the other way around, that is an ATL project with MFC support.
Brian
Noo...MFC project with ATL support. No way we can register the
classes??
Well, you probably can, but the wizard you chose doesn't put the infrastructure in place. You will have to craft all that work by
hand.
Frankly, MFC and ATL really don't mix that well together in the same project. I recommend either splitting the projects into two
subprojects (MFC in one, ATL in the other) or if you need an ATL project with GUI capabilities such as a dialog box, take a look at
WTL.
Brian- Hide quoted text -
- Show quoted text -
I think i have solved the problem..anyways thanks for ur help....
i was just debugging these methods and tried to see what is the
problem..
_AtlModule.RegisterClassObjects(CLSCTX_LOCAL_SERVER,
REGCLS_MULTIPLEUSE)
_AtlModule.UpdateRegistryAppId(FALSE);
_AtlModule.UnregisterServer(TRUE);
These weree the problem
1) for each class .rgs file will be created which has a entry..
val AppID = s '%APPID%'
i found that there was some trouble in %APPID%..so hard coded that
value
val AppID = s '{1111111-11111-1111-1111-111111}'
2) tlb file generated by the MFC application had a different name than
the exe...that is tlb file should have the same name as
[executablename.tlb]
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Some possible errors that you may get...
1) HRESULT returns 'interface not registered'->>> may be becoz tlb is
not registered..
.
- References:
- How to registere Com classes of MFC/ATL support application
- From: doublemaster007@xxxxxxxxx
- Re: How to registere Com classes of MFC/ATL support application
- From: Brian Muth
- Re: How to registere Com classes of MFC/ATL support application
- From: doublemaster007@xxxxxxxxx
- Re: How to registere Com classes of MFC/ATL support application
- From: Brian Muth
- How to registere Com classes of MFC/ATL support application
- Prev by Date: Re: Newbie: Client calling a server but what CLSID
- Next by Date: Re: Newbie: Client calling a server but what CLSID
- Previous by thread: Re: How to registere Com classes of MFC/ATL support application
- Next by thread: IOleInPlaceSite::OnUIActivate failing in IE
- Index(es):
Relevant Pages
|