~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/dplayx/dplayx_main.c

Version: ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~ [ wine-1.0-rc5 ] ~ [ wine-1.0-rc4 ] ~ [ wine-1.0-rc3 ] ~ [ wine-1.0-rc2 ] ~ [ wine-1.0-rc1 ] ~ [ wine-0.9.61 ] ~ [ wine-0.9.60 ] ~ [ wine-0.9.59 ] ~ [ wine-0.9.58 ] ~ [ wine-0.9.57 ] ~ [ wine-0.9.56 ] ~ [ wine-0.9.55 ] ~ [ wine-0.9.54 ] ~ [ wine-0.9.53 ] ~ [ wine-0.9.52 ] ~ [ wine-0.9.51 ] ~ [ wine-0.9.50 ] ~ [ wine-0.9.49 ] ~ [ wine-0.9.48 ] ~ [ wine-0.9.47 ] ~ [ wine-0.9.46 ] ~ [ wine-0.9.45 ] ~ [ wine-0.9.44 ] ~ [ wine-0.9.43 ] ~ [ wine-0.9.42 ] ~ [ wine-0.9.41 ] ~ [ wine-0.9.40 ] ~ [ wine-0.9.39 ] ~ [ wine-0.9.38 ] ~ [ wine-0.9.37 ] ~ [ wine-0.9.36 ] ~ [ wine-0.9.35 ] ~ [ wine-0.9.34 ] ~ [ wine-0.9.33 ] ~ [ wine-0.9.32 ] ~ [ wine-0.9.31 ] ~ [ wine-0.9.30 ] ~ [ wine-0.9.29 ] ~ [ wine-0.9.28 ] ~ [ wine-0.9.27 ] ~ [ wine-0.9.26 ] ~ [ wine-0.9.25 ] ~ [ wine-0.9.24 ] ~ [ wine-0.9.23 ] ~ [ wine-0.9.22 ] ~ [ wine-0.9.21 ] ~ [ wine-0.9.20 ] ~ [ wine-0.9.19 ] ~ [ wine-0.9.18 ] ~ [ wine-0.9.17 ] ~ [ wine-0.9.16 ] ~ [ wine-0.9.15 ] ~ [ wine-0.9.14 ] ~ [ wine-0.9.13 ] ~ [ wine-0.9.12 ] ~ [ wine-0.9.11 ] ~ [ wine-0.9.10 ] ~ [ wine-0.9.9 ] ~ [ wine-0.9.8 ] ~ [ wine-0.9.7 ] ~ [ wine-0.9.6 ] ~ [ wine-0.9.5 ] ~ [ wine-0.9.4 ] ~ [ wine-0.9.3 ] ~ [ wine-0.9.2 ] ~ [ wine-0.9.1 ] ~ [ wine-0.9 ] ~ [ wine20050930 ] ~ [ wine20050830 ] ~ [ wine20050725 ] ~ [ wine20050628 ] ~ [ wine20050524 ] ~ [ wine20050419 ] ~ [ wine20050310 ] ~ [ wine20050211 ] ~ [ wine20050111 ] ~ [ wine20041201 ] ~ [ wine20041019 ] ~ [ wine20040914 ] ~ [ wine20040813 ] ~ [ wine20040716 ] ~ [ wine20040615 ] ~ [ wine20040505 ] ~ [ wine20040408 ] ~ [ wine20040309 ] ~ [ wine20040213 ] ~ [ wine20040121 ] ~ [ wine20031212 ] ~ [ wine20031118 ] ~ [ wine20031016 ] ~ [ wine20030911 ] ~ [ wine20030813 ] ~ [ wine20030709 ] ~ [ wine20030618 ] ~ [ wine20030508 ] ~ [ wine20030408 ] ~ [ wine20030318 ] ~ [ wine20030219 ] ~ [ wine20030115 ] ~ [ wine20021219 ] ~ [ wine20021125 ] ~ [ wine20021031 ] ~ [ wine20021007 ] ~ [ wine20020904 ] ~ [ wine20020804 ] ~ [ wine20020710 ] ~ [ wine20020605 ] ~ [ wine20020509 ] ~ [ wine20020411 ] ~ [ wine20020310 ] ~ [ wine20020228 ] ~ [ wine20011226 ] ~ [ wine20011108 ] ~ [ wine20011004 ] ~ [ wine20010824 ] ~ [ wine20010731 ] ~ [ wine20010629 ] ~ [ wine20010510 ] ~ [ wine20010418 ] ~ [ wine20010326 ] ~ [ wine20010305 ] ~ [ wine20010216 ] ~ [ wine20010112 ] ~ [ wine20001222 ] ~ [ wine20001202 ] ~ [ wine20001026 ] ~ [ wine20001002 ] ~ [ wine20000909 ] ~ [ wine20000821 ] ~ [ wine20000801 ] ~ [ wine20000716 ] ~ [ wine20000326 ] ~ [ wine20000227 ] ~ [ wine20000130 ] ~ [ wine20000109 ] ~

  1 /*
  2  * DPLAYX.DLL LibMain
  3  *
  4  * Copyright 1999,2000 - Peter Hunnisett
  5  *
  6  *
  7  * This library is free software; you can redistribute it and/or
  8  * modify it under the terms of the GNU Lesser General Public
  9  * License as published by the Free Software Foundation; either
 10  * version 2.1 of the License, or (at your option) any later version.
 11  *
 12  * This library is distributed in the hope that it will be useful,
 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15  * Lesser General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU Lesser General Public
 18  * License along with this library; if not, write to the Free Software
 19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 20  *
 21  * NOTES
 22  *  o DPMSGCMD_ENUMSESSIONSREPLY & DPMSGCMD_ENUMSESSIONSREQUEST
 23  *    Have most fields understood, but not all.  Everything seems to work.
 24  *  o DPMSGCMD_REQUESTNEWPLAYERID & DPMSGCMD_NEWPLAYERIDREPLY
 25  *    Barely works. This needs to be completed for sessions to start.
 26  *  o A small issue will be the fact that DirectX 6.1(ie. DirectPlay4)
 27  *    introduces a layer of functionality inside the DP objects which 
 28  *    provide guaranteed protocol delivery.  This is even if the native
 29  *    protocol, IPX or modem for instance, doesn't guarantee it. I'm going
 30  *    to leave this kind of implementation to as close to the end as 
 31  *    possible. However, I will implement an abstraction layer, where 
 32  *    possible, for this functionality. It will do nothing to start, but 
 33  *    will require only the implementation of the guarantee to give
 34  *    final implementation.
 35  *
 36  * TODO:
 37  *  - Implement mutual exclusion on object data for existing functions
 38  *  - Ensure that all dll stubs are present and the ordinals are correct
 39  *  - Addition of DirectX 7.0 functionality for direct play
 40  *  - Implement some WineLib test programs using sdk programs as a skeleton
 41  *  - Change RegEnumKeyEx enumeration pattern to allow error handling and to
 42  *    share registry implementation (or at least simplify).
 43  *  - Add in appropriate RegCloseKey calls for all the opening we're doing...
 44  *  - Fix all the buffer sizes for registry calls. They're off by one - 
 45  *    but in a safe direction.
 46  *  - Fix race condition on interface destruction
 47  *  - Handles need to be correctly reference counted
 48  *  - Check if we need to deallocate any list objects when destroying 
 49  *    a dplay interface
 50  *  - RunApplication process spawning needs to have correct syncronization.
 51  *  - Need to get inter lobby messages working.
 52  *  - Decypher dplay messages between applications and implement...
 53  *  - Need to implement lobby session spawning.
 54  *  - Improve footprint and realtime blocking by setting up a separate data share
 55  *    between lobby application and client since there can be multiple apps per
 56  *    client. Also get rid of offset dependency by making data offset independent
 57  *    somehow.
 58  */
 59 #include <stdarg.h>
 60 
 61 #include "winerror.h"
 62 #include "windef.h"
 63 #include "winbase.h"
 64 #include "wine/debug.h"
 65 #include "dplayx_global.h"
 66 
 67 WINE_DEFAULT_DEBUG_CHANNEL(dplay);
 68 
 69 /* This is a globally exported variable at ordinal 6 of DPLAYX.DLL */
 70 DWORD gdwDPlaySPRefCount = 0; /* FIXME: Should it be initialized here? */
 71 
 72 
 73 BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
 74 {
 75 
 76   TRACE( "(%p,%d,%p)\n", hinstDLL, fdwReason, lpvReserved );
 77 
 78   switch ( fdwReason )
 79   {
 80     case DLL_PROCESS_ATTACH:
 81         DisableThreadLibraryCalls(hinstDLL);
 82         /* First instance perform construction of global processor data */
 83         return DPLAYX_ConstructData();
 84 
 85     case DLL_PROCESS_DETACH:
 86         /* Last instance performs destruction of global processor data */
 87         return DPLAYX_DestructData();
 88 
 89     default:
 90       break;
 91 
 92   }
 93 
 94   return TRUE;
 95 }
 96 
 97 /***********************************************************************
 98  *              DllCanUnloadNow (DPLAYX.@)
 99  */
100 HRESULT WINAPI DllCanUnloadNow(void)
101 {
102   HRESULT hr = ( gdwDPlaySPRefCount > 0 ) ? S_FALSE : S_OK;
103 
104   /* FIXME: Should I be putting a check in for class factory objects
105    *        as well?
106    */
107 
108   TRACE( ": returning 0x%08x\n", hr );
109 
110   return hr;
111 }
112 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.