12.07.2015 Views

Delcom DLL Manual - Delcom Products Inc.

Delcom DLL Manual - Delcom Products Inc.

Delcom DLL Manual - Delcom Products Inc.

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sub Form_Load()4.2 VB ExampleSource Code:Dim DeviceName As String * MAXDEVICENAMELEN ' Must predeclare sizeDim Result As LongDim DeviceHandle As LongDim Packet As PacketStructureDim DataExt As DataExtStructureText1.Text = "<strong>Delcom</strong> <strong>DLL</strong> VB Sample" & Chr(13) & Chr(10)Result = <strong>Delcom</strong>GetNthDevice(USBIODS, 0, DeviceName)If (Result) ThenText1.Text = Text1.Text & "Device Found" & Chr(13) + Chr(10)Text1.Text = Text1.Text & DeviceNameText1.Text = Text1.Text & Chr(13) & Chr(10)DeviceHandle = <strong>Delcom</strong>OpenDevice(DeviceName, 0)Text1.Text = Text1.Text + "Flash Green LED" + Chr(13) + Chr(10)Result = <strong>Delcom</strong>LEDControl(DeviceHandle, GREENLED, LEDFLASH)Result = <strong>Delcom</strong>CloseDevice(DeviceHandle)ElseText1.Text = Text1.Text + "Device Not Found" + Chr(13) + Chr(10)End IfEnd Sub<strong>Delcom</strong> <strong>DLL</strong> <strong>Manual</strong> 6 of 21 June 9, 2011 Ver 1.1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!