crash in mscorwks on 'simple' call, should be IUnknown but looks like it is trying IDispatch
From: Chad DePue (cbdepue_at_hotmail.com)
Date: 07/15/04
- Next message: Little Gazer: "C# Interop of C dll passing a struct"
- Previous message: Shawn Anderson: "Re: Attach a .NET Stream Class to StdOut/StdErro in StartupInfo for CreateProcessWithLogonW???"
- Next in thread: Mattias Sjögren: "Re: crash in mscorwks on 'simple' call, should be IUnknown but looks like it is trying IDispatch"
- Reply: Mattias Sjögren: "Re: crash in mscorwks on 'simple' call, should be IUnknown but looks like it is trying IDispatch"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 15 Jul 2004 16:01:16 -0700
Hello,
I have a COM interface that looks like the one below (this is a simplied
version). IFolder.GetNextItem always returns a subclass of IMyItem. The
implemented classes for this typelib are in C# (SDK 1.1), the caller is a
Win32 app. When my Win32 class gets a subclass of IMyItem and calls
GetPropSz, it crashes with the callstack below in mscorwks.dll.
The thing i can't understand is why mscorwks appears to be doing an
IDispatch call when the typelibrary is all based on IUnknown. For testing
purposes right now I'm just returning a hard coded string in the C# class
"foobar".
Please help me figure out why this is crashing! Thanks in advance...
[
object,
uuid(FB439F4D-CB3F-45d6-B383-289C86019CE9),
helpstring("IFolder Interface"),
pointer_default(unique)
]
interface IFolder : IUnknown
{
HRESULT GetNextItem(
[in] REFIID riid,
[out, iid_is(riid)] IUnknown **ppunkOut
)
}
[
object,
uuid(7D2A6BE3-B279-4728-9CFD-11DEA19F9665),
helpstring("IItem Interface"),
pointer_default(unique)
]
interface IMyItem : IUnknown
{
//--------------------------------------------------------------------------
-
// GetPropSz
//
// Gets a string-based property for this object.
HRESULT GetPropSz(
[in] ITEM_PROP ipProp,
[out] LPWSTR *ppszValue
);
...
Stack Trace
-----------------
00fff774 79314d48 082effe4 0012074c 77f51c48
mscorwks!Dispatch_GetTypeInfoCount+0x2a (FPO: [Non-Fpo])
00fff78c 79314d85 00fff798 082effe4 00000005
mscorwks!Dispatch_GetTypeInfoCount_CallBack+0x25 (FPO: [Non-Fpo])
00fff7a4 100544a5 082effe4 00000005 00fffa20
mscorwks!Dispatch_GetTypeInfoCount_Wrapper+0x21 (FPO: [Non-Fpo])
00fffa2c 10053f71 082effe4 100bbaa8 007c27e8
dac!CStoreHandler::_AssignBuilderObjField+0xd5 (FPO: [Non-Fpo]) (CONV:
thiscall) [c:\dac\storehandler.cpp @ 3753]
00fffa6c 1004efd1 082effe4 00fffbf4 00ffff34
dac!CStoreHandler::_CreateMsgObject+0x111 (FPO: [Non-Fpo]) (CONV: thiscall)
[c:\dac\storehandler.cpp @ 3638]
00fffac8 1009c6d3 00000001 00fffbf4 00000000
dac!CStoreHandler::getPage+0x1b1 (FPO: [Non-Fpo]) (CONV: thiscall)
[c:\dac\storehandler.cpp @ 1157]
00fffe58 1009b654 007c24b8 0000016e 00000000
dac!CmdHandler::_HandleCommand+0x1073 (FPO: [Non-Fpo]) (CONV: thiscall)
[c:\util\cmdhandler.cpp @ 1144]
00fffe70 1004b56c 007c24b8 0000016e 00000000
dac!CmdHandler::HandleCommand+0x44 (FPO: [Non-Fpo]) (CONV: thiscall)
[c:\util\cmdhandler.cpp @ 709]
00ffff68 1006a6bc 00000008 00000000 00000000 dac!CStoreUser::DoWork+0x1cc
(FPO: [Non-Fpo]) (CONV: thiscall) [c:\dac\storeuser.cpp @ 483]
00ffff80 10075ec3 007c1a70 77f51c48 ffffffff dac!UserThreadExt+0x15c (FPO:
[Non-Fpo]) (CONV: stdcall) [c:\dac\usrmgr.cpp @ 6524]
00ffffb4 77e7d33b 007c1f88 77f51c48 ffffffff dac!_threadstartex+0x73 (CONV:
stdcall) [threadex.c @ 212]
00ffffec 00000000 10075e50 007c1f88 00000000 kernel32!BaseThreadStart+0x37
(FPO: [Non-Fpo])
- Next message: Little Gazer: "C# Interop of C dll passing a struct"
- Previous message: Shawn Anderson: "Re: Attach a .NET Stream Class to StdOut/StdErro in StartupInfo for CreateProcessWithLogonW???"
- Next in thread: Mattias Sjögren: "Re: crash in mscorwks on 'simple' call, should be IUnknown but looks like it is trying IDispatch"
- Reply: Mattias Sjögren: "Re: crash in mscorwks on 'simple' call, should be IUnknown but looks like it is trying IDispatch"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|