annotate vidix/dhahelperwin/dhahelper.h @ 25777:1d16b891d440

Cached file must be 0-terminated since we use string processing functions on it
author reimar
date Sat, 19 Jan 2008 16:41:35 +0000
parents ce2b69d32891
children a93e46adb54c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23277
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
1 /******************************************************************************
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
2 * dhahelper.c: direct hardware access under Windows NT/2000/XP
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
3 * Copyright (c) 2004 Sascha Sommer <saschasommer@freenet.de>.
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
4 *
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
5 * This file is part of MPlayer.
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
6 *
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
7 * MPlayer is free software; you can redistribute it and/or modify
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
8 * it under the terms of the GNU General Public License as published by
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
10 * (at your option) any later version.
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
11 *
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
12 * MPlayer is distributed in the hope that it will be useful,
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
15 * GNU General Public License for more details.
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
16 *
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
17 * You should have received a copy of the GNU General Public License
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
18 * along with MPlayer; if not, write to the Free Software
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
20 *****************************************************************************/
32873ccfb007 Add correct boilerplate license headers.
diego
parents: 23276
diff changeset
21
25618
ce2b69d32891 Fix illegal identifier, names starting with _ and uppercase are reserved.
diego
parents: 25535
diff changeset
22 #ifndef DHAHELPER_H
ce2b69d32891 Fix illegal identifier, names starting with _ and uppercase are reserved.
diego
parents: 25535
diff changeset
23 #define DHAHELPER_H
12057
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
24
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
25 // Define the various device type values. Note that values used by Microsoft
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
26 // Corporation are in the range 0-32767, and 32768-65535 are reserved for use
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
27 // by customers.
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
28
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
29 #define FILE_DEVICE_DHAHELPER 0x00008011
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
30
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
31 // Macro definition for defining IOCTL and FSCTL function control codes.
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
32 // Note that function codes 0-2047 are reserved for Microsoft Corporation,
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
33 // and 2048-4095 are reserved for customers.
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
34
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
35 #define DHAHELPER_IOCTL_INDEX 0x810
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
36
23276
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
37 #define IOCTL_DHAHELPER_MAPPHYSTOLIN CTL_CODE(FILE_DEVICE_DHAHELPER, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
38 DHAHELPER_IOCTL_INDEX, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
39 METHOD_BUFFERED, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
40 FILE_ANY_ACCESS)
12057
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
41
23276
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
42 #define IOCTL_DHAHELPER_UNMAPPHYSADDR CTL_CODE(FILE_DEVICE_DHAHELPER, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
43 DHAHELPER_IOCTL_INDEX + 1, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
44 METHOD_BUFFERED, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
45 FILE_ANY_ACCESS)
12057
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
46
23276
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
47 #define IOCTL_DHAHELPER_ENABLEDIRECTIO CTL_CODE(FILE_DEVICE_DHAHELPER, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
48 DHAHELPER_IOCTL_INDEX + 2, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
49 METHOD_BUFFERED, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
50 FILE_ANY_ACCESS)
12057
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
51
23276
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
52 #define IOCTL_DHAHELPER_DISABLEDIRECTIO CTL_CODE(FILE_DEVICE_DHAHELPER, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
53 DHAHELPER_IOCTL_INDEX + 3, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
54 METHOD_BUFFERED, \
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
55 FILE_ANY_ACCESS)
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
56
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
57
1eb8ea777dc4 prettyprinting cosmetics
diego
parents: 22900
diff changeset
58 #if !defined(__MINGW32__) && !defined(__CYGWIN__)
12057
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
59 #pragma pack(1)
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
60 typedef struct dhahelper_t {
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
61 #else
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
62 struct __attribute__((__packed__)) dhahelper_t {
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
63 #endif
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
64 unsigned int size;
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
65 void* base;
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
66 void* ptr;
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
67 };
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
68
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
69 typedef struct dhahelper_t dhahelper_t;
0f058e9cd422 Windows XP support
faust3
parents:
diff changeset
70
25618
ce2b69d32891 Fix illegal identifier, names starting with _ and uppercase are reserved.
diego
parents: 25535
diff changeset
71 #endif /* DHAHELPER_H */