long AddDeviceText(LPCTSTR DeviceName, LPCTSTR DeviceText, long IDNumber, long SlinkeNumber, long Ports)



A string containing then name you want to use for the device within the control. This needs to be unique.


A string containing the equivalent text to a device file.


A 1-based index to which device number you want to use if the device file defines more than one possible device ID (e.g. Sony CD changers and VCRs can be numbered 1,2, or 3)


A 1-based index to which Slink-e the device is connected to. Most people only own one Slink-e, so this is usually 1. This parameter is also used to index CM11As and DXSs when the appropriate device files are loaded.


Which Slink-e port the device is connected to. The following bit fields are valid:

Bit Port
0 S-Link Port 0
1 S-Link Port 1
2 S-Link Port 2
3 S-Link Port 3
4 IR Port 0
(only IR port on Slink-e V1.0)
5 IR Port 1
6 IR Port 2
7 IR Port 3
8 IR Port 4
9 IR Port 5
10 IR Port 6
11 IR Port 7
(also Control-S Port on Slink-e V2.0)


This method is identical to AddDevice except that the device information is provided in the string parameter DeviceText instead of using a device file. The format for the DeviceText string is identical to that of an actual device file and must contain newline characters to separate lines in the device definitions just as would occur in a file. There are a few good reasons you may prefer to use AddDeviceText over AddDevice:

You can contain device information in string resources within your application, allowing it to operate without any external device files.
You can add devices to a remote server (using DCOM) without having to have those device files present on the server.
You can generate new device files on the fly.

See Also

SlinkX.AddDevice, SlinkX.DeleteDevice