dbus/dbus-sysdeps-win.h: add _dbus_win_get_dll-module (cherry picked from commit da5e8e14029cb64a65fe482e232be1d786a8ee19)

This commit is contained in:
Tor Lillqvist 2009-04-22 10:48:59 +02:00 committed by Ralf Habacker
parent b9eae52cc0
commit 8d61e82f91
2 changed files with 12 additions and 0 deletions

View file

@ -36,6 +36,14 @@ struct DBusCondVar {
static DWORD dbus_cond_event_tls = TLS_OUT_OF_INDEXES;
static HMODULE dbus_dll_hmodule;
void *
_dbus_win_get_dll_hmodule (void)
{
return dbus_dll_hmodule;
}
BOOL WINAPI DllMain (HINSTANCE hinstDLL,
DWORD fdwReason,
LPVOID lpvReserved);
@ -49,6 +57,9 @@ DllMain (HINSTANCE hinstDLL,
HANDLE event;
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
dbus_dll_hmodule = hinstDLL;
break;
case DLL_THREAD_DETACH:
if (dbus_cond_event_tls != TLS_OUT_OF_INDEXES)
{

View file

@ -26,6 +26,7 @@
#ifndef DBUS_SYSDEPS_WIN_H
#define DBUS_SYSDEPS_WIN_H
extern void *_dbus_win_get_dll_hmodule (void);
#define _WINSOCKAPI_
#include "dbus-hash.h"