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

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

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  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 "objbase.h"
 65 #include "rpcproxy.h"
 66 #include "wine/debug.h"
 67 #include "dplayx_global.h"
 68 
 69 WINE_DEFAULT_DEBUG_CHANNEL(dplay);
 70 
 71 static HINSTANCE instance;
 72 
 73 /* This is a globally exported variable at ordinal 6 of DPLAYX.DLL */
 74 DWORD gdwDPlaySPRefCount = 0; /* FIXME: Should it be initialized here? */
 75 
 76 
 77 BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )
 78 {
 79 
 80   TRACE( "(%p,%d,%p)\n", hinstDLL, fdwReason, lpvReserved );
 81 
 82   switch ( fdwReason )
 83   {
 84     case DLL_PROCESS_ATTACH:
 85         instance = hinstDLL;
 86         DisableThreadLibraryCalls(hinstDLL);
 87         /* First instance perform construction of global processor data */
 88         return DPLAYX_ConstructData();
 89 
 90     case DLL_PROCESS_DETACH:
 91         /* Last instance performs destruction of global processor data */
 92         return DPLAYX_DestructData();
 93 
 94     default:
 95       break;
 96 
 97   }
 98 
 99   return TRUE;
100 }
101 
102 /***********************************************************************
103  *              DllCanUnloadNow (DPLAYX.@)
104  */
105 HRESULT WINAPI DllCanUnloadNow(void)
106 {
107   HRESULT hr = ( gdwDPlaySPRefCount > 0 ) ? S_FALSE : S_OK;
108 
109   /* FIXME: Should I be putting a check in for class factory objects
110    *        as well?
111    */
112 
113   TRACE( ": returning 0x%08x\n", hr );
114 
115   return hr;
116 }
117 
118 /***********************************************************************
119  *              DllRegisterServer (DPLAYX.@)
120  */
121 HRESULT WINAPI DllRegisterServer(void)
122 {
123     return __wine_register_resources( instance, NULL );
124 }
125 
126 /***********************************************************************
127  *              DllUnregisterServer (DPLAYX.@)
128  */
129 HRESULT WINAPI DllUnregisterServer(void)
130 {
131     return __wine_unregister_resources( instance, NULL );
132 }
133 

~ [ 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.