在vb中如何用sendmessage向外部程序发送结构体?
这是两个结构体Private Type CARTICLE
article As String
Color1 As String
Color2 As String
CoreArea As String
KANBANID As String
Side1partpullofflength As String
Side1seal As String
Side1strippinglength As String
Side1terminal As String
Side2partpullofflength As String
Side2seal As String
Side2strippinglength As String
Side2terminal As String
WireID As String
WireLength As String
End Type
Private Type CJOB
ArticleKey As String
BatchSize As String
JobID As String
TotalPieces As String
End Type
Private Sub Command2_Click()’send data
Dim s As String
Dim FT_hWnd, l As Long
Dim ID_Control_hWnd As Long
Dim pid As Long
Dim JOB As CJOB
JOB.ArticleKey = "3"
JOB.BatchSize = "4"
JOB.JobID = "5"
JOB.TotalPieces = "6"
s = '???不知道如何把结构体数据给s
FT_hWnd = 0
hProcess = OpenProcess(PROCESS_TERMINATE, 0, pid)
FT_hWnd = FindWindow(vbNullString, "1.txt - 记事本")
If FT_hWnd = 0 Then
MsgBox "False", vbInformation, "Title"
End
End If
ID_Control_hWnd = GetDlgItem(FT_hWnd, &HF)
SendMessage ID_Control_hWnd, WM_SETTEXT, 0, ByVal s'????这一句也不知道如何写
End Sub
请高手多指教啊!