#ifndef _WUSBVME_DLL_H
#define _WUSBVME_DLL_H
#include <ansi_c.h>
#include <windows.h>
#include <cvidef.h>
#include <ivi.h>
#include "usb.h"
#include "xxusb_dll.h"
extern usb_dev_handle *udev;
void _VI_FUNC WUSBVME_load (char *module_path);
void _VI_FUNC WUSBVME_open (char *serial);
void _VI_FUNC WUSBVME_close (void);
#define VME_START(NODE) WUSBVME_load(NULL);WUSBVME_open((NODE));
#define VME_STOP() WUSBVME_close()
//#define VME_RESET() WIENVME_reset()
//#define VME_A24D8_R(VME,DATA) WIENVME_read8(hHandle24, 1, (VME), (DATA))
#define VME_A24D16_R(VME,DATA) VME_read_16(udev, Std_NoPriv_Data, (VME), (DATA))
#define VME_A24D32_R(VME,DATA) VME_read_32(udev, Std_NoPriv_Data, (VME), (DATA))
//#define VME_A24D8_W(VME,DATA) WIENVME_write8(hHandle24, 1, (VME), (DATA))
#define VME_A24D16_W(VME,DATA) VME_write_16(udev, Std_NoPriv_Data, (VME), (DATA))
#define VME_A24D32_W(VME,DATA) VME_write_32(udev, Std_NoPriv_Data, (VME), (DATA))
//#define VME_A32D8_R(VME,DATA) WIENVME_read8(hHandle32, 1, (VME), (DATA))
#define VME_A32D16_R(VME,DATA) VME_read_16(udev, Ext_NoPriv_Data, (VME), (DATA))
#define VME_A32D32_R(VME,DATA) VME_read_32(udev, Ext_NoPriv_Data, (VME), (DATA))
//#define VME_A32D8_W(VME,DATA) WIENVME_write8(hHandle32, 1, (VME), (DATA))
#define VME_A32D16_W(VME,DATA) VME_write_16(udev, Ext_NoPriv_Data, (VME), (DATA))
#define VME_A32D32_W(VME,DATA) VME_write_32(udev, Ext_NoPriv_Data, (VME), (DATA))
#endif