1 This file contains information on the implementation of the direct play
2 and direct play lobby features. There's lots to do and I'm not exactly
3 implementing it overnight! Please lend a hand.
5 Most methods and APIs are but stubs at this point. Examine the code
6 to see what has been implemented. Use -debugmsg +dplay to get a
7 reasonably thourough description of what's going on.
9 Associated DirectX user header files are include/dplay.h, include/dplobby.h.
11 Implementation of the DPLAY and DPLAYX dlls are both in the dlls/dplayx
12 directory. Here's a brief description of the function of each of the files in that
15 dplay.c: Implementation of all the direct play object interfaces.
17 dplobby.c: Implementation of all the direct play lobby interfaces.
19 dpclassfactory.c: Implementation of the COM class factory which can create either
20 direct play lobby or direct play lobby interfaces.
22 dpinit.h: Header file so that dpclassfactory.c can access dplay and dplobby query
23 functions. Shouldn't be included by anything else.
26 dplayx_global.c: Implementation of all things which are associated with dplay on
27 the computer - ie shared resources and such. Methods in this
28 compilation unit should not call anything out side this unit
29 excepting base windows services and an interface to start the
33 name_server.c: Implementation of all things which are associated with the name
36 dplayx_main.c: LibMain executed for loading and unloading the dll. This will make
37 the call to dplayx_global.c to request initialization and destruction
40 dplayx_queue.h: Linked list implementation for dplay/dplobby. Based off of the BSD
41 version found in <sys/queue.h>
44 dplayx_messages.c: Messaging interface required for both DirectPlay and
47 Presently the architectural relationship between this files is a little shakey, but
48 isn't so sufficiently bad that it needs fixing yet.
50 I think I can safely say that any application which requires direct play
51 or direct play lobby will not work at this point. Priority will be to get
52 examples from the sdk running. Once they're at least partially working, I can
53 get down to trying to get some of the games working.
55 However, now that address separation is a reality, all binary samples provided
56 in the sdk can be used. I have had success spawning processes and one
57 directx7 example will allow creation of an app and allow another to join it.
58 Unfortunately, there isn't much for it to be able to do give the state of
59 inter lobby messaging.
61 A small issue will be the fact that DirectX 6.1(ie. DirectPlay4) introduces a layer of functionality
62 inside the DP objects which provide guaranteed protocol delivery. This is
63 even if the native protocol, IPX or modem for instance, doesn't guarantee it. I'm going to leave
64 this kind of implementation to as close to the end as possible. However, I
65 will implement an abstraction layer, where possible, for this functionality.
66 It will do nothing to start, but will require only the implementation of the
67 guaranteness to give final implementation.
71 - (done) Header files for DP4 and DPL3
72 - (done) Add stub functions for all DP4 and DPL3 interfaces
73 - (done) Correct naming of the parameters for DP3 and DPL2
74 - (done) Seperate out DP and DPL into multiple .c files
75 - (done) Allow CoCreateInstance to create the new interfaces
76 - (started)Implement mutual exclusion on object data for existing functions
77 - (done) Create and move to correct dll directories (dplay and dplayx)
78 - (done) Implement dplay in terms of dplayx
79 - (done) Need a better internal implementation for the objects which scales and
80 preferably doesn't involve casting structures. Solution is a crude ctor/dtor
81 which can actually trap some runtime errors.
82 - (done) More generic initialization and destruction helper methods based off
83 the chosen internal implementation. Solution is a crude ctor/dtor.
84 - Use only windows routines where an equivalent is available
85 - (done) Fix wine dplay.h and dplobby.h header files to allow apps to create the ansi versions
86 - (started) Port some WineLib test programs using sdk programs (both C and C++ progs)
87 - (done) Implement a lib main for the dplayx dll (required for RunApplication, etc.)
88 - (done)Figure out how to share the global memory correctly
89 - Ensure that all dll stubs are present and the ordinals are correct
90 - (started) Implementation of functionality
91 - Addition of DirectX 7.0 functionality for direct play (try to catch that moving train)
93 - Implement some WineLib test programs using sdk programs as a skeleton
94 - (done) Change all RegEnumKey calls to RegEnumKeyEx.
95 - Change RegEnumKeyEx enumeration pattern to allow error handling and to
96 share registry implementation (or at least simplify).
97 - Add in appropriate RegCloseKey calls for all the opening we're doing...
98 - Fix all the buffer sizes for registry calls. They're off by one - but in a safe direction.
99 - Find out how to call the service provider dlls - they don't have a published interface!
100 - Fix race condition on interface destruction
101 - Handles need to be correctly reference counted
102 - Need to check if we need to deallocate any list objects when destroying
104 - RunApplication process spawning needs to have correct syncronization.
105 - Need to get inter lobby messages working.
108 - Improve footprint and realtime blocking by setting up a seperate data share
109 between lobby application and client since there can be multiple apps per
111 - Handle everything in UNICODE (as server does) and do conversions for ANSI
112 interfaces. Should cut down on dplayx code base and maintanability (marginally)
113 and could be used to improve efficiency of dialog with the server (it wouldn't
114 have to do ANSI<->UNICODE transformations).
118 Programs to make work:
119 - lserver.exe (from sdk)
120 - override.exe (from sdk)
121 - dpchat.exe (from sdk)
122 - duel.exe (from sdk)
123 - dplaunch.exe (from sdk)
125 Next API to implement on a per SDK program basis:
127 - fixme:dplay:DirectPlayCreate Modem binding not supported yet
128 - DirectPlay3AImpl_InitializeConnection
129 - DirectPlay2AImpl_Open
133 - Just needs final process startup messages to be exchanged correctly!
136 - IDirectPlayLobby2WImpl_Connect
137 - fixme:dplay:DirectPlayCreate Modem binding not supported yet
138 - IDirectPlay3WImpl_CreatePlayer
139 - IDirectPlay3WImpl_CreateGroup
140 - IDirectPlay3WImpl_SetGroupData
141 - IDirectPlay3WImpl_Send
145 - DP_SendSessionRequestBroadcast (implement the name server stuff)
149 - IDirectPlayLobby3AImpl_ConnectEx
153 - DirectPlayCreate Service provider binding not supported yet
158 - look at problem with parsing the resource file for dplaunch. wrc problem?
159 - I should be getting the dialog box to come up for dpchat when something is selected
160 Call OLE32.7: CoCreateInstance(010017f0,00000000,00000001,010017e0,010094b4) ret=01002f38 fs=0237
161 Call ADVAPI32.188: RegOpenKeyExA(80000002,5e08dd90 "Software\\Microsoft\\DirectPlay\\Compatibility",00000000,00020019,40e7f49c) ret=5e0b6e5a fs=0237
164 Peter Hunnisett - hunnise@nortelnetworks.com