From: NickP on
Hi there,

I am currently recieving an assertion failure with my declaration of
CAppModule (AFAIK).

The assertion failure is...

atlbase.h line 2699
Expression: _pAtlModule ==0

My understanding of this is you can only have one instance of this
object being declared in an application?

Is there a work around for this? I found the following URL (from a
similar question), but it doesn't look too relevant...

http://tech.groups.yahoo.com/group/wtl/message/3085

also I can't even find an atdafx.h header.

Any ideas on this one? Many thanks in advance.

Nick.


From: Igor Tandetnik on
"NickP" <a(a)a.com> wrote in message
news:Of9vNWgGHHA.2456(a)TK2MSFTNGP06.phx.gbl
> I am currently recieving an assertion failure with my declaration
> of CAppModule (AFAIK).

Show your declaration of CAppModule. What compiler version are you
using?

> also I can't even find an atdafx.h header.

It's a typo. The post meant stdafx.h
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


From: NickP on
Hi Igor,

In stdafx.h

extern CAppModule _Module;

In main source file,

CAppModule _Module;

I'm using Visual Studio 2005.

This is the only reference I can find to any modules in the application
and this error has just come about after integrating some 3rd party code,
which I do not have source control over.

Many thanks.

Nick.

"Igor Tandetnik" <itandetnik(a)mvps.org> wrote in message
news:e7wZGbgGHHA.2128(a)TK2MSFTNGP03.phx.gbl...
> "NickP" <a(a)a.com> wrote in message
> news:Of9vNWgGHHA.2456(a)TK2MSFTNGP06.phx.gbl
>> I am currently recieving an assertion failure with my declaration
>> of CAppModule (AFAIK).
>
> Show your declaration of CAppModule. What compiler version are you using?
>
>> also I can't even find an atdafx.h header.
>
> It's a typo. The post meant stdafx.h
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>


From: Igor Tandetnik on
NickP <a(a)a.com> wrote:
> In stdafx.h
>
> extern CAppModule _Module;
>
> In main source file,
>
> CAppModule _Module;
>
> I'm using Visual Studio 2005.
>
> This is the only reference I can find to any modules in the
> application and this error has just come about after integrating some
> 3rd party code, which I do not have source control over.

The assert happens in CAtlModule constructor, right? There should indeed
only be one CAtlModule instance in an application, and it appears this
third party code already defines one (a rather bad idea for a library
intended to be integrated with other people's code). I suggest you
contact the authors of that code.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


From: NickP on
Hi Ignor,

Thank you, this is what I had dreaded. Many thanks for confirming this.

Nick.

"Igor Tandetnik" <itandetnik(a)mvps.org> wrote in message
news:e%23OfPYhGHHA.3780(a)TK2MSFTNGP02.phx.gbl...
> NickP <a(a)a.com> wrote:
>> In stdafx.h
>>
>> extern CAppModule _Module;
>>
>> In main source file,
>>
>> CAppModule _Module;
>>
>> I'm using Visual Studio 2005.
>>
>> This is the only reference I can find to any modules in the
>> application and this error has just come about after integrating some
>> 3rd party code, which I do not have source control over.
>
> The assert happens in CAtlModule constructor, right? There should indeed
> only be one CAtlModule instance in an application, and it appears this
> third party code already defines one (a rather bad idea for a library
> intended to be integrated with other people's code). I suggest you contact
> the authors of that code.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
>