Ldv_set_driver_info(), Syntax – Echelon OpenLDV User Manual
Page 39

OpenLDV Programmer’s Guide
31
specify the Windows device path, for example, \\.\MYLON1.0. See
Appendix A, Custom Network Interfaces, on page147, for more
information about custom network interfaces.
•
Set the desc field to the description of the new device, or set it to NULL
or an empty string if the device description is not to be modified.
•
Set the caps and capsMask fields according to the capabilities of the
device.
•
Set the transId field to the transceiver ID for the device.
•
Set the driverId field to an LdvDriverID value that corresponds to the
driver ID of the device that you are creating or modifying, or set it to
-1 if the driver ID is not to be modified.
See Structures and Enumerations for the Device API on page 37 for a description
of the LDVDeviceInfo structure. See Structures and Enumerations for the
Driver API on page 42 for a description of the LDVDriverID enumeration
values.
To modify individual fields (read-modify-write) for an existing device, perform the
following steps:
1. Retrieve the current information using the ldv_get_device_info()
function.
2. Allocate and initialize a new LDVDeviceInfo structure.
3. Copy unchanging fields from the old structure into the new. For strings
that are not being modified, set them to NULL.
4. Set the fields to be changed in the new structure.
5. Call the ldv_set_device_info() function.
6. Deallocate the new structure.
7. Release the old resources by calling the ldv_free_device_info() function.
See Working with a Custom Network Interface on page 148 for an example of how
to use this function.
ldv_set_driver_info()
Call this function to create or modify the information for a specified L
ON
W
ORKS
interface device driver.
Syntax
LDVCode ldv_set_driver_info(
LDVDriverID nDriverId,
const LDVDriverInfo* pDriverInfo
)