
//#define GetVersion                   0x0

#define MapMemBufferGlobal           0x15
#define UnMapMemBufferGlobal         0x16

#define InstallIrqFastQueueUserApc   0x19
#define DeInstallIrqFastQueueUserApc 0x1A

//#define errCreateFile             1
#define errCreateEvent            2
//#define errDeviceIoControl        3
#define errBytesReturned          4

#define errIrqUnAvailable         0x40000001
#define errCanNotLockPage         0x40000002
#define errDMAUnAvailable         0x40000003
#define errStackOverflow          0x40000004
#define errInvalidCall            0x40000005
#define errCanNotMapPage          0x40000006
#define errCanNotUnMapPage        0x40000007
#define errInvalidHandle          0x40000008


typedef void (__stdcall* PTApcProc)(HANDLE);

struct TBufferGlobalInData
{
  void* PAddress;
  DWORD Size;
};


#ifdef __cplusplus
class TVLcardD
{
public:
  HANDLE hVxD;
  char*  VxDName;

    TVLcardD(char* VxDName);
    ~TVLcardD();

    void MapBufferGlobal(void** PPAddress, DWORD Size);
    void UnMapBufferGlobal(void* PAddress, DWORD Size);
};
typedef TVLcardD* PTVLcardD;


extern "C" void MyErrorHandler(DWORD MyError);


#else

#endif





#define InstallIrqHandler            0x1
#define DeInstallIrqHandler          0x2
#define InstallIrqCallback           0x3
#define DeInstallIrqCallback         0x4
#define InstallIrqEvent              0x5
#define DeInstallIrqEvent            0x6
#define InstallIrqMessage            0x7
#define DeInstallIrqMessage          0x8
#define UnMaskIrq                    0x9
#define MaskIrq                      0xA
#define InstallIrqInc                0xB
#define DeInstallIrqInc              0xC
#define InstallIrqQueueUserApc       0x11
#define DeInstallIrqQueueUserApc     0x12
#define AllocateDmaBuffer            0x13
#define FreeDmaBuffer                0x14



#define VDMAD_Get_Version                0x100
#define VDMAD_Virtualize_Channel         0x101
#define VDMAD_Get_Region_Info            0x102
#define VDMAD_Set_Region_Info            0x103
#define VDMAD_Get_Virt_State             0x104
#define VDMAD_Set_Virt_State             0x105
#define VDMAD_Set_Phys_State             0x106
#define VDMAD_Mask_Channel               0x107
#define VDMAD_UnMask_Channel             0x108
#define VDMAD_Lock_DMA_Region            0x109
#define VDMAD_Unlock_DMA_Region          0x10A
#define VDMAD_Scatter_Lock               0x10B
#define VDMAD_Scatter_Unlock             0x10C
#define VDMAD_Reserve_Buffer_Space       0x10D
#define VDMAD_Request_Buffer             0x10E
#define VDMAD_Release_Buffer             0x10F
#define VDMAD_Copy_To_Buffer             0x110
#define VDMAD_Copy_From_Buffer           0x111
#define VDMAD_Default_Handler            0x112
#define VDMAD_Disable_Translation        0x113
#define VDMAD_Enable_Translation         0x114
#define VDMAD_Get_EISA_Adr_Mode          0x115
#define VDMAD_Set_EISA_Adr_Mode          0x116
#define VDMAD_Unlock_DMA_Region_No_Dirty 0x117
#define VDMAD_Phys_Mask_Channel          0x118
#define VDMAD_Phys_Unmask_Channel        0x119
#define VDMAD_Unvirtualize_Channel       0x11A
#define VDMAD_Set_IO_Address             0x11B
#define VDMAD_Get_Phys_Count             0x11C
#define VDMAD_Get_Phys_Status            0x11D
#define VDMAD_Get_Max_Phys_Page          0x11E
#define VDMAD_Set_Channel_Callbacks      0x11F
#define VDMAD_Get_Virt_Count             0x120
#define VDMAD_Set_Virt_Count             0x121


