Release 980628

Sun Jun 28 18:37:02 1998  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c]
	Moved page-fault handling to INSTR_EmulateInstruction.

	* [scheduler/thread.c]
	Added locking and check for own thread in Suspend/ResumeThread.

Sat Jun 27 21:25:21 1998  Ulrich Weigand <weigand@informatik.uni-erlangen.de>

	* [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c] 
	  [graphics/x11drv/bitblt.c] [include/bitmap.h]
	Improved DIB section handling using page fault handlers.
	(Note: This patch includes code contributed by Matthew J. Francis.)

	* [memory/virtual.c] [if1632/signal.c] [include/global.h]
	Page Fault handler support added.

	* [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c]
	  [misc/winsock_dns.c] [include/sig_context.h] [include/thread.h]
	16-bit %fs handling improved: Always preserve 16-bit %fs value,
	always restore 32-bit %fs value for signal handlers.

	* [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c]
	  [loader/ne/resource.c] [include/callback.h] [include/module.h]
	  [if1632/kernel.spec] [if1632/wprocs.spec]
	Resource Handler function pointer stored as 16-bit SEGPTR.

	* [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec]
	  [if1632/kernel.spec] [loader/ne/module.c]
	Some minor incompatibilities fixed (Win32s relies on those):
	GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize
	should cope with having the WINDOWPOS structure trashed;
	the OFSTRUCT in the NE module image should be placed *last*.

	* [include/windows.h]
	Missing prototype for FlushViewOfFile.

	* [loader/task.c]
	Bugfix: Command line should *not* start with a blank.
	
	* [loader/ne/segment.c]
	Bugfix: Fixups to offset 0 were never applied.

	* [misc/lstr.c]
	Use debugstr_a in OutputDebugString16.

	* [msdos/dpmi.c]
	Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added.

	* [msdos/int21.c]
	Stub for int 21 AX=440d CL=6f (get drive map information) added.

Fri Jun 26 18:08:30 1998  Rein Klazes <rklazes@casema.net>

	* [windows/winpos.c]
	Fix small buglet that mixed up maximized and minimized windows.

	* [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c]
	  [graphics/x11drv/graphics.c]
	Fix some bugs with lines joining styles. Draws rectangles
	with thick pens now correctly.

Fri Jun 26 16:22:23 1998  James Juran <jrj120@psu.edu>

	* [misc/shell.c]
	Fixed bug I introduced last release in InternalExtractIcon.

	* [win32/file.c]
	Added documentation for CreateFile32A.

	* [documentation/wine.man]
	Updated manpage.	

	* [ChangeLog]
	Added my entry from last release.

Fri Jun 26 13:33:30 1998  Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>

	* [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h]
	  [include/print.h] [objects/gdiobj.c]
	First stages of an internal Postscript driver. See
	graphics/psdrv/README . Should print text (badly) from win3.1 notepad,
	write and winword6.

	* [documentation/printing]
	Some notes on printing.

	* [controls/edit.c]
	Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle.
	EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS
	and not as an action as the docs say. This actually makes more sense.
	Scroll the caret back to zero after a WM_SETTEXT.

Fri Jun 26 10:56:25 1998  Marcus Meissner <marcus@jet.franken.de>

	* [if1632/snoop.c]
	Added win16 inter-dll snooping.

	* [win32/ordinals.c]
	KERNEL_485 is GetProcessDword.

	* [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c]
	Added xcalloc so we 0 initialize XImages. 
	Fixes/Hides the 'junk around MOPYFish'.

	* [misc/ntdll.c]
	Some stubs added.

Thu Jun 25 15:22:43 1998  Adrian Harvey <adrian@select.com.au>

	* [scheduler/thread.c] 
	Implemented SuspendThread and ResumeThread.

Thu Jun 25 00:55:03 1998  Peter Hunnisett <hunnise@nortel.ca>

	* [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c]
	  [relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in]
	  [documentation/status/directplay]
	Added preliminary support for DirectPlay & DirectPlayLobby. Moved the
	preliminary stubs put in the dsound files into two new files
	dplay.h and dplay.c.
	Added new debug channel (dplay) for this.
	Created new document to keep track of implementation.

	* [include/winioctl.h][win32/device.c]
	Added some framework in DeviceIoControl to, in the future, support
	the "builtin" windows dwIoControlCodes. Added new header file
	winioctl.h . 

	* [multimedia/mmsystem.c]
	Added slightly improved debugging information for PlaySound.

