我在做COM封装API给C#调用,我把COM直接引用到C#项目里编译就生成一.NET封装的dll,我用ildasm转换成IL,因为我的API有函数参数是HDC类型,.NET自动转换的成valuetype TESTCOMLib._RemotableHandle& 类型,看文章说改成 native int 就可以和C#里的intptr类型对应起来了,可是改了IL 却不能用ilasm 转成DLL了:命令和错误提示如下
C:\Documents and Settings\ZHY>ilasm /RESOURCE=Test.res /dll Test.il /output=Test
.dllMicrosoft (R) .NET Framework IL Assembler.  Version 1.1.4322.573
Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
Assembling 'Test.il' , no listing file, to DLL --> 'Test.dll'
Could not open Test.il***** FAILURE *****
请高手进来帮帮忙啊!