VC ++ 6.0中的System.Xml.Schema [英] System.Xml.Schema in VC++ 6.0

查看:57
本文介绍了VC ++ 6.0中的System.Xml.Schema的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




有没有办法在VC ++ 6.0中使用System.Xml.Schema类?


问候,

Maansi

Hi,

Is there a way to use the System.Xml.Schema classes in VC++ 6.0?

Regards,
Maansi

推荐答案

" Maansi Sanghi" <毫安********** @ abosoftware.com>在消息中写道

新闻:uW ************* @ TK2MSFTNGP10.phx.gbl ...
"Maansi Sanghi" <ma**********@abosoftware.com> wrote in message
news:uW*************@TK2MSFTNGP10.phx.gbl...
有没有办法使用VC ++ 6.0中的System.Xml.Schema类?
Is there a way to use the System.Xml.Schema classes in VC++ 6.0?



VC ++ 6.0只能生成非托管的Win32可执行文件和DLL。

类.Net平台仅在托管代码中可用。所以,

简短答案是否定的。


或者,您可以下载包含

相同编译器的Visual C ++工具包和Visual Studio 2003中的链接器可在此处获得:

http ://msdn.microsoft.com/visualc/vctoolkit2003/

并创建一个托管类来使用整个框架,包括XML。


安装了.Net平台的系统中最不具吸引力的选项可以让你使用

开发一个非托管的本机Win32可执行文件VC ++ 6.0托管公共语言运行时(CLR)并使用.Net框架提供的COM

接口启动CLR,访问

默认域,加载程序集进入该域,创建和实例一个

托管类型(即.Net类)并调用该类的方法来执行

无论XML关系如何你需要的任务。这引出了一个问题,即你将如何创建托管类。为此,您可以使用.Net SDK附带的命令行C#

编译器。


问候,

Will



VC++ 6.0 is only capable of generating unmanaged Win32 executables and DLLs.
The classes of the .Net platform are available only in managed code. So, the
short answer is no.

Alternatively, you can download the Visual C++ toolkit which contains the
same compiler and linker as in Visual Studio 2003 available here:

http://msdn.microsoft.com/visualc/vctoolkit2003/

and create a managed class to use the whole of the framework, XML included.

The least attractive option on a system in which the .Net platform is
installed would have you develop an unmanaged native Win32 executable with
VC++ 6.0 to host the Common Language Runtime (CLR) and use the COM
interfaces that the .Net framework provides start the CLR, get access to the
default domain, load an assembly into that domain, create and instance of a
managed type (i.e. a .Net class) and call a method of that class to perform
whatever XML related task you need. That begs the question as to how you
would create the managed class. For that, you could use the command line C#
compiler that comes with the .Net SDK.

Regards,
Will


解决方案中的问题是

现有大型应用程序需要XML功能

已开发使用非托管代码。


(1)无法在我的

应用程序的非托管类中声明托管类。

both替代方案建议创建一个托管类。


(2)我有很少机器和其他开发人员的.Net许可证

ahave license
for 6.0 ..even所以我不想转向.NET,这是不希望

编译整个

应用程序,可选择托管代码为ON。


(3)这是我想到的解决方案。


1.创建.NET DLL使用regasm for创建使用

COM对象

使用托管类---->来自----->的COM对象来自

非托管代码

System.Xml.Schema .NET dll

遗留应用程序。

(4 )我不确定这个解决方案是否有效。尚未开发

a概念验证

以上方法。


问候,

Maansi


" William DePalo [MVP VC ++]" < WI *********** @ mvps.org>在消息中写道

news:uF ************** @ TK2MSFTNGP10.phx.gbl ...
The catch in the solution is that the XML functionality is required for an
existing large application
already developed using unmanaged code.

(1) An managed class cannot be declared in the unmanaged classes of my
application.
Both the alternatives suggest creating a managed class.

(2) I have .Net licence for very few machines and rest of the developers
ahave licence
for 6.0 ..even so i do not want to shift to .NET that is do not want to
compile the whole
application with the option of Managed Code as ON.

(3) This is the solution i was thinking of.

1. Create .NET DLL use regasm for creating Use the
COM object
using managed class ----> a COM object from -----> from the
unmanaged code
System.Xml.Schema .NET dll
of legacy application.
(4) I am not sure if this solution would work. Have not been able to develop
a proof of concept as yet
for the above approach.

Regards,
Maansi