Wed Jun 24 12:00:00 1998  Juergen Schmied <juergen.schmied@metronet.de> 

	* [files/profile.c][graphics/x11drv/xfont.c][loader/module.c]
	Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp,
	lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp
	because it's not necessary to support locale on such places.
	It causes a huge overhead and even fails sometimes 

	* [include/oleauto.h][include/winerror.h]
	Added some ole-related constants.

	* [misc/shell.c]
	SHELL32_DllGetClassObject, SHGetSpecialFolderLocation,
	SHGetPathFromIDList improved the stubs

	* [ole/folders.c]
	IShellFolder* functions rewrote the stubs so don't crash and give
	something sensible back, started implementation of.

	* [ole/typelib.c][relay32/oleaut32.spec]
	LoadTypeLib32, RegisterTypeLib stub.

	* [ole/ole2nls.c]
	Fixed a buffer overrun in CompareString32A.
	Test for a bad pointer in LCMapString32A (happens
	in winhlp32 while building a index for searching). 

	* [relay32/oleaut32.spec] [ole/typelib.c]
	Added stub for LoadTypeLib (ole32) to make excel95 happy.

Tue Jun 23 22:47:09 1998  Alex Priem <alexp@sci.kun.nl>

	* [files/profile.c] [relay32/kernel32.spec]
	Added WritePrivateProfileStructA, GetPrivateProfileStructA,
	GetPrivateProfileSectionNames16.

Tue Jun 23 01:34:43 1998  Pascal Cuoq <pcuoq@ens-lyon.fr>

	* [ole/ole2nls.c]
	GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases.
	LCMapString32A: Map final '\0' for '\0'-terminated strings.

	* [misc/shellord.c] [files/profile.c] [graphics/driver.c] 
	  [loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c]
	Changed lstrcmpi32A -> strcasecmp.  Should be OK in these places.

Sat Jun 20 23:40:00 1998  Bertho Stultiens <bertho@akhphd.au.dk>

	* [tools/wrc/]
	Wrc version 1.0.2 (20-Jun-1998). Please revert to 
	the file tools/wrc/CHANGES for details.

