Here a snippet from the document:
[quote]New multicard function and procedures
SearchDevices
Syntax
FUNCTION SearchDevices(): Longint;
Description
The function returns all connected devices on the computer. The returned value is a bit field.
Returned value
· Bin 0000, Dec 0 : No devices was found
· Bin 0001, Dec 1 : Card address 0 was found.
· Bin 0010, Dec 2 : Card address 1 was found.
· Bin 0100, Dec 4 : Card address 2 was found.
· Bin 1000, Dec 8 : Card address 3 was found.
Example : return value 9 = devices with address 0 and 3 are connected.
[/quote]Do not use the OpenDevice call.
The document is in this package:
Software DLL Rev 2
older DLL with examples and source code (source can also be used with DLL rev 3)
There is no need to use OpenDevice.
You can just use SetCurrentDevice after the SearchDevices()
Here is the link to the download page:
[code]void __fastcall TForm1::Button1Click(TObject *Sender)
{
int intDevices;
bool bChecked;
bChecked = false;
intDevices = SearchDevices(); // Find devices command
if (intDevices) { // If any device was found
GroupBox1->Enabled = false; // Disable buttons
Connect1->Enabled = false;
GroupBox10->Enabled = true;
Timer1->Enabled = true;
}
if (intDevices & 1) { // Device 0 = connected
RadioButton1->Enabled = true; // Enable the radio button
if (!bChecked) {
RadioButton1->Checked = true; // Set radio button check
SetCurrentDevice (0); // Set the current device command
bChecked = true;
}
} else RadioButton1->Enabled = false; // Disable radio button
if (intDevices & 2) { // Device 1 = connected
RadioButton2->Enabled = true; // Enable the radio button
if (!bChecked) {
RadioButton2->Checked = true; // Set radio button check
SetCurrentDevice (1); // Set the current device command
bChecked = true;
}
} else RadioButton2->Enabled = false; // Disable radio button
if (intDevices & 4) { // Device 2 = connected
RadioButton3->Enabled = true; // Enable the radio button
if (!bChecked) {
RadioButton3->Checked = true; // Set radio button check
SetCurrentDevice (2); // Set the current device command
bChecked = true;
}
} else RadioButton3->Enabled = false; // Disable radio button
if (intDevices & 8) { // Device 3 = connected
RadioButton4->Enabled = true; // Enable the radio button
if (!bChecked) {
RadioButton4->Checked = true; // Set radio button check
SetCurrentDevice (3); // Set the current device command
bChecked = true;
}
} else RadioButton4->Enabled = false; // Disable radio button
if (bChecked) Button1->Enabled = false;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton1Click(TObject *Sender)
{
SetCurrentDevice (0); // Set the current device command
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RadioButton2Click(TObject *Sender)
{
SetCurrentDevice (1); // Set the current device command
}
//---------------------------------------------------------------------------[/code]