C2542 What does this one mean?
Hi all,
I'm getting following error:
... atlcomcli.h(101) error C2542: 'IElementHandler' class object has no
constructor for initialization.
This diagonstic occured in compiler generated function
'CSoapEnvelopeHandler::CSoapEnvelopeHandler'
First of all i don't get any information about the source code line. I guess
this because the error occurs in a compiler generated function. But I have
absolutely no idea why the compiler points to CComPtrBase::CComPtrBase()
(atlcomcli.h ln 101).
BTW.: The template parameter T is not printed out.
It reads:
CComPtrBase() throw()
{
p = NULL;
Quote:
}
Why do we need a CSoapEnvelopeHandler here ?
Here are my classes
__interface IElementHandler /*no base*/
{
// 2 functions
Quote:
};
class CSoapEnvelopeHandler :
public IElementHandler
{
// same 2 functions implemented
Quote:
};
I can instantiate a CSoapEnvelopeHandler by adding
CSoapEnvelopeHandler h; into my main function.
I have an CAtlArray < CSoapEnvelopeHandler >
somewhere. No CComPtr in or with
CSoapEnvelopeHandler or IElementHandler.
Could someone explain the error.
I will try to create a small repro. But till then I would
greatly appreciate any input about this issue.
tia & Cheerio!
hg