发信人: kongzi (鸡龟骨滚羹), 信区: DotNet
标 题: Re: Need Help: a very wierd Managed C++ interop problem
发信站: BBS 未名空间站 (Fri Jan 12 20:10:45 2007)
Can you make the managed c++ library a dynamic one so you don't need to link
it into the native c++ system?
My guess is that when you link the managed c++ lib into the native one, the
whole lib will be executed in CLR.
【 在 OpenXml (Make One SomeOne Happy) 的大作中提到: 】
: DOTNET gurus, I really need your help on this wierd behavior.
: We have a system written in native c++; The system calls to a COM
: to perform some calculations. In one of the methods, we need to cast a
: struct as an array of bytes (BYTE *) and also passes the size of the array
: It all works fine until we link the system to a static library which is
: written in Managed C++. The input parameters to the COM method got messed
: up. It appears, the call tries to copy the input parameter data over (
: instead of using the passed in pointers). However, when copying the input
: data, it thought the data is of only one byte instead of an array, so it
: copies one byte over and messes up the call. If I remove the linkage to
※ 来源:·BBS 未名空间站 http://mitbbs.com·[FROM: 72.66.]