日期:2014-05-20 浏览次数:21180 次
public interface HvCallback {
public static interface PLATE_NO_CALLBACK extends Callback {
int invoke(HvResult lpParam, String pString, int dwStrLen, int dwType);
}
}
public class HvCallBackClass {
public static class PlateNoCallBack implements PLATE_NO_CALLBACK {
@Override
public int invoke(HvResult lpParam, String pString, int dwStrLen, int dwType) {
System.out.println("回调会的数据:");
return 1;
}
}
}
typedef INT (CDECL* HVAPI_CALLBACK_TFD_STRING)(
PVOID pUserData,
LPCSTR pString,
DWORD dwStrLen,
DWORD dwType
)
static public PlateNoCallBack plateNoFunction = new PlateNoCallBack();
int resultReceive2 = HVInterface.INSTANCE.HVAPI_SetCallBackEx(DevResult.hv_devHandle, plateNoFunction,
DevResult, 0, CALLBACK_TYPE_TFD_STRING,null);