source: trunk/include/win/driver.h@ 1036

Last change on this file since 1036 was 4, checked in by ktk, 26 years ago

Import

File size: 4.5 KB
Line 
1/* $Id: driver.h,v 1.1 1999-05-24 20:19:11 ktk Exp $ */
2
3/*
4 * Drivers definitions
5 */
6
7#ifndef __WINE_DRIVER_H
8#define __WINE_DRIVER_H
9
10#include "windef.h"
11
12#define DRV_LOAD 0x0001
13#define DRV_ENABLE 0x0002
14#define DRV_OPEN 0x0003
15#define DRV_CLOSE 0x0004
16#define DRV_DISABLE 0x0005
17#define DRV_FREE 0x0006
18#define DRV_CONFIGURE 0x0007
19#define DRV_QUERYCONFIGURE 0x0008
20#define DRV_INSTALL 0x0009
21#define DRV_REMOVE 0x000A
22#define DRV_EXITSESSION 0x000B
23#define DRV_EXITAPPLICATION 0x000C
24#define DRV_POWER 0x000F
25
26#define DRV_RESERVED 0x0800
27#define DRV_USER 0x4000
28
29#define DRVCNF_CANCEL 0x0000
30#define DRVCNF_OK 0x0001
31#define DRVCNF_RESTART 0x0002
32
33#define DRVEA_NORMALEXIT 0x0001
34#define DRVEA_ABNORMALEXIT 0x0002
35
36#define DRV_SUCCESS 0x0001
37#define DRV_FAILURE 0x0000
38
39#define GND_FIRSTINSTANCEONLY 0x00000001
40
41#define GND_FORWARD 0x00000000
42#define GND_REVERSE 0x00000002
43
44typedef struct {
45 DWORD dwDCISize;
46 LPCSTR lpszDCISectionName;
47 LPCSTR lpszDCIAliasName;
48} DRVCONFIGINFO16, *LPDRVCONFIGINFO16;
49
50typedef struct {
51 DWORD dwDCISize;
52 LPCWSTR lpszDCISectionName;
53 LPCWSTR lpszDCIAliasName;
54} DRVCONFIGINFO, *LPDRVCONFIGINFO;
55
56
57/* GetDriverInfo16 references this structure, so this a struct defined
58 * in the Win16 API.
59 * GetDriverInfo has been deprecated in Win32.
60 */
61typedef struct
62{
63 UINT16 length;
64 HDRVR16 hDriver;
65 HINSTANCE16 hModule;
66 CHAR szAliasName[128];
67} DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16;
68
69LRESULT WINAPI DefDriverProc16(DWORD dwDevID, HDRVR16 hDriv, UINT16 wMsg,
70 LPARAM dwParam1, LPARAM dwParam2);
71LRESULT WINAPI DefDriverProc(DWORD dwDriverIdentifier, HDRVR hdrvr,
72 UINT Msg, LPARAM lParam1, LPARAM lParam2);
73HDRVR16 WINAPI OpenDriver16(LPCSTR szDriverName, LPCSTR szSectionName,
74 LPARAM lParam2);
75HDRVR WINAPI OpenDriverA(LPCSTR szDriverName, LPCSTR szSectionName,
76 LPARAM lParam2);
77HDRVR WINAPI OpenDriverW(LPCWSTR szDriverName, LPCWSTR szSectionName,
78 LPARAM lParam2);
79#define OpenDriver WINELIB_NAME_AW(OpenDriver)
80LRESULT WINAPI CloseDriver16(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2);
81LRESULT WINAPI CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
82LRESULT WINAPI SendDriverMessage16( HDRVR16 hDriver, UINT16 message,
83 LPARAM lParam1, LPARAM lParam2 );
84LRESULT WINAPI SendDriverMessage( HDRVR hDriver, UINT message,
85 LPARAM lParam1, LPARAM lParam2 );
86HMODULE16 WINAPI GetDriverModuleHandle16(HDRVR16 hDriver);
87HMODULE WINAPI GetDriverModuleHandle(HDRVR hDriver);
88
89/* only win31 version for those below ? */
90HDRVR16 WINAPI GetNextDriver16(HDRVR16, DWORD);
91BOOL16 WINAPI GetDriverInfo16(HDRVR16, DRIVERINFOSTRUCT16 *);
92
93/* The following definitions are WINE internals */
94/* FIXME: This is a WINE internal struct and should be moved in include/wine directory
95 * Please note that WINE shares 16 and 32 bit drivers on a single list...
96 * Basically, we maintain an external double view on drivers, so that a 16 bit drivers
97 * can be loaded/used... by 32 functions transparently
98 */
99
100/* Who said goofy boy ? */
101#define WINE_DI_MAGIC 0x900F1B01
102
103typedef struct tagWINE_DRIVER
104{
105 DWORD dwMagic;
106 char szAliasName[128];
107 /* as usual LPWINE_DRIVER == hDriver32 */
108 HDRVR16 hDriver16;
109 union {
110 struct {
111 HMODULE16 hModule;
112 DRIVERPROC16 lpDrvProc;
113 } d16;
114 struct {
115 HMODULE hModule;
116 DRIVERPROC lpDrvProc;
117 } d32;
118 } d;
119 DWORD dwDriverID;
120 DWORD dwFlags;
121 struct tagWINE_DRIVER* lpPrevItem;
122 struct tagWINE_DRIVER* lpNextItem;
123} WINE_DRIVER, *LPWINE_DRIVER;
124
125/* values for dwFlags */
126#define WINE_DI_TYPE_MASK 0x00000007ul
127#define WINE_DI_TYPE_16 0x00000001ul
128#define WINE_DI_TYPE_32 0x00000002ul
129
130LPWINE_DRIVER DRIVER_RegisterDriver16(LPCSTR, HMODULE16, DRIVERPROC16, LPARAM, BOOL);
131LPWINE_DRIVER DRIVER_RegisterDriver32(LPCSTR, HMODULE, DRIVERPROC, LPARAM, BOOL);
132int DRIVER_GetType(HDRVR);
133
134#if 0
135#errro "it's never used"
136/* internal */
137typedef struct
138{
139 UINT length;
140 HDRVR hDriver;
141 HMODULE hModule;
142 CHAR szAliasName[128];
143} DRIVERINFOSTRUCTA, *LPDRIVERINFOSTRUCTA;
144#endif
145
146#endif /* __WINE_DRIVER_H */
Note: See TracBrowser for help on using the repository browser.