Sorry if here only for c language. But below code is from c++ that i need to convert into vb6.
1 2 3 4 5
CBM_RdrName CBMReader[100];
long l_ret_value = CBM_EnumerateReader(CBMReader);
CHAR* l_pc_UsbDeviceName;
for(int i = 0; i< CBMReader->ul_NbRdr; i++)
l_pc_UsbDeviceName = CBMReader[i].cRdrName;
I'm going to send a byte to the .dll to retrieve machine information. Right now I'm using the string to pass the value to CBMReader and I able to retrieve the value.
1 2 3 4 5 6 7 8 9 10 11 12
Dim Devc as String
Dim CBMReader as String
For i = 0 To 50
If tempDev = "" Then
tempDev = "z"
Else
Devc = Devc & tempDev
End If
Next i
CBMReader = Devc
status = CBM_EnumerateReader(CBMReader)
debug.print CBMReader
Result for CBMReader is MachineName. If i used this code to convert the string into byte, my vb6 forcely been close.
1 2 3
dim bytes() as byte
bytes = StrConv(Devc, vbFromUnicode)
status = CBM_EnumerateReader(bytes)