diff --git a/reactos/dll/win32/sensapi/sensapi.c b/reactos/dll/win32/sensapi/sensapi.c new file mode 100644 index 00000000000..c217a2d990a --- /dev/null +++ b/reactos/dll/win32/sensapi/sensapi.c @@ -0,0 +1,86 @@ +/* + * Implementation of System Event Notification Service Library (sensapi.dll) + * + * Copyright 2005 Steven Edwards for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + * + * Notes: + * The System Event Notification Service reports the status of network + * connections. For Wine we just report that we are always connected. + */ + +#include "config.h" + +#include +#include + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "wingdi.h" +#include "winuser.h" +#include "ole2.h" +#include "sensevts.h" +#include "sensapi.h" + +#include "uuids.h" + +#include "wine/unicode.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(sensapi); + +HMODULE SENSAPI_hModule = 0; + +BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("%p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved); + + switch (fdwReason) { + case DLL_PROCESS_ATTACH: + { + DisableThreadLibraryCalls(hinstDLL); + SENSAPI_hModule = hinstDLL; + break; + } + case DLL_PROCESS_DETACH: + { + break; + } + } + + return TRUE; +} + +BOOL WINAPI IsDestinationReachableA(LPCSTR lpszDestination, LPQOCINFO lpQOCInfo) +{ + FIXME("%s,%p\n", lpszDestination, lpQOCInfo); + return TRUE; +} +BOOL WINAPI IsDestinationReachableW(LPCWSTR lpszDestination, LPQOCINFO lpQOCInfo) +{ + FIXME("%s,%p\n", debugstr_w(lpszDestination), lpQOCInfo); + return TRUE; +} + +BOOL WINAPI IsNetworkAlive(LPDWORD lpdwFlags) +{ + TRACE("yes, using LAN type network.\n"); + if (lpdwFlags) + *lpdwFlags = NETWORK_ALIVE_LAN; + return TRUE; +} diff --git a/reactos/dll/win32/sensapi/sensapi.rbuild b/reactos/dll/win32/sensapi/sensapi.rbuild index 2ed4c2c6e55..dd2f017605b 100644 --- a/reactos/dll/win32/sensapi/sensapi.rbuild +++ b/reactos/dll/win32/sensapi/sensapi.rbuild @@ -1,3 +1,16 @@ - + + + . + include/reactos/wine + + + + 0x600 + 0x501 + 0x501 + wine + kernel32 + ntdll sensapi.c - \ No newline at end of file + sensapi.spec + diff --git a/reactos/dll/win32/sensapi/sensapi.spec b/reactos/dll/win32/sensapi/sensapi.spec new file mode 100644 index 00000000000..1d97531ba59 --- /dev/null +++ b/reactos/dll/win32/sensapi/sensapi.spec @@ -0,0 +1,3 @@ +@ stdcall IsDestinationReachableA(str ptr) +@ stdcall IsDestinationReachableW(wstr ptr) +@ stdcall IsNetworkAlive(ptr) diff --git a/reactos/include/psdk/sensapi.h b/reactos/include/psdk/sensapi.h new file mode 100644 index 00000000000..d934c530887 --- /dev/null +++ b/reactos/include/psdk/sensapi.h @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2005 Steven Edwards + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __SENSAPI_H__ +#define __SENSAPI_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +#define NETWORK_ALIVE_LAN 1 +#define NETWORK_ALIVE_WAN 2 +#define NETWORK_ALIVE_AOL 4 + +typedef struct tagQOCINFO +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwInSpeed; + DWORD dwOutSpeed; +} QOCINFO, *LPQOCINFO; + +BOOL WINAPI IsDestinationReachableA(LPCSTR lpszDestination, LPQOCINFO lpQOCInfo); +BOOL WINAPI IsDestinationReachableW(LPCWSTR lpszDestination, LPQOCINFO lpQOCInfo); +#define IsDestinationReachable WINELIB_NAME_AW(IsDestinationReachable) +BOOL WINAPI IsNetworkAlive(LPDWORD lpdwFlags); + +#ifdef __cplusplus +} +#endif + +#endif /* __SENSAPI_H__ */ diff --git a/reactos/include/psdk/sensevts.h b/reactos/include/psdk/sensevts.h new file mode 100644 index 00000000000..e69de29bb2d diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 32c10b93cf8..3aecccaec90 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -68,6 +68,7 @@ reactos/dll/win32/powrprof # Synced to Wine-0_9_14 reactos/dll/win32/riched20 # Synced to Wine-0_9_5 reactos/dll/win32/riched32 # Autosync reactos/dll/win32/rpcrt4 # Synced to Wine-0_9_10 +reactos/dll/win32/sensapi # Autosync reactos/dll/win32/setupapi # Forked at Wine-20050524 reactos/dll/win32/shell32 # Synced to Wine-0_9_5 reactos/dll/win32/shdocvw # Synced to Wine-0_9_5