我在哪里可以找到mscorlib::_AppDomain, mscorlib::_Type等的声明

Where can I find the declaration of mscorlib::_AppDomain, mscorlib::_Type etc

本文关键字:mscorlib Type 声明 AppDomain 在哪里      更新时间:2023-10-16

我使用这个为我的基地https://code.msdn.microsoft.com/CppHostCLR-e6581ee0/sourcecode?fileId=21953&pathId=1366553273

但是在我的VS2010中,我无法获得智能感知或去声明。我试过谷歌,但是它把我带到了。net文档。

例如,我不能得到参数(或找到它的声明):spDefaultAppDomain->Load_2(bstrAssemblyName, &spAssembly);

_AppDomainPtr spDefaultAppDomain = NULL;_AppDomainPtr基本上是mscorlib::_AppDomain..

对不起,由于我在这类编码方面没有太多经验,我不知道如何正确地提出这个问题。

我在这里找到了答案。

这个例子是这样声明的:

#pragma comment(lib, "mscoree.lib")
#import "mscorlib.tlb" raw_interfaces_only
            high_property_prefixes("_get","_put","_putref")
            rename("ReportEvent", "InteropServices_ReportEvent")
using namespace mscorlib;

我已经在VS2017中测试了这个,对于这个编译器,一定要在C/c++/语言设置中将一致性模式设置为No,以便它能够正确编译。

您可以使用OLEView.exe并向下滚动到导航窗格中的类型库,找到适当的类型库,右键单击并单击视图,有声明