Online Development Notebook > Index > Programming Overview > DLL Commands > SetReadTimeout

SetReadTimeout - Set the timeout for the read operation


This is a USBm.dll function that sets the value for the read timeout.

Command Syntax:

true⁄false USBm_SetReadTimeout( time )

The USBm_SetReadTimeout function syntax has these parts:

Part Description
time A sixteen-bit value of milliseconds.


Note: USBm_SetReadTimeout always returns TRUE.

VB Declaration (USBmAPI.bas)

Public Declare Function USBm_SetReadTimeout _
    Lib "USBm.dll" _
        (ByVal timeout As Integer) _
    As Integer

VB Example

    USBm_SetReadTimeout 3000

This code fragment shows that the read timeout has been set to three seconds.

C Prototype

int USBm_SetReadTimeout( unsigned int timeout );

C Example



Returns true if successful, false otherwise. This function sets the timeout for all the read commands. The value should be in milliseconds. The default is 1000 msecs = 1 sec.

Hardware:  U401 USB Interface    U421 USB Interface   U451 USB Interface

Programming:  USBm DLL Programming    Download Files

Application Notes:  U4x1 Application Notes    Misc Applications and Information    FAQ

While every effort has been made to make sure that the information posted on this site is correct, the author can not be held liable for any damages whatsoever for losses as a result of the application of this information. Use this information at your own risk.

USBmicro can design your custom and semi-custom USB product. Email about USB design can be directed to " Robert " at

Copyright © USBmicro, L.L.C., 2002-2010

Previous  |  Next ]     [ Up  |  First  |  Last ]     (Article 49 of 126)

This page is created with TreePad