| 1 | /****************************************************************************** |
| 2 | * dhahelper.c: direct hardware access under Windows NT/2000/XP |
| 3 | * Copyright (c) 2004 Sascha Sommer <[email protected]>. |
| 4 | * |
| 5 | * This file is part of MPlayer. |
| 6 | * |
| 7 | * MPlayer is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * MPlayer is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with MPlayer; if not, write to the Free Software |
| 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
| 20 | *****************************************************************************/ |
| 21 | |
| 22 | #ifndef _RWPORTS_H |
| 23 | #define _RWPORTS_H 1 |
| 24 | |
| 25 | // Define the various device type values. Note that values used by Microsoft |
| 26 | // Corporation are in the range 0-32767, and 32768-65535 are reserved for use |
| 27 | // by customers. |
| 28 | |
| 29 | #define FILE_DEVICE_RWPORTS 0x00008011 |
| 30 | |
| 31 | // Macro definition for defining IOCTL and FSCTL function control codes. |
| 32 | // Note that function codes 0-2047 are reserved for Microsoft Corporation, |
| 33 | // and 2048-4095 are reserved for customers. |
| 34 | |
| 35 | #define RWPORTS_IOCTL_INDEX 0x811 |
| 36 | |
| 37 | |
| 38 | |
| 39 | #define IOCTL_RWPORTS_READ_BYTE CTL_CODE(FILE_DEVICE_RWPORTS, \ |
| 40 | RWPORTS_IOCTL_INDEX + 0, \ |
| 41 | METHOD_BUFFERED, \ |
| 42 | FILE_ANY_ACCESS) |
| 43 | |
| 44 | #define IOCTL_RWPORTS_WRITE_BYTE CTL_CODE(FILE_DEVICE_RWPORTS, \ |
| 45 | RWPORTS_IOCTL_INDEX + 1, \ |
| 46 | METHOD_BUFFERED, \ |
| 47 | FILE_ANY_ACCESS) |
| 48 | |
| 49 | #define IOCTL_RWPORTS_READ_BYTES CTL_CODE(FILE_DEVICE_RWPORTS, \ |
| 50 | RWPORTS_IOCTL_INDEX + 2, \ |
| 51 | METHOD_BUFFERED, \ |
| 52 | FILE_ANY_ACCESS) |
| 53 | |
| 54 | #define IOCTL_RWPORTS_WRITE_BYTES CTL_CODE(FILE_DEVICE_RWPORTS, \ |
| 55 | RWPORTS_IOCTL_INDEX + 3, \ |
| 56 | METHOD_BUFFERED, \ |
| 57 | FILE_ANY_ACCESS) |
| 58 | |
| 59 | #endif |