- Moved dplay and dplayx to a proper home in the dlls directory.

- Implemented new DirectPlay4 and DirectPlayLobby3 interfaces.
- Implemented a class factory for dplay and dplobby. COM interfaces
  now work for dp and dpl.
- Added a few more entries to dplayx.spec files. How do you find the
  ordinals? I just guessed :(
- Seperated DirectPlay and DirectPlayLobby implementation into separate files.
- Included some missing header file definitions.
- Implemented the dplay dll in terms of the dplayx dll. I haven't
  tested it so it may not work...
- A few bug fixes and a little new implementatioe.n
- Updated document with a more detailed implementation plan.
This commit is contained in:
Peter Hunnisett 1999-09-28 16:35:32 +00:00 committed by Alexandre Julliard
parent a018d8508f
commit 22b861c1be
20 changed files with 4250 additions and 2740 deletions

View File

@ -36,6 +36,7 @@ LIBSUBDIRS = \
dlls/commdlg \
dlls/crtdll \
dlls/dciman32 \
dlls/dplayx \
dlls/imagehlp \
dlls/imm32 \
dlls/lzexpand \
@ -135,6 +136,7 @@ LIBOBJS = \
dlls/commdlg/commdlg.o \
dlls/crtdll/crtdll.o \
dlls/dciman32/dciman32.o \
dlls/dplayx/dplayx.o \
dlls/imagehlp/imagehlp.o \
dlls/imm32/imm32.o \
dlls/lzexpand/lzexpand.o \

2
configure vendored
View File

@ -5624,6 +5624,7 @@ dlls/comctl32/Makefile
dlls/commdlg/Makefile
dlls/crtdll/Makefile
dlls/dciman32/Makefile
dlls/dplayx/Makefile
dlls/imagehlp/Makefile
dlls/imm32/Makefile
dlls/lzexpand/Makefile
@ -5819,6 +5820,7 @@ dlls/comctl32/Makefile
dlls/commdlg/Makefile
dlls/crtdll/Makefile
dlls/dciman32/Makefile
dlls/dplayx/Makefile
dlls/imagehlp/Makefile
dlls/imm32/Makefile
dlls/lzexpand/Makefile

View File

@ -831,6 +831,7 @@ dlls/comctl32/Makefile
dlls/commdlg/Makefile
dlls/crtdll/Makefile
dlls/dciman32/Makefile
dlls/dplayx/Makefile
dlls/imagehlp/Makefile
dlls/imm32/Makefile
dlls/lzexpand/Makefile

View File

@ -5,6 +5,7 @@ SUBDIRS = \
commdlg \
crtdll \
dciman32 \
dplayx \
imagehlp \
imm32 \
lzexpand \

3
dlls/dplayx/.cvsignore Normal file
View File

@ -0,0 +1,3 @@
Makefile
dplay.spec.c
dplayx.spec.c

19
dlls/dplayx/Makefile.in Normal file
View File

@ -0,0 +1,19 @@
DEFS = @DLLFLAGS@ -D__WINE__
TOPSRCDIR = @top_srcdir@
TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = dplayx
SPEC_SRCS = dplay.spec dplayx.spec
C_SRCS = dplay.c \
dplobby.c \
dpclassfactory.c
all: $(MODULE).o
@MAKE_RULES@
### Dependencies:

View File

@ -0,0 +1,134 @@
#include "wine/obj_base.h"
#include "winerror.h"
#include "debugtools.h"
#include "dpinit.h"
DEFAULT_DEBUG_CHANNEL(dplay)
/*******************************************************************************
* DirectPlayLobby ClassFactory
*/
typedef struct
{
/* IUnknown fields */
ICOM_VTABLE(IClassFactory)* lpvtbl;
DWORD ref;
} IClassFactoryImpl;
static HRESULT WINAPI
DP_and_DPL_QueryInterface(LPCLASSFACTORY iface,REFIID riid,LPVOID *ppobj) {
ICOM_THIS(IClassFactoryImpl,iface);
char buf[80];
if (HIWORD(riid))
WINE_StringFromCLSID(riid,buf);
else
sprintf(buf,"<guid-0x%04x>",LOWORD(riid));
FIXME("(%p)->(%s,%p),stub!\n",This,buf,ppobj);
return E_NOINTERFACE;
}
static ULONG WINAPI
DP_and_DPL_AddRef(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
return ++(This->ref);
}
static ULONG WINAPI DP_and_DPL_Release(LPCLASSFACTORY iface) {
ICOM_THIS(IClassFactoryImpl,iface);
/* static class (reference starts @ 1), won't ever be freed */
return --(This->ref);
}
/* Not the most efficient implementation, but it's simple */
static HRESULT WINAPI DP_and_DPL_CreateInstance(
LPCLASSFACTORY iface,LPUNKNOWN pOuter,REFIID riid,LPVOID *ppobj
) {
ICOM_THIS(IClassFactoryImpl,iface);
char buf[80];
WINE_StringFromCLSID(riid,buf);
TRACE("(%p)->(%p,%s,%p)\n",This,pOuter,buf,ppobj);
/* FIXME: reuse already created DP/DPL object if present? */
if ( directPlayLobby_QueryInterface( riid, ppobj ) == S_OK )
{
return S_OK;
}
else if ( directPlay_QueryInterface( riid, ppobj ) == S_OK )
{
return S_OK;
}
return E_NOINTERFACE;
}
static HRESULT WINAPI DP_and_DPL_LockServer(LPCLASSFACTORY iface,BOOL dolock) {
ICOM_THIS(IClassFactoryImpl,iface);
FIXME("(%p)->(%d),stub!\n",This,dolock);
return S_OK;
}
static ICOM_VTABLE(IClassFactory) DP_and_DPL_Vtbl = {
DP_and_DPL_QueryInterface,
DP_and_DPL_AddRef,
DP_and_DPL_Release,
DP_and_DPL_CreateInstance,
DP_and_DPL_LockServer
};
static IClassFactoryImpl DP_and_DPL_CF = {&DP_and_DPL_Vtbl, 1 };
/*******************************************************************************
* DllGetClassObject [DPLAYX.?]
* Retrieves DP or DPL class object from a DLL object
*
* NOTES
* Docs say returns STDAPI
*
* PARAMS
* rclsid [I] CLSID for the class object
* riid [I] Reference to identifier of interface for class object
* ppv [O] Address of variable to receive interface pointer for riid
*
* RETURNS
* Success: S_OK
* Failure: CLASS_E_CLASSNOTAVAILABLE, E_OUTOFMEMORY, E_INVALIDARG,
* E_UNEXPECTED
*/
DWORD WINAPI DP_and_DPL_DllGetClassObject(REFCLSID rclsid,REFIID riid,LPVOID *ppv)
{
char buf[80],xbuf[80];
if (HIWORD(rclsid))
WINE_StringFromCLSID(rclsid,xbuf);
else
sprintf(xbuf,"<guid-0x%04x>",LOWORD(rclsid));
if (HIWORD(riid))
WINE_StringFromCLSID(riid,buf);
else
sprintf(buf,"<guid-0x%04x>",LOWORD(riid));
WINE_StringFromCLSID(riid,xbuf);
TRACE("(%p,%p,%p)\n", xbuf, buf, ppv);
if ( IsEqualCLSID( riid, &IID_IClassFactory ) )
{
*ppv = (LPVOID)&DP_and_DPL_CF;
IClassFactory_AddRef( (IClassFactory*)*ppv );
return S_OK;
}
ERR("(%p,%p,%p): no interface found.\n", xbuf, buf, ppv);
return CLASS_E_CLASSNOTAVAILABLE;
}

8
dlls/dplayx/dpinit.h Normal file
View File

@ -0,0 +1,8 @@
#ifndef __WINE_DPINIT_H
#define __WINE_DPINIT_H
extern HRESULT directPlay_QueryInterface( REFIID riid, LPVOID* ppvObj );
extern HRESULT directPlayLobby_QueryInterface( REFIID riid, LPVOID* ppvObj );
#endif

1726
dlls/dplayx/dplay.c Normal file

File diff suppressed because it is too large Load Diff

8
dlls/dplayx/dplay.spec Normal file
View File

@ -0,0 +1,8 @@
# First DirectPlay dll. Replaced by dplayx.dll.
name dplay
type win32
import dplayx.dll
1 forward DirectPlayCreate DPLAYX.DirectPlayCreate
2 forward DirectPlayEnumerate DPLAYX.DirectPlayEnumerate

View File

@ -6,4 +6,6 @@ type win32
3 stdcall DirectPlayEnumerateW(ptr ptr) DirectPlayEnumerateW
4 stdcall DirectPlayLobbyCreateA(ptr ptr ptr ptr long) DirectPlayLobbyCreateA
5 stdcall DirectPlayLobbyCreateW(ptr ptr ptr ptr long) DirectPlayLobbyCreateW
9 stub DirectPlayEnumerate
6 stub DllCanUnloadNow
7 stdcall DllGetClassObject(ptr ptr ptr) DP_and_DPL_DllGetClassObject
9 stdcall DirectPlayEnumerate(ptr ptr) DirectPlayEnumerateA

1578
dlls/dplayx/dplobby.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -5,18 +5,74 @@ Most methods and APIs are not implemented at this point. Examine the code
to see what has been implemented. Stay tuned for some information here once
there is more implementation (and I figure out what the heck I'm doing).
The files are include/dplay.h and multimedia/dplay.c. They're getting a
little cumbersome at present perhaps they will be broken out in a later
version.
The files are include/dplay.h, include/dplobby.h, multimedia/dplobby.c and multimedia/dplay.c.
The .c files will be moved to appropriate dll directories at some later time.
I think I can safely say that any application which requires direct play
or direct play lobby will not work at this point. Priority will be to get
lserver.exe from the sdk running.
examples from the sdk running. Once they're at least partially working, I can
get down to trying to get some of the games working.
A small issue will be the fact that DirectX 6.1(ie. DirectPlay4) introduces a layer of functionality
inside the DP objects which provide guaranteed protocol delivery. This is
even if the native protocol, IPX or modem for instance, doesn't guarantee it. I'm going to leave
this kind of implementation to as close to the end as possible. However, I
will implement an abstraction layer, where possible, for this functionality.
It will do nothing to start, but will require only the implementation of the
guaranteness to give final implementation.
TODO:
- Just about everything
- (done) Header files for DP4 and DPL3
- (done) Add stub functions for all DP4 and DPL3 interfaces
- (done) Correct naming of the parameters for DP3 and DPL2
- (done) Seperate out DP and DPL into multiple .c files
- (done) Allow CoCreateInstance to create the new interfaces
- (started)Implement mutual exclusion on object data for existing functions
- (done) Create and move to correct dll directories (dplay and dplayx)
- (done) Implement dplay in terms of dplayx
- (started) Need a better internal implementation for the objects which scales and
preferably doesn't involve casting structures
- (started) More generic initialization and destruction helper methods based off
the chosen internal implementation
- How to deal with all the incorrect interfaces for IUnknown methods. The standard
wine macros are incorrect in that they always give IUnknown* rather than DirectPlayLobby2A
for instance. Are we forced to cast?
- Implement a lib main for the dplayx dll
- Ensure that all dll stubs are present and the ordinals are correct
- Implementation of functionality
- bug fixes ;)
Programs to make work:
- lserver.exe (from sdk)
- override.exe (from sdk)
- dpchat.exe (from sdk)
- duel.exe (from sdk)
Peter Hunnisett - hunnise@nortel.ca
Next API to implement on a per program basis:
override.exe
- IDirectPlay3AImp_EnumConnections
- ?
dplaunch.exe
- IDirectPlayLobbyAImpl_EnumLocalApplications
- ?
lserver.exe
- IDirectPlayLobby2WImpl_Connect
- IDirectPlay3WImpl_CreatePlayer
- IDirectPlay3WImpl_CreateGroup
- IDirectPlay3WImpl_SetGroupData
- IDirectPlay3WImpl_Send
- ?
bellhop.exe
- DirectPlay3AImpl_EnumConnections
- ?
dpslots.exe
- IDirectPlayLobbyAImpl_SetConnectionSettings
- IDirectPlayAImpl_EnumConnections
- ?
Peter Hunnisett - hunnise@nortelnetworks.com

View File

@ -1,6 +1,10 @@
#ifndef __WINE_DPLAY_H
#define __WINE_DPLAY_H
/* FIXME: GCC doesn't yet support annon structures so some of the structures defined here don't match the sdk exactly.
* I've tried to come up with suitably terse names, but this file won't cut it for inclusion into a WineLib app.
*/
#include "wine/obj_base.h"
#ifdef __cplusplus
@ -29,6 +33,13 @@ typedef struct IDirectPlay3 IDirectPlay3,*LPDIRECTPLAY3;
DEFINE_GUID(IID_IDirectPlay3A,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
typedef struct IDirectPlay3 IDirectPlay3A,*LPDIRECTPLAY3A;
DEFINE_GUID(IID_IDirectPlay4, 0xab1c530, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
typedef struct IDirectPlay4 IDirectPlay4,*LPDIRECTPLAY4;
DEFINE_GUID(IID_IDirectPlay4A,0xab1c531, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
typedef struct IDirectPlay4 IDirectPlay4A,*LPDIRECTPLAY4A;
/*
* GUIDS used by Service Providers shipped with DirectPlay
* Use these to identify Service Provider returned by EnumConnections
@ -37,7 +48,7 @@ typedef struct IDirectPlay3 IDirectPlay3A,*LPDIRECTPLAY3A;
/* 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 */
/* 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} */
@ -96,6 +107,13 @@ DEFINE_GUID(DPSPGUID_MODEM, 0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0
#define DPERR_NONEWPLAYERS MAKE_DPHRESULT( 330 )
#define DPERR_INVALIDPASSWORD MAKE_DPHRESULT( 340 )
#define DPERR_CONNECTING MAKE_DPHRESULT( 350 )
#define DPERR_CONNECTIONLOST MAKE_DPHRESULT( 360 )
#define DPERR_UNKNOWNMESSAGE MAKE_DPHRESULT( 370 )
#define DPERR_CANCELFAILED MAKE_DPHRESULT( 380 )
#define DPERR_INVALIDPRIORITY MAKE_DPHRESULT( 390 )
#define DPERR_NOTHANDLED MAKE_DPHRESULT( 400 )
#define DPERR_CANCELLED MAKE_DPHRESULT( 410 )
#define DPERR_ABORTED MAKE_DPHRESULT( 420 )
#define DPERR_BUFFERTOOLARGE MAKE_DPHRESULT( 1000 )
#define DPERR_CANTCREATEPROCESS MAKE_DPHRESULT( 1010 )
#define DPERR_APPNOTSTARTED MAKE_DPHRESULT( 1020 )
@ -106,15 +124,15 @@ DEFINE_GUID(DPSPGUID_MODEM, 0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0
#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 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 )
/* DPID - DirectPlay player and group ID */
@ -589,6 +607,364 @@ ICOM_DEFINE(IDirectPlay3,IDirectPlay2)
#define IDirectPlay3_GetPlayerFlags(p,a,b) ICOM_CALL2(GetPlayerFlags,p,a,b)
#endif
/*****************************************************************************
* IDirectPlay4 interface - this is also known as IDirectPlayX. Apparently people
* are realizing that declaring all the darn interfaces as IDirectPlay{2,3,...} is
* just plain dumb. It's now going to be just IDirectPlayX since they're just macros
* anyways. That's good because I'm tired of typing these entries :)
* The compiler should catch any problems with invocation of invalid method :)
*/
#define ICOM_INTERFACE IDirectPlay4
#define IDirectPlay4_METHODS \
ICOM_METHOD2( HRESULT, GetGroupOwner, DPID,, LPDPID, ) \
ICOM_METHOD2( HRESULT, SetGroupOwner, DPID,, DPID, ) \
ICOM_METHOD9( HRESULT, SendEx, DPID,, DPID,, DWORD,, LPVOID,, DWORD,, DWORD,, DWORD,, LPVOID,, LPDWORD, ) \
ICOM_METHOD5( HRESULT, GetMessageQueue, DPID,, DPID,, DWORD,, LPDWORD,, LPDWORD, ) \
ICOM_METHOD2( HRESULT, CancelMessage, DWORD,, DWORD, ) \
ICOM_METHOD3( HRESULT, CancelPriority, DWORD,, DWORD,, DWORD, )
#define IDirectPlay4_IMETHODS
IDirectPlay3_IMETHODS \
IDirectPlay4_METHODS
ICOM_DEFINE(IDirectPlay4,IDirectPlay3)
#undef ICOM_INTERFACE
#ifdef ICOM_CINTERFACE
/*** IUnknown methods ***/
#define IDirectPlayX_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirectPlayX_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirectPlayX_Release(p) ICOM_CALL (Release,p)
/*** IDirectPlay2 methods ***/
#define IDirectPlayX_AddPlayerToGroup(p,a,b) ICOM_CALL2(AddPlayerToGroup,p,a,b)
#define IDirectPlayX_Close(p) ICOM_CALL (Close,p)
#define IDirectPlayX_CreateGroup(p,a,b,c,d,e) ICOM_CALL5(CreateGroup,p,a,b,c,d,e)
#define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) ICOM_CALL6(CreatePlayer,p,a,b,c,d,e,f)
#define IDirectPlayX_DeletePlayerFromGroup(p,a,b) ICOM_CALL2(DeletePlayerFromGroup,p,a,b)
#define IDirectPlayX_DestroyGroup(p,a) ICOM_CALL1(DestroyGroup,p,a)
#define IDirectPlayX_DestroyPlayer(p,a) ICOM_CALL1(DestroyPlayer,p,a)
#define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) ICOM_CALL5(EnumGroupPlayers,p,a,b,c,d,e)
#define IDirectPlayX_EnumGroups(p,a,b,c,d) ICOM_CALL4(EnumGroups,p,a,b,c,d)
#define IDirectPlayX_EnumPlayers(p,a,b,c,d) ICOM_CALL4(EnumPlayers,p,a,b,c,d)
#define IDirectPlayX_EnumSessions(p,a,b,c,d,e) ICOM_CALL5(EnumSessions,p,a,b,c,d,e)
#define IDirectPlayX_GetCaps(p,a,b) ICOM_CALL2(GetCaps,p,a,b)
#define IDirectPlayX_GetGroupData(p,a,b,c,d) ICOM_CALL4(GetGroupData,p,a,b,c,d)
#define IDirectPlayX_GetGroupName(p,a,b,c) ICOM_CALL3(GetGroupName,p,a,b,c)
#define IDirectPlayX_GetMessageCount(p,a,b) ICOM_CALL2(GetMessageCount,p,a,b)
#define IDirectPlayX_GetPlayerAddress(p,a,b,c) ICOM_CALL3(GetPlayerAddress,p,a,b,c)
#define IDirectPlayX_GetPlayerCaps(p,a,b,c) ICOM_CALL3(GetPlayerCaps,p,a,b,c)
#define IDirectPlayX_GetPlayerData(p,a,b,c,d) ICOM_CALL4(GetPlayerData,p,a,b,c,d)
#define IDirectPlayX_GetPlayerName(p,a,b,c) ICOM_CALL3(GetPlayerName,p,a,b,c)
#define IDirectPlayX_GetSessionDesc(p,a,b) ICOM_CALL2(GetSessionDesc,p,a,b)
#define IDirectPlayX_Initialize(p,a) ICOM_CALL1(Initialize,p,a)
#define IDirectPlayX_Open(p,a,b) ICOM_CALL2(Open,p,a,b)
#define IDirectPlayX_Receive(p,a,b,c,d,e) ICOM_CALL5(Receive,p,a,b,c,d,e)
#define IDirectPlayX_Send(p,a,b,c,d,e) ICOM_CALL5(Send,p,a,b,c,d,e)
#define IDirectPlayX_SetGroupData(p,a,b,c,d) ICOM_CALL4(SetGroupData,p,a,b,c,d)
#define IDirectPlayX_SetGroupName(p,a,b,c) ICOM_CALL3(SetGroupName,p,a,b,c)
#define IDirectPlayX_SetPlayerData(p,a,b,c,d) ICOM_CALL4(SetPlayerData,p,a,b,c,d)
#define IDirectPlayX_SetPlayerName(p,a,b,c) ICOM_CALL3(SetPlayerName,p,a,b,c)
#define IDirectPlayX_SetSessionDesc(p,a,b) ICOM_CALL2(SetSessionDesc,p,a,b)
/*** IDirectPlay3 methods ***/
#define IDirectPlayX_AddGroupToGroup(p,a,b) ICOM_CALL2(AddGroupToGroup,p,a,b)
#define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) ICOM_CALL6(CreateGroupInGroup,p,a,b,c,d,e,f)
#define IDirectPlayX_DeleteGroupFromGroup(p,a,b) ICOM_CALL2(DeleteGroupFromGroup,p,a,b)
#define IDirectPlayX_EnumConnections(p,a,b,c,d) ICOM_CALL4(EnumConnections,p,a,b,c,d)
#define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) ICOM_CALL5(EnumGroupsInGroup,p,a,b,c,d,e)
#define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) ICOM_CALL4(GetGroupConnectionSettings,p,a,b,c,d)
#define IDirectPlayX_InitializeConnection(p,a,b) ICOM_CALL2(InitializeConnection,p,a,b)
#define IDirectPlayX_SecureOpen(p,a,b,c,d) ICOM_CALL4(SecureOpen,p,a,b,c,d)
#define IDirectPlayX_SendChatMessage(p,a,b,c,d) ICOM_CALL4(SendChatMessage,p,a,b,c,d)
#define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) ICOM_CALL3(SetGroupConnectionSettings,p,a,b,c)
#define IDirectPlayX_StartSession(p,a,b) ICOM_CALL2(StartSession,p,a,b)
#define IDirectPlayX_GetGroupFlags(p,a,b) ICOM_CALL2(GetGroupFlags,p,a,b)
#define IDirectPlayX_GetGroupParent(p,a,b) ICOM_CALL2(GetGroupParent,p,a,b)
#define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) ICOM_CALL4(GetPlayerAccount,p,a,b,c,d)
#define IDirectPlayX_GetPlayerFlags(p,a,b) ICOM_CALL2(GetPlayerFlags,p,a,b)
/*** IDirectPlay4 methods ***/
#define IDirectPlayX_GetGroupOwner(p,a,b) ICOM_CALL2(GetGroupOwner,p,a,b)
#define IDirectPlayX_SetGroupOwner(p,a,b) ICOM_CALL2(SetGroupOwner,p,a,b)
#define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) ICOM_CALL9(SendEx,a,b,c,d,e,f,g,h,i)
#define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) ICOM_CALL5(GetMessageQueue,a,b,c,d,e)
#define IDirectPlayX_CancelMessage(p,a,b) ICOM_CALL2(CancelMessage,a,b)
#define IDirectPlayX_CancelPriority(p,a,b,c) ICOM_CALL3(CancelPriority,a,b,c)
#endif
/* For DirectPlay::EnumConnections */
#define DPCONNECTION_DIRECTPLAY 0x00000001
#define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002
/* For DirectPlay::EnumPlayers and DirectPlay::EnumGroups */
#define DPENUMPLAYERS_ALL 0x00000000
#define DPENUMPLAYERS_LOCAL 0x00000008
#define DPENUMPLAYERS_REMOTE 0x00000010
#define DPENUMPLAYERS_GROUP 0x00000020
#define DPENUMPLAYERS_SESSION 0x00000080
#define DPENUMPLAYERS_SERVERPLAYER 0x00000100
#define DPENUMPLAYERS_SPECTATOR 0x00000200
#define DPENUMPLAYERS_OWNER 0x00002000
#define DPENUMGROUPS_ALL DPENUMPLAYERS_ALL
#define DPENUMGROUPS_LOCAL DPENUMPLAYERS_LOCAL
#define DPENUMGROUPS_REMOTE DPENUMPLAYERS_REMOTE
#define DPENUMGROUPS_SESSION DPENUMPLAYERS_SESSION
#define DPENUMGROUPS_SHORTCUT 0x00000400
#define DPENUMGROUPS_STAGINGAREA 0x00000800
#define DPENUMGROUPS_HIDDEN 0x00001000
/* For DirectPlay::CreatePlayer */
#define DPPLAYER_SERVERPLAYER DPENUMPLAYERS_SERVERPLAYER
#define DPPLAYER_SPECTATOR DPENUMPLAYERS_SPECTATOR
#define DPPLAYER_LOCAL DPENUMPLAYERS_LOCAL
#define DPPLAYER_OWNER DPENUMPLAYERS_OWNER
/* For DirectPlay::CreateGroup */
#define DPGROUP_STAGINGAREA DPENUMGROUPS_STAGINGAREA
#define DPGROUP_LOCAL DPENUMGROUPS_LOCAL
#define DPGROUP_HIDDEN DPENUMGROUPS_HIDDEN
/* For DirectPlay::EnumSessions */
#define DPENUMSESSIONS_AVAILABLE 0x00000001
#define DPENUMSESSIONS_ALL 0x00000002
#define DPENUMSESSIONS_ASYNC 0x00000010
#define DPENUMSESSIONS_STOPASYNC 0x00000020
#define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040
#define DPENUMSESSIONS_RETURNSTATUS 0x00000080
/* For DirectPlay::GetCaps and DirectPlay::GetPlayerCaps */
#define DPGETCAPS_GUARANTEED 0x00000001
/* For DirectPlay::GetGroupData and DirectPlay::GetPlayerData */
#define DPGET_REMOTE 0x00000000
#define DPGET_LOCAL 0x00000001
/* For DirectPlay::Receive */
#define DPRECEIVE_ALL 0x00000001
#define DPRECEIVE_TOPLAYER 0x00000002
#define DPRECEIVE_FROMPLAYER 0x00000004
#define DPRECEIVE_PEEK 0x00000008
/* For DirectPlay::Send */
#define DPSEND_NONGUARANTEED 0x00000000
#define DPSEND_GUARANTEED 0x00000001
#define DPSEND_HIGHPRIORITY 0x00000002
#define DPSEND_OPENSTREAM 0x00000008
#define DPSEND_CLOSESTREAM 0x00000010
#define DPSEND_SIGNED 0x00000020
#define DPSEND_ENCRYPTED 0x00000040
#define DPSEND_LOBBYSYSTEMMESSAGE 0x00000080
#define DPSEND_ASYNC 0x00000200
#define DPSEND_NOSENDCOMPLETEMSG 0x00000400
#define DPSEND_MAX_PRI 0x0000FFFF
#define DPSEND_MAX_PRIORITY DPSEND_MAX_PRI
/* For DirectPlay::SetGroupData, DirectPlay::SetGroupName,
* DirectPlay::SetPlayerData, DirectPlay::SetPlayerName and
* DirectPlay::SetSessionDesc.
*/
#define DPSET_REMOTE 0x00000000
#define DPSET_LOCAL 0x00000001
#define DPSET_GUARANTEED 0x00000002
/* For DirectPlay::GetMessageQueue */
#define DPMESSAGEQUEUE_SEND 0x00000001
#define DPMESSAGEQUEUE_RECEIVE 0x00000002
/* DirectPlay::Connect */
#define DPCONNECT_RETURNSTATUS (DPENUMSESSIONS_RETURNSTATUS)
/** DirectPlay system messages **/
/* A new player or group has been created in the session */
#define DPSYS_CREATEPLAYERORGROUP 0x0003
/* A player or group has been deleted from the session */
#define DPSYS_DESTROYPLAYERORGROUP 0x0005
/* A player has been added to a group */
#define DPSYS_ADDPLAYERTOGROUP 0x0007
/* A player has been deleted from a group */
#define DPSYS_DELETEPLAYERFROMGROUP 0x0021
/* Session lost for this object - ie lost contact with all players */
#define DPSYS_SESSIONLOST 0x0031
/* The current host has left the session */
#define DPSYS_HOST 0x0101
/* Player or group data has changed */
#define DPSYS_SETPLAYERORGROUPDATA 0x0102
/* The name of a player or group has changed */
#define DPSYS_SETPLAYERORGROUPNAME 0x0103
/* The session description has changed */
#define DPSYS_SETSESSIONDESC 0x0104
/* A group has been added to a group */
#define DPSYS_ADDGROUPTOGROUP 0x0105
/* A group has been deleted from a group */
#define DPSYS_DELETEGROUPFROMGROUP 0x0106
/* A secure player to player message has arrived */
#define DPSYS_SECUREMESSAGE 0x0107
/* Start a new session */
#define DPSYS_STARTSESSION 0x0108
/* A chat message has arrived */
#define DPSYS_CHAT 0x0109
/* The owner of a group has changed */
#define DPSYS_SETGROUPOWNER 0x010A
/* An async send is done (finished normally, failed or cancelled) */
#define DPSYS_SENDCOMPLETE 0x010d
/** DirectPlay System Messages **/
#define DPPLAYERTYPE_GROUP 0x00000000
#define DPPLAYERTYPE_PLAYER 0x00000001
/* NOTE: DPMSG_HOST and DPMSG_GENERIC share the same format */
typedef struct tagDPMSG_GENERIC
{
DWORD dwType; /* Use message type as described above */
} DPMSG_GENERIC, *LPDPMSG_GENERIC,
DPMSG_HOST, *LPDPMSG_HOST,
DPMSG_SESSIONLOST, *LPDPMSG_SESSIONLOST;
typedef struct tagDPMSG_CREATEPLAYERORGROUP
{
DWORD dwType; /* Use message type as described above */
DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
DPID dpId; /* ID of the player/group */
DWORD dwCurrentPlayers; /* Current number of players/groups in session */
LPVOID lpData; /* Pointer to data */
DWORD dwDataSize; /* Size of data */
DPNAME dpnName; /* Name info */
/* dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
* does that mean about the message size before? -PH */
DPID dpIdParent; /* id of parent group */
DWORD dwFlags; /* Flags for the player/group */
} DPMSG_CREATEPLAYERORGROUP, *LPDPMSG_CREATEPLAYERORGROUP;
typedef struct tagDPMSG_DESTROYPLAYERORGROUP
{
DWORD dwType; /* Use message type as described above */
DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
DPID dpId; /* ID of player/group to be deleted */
LPVOID lpLocalData; /* Pointer to local data */
DWORD dwLocalDataSize; /* Sizeof local data */
LPVOID lpRemoteData; /* Pointer to remote data */
DWORD dwRemoteDataSize; /* Sizeof remote data */
/* dpnName, dpIdParent and dwFlags are only valid in DirectPlay3 and later. What
* does that mean about the message size before? -PH */
DPNAME dpnName; /* Name info */
DPID dpIdParent; /* id of parent group */
DWORD dwFlags; /* Flags for the player/group */
} DPMSG_DESTROYPLAYERORGROUP, *LPDPMSG_DESTROYPLAYERORGROUP;
/* NOTE: DPMSG_ADDPLAYERTOGROUP and DPMSG_DELETEPLAYERFROMGROUP are the same */
typedef struct tagDPMSG_ADDPLAYERTOGROUP
{
DWORD dwType; /* Use message type as described above */
DPID dpIdGroup; /* Group ID to add player into */
DPID dpIdPlayer; /* ID of player to add */
} DPMSG_ADDPLAYERTOGROUP, *LPDPMSG_ADDPLAYERTOGROUP,
DPMSG_DELETEPLAYERFROMGROUP, *LPDPMSG_DELETEPLAYERFROMGROUP;
/* NOTE: DPMSG_ADDGROUPTOGROUP and DPMSG_DELETEGROUPFROMGROUP are the same */
typedef struct tagDPMSG_ADDGROUPTOGROUP
{
DWORD dwType; /* Use message type as described above */
DPID dpIdParentGroup; /* Group ID to add group into */
DPID dpIdGroup; /* ID of group to add */
} DPMSG_ADDGROUPTOGROUP, *LPDPMSG_ADDGROUPTOGROUP,
DPMSG_DELETEGROUPFROMGROUP, *LPDPMSG_DELETEGROUPFROMGROUP;
typedef struct tagDPMSG_SETPLAYERORGROUPDATA
{
DWORD dwType; /* Use message type as described above */
DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
DPID dpId; /* ID of player/group */
LPVOID lpData; /* Pointer to data */
DWORD dwDataSize; /* Size of data */
} DPMSG_SETPLAYERORGROUPDATA, *LPDPMSG_SETPLAYERORGROUPDATA;
typedef struct tagDPMSG_SETPLAYERORGROUPNAME
{
DWORD dwType; /* Use message type as described above */
DWORD dwPlayerType; /* Use DPPLAYERTYPE_GROUP or DPPLAYERTYPE_PLAYER */
DPID dpId; /* ID of player/group */
DPNAME dpnName; /* New name */
} DPMSG_SETPLAYERORGROUPNAME, *LPDPMSG_SETPLAYERORGROUPNAME;
typedef struct tagDPMSG_SETSESSIONDESC
{
DWORD dwType; /* Use message type as described above */
DPSESSIONDESC2 dpDesc; /* New session desc */
} DPMSG_SETSESSIONDESC, *LPDPMSG_SETSESSIONDESC;
typedef struct tagDPMSG_SECUREMESSAGE
{
DWORD dwType; /* Use message type as described above */
DWORD dwFlags; /* Signed/Encrypted */
DPID dpIdFrom; /* ID of from player */
LPVOID lpData; /* Message sent */
DWORD dwDataSize; /* Size of message */
} DPMSG_SECUREMESSAGE, *LPDPMSG_SECUREMESSAGE;
typedef struct tagDPMSG_STARTSESSION
{
DWORD dwType; /* Use message type as described above */
LPDPLCONNECTION lpConn; /* DPLCONNECTION structure */
} DPMSG_STARTSESSION, *LPDPMSG_STARTSESSION;
typedef struct tagDPMSG_CHAT
{
DWORD dwType; /* Use message type as described above */
DWORD dwFlags; /* Message flags */
DPID idFromPlayer; /* ID of sender */
DPID idToPlayer; /* ID of who msg is for */
DPID idToGroup; /* ID of what group msg is for */
LPDPCHAT lpChat; /* Chat message */
} DPMSG_CHAT, *LPDPMSG_CHAT;
typedef struct tagDPMSG_SETGROUPOWNER
{
DWORD dwType; /* Use message type as described above */
DPID idGroup; /* Group ID */
DPID idNewOwner; /* ID of player who now owns group */
DPID idOldOwner; /* ID of player who used to own group */
} DPMSG_SETGROUPOWNER, *LPDPMSG_SETGROUPOWNER;
typedef struct
{
DWORD dwType; /* Use message type as described above */
DPID idFrom; /* ID from */
DPID idTo; /* ID to */
DWORD dwFlags;
DWORD dwPriority;
DWORD dwTimeout;
LPVOID lpvContext;
DWORD dwMsgID;
HRESULT hr;
DWORD dwSendTime; /* When sent ? */
} DPMSG_SENDCOMPLETE, *LPDPMSG_SENDCOMPLETE;
#ifdef __cplusplus
} /* extern "C" */
#endif /* defined(__cplusplus) */

View File

@ -1,6 +1,10 @@
#ifndef __WINE_DPLOBBY_H
#define __WINE_DPLOBBY_H
/* FIXME: GCC doesn't yet support annon structures so some of the structures defined here don't match the sdk exactly.
* I've tried to come up with suitably terse names, but this file won't cut it for inclusion into a WineLib app.
*/
#include "dplay.h"
#ifdef __cplusplus
@ -26,8 +30,238 @@ typedef struct IDirectPlayLobby2 IDirectPlayLobby2, *LPDIRECTPLAYLOBBY2;
DEFINE_GUID(IID_IDirectPlayLobby2A, 0x1bb4af80, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
typedef struct IDirectPlayLobby2 IDirectPlayLobby2A, *LPDIRECTPLAYLOBBY2A;
DEFINE_GUID(IID_IDirectPlayLobby3, 0x2db72490, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
typedef struct IDirectPlayLobby3 IDirectPlayLobby3, *LPDIRECTPLAYLOBBY3;
DEFINE_GUID(IID_IDirectPlayLobby3A, 0x2db72491, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
typedef struct IDirectPlayLobby3A IDirectPlayLobby3A, *LPDIRECTPLAYLOBBY3A;
/*****************************************************************************
* DirectPlayLobby Property GUIDs used in lobby messages
*/
/* DPLPROPERTY_MessagesSupported {762CCDA1-D916-11d0-BA39-00C04FD7ED67}.
* Purpose: Request if the lobby supports standard (?).
* Response: Answer is a BOOL. TRUE if supports the standard (?) and FALSE otherwise. Of course, it might not respond at all.
*/
DEFINE_GUID(DPLPROPERTY_MessagesSupported, 0x762ccda1, 0xd916, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/* DPLPROPERTY_LobbyGuid {F56920A0-D218-11d0-BA39-00C04FD7ED67}.
* Purpose: Request the GUID that identifies the lobby version that the application is communicating with.
* Response: The GUID which identifies the lobby version
*/
DEFINE_GUID(DPLPROPERTY_LobbyGuid, 0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/* DPLPROPERTY_PlayerGuid {B4319322-D20D-11d0-BA39-00C04FD7ED67}
* Purpose: Request the GUID that identifies the player for this particular machine.
* Response: DPLDATA_PLAYERDATA structure.
*/
DEFINE_GUID(DPLPROPERTY_PlayerGuid, 0xb4319322, 0xd20d, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/* DPLPROPERTY_PlayerScore {48784000-D219-11d0-BA39-00C04FD7ED67}
* Purpose: Used to send a score of a player to the lobby. The format is an array of long integers.
* Response: I don't think there is one.
*/
DEFINE_GUID(DPLPROPERTY_PlayerScore, 0x48784000, 0xd219, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67);
/*****************************************************************************
* LOBBY structures associated with GUID messages
*/
typedef struct tagDPLDATA_PLAYERGUID
{
GUID guidPlayer;
DWORD dwPlayerFlags;
} DPLDATA_PLAYERGUID, *LPDPLDATA_PLAYERGUID;
typedef struct tagDPLDATA_PLAYERSCORE
{
DWORD dwScoreCount;
LONG Score[1];
} DPLDATA_PLAYERSCORE, *LPDPLDATA_PLAYERSCORE;
/*****************************************************************************
* LOBBY messages and message data structures.
*
* System messages can be identified by dwMessageFlags having a value of DPLMSG_SYSTEM
* after a call to ReceiveLobbyMessage.
*
* Standard messages can be indentified by dwMessageFlags having a value of DPLMSG_STANDARD
* after a call to ReceiveLobbyMessage.
*/
/* DPLobby1 definition required for backwards compatibility */
#define DPLMSG_SYSTEM 0x00000001
#define DPLMSG_STANDARD 0x00000002
#define DPLAD_SYSTEM DPLMSG_SYSTEM
/* System messages - dwType field for messages */
#define DPLSYS_CONNECTIONSETTINGSREAD 0x00000001
#define DPLSYS_DPLAYCONNECTFAILED 0x00000002
#define DPLSYS_DPLAYCONNECTSUCCEEDED 0x00000003
#define DPLSYS_APPTERMINATED 0x00000004
#define DPLSYS_SETPROPERTY 0x00000005
#define DPLSYS_SETPROPERTYRESPONSE 0x00000006
#define DPLSYS_GETPROPERTY 0x00000007
#define DPLSYS_GETPROPERTYRESPONSE 0x00000008
#define DPLSYS_NEWSESSIONHOST 0x00000009
#define DPLSYS_NEWCONNECTIONSETTINGS 0x0000000A
/* Used to indentify the message type */
typedef struct tagDPLMSG_GENERIC
{
DWORD dwType; /* Message type */
} DPLMSG_GENERIC, *LPDPLMSG_GENERIC;
/* Generic format for system messages - see above */
typedef struct tagDPLMSG_SYSTEMMESSAGE
{
DWORD dwType; /* Message type */
GUID guidInstance; /* Instance GUID of the dplay session the message corresponds to */
} DPLMSG_SYSTEMMESSAGE, *LPDPLMSG_SYSTEMMESSAGE;
/* Generic message to set a property - see property GUIDs above */
typedef struct tagDPLMSG_SETPROPERTY
{
DWORD dwType; /* Message type */
DWORD dwRequestID; /* Request ID (DPL_NOCONFIRMATION if no confirmation desired) */
GUID guidPlayer; /* Player GUID */
GUID guidPropertyTag; /* Property GUID */
DWORD dwDataSize; /* Size of data */
DWORD dwPropertyData[1]; /* Buffer containing data */
} DPLMSG_SETPROPERTY, *LPDPLMSG_SETPROPERTY;
#define DPL_NOCONFIRMATION 0L
/* Reply to DPLMSG_SETPROPERTY */
typedef struct tagDPLMSG_SETPROPERTYRESPONSE
{
DWORD dwType; /* Message type */
DWORD dwRequestID; /* Request ID */
GUID guidPlayer; /* Player GUID */
GUID guidPropertyTag; /* Property GUID */
HRESULT hr; /* Return Code */
} DPLMSG_SETPROPERTYRESPONSE, *LPDPLMSG_SETPROPERTYRESPONSE;
/* Request to get the present value of a property */
typedef struct tagDPLMSG_GETPROPERTY
{
DWORD dwType; /* Message type */
DWORD dwRequestID; /* Request ID */
GUID guidPlayer; /* Player GUID */
GUID guidPropertyTag; /* Property GUID */
} DPLMSG_GETPROPERTY, *LPDPLMSG_GETPROPERTY;
/* Response to a request to get the present value of a property */
typedef struct tagDPLMSG_GETPROPERTYRESPONSE
{
DWORD dwType; /* Message type */
DWORD dwRequestID; /* Request ID */
GUID guidPlayer; /* Player GUID */
GUID guidPropertyTag; /* Property GUID */
HRESULT hr; /* Return Code */
DWORD dwDataSize; /* Size of data */
DWORD dwPropertyData[1]; /* Buffer containing data */
} DPLMSG_GETPROPERTYRESPONSE, *LPDPLMSG_GETPROPERTYRESPONSE;
/* Standard message in response to a session host migration to a new client */
typedef struct tagDPLMSG_NEWSESSIONHOST
{
DWORD dwType; /* Message type */
GUID guidInstance; /* GUID Instance of the session */
} DPLMSG_NEWSESSIONHOST, *LPDPLMSG_NEWSESSIONHOST;
/*****************************************************************************
* DirectPlay Address ID's
* A DirectPlay address is composed of multiple data chunks, each assocated with
* a GUID to give significance to the type of data. All chunks have an associated
* size so that unknown chunks can be ignored for backwards compatibility!
* EnumAddresses function is used to parse the address data chunks.
*/
/* DPAID_TotalSize {1318F560-912C-11d0-9DAA-00A0C90A43CB}
* Chunk purpose: Chunk is a DWORD containing the size of the entire DPADDRESS struct
*/
DEFINE_GUID(DPAID_TotalSize, 0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb);
/* DPAID_ServiceProvider {07D916C0-E0AF-11cf-9C4E-00A0C905425E}
* Chunk purpose: Chunk is a GUID indicated what service provider created the chunk.
*/
DEFINE_GUID(DPAID_ServiceProvider, 0x7d916c0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* DPAID_LobbyProvider {59B95640-9667-11d0-A77D-0000F803ABFC}
* Chunk purpose: Chunk is a GUID indicating what lobby provider created the chunk.
*/
DEFINE_GUID(DPAID_LobbyProvider, 0x59b95640, 0x9667, 0x11d0, 0xa7, 0x7d, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc);
/* DPAID_Phone {78EC89A0-E0AF-11cf-9C4E-00A0C905425E} -- ANSI
* DPAID_PhoneW {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E} -- UNICODE
* Chunk purpose: Chunk is a phone number in ANSI or UNICODE format
*/
DEFINE_GUID(DPAID_Phone, 0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
DEFINE_GUID(DPAID_PhoneW, 0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* DPAID_Modem {F6DCC200-A2FE-11d0-9C4F-00A0C905425E} -- ANSI
* DPAID_ModemW {01FD92E0-A2FF-11d0-9C4F-00A0C905425E} -- UNICODE
* Chunk purpose: Chunk is a modem name registered with TAPI
*/
DEFINE_GUID(DPAID_Modem, 0xf6dcc200, 0xa2fe, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
DEFINE_GUID(DPAID_ModemW, 0x1fd92e0, 0xa2ff, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* DPAID_INet {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E} -- ANSI
* DPAID_INetW {E63232A0-9DBF-11d0-9CC1-00A0C905425E} -- UNICODE
* Chunk purpose: Chunk is a string containing a TCP/IP host name or IP address
*/
DEFINE_GUID(DPAID_INet, 0xc4a54da0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
DEFINE_GUID(DPAID_INetW, 0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* DPAID_INetPort {E4524541-8EA5-11d1-8A96-006097B01411}
* Chunk purpose: Chunk is a port number used for creating TCP and UDP sockets.
*/
DEFINE_GUID(DPAID_INetPort, 0xe4524541, 0x8ea5, 0x11d1, 0x8a, 0x96, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11);
/* DPAID_ComPort {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E}
* Chunk purpose: Chunk contains the description of a serial port.
*/
DEFINE_GUID(DPAID_ComPort, 0xf2f0ce00, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e);
/* Header block for address data elements */
typedef struct tagDPADDRESS
{
GUID guidDataType;
DWORD dwDataSize;
} DPADDRESS, *LPDPADDRESS;
/* Used for specification of a communication port. Baud rate, stop bits and
* parity bits can be found in winbase.h. These are flow control constants only.
*/
#define DPCPA_NOFLOW 0 // no flow control
#define DPCPA_XONXOFFFLOW 1 // software flow control
#define DPCPA_RTSFLOW 2 // hardware flow control with RTS
#define DPCPA_DTRFLOW 3 // hardware flow control with DTR
#define DPCPA_RTSDTRFLOW 4 // hardware flow control with RTS and DTR
typedef struct tagDPCOMPORTADDRESS
{
DWORD dwComPort; // COM port to use (1-4)
DWORD dwBaudRate; // baud rate (100-256k)
DWORD dwStopBits; // no. stop bits (1-2)
DWORD dwParity; // parity (none, odd, even, mark)
DWORD dwFlowControl; // flow control (none, xon/xoff, rts, dtr)
} DPCOMPORTADDRESS, *LPDPCOMPORTADDRESS;
/****************************************************************************
* Miscellaneous
*/
@ -36,11 +270,11 @@ typedef struct tagDPLAPPINFO
DWORD dwSize;
GUID guidApplication;
union appName
union
{
LPSTR lpszAppNameA;
LPWSTR lpszAppName;
};
} appName;
} DPLAPPINFO, *LPDPLAPPINFO;
typedef const DPLAPPINFO *LPCDPLAPPINFO;
@ -53,6 +287,49 @@ typedef struct DPCOMPOUNDADDRESSELEMENT
} DPCOMPOUNDADDRESSELEMENT, *LPDPCOMPOUNDADDRESSELEMENT;
typedef const DPCOMPOUNDADDRESSELEMENT *LPCDPCOMPOUNDADDRESSELEMENT;
typedef struct tagDPAPPLICATIONDESC
{
DWORD dwSize;
DWORD dwFlags;
union
{
LPSTR lpszApplicationNameA;
LPWSTR lpszApplicationName;
} appName;
GUID guidApplication;
union
{
LPSTR lpszFilenameA;
LPWSTR lpszFilename;
} fileName;
union
{
LPSTR lpszCommandLineA;
LPWSTR lpszCommandLine;
} cmdLine;
union
{
LPSTR lpszPathA;
LPWSTR lpszPath;
} path;
union
{
LPSTR lpszCurrentDirectoryA;
LPWSTR lpszCurrentDirectory;
} curDir;
LPSTR lpszDescriptionA;
LPWSTR lpszDescriptionW;
} DPAPPLICATIONDESC, *LPDPAPPLICATIONDESC;
extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD );
extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD );
@ -99,26 +376,6 @@ typedef BOOL (CALLBACK* LPDPLENUMLOCALAPPLICATIONSCALLBACK)(
ICOM_DEFINE(IDirectPlayLobby,IUnknown)
#undef ICOM_INTERFACE
#ifdef ICOM_CINTERFACE
/*** IUnknown methods ***/
#define IDirectPlayLobby_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirectPlayLobby_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirectPlayLobby_Release(p) ICOM_CALL (Release,p)
/*** IDirectPlayLobby methods ***/
#define IDirectPlayLobby_Connect(p,a,b,c) ICOM_CALL3(Connect,p,a,b,c)
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) ICOM_CALL6(CreateAddress,p,a,b,c,d,e,f)
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) ICOM_CALL4(EnumAddress,p,a,b,c,d)
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) ICOM_CALL4(EnumAddressTypes,p,a,b,c,d)
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) ICOM_CALL3(EnumLocalApplications,p,a,b,c)
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) ICOM_CALL3(GetConnectionSettings,p,a,b,c)
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) ICOM_CALL5(ReceiveLobbyMessage,p,a,b,c,d,e)
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) ICOM_CALL4(RunApplication,p,a,b,c,d)
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) ICOM_CALL4(SendLobbyMessage,p,a,b,c,d)
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) ICOM_CALL3(SetConnectionSettings,p,a,b,c)
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) ICOM_CALL3(SetLobbyMessageEvent,p,a,b,c)
#endif
/*****************************************************************************
* IDirectPlayLobby2 interface
*/
@ -131,25 +388,45 @@ ICOM_DEFINE(IDirectPlayLobby,IUnknown)
ICOM_DEFINE(IDirectPlayLobby2,IDirectPlayLobby)
#undef ICOM_INTERFACE
/*****************************************************************************
* IDirectPlayLobby3 interface
*/
#define ICOM_INTERFACE IDirectPlayLobby3
#define IDirectPlayLobby3_METHODS \
ICOM_METHOD4( HRESULT, ConnectEx, DWORD,, REFIID,, LPVOID *,, IUnknown *,) \
ICOM_METHOD2( HRESULT, RegisterApplication, DWORD,, LPDPAPPLICATIONDESC, ) \
ICOM_METHOD2( HRESULT, UnregisterApplication, DWORD,, REFGUID, ) \
ICOM_METHOD1( HRESULT, WaitForConnectionSettings, DWORD, )
#define IDirectPlayLobby3_IMETHODS \
IDirectPlayLobby2_IMETHODS \
IDirectPlayLobby3_METHODS
ICOM_DEFINE(IDirectPlayLobby3,IDirectPlayLobby2)
#undef ICOM_INTERFACE
#ifdef ICOM_CINTERFACE
/*** IUnknown methods ***/
#define IDirectPlayLobby2_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirectPlayLobby2_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirectPlayLobby2_Release(p) ICOM_CALL (Release,p)
/*** IDirectPlayLobby methods ***/
#define IDirectPlayLobby2_Connect(p,a,b,c) ICOM_CALL3(Connect,p,a,b,c)
#define IDirectPlayLobby2_CreateAddress(p,a,b,c,d,e,f) ICOM_CALL6(CreateAddress,p,a,b,c,d,e,f)
#define IDirectPlayLobby2_EnumAddress(p,a,b,c,d) ICOM_CALL4(EnumAddress,p,a,b,c,d)
#define IDirectPlayLobby2_EnumAddressTypes(p,a,b,c,d) ICOM_CALL4(EnumAddressTypes,p,a,b,c,d)
#define IDirectPlayLobby2_EnumLocalApplications(p,a,b,c) ICOM_CALL3(EnumLocalApplications,p,a,b,c)
#define IDirectPlayLobby2_GetConnectionSettings(p,a,b,c) ICOM_CALL3(GetConnectionSettings,p,a,b,c)
#define IDirectPlayLobby2_ReceiveLobbyMessage(p,a,b,c,d,e) ICOM_CALL5(ReceiveLobbyMessage,p,a,b,c,d,e)
#define IDirectPlayLobby2_RunApplication(p,a,b,c,d) ICOM_CALL4(RunApplication,p,a,b,c,d)
#define IDirectPlayLobby2_SendLobbyMessage(p,a,b,c,d) ICOM_CALL4(SendLobbyMessage,p,a,b,c,d)
#define IDirectPlayLobby2_SetConnectionSettings(p,a,b,c) ICOM_CALL3(SetConnectionSettings,p,a,b,c)
#define IDirectPlayLobby2_SetLobbyMessageEvent(p,a,b,c) ICOM_CALL3(SetLobbyMessageEvent,p,a,b,c)
/*** IDirectPlayLobby2 methods ***/
#define IDirectPlayLobby2_CreateCompoundAddress(p,a,b,c,d) ICOM_CALL4(CreateCompoundAddress,p,a,b,c,d)
#define IDirectPlayLobby_QueryInterface(p,a,b) ICOM_CALL2(QueryInterface,p,a,b)
#define IDirectPlayLobby_AddRef(p) ICOM_CALL (AddRef,p)
#define IDirectPlayLobby_Release(p) ICOM_CALL (Release,p)
#define IDirectPlayLobby_Connect(p,a,b,c) ICOM_CALL3(Connect,p,a,b,c)
#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) ICOM_CALL4(ConnectEx,p,a,b,c,d)
#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) ICOM_CALL6(CreateAddress,p,a,b,c,d,e,f)
#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) ICOM_CALL4(CreateCompoundAddress,p,a,b,c,d)
#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) ICOM_CALL4(EnumAddress,p,a,b,c,d)
#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) ICOM_CALL4(EnumAddressTypes,p,a,b,c,d)
#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) ICOM_CALL3(EnumLocalApplications,p,a,b,c)
#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) ICOM_CALL3(GetConnectionSettings,p,a,b,c)
#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) ICOM_CALL5(ReceiveLobbyMessage,p,a,b,c,d,e)
#define IDirectPlayLobby_RegisterApplication(p,a,b) ICOM_CALL2(RegisterApplication,p,a,b)
#define IDirectPlayLobby_RunApplication(p,a,b,c,d) ICOM_CALL4(RunApplication,p,a,b,c,d)
#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) ICOM_CALL4(SendLobbyMessage,p,a,b,c,d)
#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) ICOM_CALL3(SetConnectionSettings,p,a,b,c)
#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) ICOM_CALL3(SetLobbyMessageEvent,p,a,b,c)
#define IDirectPlayLobby_UnregisterApplication(p,a,b) ICOM_CALL2(UnregisterApplication,p,a,b)
#define IDirectPlayLobby_WaitForConnectionSettings(p,a) ICOM_CALL1(WaitForConnectionSettings,p,a)
#endif
#ifdef __cplusplus

View File

@ -8,7 +8,6 @@ WRCEXTRA = -s -pwinmm
C_SRCS = \
audio.c \
dplay.c \
dsound.c \
joystick.c \
lolvldrv.c \

File diff suppressed because it is too large Load Diff

View File

@ -2,8 +2,6 @@ Makefile
call32.s
ddraw.spec.c
dinput.spec.c
dplay.spec.c
dplayx.spec.c
dsound.spec.c
gdi32.spec.c
kernel32.spec.c

View File

@ -8,8 +8,6 @@ MODULE = relay32
SPEC_SRCS = \
ddraw.spec \
dinput.spec \
dplay.spec \
dplayx.spec \
dsound.spec \
gdi32.spec \
kernel32.spec \

View File

@ -1,5 +0,0 @@
name dplay
type win32
1 stdcall DirectPlayCreate(ptr ptr ptr ptr) DirectPlayCreate
2 stdcall DirectPlayEnumerate(ptr ptr) DirectPlayEnumerateA