-
Feb 3rd, 2013, 07:48 AM
#1
Thread Starter
New Member
rfid + pr101-usb
hello
I want to help.
Program in rfid + pr101-usb
Overview of reader detection and connection functions
FEUSB.dll and FEISC.dll include several functions allowing to detect or connect to a
reader:
● FEUSB_ClearScanList
This function re-initializes the USB detection process by clearing the list of scanned
readers.
● FEUSB_Scan
This function searches for all the USB FEIG readers connected to the USB ports of the
host computer.
● FEUSB_GetScanListSize
This function retrieves the number of detected readers.
● FEUSB_GetScanListPara
This function gives access to all the detected reader information.
● FEUSB_OpenDevice
This function opens a communication channel between a USB FEIG reader and the
FEUSB dll, and assigns a handle to this channel.
● FEISC_NewReader
This function opens a communication channel between a USB FEIG reader and the
FEISC dll. The reader must have been previously detected by the
FEUSB_OpenDevice function.
Language *c#
class
using System;
using System.Collections.Generic;
//using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace iso_c.Classes
{
class FEUSB
{
public const int FEUSB_THREAD_ID = 1; //not useable in Visual Basic
public const int FEUSB_WND_HWND = 2 ; //not useable in Visual Basic
public const int FEUSB_CALLBACK = 3;
// defines for uiUse in FEUSB_EVENT_INIT
public const int FEUSB_DEV_CONNECT_EVENT = 1;
public const int FEUSB_DEV_DISCONNECT_EVENT = 2;
// scan options
public const int FEUSB_SCAN_FIRST = 0x00000001;
public const int FEUSB_SCAN_NEXT = 0x00000002;
public const int FEUSB_SCAN_NEW = 0x00000003;
public const int FEUSB_SCAN_ALL = 0x0000000F;
public const int FEUSB_SCAN_SEARCH = 0x00010000;
public const int FEUSB_SCAN_PACK = 0x00020000;
// search options
public const int FEUSB_SEARCH_FAMILY = 0x00000001;
public const int FEUSB_SEARCH_PRODUCT = 0x00000002;
public const int FEUSB_SEARCH_DEVICEID = 0x00000004;
// communication directions
public const int FEUSB_DIR_IN = 1;
public const int FEUSB_DIR_OUT = 2;
// Interface names
public const string FEUSB_INTERFACE_OBID_RCI = "OBID-RCI";
public const string FEUSB_INTERFACE_OBID_RCI_V2 = "OBID-RCI2";
// structure for transfering callback functions
struct FEUSB_EVENT_INIT{
int uiUse ; // defines the event (e.g. FEUSB_DEV_CONNECT_EVENT)
int uiMsg ; ///set always to 0 - in Visual Basic not used !!
int uiFlag ; // specifies the use of the Variant (e.g. FEUSB_CALLBACK)
int Method; // for callback-function
}
public struct FEUSB_SCANSEARCH
{
public int iMask;
public string cFamilyName;
public string cDeviceName;
public string cInterface;
public string cDeviceID;
}
// common functions
[DllImport("FEUSB.DLL")]
public static extern short FEUSB_GetDLLVersion(string cVersion);
[DllImport("FEUSB.DLL")]
public static extern int FEUSB_GetErrorText(int iError ,string cText );
[DllImport("FEUSB.DLL")]
public static extern int FEUSB_GetLastError(int iDevHnd, int iErrorCode, string cErrorText);
[DllImport("FEUSB.DLL", CallingConvention = CallingConvention.StdCall)]
public static extern int FEUSB_Scan(int iScanOpt ,FEUSB_SCANSEARCH searchOpt) ;
[DllImport("FEUSB.DLL", CallingConvention = CallingConvention.StdCall)]
public static extern int FEUSB_ScanAndOpen(int iScanOpt, FEUSB_SCANSEARCH searchOpt);
[DllImport("FEUSB.DLL")]
public static extern int FEUSB_GetScanListPara(int iIndex, string cPara,string cValue);
[DllImport("FEUSB.DLL")]
public static extern int FEUSB_GetScanListSize();
[DllImport("FEUSB.DLL")]
public static extern int FEUSB_ClearScanList();
[DllImport("FEISC.DLL")]
public static extern int FEISC_NewReader(int iPortHnd);
[DllImport("FEUSB.DLL")]
public static extern int FEUSB_OpenDevice(int dwDeviceID);
[DllImport("FEUSB.DLL")]
public static extern int FEUSB_CloseDevice(int iDevHnd);
}
}
call function
FEUSB.FEUSB_ClearScanList();
DeviceHnd =Classes.FEUSB.FEUSB_Scan(Classes.FEUSB.FEUSB_SCAN_ALL, oSearch); return 0 =true
lngReaderNumber = Classes.FEUSB.FEUSB_GetScanListSize(); return 1 =true
but
error1 = Classes.FEUSB. FEUSB_GetScanListPara(0, "DeviceHnd", strDeviceHnd);
error1 = Classes.FEUSB.FEUSB_GetScanListPara(0, "FamilyName", strFamilyName);
error1 = Classes.FEUSB.FEUSB_GetScanListPara(0, "DeviceName", strDeviceName);
error1 = Classes.FEUSB.FEUSB_GetScanListPara(0, "Present", strPresent[i]);
error1 = Classes.FEUSB.FEUSB_GetScanListPara(0, "Device-ID", strDeviceID);
return -1102 #define FEUSB_ERR_POINTER_IS_NULL
help me
-
Feb 3rd, 2013, 05:18 PM
#2
Re: rfid + pr101-usb
Help you do what? Are you programming in C# in which case this is not the correct forum, or do you have a program in C# that you want to convert to VB.Net? If the latter there are plenty of online convertors available so I'd try one first.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
Feb 4th, 2013, 12:07 AM
#3
Thread Starter
New Member
Re: rfid + pr101-usb
hello
Thanks you for your answer
i am programming in C#.I want a program with Language c#.
Where correct forum ؟ I got the program to run without error
I use a class from dll . (class FEUSB)
in forum call function dll
My problem with the function's (FEUSB. FEUSB_GetScanListPara) return value -1102
The right to work should return zero. The function returns zero but less than
Work function of the spin parameter
See the following link
http://www.st.com/internet/com/TECHN...CD00275180.pdf
http://epic.hpi.uni-potsdam.de/pub/H...esentation.pdf
To become more familiar with the functions
-
Feb 4th, 2013, 12:22 AM
#4
Thread Starter
New Member
Re: rfid + pr101-usb
If you are familiar with the language of the vb
Code you want to put vb
-
Feb 4th, 2013, 06:47 AM
#5
Thread Starter
New Member
Re: rfid + pr101-usb
help me
-
Feb 5th, 2013, 01:45 AM
#6
Thread Starter
New Member
-
Feb 5th, 2013, 08:03 AM
#7
Re: rfid + pr101-usb
Originally Posted by samira3
i am programming in C#.I want a program with Language c#.
Where correct forum ؟
That would be the one labeled C#
http://www.vbforums.com/forumdisplay.php?30-C
Of course this is VB forums and there is not a lot of activity in the C# area.
You could try
http://forums.codeguru.com/forumdisp...rp-Programming
Which has a bit more activity in the C# area
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|