Echelon OpenLDV User Manual Page 44

  • Download
  • Add to my manuals
  • Print
  • Page
    / 194
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 43
36 Using the OpenLDV API
information. If you do not specify a valid network interface name as the id
parameter when you call this function, or if the network interface referenced by
the id parameter cannot be found, the LDV_INVALID_DEVICE_ID or
LDVX_INVALID_XDRIVER return code is returned.
Each network interface can only be part of one OpenLDV session at a time on a
particular computer. If you call this function for a network interface that is being
used by another process on your computer, the function will fail, and the
LDV_ACCESS_DENIED return code is returned.
If you use xDriver to open a remote network interface while a remote client on
another computer is using it, the call to ldvx_open() might initially appear to
succeed. However, when you call ldv_read() or ldv_write() to read or write a
message to the network interface later, the LDVX_READ_FAILED or
LDVX_WRITE_FAILED failure code is returned, indicating that the session has
failed. The timing of the failure depends on the setting of the Synchronous
Timeout field of the xDriver profile that is handling the session, as well as the
setting of the TcpMaxConnectRetransmissions parameter on the computer
that is running the application. For more information about xDriver profiles, see
xDriver Profiles on page 134.
ldvx_register_window()
Call this function to register a Windows HWND object for receiving session
change notifications.
Syntax
LDVCode ldvx_register_window(
LdvHandle handle,
HWND hWnd,
LONG tag
)
Table 21. ldvx_register_window() Parameters
Parameter Direction Description
handle
Input The session handle for the network interface. This value
was returned as the handle parameter when you opened the
network interface with one of the open functions
(ldv_open(), ldv_open_cap(), or ldvx_open()).
hWnd Input The Windows handle for the session state change or
attachment notification messages, where available (for
example, from an xDriver device or a USB network
interface). This handle replaces any previously set handle
(such as one from one of the open functions).
If NULL, OpenLDV stops sending notifications.
See Windows Messages for Session Notifications on page 44.
Page view 43
1 2 ... 39 40 41 42 43 44 45 46 47 48 49 ... 193 194

Comments to this Manuals

No comments