usbdmx.com Home of the opto isolated, bus powered, DMX512 interface with both in and out universes. Cheap and simple to build. USBDMX logo

WinTypes.h

00001 #ifndef __WINDOWS_TYPES__
00002 #define __WINDOWS_TYPES__
00003 
00004 #define MAX_NUM_DEVICES 50
00005 #include <sys/time.h>
00006 
00007 typedef unsigned int                    DWORD;
00008 typedef UInt32                  ULONG;
00009 typedef unsigned short                  USHORT;
00010 typedef unsigned short                  SHORT;
00011 typedef unsigned char                   UCHAR;
00012 typedef unsigned short                  WORD;
00013 typedef unsigned char                   BYTE;
00014 typedef BYTE                                    *LPBYTE;
00015 typedef signed char                     BOOL;
00016 typedef unsigned char                   BOOLEAN;
00017 typedef unsigned char                   CHAR;
00018 typedef BOOL                                    *LPBOOL;
00019 typedef UCHAR                                   *PUCHAR;
00020 typedef const char                              *LPCSTR;
00021 typedef char                                    *PCHAR;
00022 typedef void                                    *PVOID;
00023 typedef void                                    *HANDLE;
00024 typedef unsigned int                    LONG;
00025 typedef int                                             INT;
00026 typedef unsigned int                    UINT;
00027 typedef char                                    *LPSTR;
00028 typedef char                                    *LPTSTR;
00029 typedef DWORD                                   *LPDWORD;
00030 typedef WORD                                    *LPWORD;
00031 typedef ULONG                                   *PULONG;
00032 typedef PVOID                                   LPVOID;
00033 typedef void                                    VOID;
00034 typedef unsigned long long int  ULONGLONG;
00035 
00036 typedef struct _OVERLAPPED {
00037         DWORD Internal;
00038         DWORD InternalHigh;
00039         DWORD Offset;
00040         DWORD OffsetHigh;
00041         HANDLE hEvent;
00042 } OVERLAPPED, *LPOVERLAPPED;
00043 
00044 typedef struct _SECURITY_ATTRIBUTES {
00045         DWORD nLength;
00046         LPVOID lpSecurityDescriptor;
00047         BOOL bInheritHandle;
00048 } SECURITY_ATTRIBUTES , *LPSECURITY_ATTRIBUTES;
00049 
00050 typedef struct timeval SYSTEMTIME;
00051 typedef struct timeval FILETIME;
00052 #ifndef TRUE
00053 #define TRUE    1
00054 #endif
00055 #ifndef FALSE
00056 #define FALSE   0
00057 #endif
00058 
00059 //
00060 // Modem Status Flags
00061 //
00062 #define MS_CTS_ON           ((DWORD)0x0010)
00063 #define MS_DSR_ON           ((DWORD)0x0020)
00064 #define MS_RING_ON          ((DWORD)0x0040)
00065 #define MS_RLSD_ON          ((DWORD)0x0080)
00066 
00067 //
00068 // Error Flags
00069 //
00070 
00071 #define CE_RXOVER           0x0001  // Receive Queue overflow
00072 #define CE_OVERRUN          0x0002  // Receive Overrun Error
00073 #define CE_RXPARITY         0x0004  // Receive Parity Error
00074 #define CE_FRAME            0x0008  // Receive Framing error
00075 #define CE_BREAK            0x0010  // Break Detected
00076 #define CE_TXFULL           0x0100  // TX Queue is full
00077 #define CE_PTO              0x0200  // LPTx Timeout
00078 #define CE_IOE              0x0400  // LPTx I/O Error
00079 #define CE_DNS              0x0800  // LPTx Device not selected
00080 #define CE_OOP              0x1000  // LPTx Out-Of-Paper
00081 #define CE_MODE             0x8000  // Requested mode unsupported
00082 
00083 #ifndef INVALID_HANDLE_VALUE
00084 #define INVALID_HANDLE_VALUE 0xFFFFFFFF
00085 #endif
00086 
00087 #endif