"William DePalo [MVP VC++]" <wi***********@mvps.org> wrote in message
news:uF**************@TK2MSFTNGP10.phx.gbl...
" Maansi Sanghi" <毫安********** @ abosoftware.com>在消息中写道
新闻:uW ************* @ TK2MSFTNGP10.phx.gbl ...
"Maansi Sanghi" <ma**********@abosoftware.com> wrote in message
news:uW*************@TK2MSFTNGP10.phx.gbl...
有没有办法使用System.Xml VC ++ 6.0中的模式类?
VC ++ 6.0只能生成非托管的Win32可执行文件和
Is there a way to use the System.Xml.Schema classes in VC++ 6.0?
VC++ 6.0 is only capable of generating unmanaged Win32 executables and



DLL。 .Net平台的类仅在托管代码中可用。所以,
简短的答案是否定的。

或者,您可以下载Visual C ++工具包,其中包含与Visual Studio 2003中相同的编译器和链接器:

http://msdn.microsoft.com/visualc/vctoolkit2003 /

创建一个托管类来使用整个框架,包括XML

.Net平台系统中最不具吸引力的选项是否已安装将使用
VC ++ 6.0开发非托管本机Win32可执行文件来托管公共语言运行时(CLR)并使用.Net框架提供的COM
接口启动CLR,访问
默认域,将程序集加载到该域,创建和
a托管类型的实例(即.Net类)并调用该类的方法到
执行任何XML你需要的相关任务。这就引出了关于如何创建托管类的问题。为此,您可以使用.Net SDK附带的命令行
C#编译器。

问候,


DLLs. The classes of the .Net platform are available only in managed code. So, the short answer is no.

Alternatively, you can download the Visual C++ toolkit which contains the
same compiler and linker as in Visual Studio 2003 available here:

http://msdn.microsoft.com/visualc/vctoolkit2003/

and create a managed class to use the whole of the framework, XML included.
The least attractive option on a system in which the .Net platform is
installed would have you develop an unmanaged native Win32 executable with
VC++ 6.0 to host the Common Language Runtime (CLR) and use the COM
interfaces that the .Net framework provides start the CLR, get access to the default domain, load an assembly into that domain, create and instance of a managed type (i.e. a .Net class) and call a method of that class to perform whatever XML related task you need. That begs the question as to how you
would create the managed class. For that, you could use the command line C# compiler that comes with the .Net SDK.

Regards,
Will



" Maansi Sanghi" <毫安********** @ abosoftware.com>在消息中写道

news:ul ************* @ TK2MSFTNGP14.phx.gbl ...
"Maansi Sanghi" <ma**********@abosoftware.com> wrote in message
news:ul*************@TK2MSFTNGP14.phx.gbl...
解决方案中的问题是已经使用非托管代码开发的现有大型应用程序需要XML功能。

(1)无法在我的非托管类中声明托管类/>应用程序。
这两种方法都建议创建一个托管类。

(2)我有很少机器和其他开发人员的.Net许可证
ahave license
for 6.0 ..所以我不想转移到.NET,不希望用托管代码选项编译整个
应用程序。

(3)这是我想到的解决方案。
The catch in the solution is that the XML functionality is required for an
existing large application
already developed using unmanaged code.

(1) An managed class cannot be declared in the unmanaged classes of my
application.
Both the alternatives suggest creating a managed class.

(2) I have .Net licence for very few machines and rest of the developers
ahave licence
for 6.0 ..even so i do not want to shift to .NET that is do not want to
compile the whole
application with the option of Managed Code as ON.

(3) This is the solution i was thinking of.




我把你的问题意味着你_only_已经VC ++ 6.00作为开发

工具,并希望在没有升级

开发工具的情况下获得一些互操作性。所以,我在免费工具世界中勾画了你的选择。


顺便说一句,我描绘的内容并不涉及在非托管代码中声明托管类

在#1中。


是的,您当然可以将.Net程序集视为一个COM组件,并且可以使用
代码。在C ++管理扩展基本指南(Apress)一书中,
Challa和Laksberg提供了一些选择。


我现在很忙,但如果没有人提供一些片段,你可以使用

概念证明,我会在今晚晚些时候在这里发布。


问候,




I took your question to mean that you _only_ had VC++ 6.00 as a development
tool and wanted to get some interoperability without the upgrade in
development tool. So, I sketched your options in the free tools world.

Just by the way, what I sketched does not involve declaring managed classes
in unmanaged code as in #1.

Yes, you certainly can treat a .Net assembly as a COM component in maanged
code. In the book "Essential Guide to Managed Extensions for C++ (Apress)
Challa and Laksberg offer a few options.

I''m a little busy now, but if no one provides some snippets you can use a
proof of concept, I''ll post them here later tonight.

Regards,
Will


这篇关于VC ++ 6.0中的System.Xml.Schema的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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