开发者

/clr option on managed inproc com-server crashes .net client

开发者 https://www.devze.com 2023-03-16 08:54 出处:网络
I have inproc com-server (dll) implemented within MSVS 2010. Client is pretty simple: static void Main()

I have inproc com-server (dll) implemented within MSVS 2010.

Client is pretty simple:

static void Main()
{
    var t = Type.GetTypeFromCLSID(clsid);
    dynamic o = Activator.CreateInstance(t);
    o.CallMe();
}

CallMe does nothing. It's empty and returns S_OK;

Client crashes with exception (vshost32.exe terminated) and than messagebox "would like to send crash detail to Microsoft?". I can't debug the crashed process at this开发者_Python百科 point.

I noticed that this exception occurs only if "\clr" option is applied to com-server (as it uses some .net classes inside but client doesn't call these methods)

I guess I have to check some exta project flags on Com-Server project?

What can I miss here?

Temporary solution

I kicked off .Net code I used to work with images and replaced it with native opensource C++ library. After that I could remove /clr option.

0

精彩评论

暂无评论...
验证码 换一张
取 消