托管代码是在c ++中使用SMO的唯一方法吗? [英] Is managed code is the only way to use SMO in c++?

查看:161
本文介绍了托管代码是在c ++中使用SMO的唯一方法吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在C ++中使用SQLSERVER SMO。是托管代码是使用C ++中的SQLSERVER SMO的唯一方法吗?

I have to work with SQLSERVER SMO in C++. Is Managed code is the only way to work with SQLSERVER SMO in C++ ?

我尝试了很多方法..但我发现使用托管代码是唯一的选择。是否有其他方法?

I have tried many ways.. but I found that using managed code is the only option. Are there other ways?

推荐答案

技术上,您可以将.NET程序集公开到标准COM基础结构,但这需要更改源代码(请参阅 this )。您可以尝试在标准SMO对象周围创建一个COM感知包装器,然后在C ++中将它们用作常规COM类。

Technically, you can expose .NET assemblies to standard COM infrastructure, but that requires changes to the source code (see this). You may try and create a COM-aware wrappers around standard SMO objects and then use them as regular COM classes in C++.

这篇关于托管代码是在c ++中使用SMO的唯一方法吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