Re: PassthruAPP compile on VC 7(?) problem



Igor Tandetnik wrote:


Where do you get ATL headers from? I was under impression that VC++ Toolkit does come with ATL.

No, it has only C++ support, C RTL and so on, neither ATL nor MFC. So I got ATL stuff from the Platform SDK.


Have you tried debugging into ObjectLock's constructor? Most likely the critical section is not initialized, though I don't quite see how that could happen.

Its contructor does merely nothing:
CComObjectLockT(CComObjectRootEx<ThreadModel>* p)
{
if (p)
p->Lock();
m_p = p;
}

and p->Lock() goes to:

void Lock() {m_critsec.Lock();}

So perhaps this m_critsec is not initialized.


The problem is that it tries to access something at address 0x10, which looks like an offset to some class member of a class object which points to NULL:

-------
(4a0.564): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
eax=00000000 ebx=00000000 ecx=00be2800 edx=00000280 esi=00be27f0 edi=00000000
eip=77f88216 esp=0012fa28 ebp=0012fa88 iopl=0 nv up ei pl zr na po nc
cs=001b ss=0023 ds=0023 es=0023 fs=0038 gs=0000 efl=00010246
ntdll!RtlpWaitForCriticalSection+0x60:
77f88216 ff4010 inc dword ptr [eax+0x10] ds:0023:00000010=????????
------

See that:
inc dword ptr [eax+0x10]
and eax=00000000
Looks like something is NULL and it tries to its member at offset 10.

Because I am not familiar with ATL, I don't know what to change to get critical initialized initialized.
.



Relevant Pages

  • Re: Interpretting the symbols (WinDbg)
    ... My first post was in the programmer.kernel NG. ... I was testing a VB application that hosts a server control (ATL). ... First chance exceptions are reported before any exception handling. ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Interpretting the symbols (WinDbg)
    ... My first post was in the programmer.kernel NG. ... I was testing a VB application that hosts a server control (ATL). ... First chance exceptions are reported before any exception handling. ...
    (microsoft.public.vc.atl)
  • Re: Problem with CoCreateInstance
    ... Can you post the server class' declaration? ... The likeliest reason for E_OUTOFMEMORY is an exception ... > I have a out-of-process COM server designed with ATL ...
    (microsoft.public.vc.atl)
  • Re: Exception from HRESULT when using COM server and ISupportErrorInfo
    ... What exatcly does the Errorfunction do in the ATL COM? ... > ITestInterface1 and ITestInterface2. ... > // Methodname: ShowChar ... > i get a nice exception which says "Error in ShowChar". ...
    (microsoft.public.dotnet.languages.csharp)
  • rpcrt4.dll exception
    ... consists of numerous *.exe's & *.dll's and uses MFC, STL, ATL and DCOM. ... The exception output seems to suggest that the exception occurs in ... map files indicates that this is within the SelectTransferSyntaxfunction. ... Although I know that this file is part of DCOM. ...
    (microsoft.public.windowsce.platbuilder)