#ifndef win2linux_H #define win2linux_H /* Test for GCC > 4.1.2 */ #define GCC_VERSION (__GNUC__ * 10000 \ + __GNUC_MINOR__ * 100 \ + __GNUC_PATCHLEVEL__) #if GCC_VERSION < 40102 #include #endif //-- for gcc 4.3 #include #include #include #include #include #include #include #include //------------ usb ------------------- #include #include #include #include #include //#include //#include //#include #include #define SF_DEBUG_USB 0 //------------------------------ #define USHORT unsigned short int #define ULONG unsigned long int #define LONG long int #define _WORD_DEFINED #define WORD unsigned short int #define _BYTE_DEFINED #define BYTE unsigned char #define byte unsigned char #define BOOL bool #define UCHAR unsigned char #define WCHAR unsigned short int #define PVOID void * #define PULONG unsigned long* #define AnsiString std::string // #define LPVOID void* #define Length() length() #define INVALID_HANDLE_VALUE NULL #define GENERIC_READ 1 #define GENERIC_WRITE 2 #define FILE_SHARE_READ 3 #define OPEN_EXISTING 4 #define FILE_DEVICE_UNKNOWN 5 #define METHOD_BUFFERED 6 #define FILE_ANY_ACCESS 7 #define ICONEXCLAMATION 8 #define MB_ICONEXCLAMATION 9 #define TRUE 10 #define METHOD_IN_DIRECT 11 #define METHOD_OUT_DIRECT 12 #define DWORD unsigned long int #define tpHigher 1 #define __fastcall #define __stdcall #define HANDLE int* //#define ShowMessage(name) puts(name) #define MB_OK 1 #define MB_ICONINFORMATION 4 //--------- win2linux.cpp ------- void ShowLastError(const char *msg); void MessageBox(void *p1, const char *msg, const char *dev, int flag); void ShowMessage(std::string msg); int usbdev_ioctl (int fd, int ifno, unsigned request, void *param); int DeviceIoControl (int* USBDeviceHandle, int IOCTL_SLBUSB, void *Control, int sizeControl, void *ioBuffer, int sizeBuffer, unsigned long *doneBytes, void *dummyNULL); #endif