Sat Jun 20 14:58:00 1998  Marcel Baur  <mbaur@g26.ethz.ch>

	* [ole/ole2nls.c] [ole/nls/*]
	Added the first 57 nls files, most are not yet complete.

Wed Jun 17 11:16:54 1998  David Luyer <luyer@ucs.uwa.edu.au>

	* [relay32/relay386.c] [if1632/relay.c]
	Move debug_relay_(include|exclude)_list handling into
	seperate function RELAY_ShowDebugmsgsRelay().  Include
	checking of this for 16 bit calls (originally only
	32-bit calls).

	* [relay32/snoop.c] [misc/main.c]
	Add debug_snoop_(include|exclude)_list as per the relay stuff.
	Fix typo and add information on -debugmsg +/-relay=... in
	help on -debugmsg.  Refer to availability of snoop too.

Tue Jun 10 22:00:18 1998  Eric Kohl <ekohl@abo.rhein-zeitung.de>

	* [controls/header.c][include/header.h][include/commctrl.h]
	Added owner draw support.

	* [windows/nonclient.c][windows/sysmetics.c]
	Fixed menu bar height for Win95 look.
	Split NC_AdjustRect95() into NC_AdjustRectOuter95() and
	NC_AdjustRectInner95 to fix a menu bar bug.
	Improved Win95 look.

	* [controls/progress.c]
	Improved drawing code. Borders will be drawn by non-client code.

	* [controls/updown.c]
	Changed memory allocation and fixed some bugs.

	* [controls/toolbar.c]
	Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs.
	Several improvements.

	* [misc/shell.c]
	Added stub for BrowseForFoldersA().

	* [misc/shellord.c]
	Added stub for SHELL32_147().

	* [controls/comctl32undoc.c]
	Minor changes.

	* [documentation/common_controls]
	New File: Documentation about development status, undocumented
	features and functions of the common controls.
diff --git a/include/dplay.h b/include/dplay.h
new file mode 100644
index 0000000..f9d649e
--- /dev/null
+++ b/include/dplay.h
@@ -0,0 +1,338 @@
+/* Header for Direct Play and Direct Play Lobby */
+#ifndef __WINE_DPLAY_H
+#define __WINE_DPLAY_H
+
+#include "mmsystem.h"
+
+/* Return Values */
+#define _FACDP  0x877
+#define MAKE_DPHRESULT( code )    MAKE_HRESULT( 1, _FACDP, code )
+
+#define DP_OK                           S_OK
+#define DPERR_ALREADYINITIALIZED        MAKE_DPHRESULT(   5 )
+#define DPERR_ACCESSDENIED              MAKE_DPHRESULT(  10 )
+#define DPERR_ACTIVEPLAYERS             MAKE_DPHRESULT(  20 )
+#define DPERR_BUFFERTOOSMALL            MAKE_DPHRESULT(  30 )
+#define DPERR_CANTADDPLAYER             MAKE_DPHRESULT(  40 )
+#define DPERR_CANTCREATEGROUP           MAKE_DPHRESULT(  50 )
+#define DPERR_CANTCREATEPLAYER          MAKE_DPHRESULT(  60 )
+#define DPERR_CANTCREATESESSION         MAKE_DPHRESULT(  70 )
+#define DPERR_CAPSNOTAVAILABLEYET       MAKE_DPHRESULT(  80 )
+#define DPERR_EXCEPTION                 MAKE_DPHRESULT(  90 )
+#define DPERR_GENERIC                   E_FAIL
+#define DPERR_INVALIDFLAGS              MAKE_DPHRESULT( 120 )
+#define DPERR_INVALIDOBJECT             MAKE_DPHRESULT( 130 )
+#define DPERR_INVALIDPARAM              E_INVALIDARG
+#define DPERR_INVALIDPARAMS             DPERR_INVALIDPARAM
+#define DPERR_INVALIDPLAYER             MAKE_DPHRESULT( 150 )
+#define DPERR_INVALIDGROUP              MAKE_DPHRESULT( 155 )
+#define DPERR_NOCAPS                    MAKE_DPHRESULT( 160 )
+#define DPERR_NOCONNECTION              MAKE_DPHRESULT( 170 )
+#define DPERR_NOMEMORY                  E_OUTOFMEMORY
+#define DPERR_OUTOFMEMORY               DPERR_NOMEMORY
+#define DPERR_NOMESSAGES                MAKE_DPHRESULT( 190 )
+#define DPERR_NONAMESERVERFOUND         MAKE_DPHRESULT( 200 )
+#define DPERR_NOPLAYERS                 MAKE_DPHRESULT( 210 )
+#define DPERR_NOSESSIONS                MAKE_DPHRESULT( 220 )
+#define DPERR_PENDING                                   E_PENDING
+#define DPERR_SENDTOOBIG                                MAKE_DPHRESULT( 230 )
+#define DPERR_TIMEOUT                   MAKE_DPHRESULT( 240 )
+#define DPERR_UNAVAILABLE               MAKE_DPHRESULT( 250 )
+#define DPERR_UNSUPPORTED               E_NOTIMPL
+#define DPERR_BUSY                      MAKE_DPHRESULT( 270 )
+#define DPERR_USERCANCEL                MAKE_DPHRESULT( 280 )
+#define DPERR_NOINTERFACE               E_NOINTERFACE
+#define DPERR_CANNOTCREATESERVER        MAKE_DPHRESULT( 290 )
+#define DPERR_PLAYERLOST                MAKE_DPHRESULT( 300 )
+#define DPERR_SESSIONLOST               MAKE_DPHRESULT( 310 )
+#define DPERR_UNINITIALIZED             MAKE_DPHRESULT( 320 )
+#define DPERR_NONEWPLAYERS              MAKE_DPHRESULT( 330 )
+#define DPERR_INVALIDPASSWORD           MAKE_DPHRESULT( 340 )
+#define DPERR_CONNECTING                MAKE_DPHRESULT( 350 )
+#define DPERR_BUFFERTOOLARGE            MAKE_DPHRESULT( 1000 )
+#define DPERR_CANTCREATEPROCESS         MAKE_DPHRESULT( 1010 )
+#define DPERR_APPNOTSTARTED             MAKE_DPHRESULT( 1020 )
+#define DPERR_INVALIDINTERFACE          MAKE_DPHRESULT( 1030 )
+#define DPERR_NOSERVICEPROVIDER         MAKE_DPHRESULT( 1040 )
+#define DPERR_UNKNOWNAPPLICATION        MAKE_DPHRESULT( 1050 )
+#define DPERR_NOTLOBBIED                MAKE_DPHRESULT( 1070 )
+#define DPERR_SERVICEPROVIDERLOADED     MAKE_DPHRESULT( 1080 )
+#define DPERR_ALREADYREGISTERED         MAKE_DPHRESULT( 1090 )
+#define DPERR_NOTREGISTERED             MAKE_DPHRESULT( 1100 )
+#define DPERR_AUTHENTICATIONFAILED      MAKE_DPHRESULT(  2000 )
+#define DPERR_CANTLOADSSPI              MAKE_DPHRESULT(  2010 )
+#define DPERR_ENCRYPTIONFAILED          MAKE_DPHRESULT(  2020 )
+#define DPERR_SIGNFAILED                MAKE_DPHRESULT(  2030 )
+#define DPERR_CANTLOADSECURITYPACKAGE   MAKE_DPHRESULT(  2040 )
+#define DPERR_ENCRYPTIONNOTSUPPORTED    MAKE_DPHRESULT(  2050 )
+#define DPERR_CANTLOADCAPI              MAKE_DPHRESULT(  2060 )
+#define DPERR_NOTLOGGEDIN               MAKE_DPHRESULT(  2070 )
+#define DPERR_LOGONDENIED               MAKE_DPHRESULT(  2080 )
+
+DEFINE_GUID(IID_IDirectPlay2, 0x2b74f7c0, 0x9154, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
+DEFINE_GUID(IID_IDirectPlay2A,0x9d460580, 0xa822, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
+
+DEFINE_GUID(IID_IDirectPlay3, 0x133efe40, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
+DEFINE_GUID(IID_IDirectPlay3A,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
+
+// {D1EB6D20-8923-11d0-9D97-00A0C90A43CB}
+DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20, 0x8923, 0x11d0, 0x9d, 0x97, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
+
+
+/* {AF465C71-9588-11cf-A020-00AA006157AC} */
+DEFINE_GUID(IID_IDirectPlayLobby, 0xaf465c71, 0x9588, 0x11cf, 0xa0, 0x20, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
+/* {26C66A70-B367-11cf-A024-00AA006157AC} */
+DEFINE_GUID(IID_IDirectPlayLobbyA, 0x26c66a70, 0xb367, 0x11cf, 0xa0, 0x24, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac);
+/* {0194C220-A303-11d0-9C4F-00A0C905425E} */
+DEFINE_GUID(IID_IDirectPlayLobby2, 0x194c220, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
+/* {1BB4AF80-A303-11d0-9C4F-00A0C905425E} */
+DEFINE_GUID(IID_IDirectPlayLobby2A, 0x1bb4af80, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
+/* {2FE8F810-B2A5-11d0-A787-0000F803ABFC} */
+DEFINE_GUID(CLSID_DirectPlayLobby, 0x2fe8f810, 0xb2a5, 0x11d0, 0xa7, 0x87, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
+
+/*
+ * GUIDS used by Service Providers shipped with DirectPlay
+ * Use these to identify Service Provider returned by EnumConnections
+ */
+
+/* GUID for IPX service provider {685BC400-9D2C-11cf-A9CD-00AA006886E3} */
+DEFINE_GUID(DPSPGUID_IPX, 0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3);
+
+/* GUID for TCP/IP service provider 36E95EE0-8577-11cf-960C-0080C7534E82 */
+DEFINE_GUID(DPSPGUID_TCPIP, 0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82);
+
+/* GUID for Serial service provider {0F1D6860-88D9-11cf-9C4E-00A0C905425E} */
+DEFINE_GUID(DPSPGUID_SERIAL, 0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
+
+/* GUID for Modem service provider {44EAA760-CB68-11cf-9C4E-00A0C905425E} */
+DEFINE_GUID(DPSPGUID_MODEM, 0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
+
+
+#pragma pack(1)
+
+/* Direct Play */
+typedef struct IDirectPlay        IDirectPlay, *LPDIRECTPLAY;
+
+/* Direct Play 2 */
+typedef struct IDirectPlay2       IDirectPlay2, *LPDIRECTPLAY2;
+typedef struct IDirectPlay2       IDirectPlay2A, *LPDIRECTPLAY2A;
+
+/* Direct Play 3 */
+typedef struct IDirectPlay3       IDirectPlay3, *LPDIRECTPLAY3;
+typedef struct IDirectPlay3       IDirectPlay3A, *LPDIRECTPLAY3A;
+
+/* DPID - DirectPlay player and group ID */
+typedef DWORD DPID, *LPDPID;
+
+/* DPID from whence originate messages - just an ID */
+#define DPID_SYSMSG             0           /* DPID of system */
+#define DPID_ALLPLAYERS         0           /* DPID of all players */
+#define DPID_SERVERPLAYER       1           /* DPID of the server player */
+#define DPID_UNKNOWN            0xFFFFFFFF  /* Player ID is unknown */
+
+/*  DPCAPS -  Used to obtain the capabilities of a DirectPlay object */
+typedef struct tagDPCAPS
+{
+    DWORD dwSize;               /* Size of structure in bytes */
+    DWORD dwFlags;              
+    DWORD dwMaxBufferSize;      
+    DWORD dwMaxQueueSize;       /* Obsolete. */
+    DWORD dwMaxPlayers;         /* Maximum players/groups (local + remote) */
+    DWORD dwHundredBaud;        /* Bandwidth in 100 bits per second units;
+                                 * i.e. 24 is 2400, 96 is 9600, etc. 
+                                 */
+    DWORD dwLatency;            /* Estimated latency; 0 = unknown */
+    DWORD dwMaxLocalPlayers;    /* Maximum # of locally created players */
+    DWORD dwHeaderLength;       /* Maximum header length in bytes */
+    DWORD dwTimeout;            /* Service provider's suggested timeout value
+                                 * This is how long DirectPlay will wait for
+                                 * responses to system messages
+                                 */
+} DPCAPS, *LPDPCAPS;
+
+typedef struct tagDPNAME
+{
+    DWORD   dwSize;             
+    DWORD   dwFlags;            /* Not used must be 0 */
+    union playerShortName       /* Player's Handle? */
+    {                           
+        LPWSTR  lpszShortName;  
+        LPSTR   lpszShortNameA; 
+    };
+    union playerLongName        /* Player's formal/real name */
+    {                         
+        LPWSTR  lpszLongName;  
+        LPSTR   lpszLongNameA;  
+    };
+
+} DPNAME, *LPDPNAME;
+
+typedef struct tagDPSESSIONDESC2
+{
+    DWORD   dwSize;             
+    DWORD   dwFlags;           
+    GUID    guidInstance;      
+    GUID    guidApplication;   
+                               
+    DWORD   dwMaxPlayers;      
+    DWORD   dwCurrentPlayers;  
+
+    union sessionName
+    {                             
+        LPWSTR  lpszSessionName;  
+        LPSTR   lpszSessionNameA; 
+    };
+
+    union optnlSessionPasswd
+    {                           
+        LPWSTR  lpszPassword;   
+        LPSTR   lpszPasswordA;  
+    };
+
+    DWORD   dwReserved1;       
+    DWORD   dwReserved2;
+    DWORD   dwUser1;          
+    DWORD   dwUser2;
+    DWORD   dwUser3;
+    DWORD   dwUser4;
+} DPSESSIONDESC2, *LPDPSESSIONDESC2;
+
+typedef struct tagDPLCONNECTION
+{
+    DWORD               dwSize;          
+    DWORD               dwFlags;          
+    LPDPSESSIONDESC2    lpSessionDesc;   
+    LPDPNAME            lpPlayerName;    
+    GUID                guidSP;          
+    LPVOID              lpAddress;       
+    DWORD               dwAddressSize;  
+} DPLCONNECTION, *LPDPLCONNECTION;
+
+typedef struct tagDPLAPPINFO
+{
+    DWORD       dwSize;            
+    GUID        guidApplication;   
+
+    union appName
+    {
+        LPSTR   lpszAppNameA;      
+        LPWSTR  lpszAppName;
+    };
+
+} DPLAPPINFO, *LPDPLAPPINFO;
+typedef const DPLAPPINFO *LPCDPLAPPINFO;
+
+typedef struct DPCOMPOUNDADDRESSELEMENT
+{
+    GUID    guidDataType;
+    DWORD   dwDataSize;
+    LPVOID  lpData;
+} DPCOMPOUNDADDRESSELEMENT, *LPDPCOMPOUNDADDRESSELEMENT;
+typedef const DPCOMPOUNDADDRESSELEMENT *LPCDPCOMPOUNDADDRESSELEMENT;
+
+typedef BOOL32 (CALLBACK* LPDPENUMDPCALLBACKW)(
+    LPGUID      lpguidSP,
+    LPWSTR      lpSPName,
+    DWORD       dwMajorVersion,
+    DWORD       dwMinorVersion,
+    LPVOID      lpContext);
+
+typedef BOOL32 (CALLBACK* LPDPENUMDPCALLBACKA)(
+    LPGUID      lpguidSP,
+    LPSTR       lpSPName,       /* ptr to str w/ driver description */
+    DWORD       dwMajorVersion, /* Major # of driver spec in lpguidSP */
+    DWORD       dwMinorVersion, /* Minor # of driver spec in lpguidSP */ 
+    LPVOID      lpContext);     /* User given */
+
+typedef const GUID   *LPCGUID;
+typedef const DPNAME *LPCDPNAME;
+
+typedef BOOL32 (CALLBACK* LPDPENUMCONNECTIONSCALLBACK)(
+    LPCGUID     lpguidSP,
+    LPVOID      lpConnection,
+    DWORD       dwConnectionSize,
+    LPCDPNAME   lpName,
+    DWORD       dwFlags,
+    LPVOID      lpContext);
+
+extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID );
+extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACKW, LPVOID );
+extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY *lplpDP, IUnknown *pUnk);
+
+
+/* Direct Play Lobby 1 */
+typedef struct IDirectPlayLobby   IDirectPlayLobby, *LPDIRECTPLAYLOBBY;
+typedef struct IDirectPlayLobby   IDirectPlayLobbyA, *LPDIRECTPLAYLOBBYA;
+
+/* Direct Play Lobby 2 */
+typedef struct IDirectPlayLobby2    IDirectPlayLobby2, *LPDIRECTPLAYLOBBY2;
+typedef struct IDirectPlayLobby2    IDirectPlayLobby2A, *LPDIRECTPLAYLOBBY2A;
+
+extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY2 *, IUnknown *, LPVOID, DWORD );
+extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBY2A *, IUnknown *, LPVOID, DWORD );
+
+
+
+typedef BOOL32 (CALLBACK* LPDPENUMADDRESSCALLBACK)(
+    REFGUID         guidDataType,
+    DWORD           dwDataSize,
+    LPCVOID         lpData,
+    LPVOID          lpContext);
+
+typedef BOOL32 (CALLBACK* LPDPLENUMADDRESSTYPESCALLBACK)(
+    REFGUID         guidDataType,
+    LPVOID          lpContext,
+    DWORD           dwFlags);
+
+typedef BOOL32 (CALLBACK* LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
+    LPCDPLAPPINFO   lpAppInfo,
+    LPVOID          lpContext,
+    DWORD           dwFlags);
+
+
+#define STDMETHOD(xfn) HRESULT (CALLBACK *fn##xfn)
+#define STDMETHOD_(ret,xfn) ret (CALLBACK *fn##xfn)
+#define PURE
+#define FAR
+#define THIS_ THIS,
+
+#define THIS LPDIRECTPLAYLOBBY2 this
+typedef struct tagLPDIRECTPLAYLOBBY2_VTABLE {
+    /*  IUnknown Methods "Inherited Methods" */
+    STDMETHOD(QueryInterface)       (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
+    STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
+    STDMETHOD_(ULONG,Release)       (THIS) PURE;
+
+    /*  IDirectPlayLobby Methods */
+    STDMETHOD(Connect)              (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown *) PURE;
+    STDMETHOD(CreateAddress)        (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE;
+    STDMETHOD(EnumAddress)          (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE;
+    STDMETHOD(EnumAddressTypes)     (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE;
+    STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE;
+    STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE;
+    STDMETHOD(ReceiveLobbyMessage)  (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE;
+    STDMETHOD(RunApplication)       (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE32) PURE;
+    STDMETHOD(SendLobbyMessage)     (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE;
+    STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE;
+    STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE32) PURE;
+
+    /*  IDirectPlayLobby2 Methods */
+    STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT, DWORD, LPVOID, LPDWORD) PURE;
+
+} DIRECTPLAYLOBBY2_VTABLE, *LPDIRECTPLAYLOBBY2_VTABLE;
+
+/* Is this right? How does one know? */
+struct IDirectPlayLobby2 {
+    LPDIRECTPLAYLOBBY2_VTABLE lpvtbl;
+    DWORD                     ref;
+};
+
+#pragma pack(4)
+
+#undef STDMETHOD
+#undef STDMETHOD_
+#undef PURE
+#undef FAR
+#undef THIS_
+
+#endif