ReactOS  0.4.14-dev-608-gd495a4f
dplayx_main.c File Reference
#include <stdarg.h>
#include "winerror.h"
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "rpcproxy.h"
#include "wine/debug.h"
#include "dplayx_global.h"
Include dependency graph for dplayx_main.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (dplay)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
HRESULT WINAPI DllCanUnloadNow (void)
 
HRESULT WINAPI DllRegisterServer (void)
 
HRESULT WINAPI DllUnregisterServer (void)
 

Variables

static HINSTANCE instance
 
DWORD gdwDPlaySPRefCount = 0
 

Function Documentation

◆ DllCanUnloadNow()

HRESULT WINAPI DllCanUnloadNow ( void  )

Definition at line 105 of file dplayx_main.c.

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 }
HRESULT hr
Definition: shlfolder.c:183
#define S_FALSE
Definition: winerror.h:2357
DWORD gdwDPlaySPRefCount
Definition: dplayx_main.c:74
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
#define S_OK
Definition: intsafe.h:59

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 77 of file dplayx_main.c.

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 }
#define TRUE
Definition: types.h:120
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
#define DLL_PROCESS_ATTACH
Definition: compat.h:120
static IN DWORD IN LPVOID lpvReserved
BOOL DPLAYX_DestructData(void)
#define DLL_PROCESS_DETACH
Definition: compat.h:119
#define TRACE(s)
Definition: solgame.cpp:4
static HINSTANCE instance
Definition: dplayx_main.c:71
BOOL DPLAYX_ConstructData(void)

◆ DllRegisterServer()

HRESULT WINAPI DllRegisterServer ( void  )

Definition at line 121 of file dplayx_main.c.

122 {
124 }
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
static HINSTANCE instance
Definition: dplayx_main.c:71

◆ DllUnregisterServer()

HRESULT WINAPI DllUnregisterServer ( void  )

Definition at line 129 of file dplayx_main.c.

130 {
132 }
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110
static HINSTANCE instance
Definition: dplayx_main.c:71

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( dplay  )

Variable Documentation

◆ gdwDPlaySPRefCount

DWORD gdwDPlaySPRefCount = 0

Definition at line 74 of file dplayx_main.c.

Referenced by DllCanUnloadNow().

◆ instance

HINSTANCE instance
static

Definition at line 71 of file dplayx_main.c.

Referenced by DllMain(), DllRegisterServer(), and DllUnregisterServer().