Re: dpnet: Stub interface IDirectPlay8LobbyClient (try 3)
Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> writes:
diff --git a/dlls/dpnet/Makefile.in b/dlls/dpnet/Makefile.in index 541e104..70ccef0 100644 --- a/dlls/dpnet/Makefile.in +++ b/dlls/dpnet/Makefile.in @@ -7,6 +7,7 @@ C_SRCS = \ client.c \ dpnet_main.c \ lobbiedapp.c \ + lobbyclient.c \ peer.c \ server.c \ threadpool.c
Please merge that code into some existing files, we don't need so many new files. -- Alexandre Julliard julliard(a)winehq.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Alistair, Since you have to resend it anyway, I'll point out some things you missed: Am 2014-05-16 11:55, schrieb Alistair Leslie-Hughes:
+extern HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppobj) DECLSPEC_HIDDEN; ppobj, pUnkOuter. I guess "riid" qualifies as hungarian notation as well, "iid" would be a better name.
+static HRESULT WINAPI lobbyclient_GetConnectionSettings(IDirectPlay8LobbyClient *iface, DPNHANDLE connection, DPL_CONNECTION_SETTINGS *sessioninfo, DWORD *infosize, DWORD flags) +{ + IDirectPlay8LobbyClientImpl *This = impl_from_IDirectPlay8LobbyClient(iface); + + FIXME("(%p)->(%d %p %p %x)\n", This, connection, sessioninfo, infosize, flags); DPNHANDLE is a DWORD, so you should use %u. This affects the other functions as well.
You may want to use 0x%0x, or %#x instead of %x to make it obvious that a value in the logs is a hex value. This is purely a matter of taste and I'll leave it up to you - just pointing out the options.
+HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **obj) Same as above.
+ client = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectPlay8LobbyClientImpl)); + if (!client) { + *obj = NULL; + return E_OUTOFMEMORY; + } } placement.
Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJTdgMYAAoJEN0/YqbEcdMwrZQP/RDuje3TEb0hSoBeQslCkopF jCWpT0FgX8k/yV03yrtS1Rs23vk6edeNdUBQw3oFjtw7W+eIm2sF/07w69Xbgwtn 6qmIb2Et+gffC+c95XdAhtEZucEzAbepD1IgIoMo6QBbVKDeVzupb2sJyhRO4fYU BXYj4gh12B6Ldn70gk9eebgYbf1fI00wagtQj8SJI2mD2iyuntylJ6f5wauOSLS0 jGS66furb5xqN73c05knfIsZhfg21b4jCEs3viOPlo5255R9kiH7xW1A7HEXdT+Y RmVBEmfaAR0IBlRi8tQ+33wsPy6rTo4YS9tAPQugXgXU36XCOJ5UHlLRF3KbmmUj BeiXGZa7EYdWaCCECfNapVq+xGBfoFVwGR1HtKNDjGZIBCJIbn7GIEh5iRvTO/VB 1Vd1mDVZeCQS4L5euMLdVxr1q8EO8cFMUVNoZPpkATwOZgUngaOIptsBhsrcTtdp 3qa4Q/Zhou2vf45FnzTxn5+rCV1Ok96Ks6TrqZzrHzv3iJyxigVwni9OguYVvxRF ajj3u2IG3PhcOEmlHKoGmxMuX+aT9X/qECHIYu+B9UMQCMJ0xNQRR1DFatH1egUl cFJOAjlY5xiZl2abl0rzYMxTchL6cYSHRrRR3wH0gayy+MG5or+7zBLnHOp9jQDJ PC42+CyMr1Zxketm8h7y =wB3J -----END PGP SIGNATURE-----
On 16 May 2014 14:22, Stefan Dösinger <stefandoesinger(a)gmail.com> wrote:
+ client = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirectPlay8LobbyClientImpl)); + if (!client) { + *obj = NULL; + return E_OUTOFMEMORY; + } } placement.
While we're handing out style hints, I think "sizeof(*client)" is generally nicer for this kind of thing.
Hello Stefan, On 05/16/2014 02:22 PM, Stefan Dösinger wrote:
Since you have to resend it anyway, I'll point out some things you missed:
Am 2014-05-16 11:55, schrieb Alistair Leslie-Hughes:
+extern HRESULT DPNET_CreateDirectPlay8LobbyClient(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, void **ppobj) DECLSPEC_HIDDEN; ppobj, pUnkOuter. I guess "riid" qualifies as hungarian notation as well, "iid" would be a better name. riid is the documented name on http://wiki.winehq.org/COMGuideline Some of the variables are "well established" now even though they might have had a hungarian notation background.
bye michael
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 2014-05-16 14:34, schrieb Michael Stefaniuc:
riid is the documented name on http://wiki.winehq.org/COMGuideline Some of the variables are "well established" now even though they might have had a hungarian notation background. Ok. While I am aware of the COM guide I didn't notice the "riid" naming. Never mind this name then.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIbBAEBAgAGBQJTdgqtAAoJEN0/YqbEcdMwzmIP8wcK622ojMMhZTVhuVLJM0Oh RzZPC1vdWGlo8reXKIPD5yIuh6KJTeFx0W4PHZvv2N88kBNFHsT3daE/LfxSOVx5 mwNvb/QkAnUjNci7OImy1Cw5ZiLsKWGb/dYy+CdwMTTUhfOKaPy7Ac+BB8QHLRCC 7OhswS8+kkgeGqBTB+BBPEKPZ63aALLSkIAfv/hj90TEOCZRv3lyDIeSiJdSDezR sM4IqokJzdUxhRMcv4r99NvdDEKBk6WwlJCRJN47RJWfAZnCQoZ7X0v8tcnnI24S LtMETU8nVWR1nEV9JrLar9+FYyooxrKDZklA0ASfYpqoTSxhyfxc2eH9Uv9qH3A+ 1l4HempfyUishqYfVQm5P1x+QMgAE0ZoYGc+3/xpsla3W+mtfBqMeRjnG25URFeO W2jmFsb6XXwLSh2zC/u0yy6NmIaGW2tGxpQ3ePjHj9sT40ubajKoTPd4uOyJ/Pda o7RYori/mzNKu4tBMrSGdf5fsGA4EMznqjXgL8FRnWeSOksTK8KbwYzkTWf6IvOl h6dvM9bN2xT2dmfumLgJuMDi+XzprFai5IAL7UdNfgf4yUMnqleMnKy4UFrF/L9U nt/g+vW9l1jdpUHnKtaf8QFRRWIzlg/7sB9f2GukvJhr1EcdSnP+bhbmRyVx4GZ8 l710pYn6ng3G/FwDI98= =QF7P -----END PGP SIGNATURE-----
participants (4)
-
Alexandre Julliard -
Henri Verbeet -
Michael Stefaniuc -
Stefan Dösinger