Adapted to separation between KERNEL and USER.
[wine] / include / driver.h
1 /*
2  * Drivers definitions
3  */
4
5 #ifndef __WINE_DRIVER_H
6 #define __WINE_DRIVER_H
7
8 #define DRV_LOAD                0x0001
9 #define DRV_ENABLE              0x0002
10 #define DRV_OPEN                0x0003
11 #define DRV_CLOSE               0x0004
12 #define DRV_DISABLE             0x0005
13 #define DRV_FREE                0x0006
14 #define DRV_CONFIGURE           0x0007
15 #define DRV_QUERYCONFIGURE      0x0008
16 #define DRV_INSTALL             0x0009
17 #define DRV_REMOVE              0x000A
18 #define DRV_EXITSESSION         0x000B
19 #define DRV_EXITAPPLICATION     0x000C
20 #define DRV_POWER               0x000F
21
22 #define DRV_RESERVED            0x0800
23 #define DRV_USER                0x4000
24
25 #define DRVCNF_CANCEL           0x0000
26 #define DRVCNF_OK               0x0001
27 #define DRVCNF_RESTART                  0x0002
28
29 #define DRVEA_NORMALEXIT                0x0001
30 #define DRVEA_ABNORMALEXIT              0x0002
31
32 #define GND_FIRSTINSTANCEONLY   0x00000001
33
34 #define GND_FORWARD                     0x00000000
35 #define GND_REVERSE                     0x00000002
36
37 /* FIXME: unused? */
38 typedef struct {
39         DWORD   dwDCISize;
40         LPCSTR  lpszDCISectionName;
41         LPCSTR  lpszDCIAliasName;
42 } xDRVCONFIGINFO, *xLPDRVCONFIGINFO;
43
44 /* GetDriverInfo16 references this structure, so this a struct defined
45  * in the Win16 API.
46  */
47 typedef struct
48 {
49     UINT16       length;
50     HDRVR16      hDriver;
51     HINSTANCE16  hModule;
52     CHAR         szAliasName[128];
53 } DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16;
54
55 /* FIXME: Is this a WINE internal struct? */
56 typedef struct tagDRIVERITEM
57 {
58     DRIVERINFOSTRUCT16    dis;
59     WORD                  count;
60     struct tagDRIVERITEM *lpPrevItem;
61     struct tagDRIVERITEM *lpNextItem;
62     DRIVERPROC16          lpDrvProc;
63 } DRIVERITEM, *LPDRIVERITEM;
64
65 /* internal */
66 typedef struct
67 {
68     UINT32      length;
69     HDRVR32     hDriver;
70     HMODULE32   hModule;
71     CHAR        szAliasName[128];
72 } DRIVERINFOSTRUCT32A, *LPDRIVERINFOSTRUCT32A;
73
74 /* internal */
75 typedef struct tagDRIVERITEM32A {
76         DRIVERINFOSTRUCT32A     dis;
77         DWORD                   count;
78         struct tagDRIVERITEM32A *next;
79         DRIVERPROC32            driverproc;
80 } DRIVERITEM32A,*LPDRIVERITEM32A;
81
82 LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg, 
83                                LPARAM dwParam1, LPARAM dwParam2);
84 LRESULT WINAPI DefDriverProc32(DWORD dwDriverIdentifier, HDRVR32 hdrvr,
85                                UINT32 Msg, LPARAM lParam1, LPARAM lParam2);
86 #define DefDriverProc WINELIB_NAME(DefDriverProc)
87 HDRVR16 WINAPI OpenDriver16(LPCSTR szDriverName, LPCSTR szSectionName,
88                             LPARAM lParam2);
89 HDRVR32 WINAPI OpenDriver32A(LPCSTR szDriverName, LPCSTR szSectionName,
90                              LPARAM lParam2);
91 HDRVR32 WINAPI OpenDriver32W(LPCWSTR szDriverName, LPCWSTR szSectionName,
92                              LPARAM lParam2);
93 #define OpenDriver WINELIB_NAME_AW(OpenDriver)
94 LRESULT WINAPI CloseDriver16(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2);
95 LRESULT WINAPI CloseDriver32(HDRVR32 hDriver, LPARAM lParam1, LPARAM lParam2);
96 #define CloseDriver WINELIB_NAME(CloseDriver)
97 LRESULT WINAPI SendDriverMessage16( HDRVR16 hDriver, UINT16 message,
98                                     LPARAM lParam1, LPARAM lParam2 );
99 LRESULT WINAPI SendDriverMessage32( HDRVR32 hDriver, UINT32 message,
100                                     LPARAM lParam1, LPARAM lParam2 );
101 #define SendDriverMessage WINELIB_NAME(SendDriverMessage)
102 HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDriver);
103 HMODULE32 WINAPI GetDriverModuleHandle32(HDRVR32 hDriver);
104 #define GetDriverModuleHandle WINELIB_NAME(GetDriverModuleHandle)
105
106 /* only win31 version for those below ? */
107 HDRVR16 WINAPI GetNextDriver(HDRVR16, DWORD);
108 BOOL16 WINAPI GetDriverInfo(HDRVR16, DRIVERINFOSTRUCT16 *);
109
110 #endif  /* __WINE_DRIVER_H */