我在哪里可以找到mscorlib::_AppDomain, mscorlib::_Type等的声明
Where can I find the declaration of mscorlib::_AppDomain, mscorlib::_Type etc
我使用这个为我的基地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并向下滚动到导航窗格中的类型库,找到适当的类型库,右键单击并单击视图,有声明
相关文章:
- 使用 [] 运算符时"binding reference of type discards qualifiers"
- 在 QVector<std::unique_ptr 上使用 std::find<Type>>
- 在类型和包装器之间reinterpret_cast是否安全<Type>?
- 使用 cmake 的 Linux 终端上的"Conversion to non-scalar type is requested"错误
- 控制到达非空函数clang(-Wreturn-type)的末尾
- std::unordered_map 类型对象声明期间出现"field has incomplete type"错误
- 将系数存储在头文件的数组中("does not name a type"错误)
- 尝试打开 ifstream 时出现"Incomplete type"错误
- 将成员函数作为构造函数参数调用时出错 "Variable is not a type name"
- 在"结构提升::enable_if<提升::is_pod<T>,无效>"中没有名为"type"的类型
- "Missing type specifier - int assumed"无法通过向主函数添加"return 0"来解决
- OpenCV CV_16F type
- C++ "错误:在'类 std::result_of< ... >"中没有名为'type'的类型"
- 将内存分配返回值强制转换为 TYPE 数组
- C++ 一个lambda浅拷贝const Type&如果它被赋予一个命名捕获,如[copy=val](){}?
- reference_wrapper导致"incomplete type is not allowed"
- 继承类时"invalid use of incomplete type ‘class tree_node_t’"
- 由于"error C4430: missing type specifier - int assumed. Note: C++ does not support default-int",我现在无法编
- 如何解决"'mutex' in namespace 'std' does not name a type"?
- 结构中的错误"Incomplete type is not allowed"