Commit 3fb2f428 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Better 16/32 bit driver messages mapping and handling.

Better protection against bad handles.
parent 7f95bb7f
...@@ -87,13 +87,18 @@ HDRVR16 WINAPI GetNextDriver16(HDRVR16, DWORD); ...@@ -87,13 +87,18 @@ HDRVR16 WINAPI GetNextDriver16(HDRVR16, DWORD);
BOOL16 WINAPI GetDriverInfo16(HDRVR16, DRIVERINFOSTRUCT16 *); BOOL16 WINAPI GetDriverInfo16(HDRVR16, DRIVERINFOSTRUCT16 *);
/* The following definitions are WINE internals */ /* The following definitions are WINE internals */
/* FIXME: This is a WINE internal struct and should be moved in include/wine directory */ /* FIXME: This is a WINE internal struct and should be moved in include/wine directory
/* Please note that WINE shares 16 and 32 bit drivers on a single list... */ * Please note that WINE shares 16 and 32 bit drivers on a single list...
/* Basically, we maintain an external double view on drivers, so that a 16 bit drivers * Basically, we maintain an external double view on drivers, so that a 16 bit drivers
* can be loaded/used... by 32 functions transparently * can be loaded/used... by 32 functions transparently
*/ */
/* Who said goofy boy ? */
#define WINE_DI_MAGIC 0x900F1B01
typedef struct tagWINE_DRIVER typedef struct tagWINE_DRIVER
{ {
DWORD dwMagic;
char szAliasName[128]; char szAliasName[128];
/* as usual LPWINE_DRIVER == hDriver32 */ /* as usual LPWINE_DRIVER == hDriver32 */
HDRVR16 hDriver16; HDRVR16 hDriver16;
...@@ -118,8 +123,9 @@ typedef struct tagWINE_DRIVER ...@@ -118,8 +123,9 @@ typedef struct tagWINE_DRIVER
#define WINE_DI_TYPE_16 0x00000001ul #define WINE_DI_TYPE_16 0x00000001ul
#define WINE_DI_TYPE_32 0x00000002ul #define WINE_DI_TYPE_32 0x00000002ul
LPWINE_DRIVER DRIVER_RegisterDriver16(LPCSTR, HMODULE16, DRIVERPROC16, LPARAM); LPWINE_DRIVER DRIVER_RegisterDriver16(LPCSTR, HMODULE16, DRIVERPROC16, LPARAM, BOOL);
LPWINE_DRIVER DRIVER_RegisterDriver32(LPCSTR, HMODULE, DRIVERPROC, LPARAM); LPWINE_DRIVER DRIVER_RegisterDriver32(LPCSTR, HMODULE, DRIVERPROC, LPARAM, BOOL);
int DRIVER_GetType(HDRVR);
#if 0 #if 0
#errro "it's never used" #errro "it's never used"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment