用Vb.net结构作为工艺参数

用Vb.net结构作为工艺参数,vb.net,process,structure,Vb.net,Process,Structure,我有一个项目,我需要调用一个进程,这个进程反过来会调用一个库函数,这个函数需要作为一个结构传递。我想要的是这样的东西: Structure struct1 Dim field1 As String Dim field2 As Double End Structure With process With .StartInfo .Arguments() = "/Payroll" & _ ."/wh

我有一个项目,我需要调用一个进程,这个进程反过来会调用一个库函数,这个函数需要作为一个结构传递。我想要的是这样的东西:

   Structure struct1
    Dim field1 As String
    Dim field2 As Double
End Structure

  With process
        With .StartInfo
             .Arguments() = "/Payroll" & _
             ."/wh" & struct1
             .WorkingDirectory = System.Windows.Forms.Application.StartupPath
             .FileName = "VCWin32Tools.exe"
        end with
         .Start()
        .WaitForExit()
        .Close()
  end with
注:
在实际项目中,它包含很多字段,我不知道如何传递它,或者是否有其他方法。

您不能将对象传递给新进程。在
Arguments
属性中输入的内容必须是可以在命令行中键入的内容。应用程序将以命令行参数的形式接收该数据,因此它必须是字符串,并且只能是字符串。如果要从控制台窗口启动此过程,您会键入什么?这就是您需要在
文件名
参数
属性中输入的内容