2006-01-10 17:51:06 +00:00
|
|
|
/***
|
2006-06-19 21:53:48 +00:00
|
|
|
This file is part of PulseAudio.
|
2006-01-10 17:51:06 +00:00
|
|
|
|
2007-02-13 15:35:19 +00:00
|
|
|
Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
|
|
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is free software; you can redistribute it and/or modify
|
2006-01-10 17:51:06 +00:00
|
|
|
it under the terms of the GNU Lesser General Public License as published
|
2009-03-03 20:23:02 +00:00
|
|
|
by the Free Software Foundation; either version 2.1 of the License,
|
2006-01-10 17:51:06 +00:00
|
|
|
or (at your option) any later version.
|
|
|
|
|
|
2006-06-19 21:53:48 +00:00
|
|
|
PulseAudio is distributed in the hope that it will be useful, but
|
2006-01-10 17:51:06 +00:00
|
|
|
WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
|
General Public License for more details.
|
|
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public License
|
2006-06-19 21:53:48 +00:00
|
|
|
along with PulseAudio; if not, write to the Free Software
|
2006-01-10 17:51:06 +00:00
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
|
|
|
|
|
USA.
|
|
|
|
|
***/
|
|
|
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
|
#include <config.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#ifdef OS_IS_WIN32
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
|
|
extern pa_set_root(HANDLE handle);
|
|
|
|
|
|
|
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
|
2006-05-11 11:02:25 +00:00
|
|
|
WSADATA data;
|
2006-01-10 17:51:06 +00:00
|
|
|
|
2006-05-11 11:02:25 +00:00
|
|
|
switch (fdwReason) {
|
2006-01-10 17:51:06 +00:00
|
|
|
|
2006-05-11 11:02:25 +00:00
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
|
if (!pa_set_root(hinstDLL))
|
|
|
|
|
return FALSE;
|
|
|
|
|
WSAStartup(MAKEWORD(2, 0), &data);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case DLL_PROCESS_DETACH:
|
|
|
|
|
WSACleanup();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
}
|
2006-01-10 17:51:06 +00:00
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif /* OS_IS_WIN32 */
|