将结构复制到另一个程序 [英] Copy Structure To Another Program

查看:44
本文介绍了将结构复制到另一个程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

长话短说:
我正在向使用 LabVIEW 输出原始数据文件.这些原始数据文件是LabVIEW集群(本质上是一个结构)的二进制表示.LabVIEW 提供了实例化类或结构或调用 .NET DLL 文件中定义的方法的函数.

Long story, long:
I am adding a web interface (ASPX.NET: VB) to a data acquisition system developed with LabVIEW which outputs raw data files. These raw data files are the binary representation of a LabVIEW cluster (essentially a structure). LabVIEW provides functions to instantiate a class or structure or call a method defined in a .NET DLL file.

我计划创建一个 DLL 文件,其中包含一个结构定义和一个具有传输结构方法的类.当网页请求数据时,它会调用带有文件名参数的 LabVIEW 可执行文件.LabVIEW 代码会实例化结构,从数据文件中填充结构,然后调用方法将数据传输回网站.

I plan to create a DLL file containing a structure definition and a class with methods to transfer the structure. When the webpage requests data, it would call a LabVIEW executable with a filename parameter. The LabVIEW code would instantiate the structure, populate the structure from the data file, then call the method to transfer the data back to the website.

长话短说:您建议我如何将结构实例从一个 .NET 程序转移(复制)到执行它的 VB.NET 程序?

Long story, short: How do you recommend I transfer (copy) an instance of a structure from one .NET program to the VB.NET program that executed it?

考虑的想法:套接字、临时文件、xml文件、控制台输出、配置文件、网络服务、CSV、某种类型的序列化、共享内存

Ideas considered: sockets, temp file, xml file, console output, config file, web services, CSV, some type of serialization, shared memory

推荐答案

序列化 XML 将是我对它的第一个初步尝试.(System.Xml.Serialization 命名空间).

Serialized XML would be my first initial stab at it. (System.Xml.Serialization namespace).

它是特定于 Microsoft 的,但它是标准的足够",与我听说过的恐怖故事相比,与以前的 MS 对象序列化技术相比,您可能可以使用另一种技术获得另一个程序以最少的麻烦来读取它.

It's Microsoft-specific but it's standard "enough" that you could probably get another program w/ another technology to read it with minimal finagling, compared to previous MS object serialization technologies I've heard horror stories about.

这篇关于将结构复制到另一个程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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