# Transmitting Long Messages - neoVI API

**Overview**

For ISO9141 and Keyword 2000 Networks, a long message transmission option is allowed. Long message transmission is necessary when the message length exceeds twelve bytes (including checksum if used).

You can transmit a long message by calling the [TxMessages](/neovi-api/win32-api-overview-intrepidcs-api/message-functions-overview-intrepidcs-api/txmessages-method-intrepidcs-api.md) method with modified arguments. First, you will pass an array of icsSpyMessage structures which contain the long message data. This data in the array must be set properly. Finally, you must set the lNumMessages argument to the number of structures.

You must setup the long message data properly. For the first message, both the 3 byte Header and the 8 byte data section are filled in. For consecutive messages only the 8 byte data section is filled in.

**VB Example to Send a 16 byte message**

```vbnet
'// Declared at form level
Private m_hObject As intptr '// Holds the object for the state of the application


Dim stMsgJ1850(0 To 3) As icsSpyMessageJ1850
Dim lResult As Long

'//Fill in first header
stMsgJ1850(0).Header1 = &H1
stMsgJ1850(0).Header2 = &H2
stMsgJ1850(0).Header3 = &H0
stMsgJ1850(0).NumberBytesHeader = 3

'//Fill in data
stMsgJ1850(0).Data1 = &H4
stMsgJ1850(0).Data2 = &H5
stMsgJ1850(0).Data3 = &H6
stMsgJ1850(0).Data4 = &H7
stMsgJ1850(0).Data5 = &H8
stMsgJ1850(0).Data6 = &H9
stMsgJ1850(0).Data7 = &H10
stMsgJ1850(0).Data8 = &H11
stMsgJ1850(0).NumberBytesData = 8

'//Fill in data
stMsgJ1850(1).NumberBytesHeader = 0
stMsgJ1850(1).Data1 = &H12
stMsgJ1850(1).Data2 = &H13
stMsgJ1850(1).Data3 = &H14
stMsgJ1850(1).Data4 = &H15
stMsgJ1850(1).Data5 = &H16
stMsgJ1850(1).NumberBytesData = 5

'// Transmit the assembled message
lResult = icsneoTxMessages(m_hObject, stMsgJ1850(0), NETID_ISO, 2)

'// Test the returned result
If Not CBool(lResult) Then
    MsgBox("Problem Transmitting Message")
End If
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.intrepidcs.com/neovi-api/win32-api-overview-intrepidcs-api/message-functions-overview-intrepidcs-api/transmitting-long-messages-intrepidcs-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
