39 changed files with 4328 additions and 90 deletions
@ -1,67 +1,49 @@ |
|||||||
/*-
|
/*
|
||||||
* Redistribution and use in source and binary forms, with or without |
* Copyright (c) 2017 Joachim Nilsson <troglobit@gmail.com> |
||||||
* modification, are permitted provided that the following conditions |
|
||||||
* are met: |
|
||||||
* |
* |
||||||
* 1. Redistributions of source code must retain the above copyright |
* Permission to use, copy, modify, and/or distribute this software for any |
||||||
* notice, this list of conditions and the following disclaimer. |
* purpose with or without fee is hereby granted, provided that the above |
||||||
|
* copyright notice and this permission notice appear in all copies. |
||||||
* |
* |
||||||
* 2. Redistributions in binary form must reproduce the above copyright |
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
||||||
* notice, this list of conditions and the following disclaimer in the |
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
||||||
* documentation and/or other materials provided with the distribution. |
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
||||||
* |
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
||||||
* 3. Neither the name of Novell nor the names of its contributors may |
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
||||||
* be used to endorse or promote products derived from this software |
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
||||||
* without specific prior written permission. |
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
||||||
* |
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
|
||||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, |
|
||||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
|
||||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
|
||||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
|
||||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING |
|
||||||
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
|
||||||
* POSSIBILITY OF SUCH DAMAGE. |
|
||||||
*/ |
*/ |
||||||
|
|
||||||
#include "fmemopen.h" |
#include "fmemopen.h" |
||||||
|
|
||||||
FILE* |
FILE* fmemopen(void* buf, size_t len, const char* type) |
||||||
fmemopen(void* buf, size_t size, const char* mode) |
|
||||||
{ |
{ |
||||||
char temppath[MAX_PATH + 1]; |
int fd; |
||||||
char tempnam[MAX_PATH + 1]; |
|
||||||
DWORD l; |
|
||||||
HANDLE fh; |
|
||||||
FILE* fp; |
FILE* fp; |
||||||
|
char tp[MAX_PATH - 13]; |
||||||
|
char fn[MAX_PATH + 1]; |
||||||
|
|
||||||
if (strcmp(mode, "r") != 0 && strcmp(mode, "r+") != 0) |
if (!GetTempPathA(sizeof(tp), tp)) |
||||||
return 0; |
return NULL; |
||||||
l = GetTempPathA(MAX_PATH, temppath); |
|
||||||
if (!l || l >= MAX_PATH) |
if (!GetTempFileNameA(tp, "eptmp", 0, fn)) |
||||||
return 0; |
return NULL; |
||||||
if (!GetTempFileNameA(temppath, "solvtmp", 0, tempnam)) |
|
||||||
return 0; |
_sopen_s(&fd, fn, |
||||||
fh = CreateFileA(tempnam, DELETE | GENERIC_READ | GENERIC_WRITE, 0, |
_O_CREAT | _O_RDWR | _O_SHORT_LIVED | _O_TEMPORARY | _O_BINARY, |
||||||
NULL, CREATE_ALWAYS, |
_SH_DENYRW, |
||||||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, |
_S_IREAD | _S_IWRITE); |
||||||
NULL); |
if (fd == -1) |
||||||
if (fh == INVALID_HANDLE_VALUE) |
return NULL; |
||||||
return 0; |
|
||||||
fp = _fdopen(_open_osfhandle((intptr_t)fh, 0), "w+b"); |
fp = _fdopen(fd, "w+"); |
||||||
if (!fp) |
if (!fp) { |
||||||
{ |
_close(fd); |
||||||
CloseHandle(fh); |
return NULL; |
||||||
return 0; |
|
||||||
} |
|
||||||
if (buf && size && fwrite(buf, size, 1, fp) != 1) |
|
||||||
{ |
|
||||||
fclose(fp); |
|
||||||
return 0; |
|
||||||
} |
} |
||||||
|
|
||||||
|
fwrite(buf, len, 1, fp); |
||||||
rewind(fp); |
rewind(fp); |
||||||
|
|
||||||
return fp; |
return fp; |
||||||
} |
} |
||||||
@ -1 +1 @@ |
|||||||
Subproject commit cb881d8bcc22bfb518782f340e03aa7c3204a6f7 |
Subproject commit 3582747da01b6a52aa0b7d7472c18c0a391cfd3f |
||||||
@ -0,0 +1,309 @@ |
|||||||
|
#include "ep_weather.h" |
||||||
|
#include "ep_weather_factory.h" |
||||||
|
#include "ep_weather_host.h" |
||||||
|
|
||||||
|
HMODULE epw_hModule; |
||||||
|
DWORD epw_OutstandingObjects = 0; |
||||||
|
DWORD epw_LockCount = 0; |
||||||
|
|
||||||
|
#ifdef _WIN64 |
||||||
|
#pragma comment(linker, "/export:DllRegisterServer=_DllRegisterServer") |
||||||
|
#else |
||||||
|
#pragma comment(linker, "/export:DllRegisterServer=__DllRegisterServer@0") |
||||||
|
#endif |
||||||
|
HRESULT WINAPI _DllRegisterServer() |
||||||
|
{ |
||||||
|
DWORD dwLastError = ERROR_SUCCESS; |
||||||
|
HKEY hKey = NULL; |
||||||
|
DWORD dwSize = 0; |
||||||
|
wchar_t wszFilename[MAX_PATH]; |
||||||
|
wchar_t wszInstallPath[MAX_PATH]; |
||||||
|
|
||||||
|
if (!dwLastError) |
||||||
|
{ |
||||||
|
if (!GetModuleFileNameW(epw_hModule, wszFilename, MAX_PATH)) |
||||||
|
{ |
||||||
|
dwLastError = GetLastError(); |
||||||
|
} |
||||||
|
} |
||||||
|
if (!dwLastError) |
||||||
|
{ |
||||||
|
dwLastError = RegCreateKeyExW( |
||||||
|
HKEY_LOCAL_MACHINE, |
||||||
|
_T("SOFTWARE\\Classes\\CLSID\\") _T(CLSID_EPWeather_TEXT), |
||||||
|
0, |
||||||
|
NULL, |
||||||
|
REG_OPTION_NON_VOLATILE, |
||||||
|
KEY_WRITE | KEY_WOW64_64KEY, |
||||||
|
NULL, |
||||||
|
&hKey, |
||||||
|
NULL |
||||||
|
); |
||||||
|
if (hKey == NULL || hKey == INVALID_HANDLE_VALUE) |
||||||
|
{ |
||||||
|
hKey = NULL; |
||||||
|
} |
||||||
|
if (hKey) |
||||||
|
{ |
||||||
|
dwLastError = RegSetValueExW( |
||||||
|
hKey, |
||||||
|
NULL, |
||||||
|
0, |
||||||
|
REG_SZ, |
||||||
|
_T(CLSID_EPWeather_Name), |
||||||
|
29 * sizeof(wchar_t) |
||||||
|
); |
||||||
|
dwLastError = RegSetValueExW( |
||||||
|
hKey, |
||||||
|
L"AppID", |
||||||
|
0, |
||||||
|
REG_SZ, |
||||||
|
_T(CLSID_EPWeather_TEXT), |
||||||
|
39 * sizeof(wchar_t) |
||||||
|
); |
||||||
|
RegCloseKey(hKey); |
||||||
|
} |
||||||
|
dwLastError = RegCreateKeyExW( |
||||||
|
HKEY_LOCAL_MACHINE, |
||||||
|
_T("SOFTWARE\\Classes\\CLSID\\") _T(CLSID_EPWeather_TEXT) _T("\\InProcServer32"), |
||||||
|
0, |
||||||
|
NULL, |
||||||
|
REG_OPTION_NON_VOLATILE, |
||||||
|
KEY_WRITE | KEY_WOW64_64KEY, |
||||||
|
NULL, |
||||||
|
&hKey, |
||||||
|
NULL |
||||||
|
); |
||||||
|
if (hKey == NULL || hKey == INVALID_HANDLE_VALUE) |
||||||
|
{ |
||||||
|
hKey = NULL; |
||||||
|
} |
||||||
|
if (hKey) |
||||||
|
{ |
||||||
|
dwLastError = RegSetValueExW( |
||||||
|
hKey, |
||||||
|
NULL, |
||||||
|
0, |
||||||
|
REG_SZ, |
||||||
|
wszFilename, |
||||||
|
(wcslen(wszFilename) + 1) * sizeof(wchar_t) |
||||||
|
); |
||||||
|
dwLastError = RegSetValueExW( |
||||||
|
hKey, |
||||||
|
L"ThreadingModel", |
||||||
|
0, |
||||||
|
REG_SZ, |
||||||
|
L"Apartment", |
||||||
|
10 * sizeof(wchar_t) |
||||||
|
); |
||||||
|
RegCloseKey(hKey); |
||||||
|
} |
||||||
|
dwLastError = RegCreateKeyExW( |
||||||
|
HKEY_LOCAL_MACHINE, |
||||||
|
_T("SOFTWARE\\Classes\\AppID\\") _T(CLSID_EPWeather_TEXT), |
||||||
|
0, |
||||||
|
NULL, |
||||||
|
REG_OPTION_NON_VOLATILE, |
||||||
|
KEY_WRITE | KEY_WOW64_64KEY, |
||||||
|
NULL, |
||||||
|
&hKey, |
||||||
|
NULL |
||||||
|
); |
||||||
|
if (hKey == NULL || hKey == INVALID_HANDLE_VALUE) |
||||||
|
{ |
||||||
|
hKey = NULL; |
||||||
|
} |
||||||
|
if (hKey) |
||||||
|
{ |
||||||
|
dwLastError = RegSetValueExW( |
||||||
|
hKey, |
||||||
|
NULL, |
||||||
|
0, |
||||||
|
REG_SZ, |
||||||
|
_T(CLSID_EPWeather_Name), |
||||||
|
29 * sizeof(wchar_t) |
||||||
|
); |
||||||
|
dwLastError = RegSetValueExW( |
||||||
|
hKey, |
||||||
|
L"DllSurrogate", |
||||||
|
0, |
||||||
|
REG_SZ, |
||||||
|
L"", |
||||||
|
1 * sizeof(wchar_t) |
||||||
|
); |
||||||
|
RegCloseKey(hKey); |
||||||
|
} |
||||||
|
dwLastError = RegCreateKeyExW( |
||||||
|
HKEY_LOCAL_MACHINE, |
||||||
|
_T("SOFTWARE\\Classes\\AppID\\") _T(CLSID_EPWeather_TEXT), |
||||||
|
0, |
||||||
|
NULL, |
||||||
|
REG_OPTION_NON_VOLATILE, |
||||||
|
KEY_WRITE | KEY_WOW64_64KEY, |
||||||
|
NULL, |
||||||
|
&hKey, |
||||||
|
NULL |
||||||
|
); |
||||||
|
if (hKey == NULL || hKey == INVALID_HANDLE_VALUE) |
||||||
|
{ |
||||||
|
hKey = NULL; |
||||||
|
} |
||||||
|
if (hKey) |
||||||
|
{ |
||||||
|
dwLastError = RegSetValueExW( |
||||||
|
hKey, |
||||||
|
NULL, |
||||||
|
0, |
||||||
|
REG_SZ, |
||||||
|
_T(CLSID_EPWeather_Name), |
||||||
|
29 * sizeof(wchar_t) |
||||||
|
); |
||||||
|
dwLastError = RegSetValueExW( |
||||||
|
hKey, |
||||||
|
L"DllSurrogate", |
||||||
|
0, |
||||||
|
REG_SZ, |
||||||
|
L"", |
||||||
|
1 * sizeof(wchar_t) |
||||||
|
); |
||||||
|
RegCloseKey(hKey); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return dwLastError == 0 ? (NOERROR) : (HRESULT_FROM_WIN32(dwLastError)); |
||||||
|
} |
||||||
|
|
||||||
|
#ifdef _WIN64 |
||||||
|
#pragma comment(linker, "/export:DllUnregisterServer=_DllUnregisterServer") |
||||||
|
#else |
||||||
|
#pragma comment(linker, "/export:DllUnregisterServer=__DllUnregisterServer@0") |
||||||
|
#endif |
||||||
|
HRESULT WINAPI _DllUnregisterServer() |
||||||
|
{ |
||||||
|
DWORD dwLastError = ERROR_SUCCESS; |
||||||
|
HKEY hKey = NULL; |
||||||
|
DWORD dwSize = 0; |
||||||
|
wchar_t wszFilename[MAX_PATH]; |
||||||
|
|
||||||
|
if (!dwLastError) |
||||||
|
{ |
||||||
|
if (!GetModuleFileNameW(epw_hModule, wszFilename, MAX_PATH)) |
||||||
|
{ |
||||||
|
dwLastError = GetLastError(); |
||||||
|
} |
||||||
|
} |
||||||
|
if (!dwLastError) |
||||||
|
{ |
||||||
|
dwLastError = RegOpenKeyW( |
||||||
|
HKEY_LOCAL_MACHINE, |
||||||
|
_T("SOFTWARE\\Classes\\CLSID\\") _T(CLSID_EPWeather_TEXT), |
||||||
|
&hKey |
||||||
|
); |
||||||
|
if (hKey == NULL || hKey == INVALID_HANDLE_VALUE) |
||||||
|
{ |
||||||
|
hKey = NULL; |
||||||
|
} |
||||||
|
if (hKey) |
||||||
|
{ |
||||||
|
dwLastError = RegDeleteTreeW( |
||||||
|
hKey, |
||||||
|
0 |
||||||
|
); |
||||||
|
RegCloseKey(hKey); |
||||||
|
if (!dwLastError) |
||||||
|
{ |
||||||
|
RegDeleteKeyW( |
||||||
|
HKEY_LOCAL_MACHINE, |
||||||
|
_T("SOFTWARE\\Classes\\CLSID\\") _T(CLSID_EPWeather_TEXT) |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
dwLastError = RegOpenKeyW( |
||||||
|
HKEY_LOCAL_MACHINE, |
||||||
|
_T("SOFTWARE\\Classes\\AppID\\") _T(CLSID_EPWeather_TEXT), |
||||||
|
&hKey |
||||||
|
); |
||||||
|
if (hKey == NULL || hKey == INVALID_HANDLE_VALUE) |
||||||
|
{ |
||||||
|
hKey = NULL; |
||||||
|
} |
||||||
|
if (hKey) |
||||||
|
{ |
||||||
|
dwLastError = RegDeleteTreeW( |
||||||
|
hKey, |
||||||
|
0 |
||||||
|
); |
||||||
|
RegCloseKey(hKey); |
||||||
|
if (!dwLastError) |
||||||
|
{ |
||||||
|
RegDeleteKeyW( |
||||||
|
HKEY_LOCAL_MACHINE, |
||||||
|
_T("SOFTWARE\\Classes\\AppID\\") _T(CLSID_EPWeather_TEXT) |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return dwLastError == 0 ? (NOERROR) : (HRESULT_FROM_WIN32(dwLastError)); |
||||||
|
} |
||||||
|
|
||||||
|
#ifdef _WIN64 |
||||||
|
#pragma comment(linker, "/export:DllCanUnloadNow=_DllCanUnloadNow") |
||||||
|
#else |
||||||
|
#pragma comment(linker, "/export:DllCanUnloadNow=__DllCanUnloadNow@0") |
||||||
|
#endif |
||||||
|
HRESULT WINAPI _DllCanUnloadNow() |
||||||
|
{ |
||||||
|
return((epw_OutstandingObjects | epw_LockCount) ? S_FALSE : S_OK); |
||||||
|
} |
||||||
|
|
||||||
|
#ifdef _WIN64 |
||||||
|
#pragma comment(linker, "/export:DllGetClassObject=_DllGetClassObject") |
||||||
|
#else |
||||||
|
#pragma comment(linker, "/export:DllGetClassObject=__DllGetClassObject@12") |
||||||
|
#endif |
||||||
|
HRESULT WINAPI _DllGetClassObject( |
||||||
|
REFCLSID objGuid, |
||||||
|
REFIID factoryGuid, |
||||||
|
LPVOID* factoryHandle |
||||||
|
) |
||||||
|
{ |
||||||
|
HRESULT hr; |
||||||
|
if (IsEqualCLSID(objGuid, &CLSID_EPWeather)) |
||||||
|
{ |
||||||
|
hr = ClassFactory->lpVtbl->QueryInterface( |
||||||
|
ClassFactory, |
||||||
|
factoryGuid, |
||||||
|
factoryHandle |
||||||
|
); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
*factoryHandle = 0; |
||||||
|
hr = CLASS_E_CLASSNOTAVAILABLE; |
||||||
|
} |
||||||
|
|
||||||
|
return(hr); |
||||||
|
} |
||||||
|
|
||||||
|
BOOL WINAPI DllMain( |
||||||
|
_In_ HINSTANCE hinstDLL, |
||||||
|
_In_ DWORD fdwReason, |
||||||
|
_In_ LPVOID lpvReserved |
||||||
|
) |
||||||
|
{ |
||||||
|
switch (fdwReason) |
||||||
|
{ |
||||||
|
case DLL_PROCESS_ATTACH: |
||||||
|
DisableThreadLibraryCalls(hinstDLL); |
||||||
|
epw_hModule = hinstDLL; |
||||||
|
break; |
||||||
|
case DLL_THREAD_ATTACH: |
||||||
|
break; |
||||||
|
case DLL_THREAD_DETACH: |
||||||
|
break; |
||||||
|
case DLL_PROCESS_DETACH: |
||||||
|
break; |
||||||
|
} |
||||||
|
return TRUE; |
||||||
|
} |
||||||
@ -0,0 +1,51 @@ |
|||||||
|
#ifndef _H_AS_H_ |
||||||
|
#define _H_AS_H_ |
||||||
|
#include <initguid.h> |
||||||
|
#include <Windows.h> |
||||||
|
#include <tchar.h> |
||||||
|
#include <Shlwapi.h> |
||||||
|
|
||||||
|
#pragma comment(lib, "Version.lib") |
||||||
|
#pragma comment(lib, "Shlwapi.lib") |
||||||
|
|
||||||
|
#define ALLOC(x) calloc(1, x) |
||||||
|
#define FREE(x) free(x) |
||||||
|
|
||||||
|
extern HMODULE epw_hModule; |
||||||
|
extern DWORD epw_OutstandingObjects; |
||||||
|
extern DWORD epw_LockCount; |
||||||
|
|
||||||
|
// {A6EA9C2D-4982-4827-9204-0AC532959F6D}
|
||||||
|
#define CLSID_EPWeather_Name "ExplorerPatcher Weather Host" |
||||||
|
#define CLSID_EPWeather_TEXT "{A6EA9C2D-4982-4827-9204-0AC532959F6D}" |
||||||
|
#define EP_Weather_Killswitch "Global\\EP_Weather_Killswitch_" CLSID_EPWeather_TEXT |
||||||
|
DEFINE_GUID(CLSID_EPWeather, |
||||||
|
0xa6ea9c2d, 0x4982, 0x4827, 0x92, 0x4, 0xa, 0xc5, 0x32, 0x95, 0x9f, 0x6d); |
||||||
|
|
||||||
|
#if defined(__cplusplus) && !defined(CINTERFACE) |
||||||
|
#else |
||||||
|
DEFINE_GUID(IID_IEPWeather, |
||||||
|
0xcdbf3734, 0xf847, 0x4f1b, 0xb9, 0x53, 0xa6, 0x5, 0x43, 0x4d, 0xc1, 0xe7); |
||||||
|
#endif |
||||||
|
|
||||||
|
#define EPW_WEATHER_CLASSNAME "ExplorerPatcher_Weather_" CLSID_EPWeather_TEXT |
||||||
|
|
||||||
|
#define EP_WEATHER_KEEP_VALUE -1 |
||||||
|
|
||||||
|
#define EP_WEATHER_NUM_PROVIDERS 2 |
||||||
|
#define EP_WEATHER_PROVIDER_TEST 0 |
||||||
|
#define EP_WEATHER_PROVIDER_GOOGLE 1 |
||||||
|
|
||||||
|
#define EP_WEATHER_NUM_TUNITS 2 |
||||||
|
#define EP_WEATHER_TUNIT_CELSIUS 0 |
||||||
|
#define EP_WEATHER_TUNIT_FAHRENHEIT 1 |
||||||
|
|
||||||
|
#define EP_WEATHER_VIEW_ICONONLY 1 |
||||||
|
#define EP_WEATHER_VIEW_ICONTEMP 3 |
||||||
|
#define EP_WEATHER_VIEW_ICONTEXT 0 |
||||||
|
|
||||||
|
#define EP_WEATHER_UPDATE_NORMAL 1200 |
||||||
|
#define EP_WEATHER_UPDATE_REDUCED 3600 |
||||||
|
|
||||||
|
#define EP_WEATHER_WM_FETCH_DATA (WM_USER + 10) |
||||||
|
#endif |
||||||
@ -0,0 +1,93 @@ |
|||||||
|
#include "ep_weather_factory.h" |
||||||
|
#include "ep_weather_host.h" |
||||||
|
|
||||||
|
ULONG STDMETHODCALLTYPE epw_factory_AddRef(IClassFactory* _this) |
||||||
|
{ |
||||||
|
return(1); |
||||||
|
} |
||||||
|
|
||||||
|
ULONG STDMETHODCALLTYPE epw_factory_Release(IClassFactory* _this) |
||||||
|
{ |
||||||
|
return(1); |
||||||
|
} |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE epw_factory_QueryInterface( |
||||||
|
IClassFactory* _this, |
||||||
|
REFIID riid, |
||||||
|
void** ppv |
||||||
|
) |
||||||
|
{ |
||||||
|
if (!IsEqualIID(riid, &IID_IUnknown) && |
||||||
|
!IsEqualIID(riid, &IID_IClassFactory)) |
||||||
|
{ |
||||||
|
*ppv = 0; |
||||||
|
return(E_NOINTERFACE); |
||||||
|
} |
||||||
|
*ppv = _this; |
||||||
|
_this->lpVtbl->AddRef(_this); |
||||||
|
return(NOERROR); |
||||||
|
} |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE epw_factory_LockServer( |
||||||
|
IClassFactory* this, |
||||||
|
BOOL flock |
||||||
|
) |
||||||
|
{ |
||||||
|
if (flock) InterlockedIncrement(&epw_LockCount); |
||||||
|
else |
||||||
|
{ |
||||||
|
LONG dwOutstandingLocks = InterlockedDecrement(&epw_LockCount); |
||||||
|
LONG dwOutstandingObjects = InterlockedAdd(&epw_OutstandingObjects, 0); |
||||||
|
if (!dwOutstandingObjects && !dwOutstandingLocks) |
||||||
|
{ |
||||||
|
} |
||||||
|
} |
||||||
|
return(NOERROR); |
||||||
|
} |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE epw_factory_CreateInstance( |
||||||
|
IClassFactory* _this, |
||||||
|
IUnknown* punkOuter, |
||||||
|
REFIID vTableGuid, |
||||||
|
void** ppv |
||||||
|
) |
||||||
|
{ |
||||||
|
HRESULT hr = E_NOINTERFACE; |
||||||
|
EPWeather* thisobj = NULL; |
||||||
|
|
||||||
|
*ppv = 0; |
||||||
|
|
||||||
|
if (punkOuter) |
||||||
|
{ |
||||||
|
hr = CLASS_E_NOAGGREGATION; |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
BOOL bOk = FALSE; |
||||||
|
if (IsEqualIID(vTableGuid, &IID_IEPWeather)) |
||||||
|
{ |
||||||
|
if (!(thisobj = ALLOC(sizeof(EPWeather)))) |
||||||
|
{ |
||||||
|
hr = E_OUTOFMEMORY; |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
thisobj->lpVtbl = &IEPWeather_Vtbl; |
||||||
|
bOk = TRUE; |
||||||
|
} |
||||||
|
} |
||||||
|
if (bOk) |
||||||
|
{ |
||||||
|
thisobj->cbCount = 1; |
||||||
|
hr = thisobj->lpVtbl->QueryInterface(thisobj, vTableGuid, ppv); |
||||||
|
thisobj->lpVtbl->Release(thisobj); |
||||||
|
if (SUCCEEDED(hr)) InterlockedIncrement(&epw_OutstandingObjects); |
||||||
|
} |
||||||
|
else |
||||||
|
{ |
||||||
|
return hr; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return(hr); |
||||||
|
} |
||||||
@ -0,0 +1,34 @@ |
|||||||
|
#ifndef _H_AS_FACTORY_H_ |
||||||
|
#define _H_AS_FACTORY_H_ |
||||||
|
#include "ep_weather.h" |
||||||
|
ULONG STDMETHODCALLTYPE epw_factory_AddRef(IClassFactory* _this); |
||||||
|
ULONG STDMETHODCALLTYPE epw_factory_Release(IClassFactory* _this); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_factory_QueryInterface( |
||||||
|
IClassFactory* _this, |
||||||
|
REFIID riid, |
||||||
|
void** ppv |
||||||
|
); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_factory_LockServer( |
||||||
|
IClassFactory* _this, |
||||||
|
BOOL flock |
||||||
|
); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_factory_CreateInstance( |
||||||
|
IClassFactory* _this, |
||||||
|
IUnknown* punkOuter, |
||||||
|
REFIID vTableGuid, |
||||||
|
void** ppv |
||||||
|
); |
||||||
|
typedef interface IEPWeatherFactory IEPWeatherFactory; |
||||||
|
// {A25216A3-4223-4CB3-A572-11A7CC1AEE4E}
|
||||||
|
DEFINE_GUID(IID_IEPWeatherFactory, |
||||||
|
0xa25216a3, 0x4223, 0x4cb3, 0xa5, 0x72, 0x11, 0xa7, 0xcc, 0x1a, 0xee, 0x4e); |
||||||
|
static const IClassFactoryVtbl IEPWeatherFactoryVtbl = { |
||||||
|
epw_factory_QueryInterface, |
||||||
|
epw_factory_AddRef, |
||||||
|
epw_factory_Release, |
||||||
|
epw_factory_CreateInstance, |
||||||
|
epw_factory_LockServer |
||||||
|
}; |
||||||
|
static IClassFactory IClassFactoryInstance = { &IEPWeatherFactoryVtbl }; |
||||||
|
static IClassFactory* ClassFactory = &IClassFactoryInstance; |
||||||
|
#endif |
||||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,210 @@ |
|||||||
|
#ifndef _H_AS_SERVICE_P_H_ |
||||||
|
#define _H_AS_SERVICE_P_H_ |
||||||
|
#include "ep_weather.h" |
||||||
|
#include "ep_weather_utility.h" |
||||||
|
#include "../ep_weather_host_stub/ep_weather_host_h.h" |
||||||
|
#include <windowsx.h> |
||||||
|
#include <ShlObj.h> |
||||||
|
#include <Shobjidl.h> |
||||||
|
#include <dwmapi.h> |
||||||
|
#pragma comment(lib, "Dwmapi.lib") |
||||||
|
#include <netlistmgr.h> |
||||||
|
#include <Iphlpapi.h> |
||||||
|
#pragma comment(lib, "IPHLPAPI.lib") |
||||||
|
#include "WebView2.h" |
||||||
|
|
||||||
|
DEFINE_GUID(IID_ITaskbarList, |
||||||
|
0x56FDF342, 0xFD6D, 0x11d0, 0x95, 0x8A, 0x00, 0x60, 0x97, 0xC9, 0xA0, 0x90); |
||||||
|
|
||||||
|
#define EP_WEATHER_NUM_SIGNALS 2 |
||||||
|
|
||||||
|
#define EP_WEATHER_TIMER_REQUEST_REPAINT 1 |
||||||
|
#define EP_WEATHER_TIMER_REQUEST_REPAINT_DELAY 1000 |
||||||
|
#define EP_WEATHER_TIMER_REBOUND_BROWSER 2 |
||||||
|
#define EP_WEATHER_TIMER_REBOUND_BROWSER_DELAY 1 |
||||||
|
#define EP_WEATHER_TIMER_SCHEDULE_REFRESH 10 |
||||||
|
|
||||||
|
typedef interface EPWeather |
||||||
|
{ |
||||||
|
CONST_VTBL IEPWeatherVtbl* lpVtbl; |
||||||
|
unsigned int cbCount; |
||||||
|
HRESULT hrLastError; |
||||||
|
HANDLE hMainThread; |
||||||
|
HANDLE hInitializeEvent; |
||||||
|
HWND hWnd; |
||||||
|
|
||||||
|
INT64 bBrowserBusy; // interlocked
|
||||||
|
HWND hNotifyWnd; // interlocked
|
||||||
|
LONG64 dwTemperatureUnit; // interlocked
|
||||||
|
LONG64 dwUpdateSchedule; // interlocked
|
||||||
|
WCHAR wszTerm[MAX_PATH]; |
||||||
|
WCHAR wszLanguage[MAX_PATH]; |
||||||
|
LONG64 cbx; // interlocked
|
||||||
|
LONG64 cby; // interlocked
|
||||||
|
LONG64 dwProvider; // interlocked
|
||||||
|
|
||||||
|
double dpi; |
||||||
|
|
||||||
|
HANDLE hMutexData; // protects the following:
|
||||||
|
DWORD cbTemperature; |
||||||
|
LPCWSTR wszTemperature; |
||||||
|
DWORD cbUnit; |
||||||
|
LPCWSTR wszUnit; |
||||||
|
DWORD cbCondition; |
||||||
|
LPCWSTR wszCondition; |
||||||
|
DWORD cbImage; |
||||||
|
char* pImage; |
||||||
|
DWORD cbLocation; |
||||||
|
LPCWSTR wszLocation; |
||||||
|
|
||||||
|
RECT rcBorderThickness; // local variables:
|
||||||
|
ITaskbarList* pTaskList; |
||||||
|
ICoreWebView2Controller* pCoreWebView2Controller; |
||||||
|
ICoreWebView2* pCoreWebView2; |
||||||
|
EventRegistrationToken* tkOnNavigationCompleted; |
||||||
|
LPCWSTR wszScriptData; |
||||||
|
|
||||||
|
HANDLE hSignalExitMainThread; |
||||||
|
HANDLE hSignalKillSwitch; |
||||||
|
} EPWeather; |
||||||
|
|
||||||
|
ULONG STDMETHODCALLTYPE epw_Weather_AddRef(EPWeather* _this); |
||||||
|
ULONG STDMETHODCALLTYPE epw_Weather_Release(EPWeather* _this); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_QueryInterface(EPWeather* _this, REFIID riid, void** ppv); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_About(EPWeather* _this, HWND hWnd); |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_Initialize(EPWeather* _this, WCHAR wszName[MAX_PATH], BOOL bAllocConsole, LONG64 dwProvider, LONG64 cbx, LONG64 cby, LONG64 dwTemperatureUnit, LONG64 dwUpdateSchedule, double dpi); |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_Show(EPWeather* _this); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_Hide(EPWeather* _this); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_GetWindowHandle(EPWeather* _this, HWND* phWnd); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_IsInitialized(EPWeather* _this, BOOL* bIsInitialized); |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_LockData(EPWeather* _this); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_GetDataSizes(EPWeather* _this, LPDWORD pcbTemperature, LPDWORD pcbUnit, LPDWORD pcbCondition, LPDWORD pcbImage); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_GetData(EPWeather* _this, DWORD cbTemperature, LPCWSTR wszTemperature, DWORD cbUnit, LPCWSTR wszUnit, DWORD cbCondition, LPCWSTR wszCondition, DWORD cbImage, char* pImage); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_GetTitle(EPWeather* _this, DWORD cbTitle, LPCWSTR wszTitle, DWORD dwType); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_UnlockData(EPWeather* _this); |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_SetNotifyWindow(EPWeather* _this, HWND hWndNotify); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_SetTemperatureUnit(EPWeather* _this, LONG64 dwTemperatureUnit); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_SetUpdateSchedule(EPWeather* _this, LONG64 dwUpdateSchedule); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_SetTerm(EPWeather* _this, DWORD cbTerm, LPCWSTR wszTerm); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_SetLanguage(EPWeather* _this, DWORD cbLanguage, LPCWSTR wszLanguage); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_SetIconSize(EPWeather* _this, LONG64 cbx, LONG64 cby); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_GetIconSize(EPWeather* _this, LONG64* cbx, LONG64* cby); |
||||||
|
|
||||||
|
static const IEPWeatherVtbl IEPWeather_Vtbl = { |
||||||
|
.QueryInterface = epw_Weather_QueryInterface, |
||||||
|
.AddRef = epw_Weather_AddRef, |
||||||
|
.Release = epw_Weather_Release, |
||||||
|
.About = epw_Weather_About, |
||||||
|
.Initialize = epw_Weather_Initialize, |
||||||
|
.Show = epw_Weather_Show, |
||||||
|
.Hide = epw_Weather_Hide, |
||||||
|
.GetWindowHandle = epw_Weather_GetWindowHandle, |
||||||
|
.LockData = epw_Weather_LockData, |
||||||
|
.GetDataSizes = epw_Weather_GetDataSizes, |
||||||
|
.GetData = epw_Weather_GetData, |
||||||
|
.UnlockData = epw_Weather_UnlockData, |
||||||
|
.SetNotifyWindow = epw_Weather_SetNotifyWindow, |
||||||
|
.IsInitialized = epw_Weather_IsInitialized, |
||||||
|
.GetTitle = epw_Weather_GetTitle, |
||||||
|
.SetTemperatureUnit = epw_Weather_SetTemperatureUnit, |
||||||
|
.SetTerm = epw_Weather_SetTerm, |
||||||
|
.SetLanguage = epw_Weather_SetLanguage, |
||||||
|
.SetIconSize = epw_Weather_SetIconSize, |
||||||
|
.GetIconSize = epw_Weather_GetIconSize, |
||||||
|
.SetUpdateSchedule = epw_Weather_SetUpdateSchedule, |
||||||
|
}; |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_static_Stub(void* _this); |
||||||
|
ULONG STDMETHODCALLTYPE epw_Weather_static_AddRefRelease(EPWeather* _this); |
||||||
|
HRESULT STDMETHODCALLTYPE epw_Weather_static_QueryInterface(EPWeather* _this, REFIID riid, void** ppv); |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE ICoreWebView2_CreateCoreWebView2EnvironmentCompleted(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* _this, HRESULT errorCode, ICoreWebView2Environment* pCoreWebView2Environment); |
||||||
|
HRESULT STDMETHODCALLTYPE ICoreWebView2_CreateCoreWebView2ControllerCompleted(ICoreWebView2CreateCoreWebView2ControllerCompletedHandler* _this, HRESULT hr, ICoreWebView2Controller* pCoreWebView2Controller); |
||||||
|
HRESULT STDMETHODCALLTYPE ICoreWebView2_NavigationCompleted(ICoreWebView2NavigationCompletedEventHandler* _this, ICoreWebView2* pCoreWebView2, ICoreWebView2NavigationCompletedEventArgs* pCoreWebView2NavigationCompletedEventArgs); |
||||||
|
HRESULT STDMETHODCALLTYPE ICoreWebView2_ExecuteScriptCompleted(ICoreWebView2ExecuteScriptCompletedHandler* _this, HRESULT hr, LPCWSTR pResultObjectAsJson); |
||||||
|
HRESULT STDMETHODCALLTYPE ICoreWebView2_get_AdditionalBrowserArguments(ICoreWebView2EnvironmentOptions* _this, LPWSTR* value); |
||||||
|
HRESULT STDMETHODCALLTYPE ICoreWebView2_get_Language(ICoreWebView2EnvironmentOptions* _this, LPWSTR* value); |
||||||
|
HRESULT STDMETHODCALLTYPE ICoreWebView2_get_TargetCompatibleBrowserVersion(ICoreWebView2EnvironmentOptions* _this, LPWSTR* value); |
||||||
|
HRESULT STDMETHODCALLTYPE ICoreWebView2_get_AllowSingleSignOnUsingOSPrimaryAccount(ICoreWebView2EnvironmentOptions* _this, BOOL* allow); |
||||||
|
|
||||||
|
static const ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl EPWeather_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl = { |
||||||
|
.QueryInterface = epw_Weather_static_QueryInterface, |
||||||
|
.AddRef = epw_Weather_static_AddRefRelease, |
||||||
|
.Release = epw_Weather_static_AddRefRelease, |
||||||
|
.Invoke = ICoreWebView2_CreateCoreWebView2EnvironmentCompleted, |
||||||
|
}; |
||||||
|
|
||||||
|
static const ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler EPWeather_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler = { |
||||||
|
&EPWeather_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandlerVtbl |
||||||
|
}; |
||||||
|
|
||||||
|
static const ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl EPWeather_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl = { |
||||||
|
.QueryInterface = epw_Weather_static_QueryInterface, |
||||||
|
.AddRef = epw_Weather_static_AddRefRelease, |
||||||
|
.Release = epw_Weather_static_AddRefRelease, |
||||||
|
.Invoke = ICoreWebView2_CreateCoreWebView2ControllerCompleted, |
||||||
|
}; |
||||||
|
|
||||||
|
static const ICoreWebView2CreateCoreWebView2ControllerCompletedHandler EPWeather_ICoreWebView2CreateCoreWebView2ControllerCompletedHandler = { |
||||||
|
&EPWeather_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl |
||||||
|
}; |
||||||
|
|
||||||
|
static const ICoreWebView2NavigationCompletedEventHandlerVtbl EPWeather_ICoreWebView2NavigationCompletedEventHandlerVtbl = { |
||||||
|
.QueryInterface = epw_Weather_static_QueryInterface, |
||||||
|
.AddRef = epw_Weather_static_AddRefRelease, |
||||||
|
.Release = epw_Weather_static_AddRefRelease, |
||||||
|
.Invoke = ICoreWebView2_NavigationCompleted, |
||||||
|
}; |
||||||
|
|
||||||
|
static const ICoreWebView2NavigationCompletedEventHandler EPWeather_ICoreWebView2NavigationCompletedEventHandler = { |
||||||
|
&EPWeather_ICoreWebView2NavigationCompletedEventHandlerVtbl |
||||||
|
}; |
||||||
|
|
||||||
|
static const ICoreWebView2ExecuteScriptCompletedHandlerVtbl EPWeather_ICoreWebView2ExecuteScriptCompletedHandlerVtbl = { |
||||||
|
.QueryInterface = epw_Weather_static_QueryInterface, |
||||||
|
.AddRef = epw_Weather_static_AddRefRelease, |
||||||
|
.Release = epw_Weather_static_AddRefRelease, |
||||||
|
.Invoke = ICoreWebView2_ExecuteScriptCompleted, |
||||||
|
}; |
||||||
|
|
||||||
|
static const ICoreWebView2ExecuteScriptCompletedHandler EPWeather_ICoreWebView2ExecuteScriptCompletedHandler = { |
||||||
|
&EPWeather_ICoreWebView2ExecuteScriptCompletedHandlerVtbl |
||||||
|
}; |
||||||
|
|
||||||
|
static const ICoreWebView2EnvironmentOptionsVtbl EPWeather_ICoreWebView2EnvironmentOptionsVtbl = { |
||||||
|
.QueryInterface = epw_Weather_static_QueryInterface, |
||||||
|
.AddRef = epw_Weather_static_AddRefRelease, |
||||||
|
.Release = epw_Weather_static_AddRefRelease, |
||||||
|
.get_AdditionalBrowserArguments = ICoreWebView2_get_AdditionalBrowserArguments, |
||||||
|
.put_AdditionalBrowserArguments = epw_Weather_static_Stub, |
||||||
|
.get_Language = ICoreWebView2_get_Language, |
||||||
|
.put_Language = epw_Weather_static_Stub, |
||||||
|
.get_TargetCompatibleBrowserVersion = ICoreWebView2_get_TargetCompatibleBrowserVersion, |
||||||
|
.put_TargetCompatibleBrowserVersion = epw_Weather_static_Stub, |
||||||
|
.get_AllowSingleSignOnUsingOSPrimaryAccount = ICoreWebView2_get_AllowSingleSignOnUsingOSPrimaryAccount, |
||||||
|
.put_AllowSingleSignOnUsingOSPrimaryAccount = epw_Weather_static_Stub, |
||||||
|
}; |
||||||
|
|
||||||
|
static const ICoreWebView2EnvironmentOptions EPWeather_ICoreWebView2EnvironmentOptions = { |
||||||
|
&EPWeather_ICoreWebView2EnvironmentOptionsVtbl |
||||||
|
}; |
||||||
|
|
||||||
|
HRESULT STDMETHODCALLTYPE INetworkListManagerEvents_QueryInterface(void* _this, REFIID riid, void** ppv); |
||||||
|
ULONG STDMETHODCALLTYPE INetworkListManagerEvents_AddRefRelease(void* _this); |
||||||
|
HRESULT STDMETHODCALLTYPE INetworkListManagerEvents_ConnectivityChanged(void* _this, NLM_CONNECTIVITY newConnectivity); |
||||||
|
|
||||||
|
static const INetworkListManagerEventsVtbl INetworkListManagerEvents_Vtbl = { |
||||||
|
.QueryInterface = INetworkListManagerEvents_QueryInterface, |
||||||
|
.AddRef = INetworkListManagerEvents_AddRefRelease, |
||||||
|
.Release = INetworkListManagerEvents_AddRefRelease, |
||||||
|
.ConnectivityChanged = INetworkListManagerEvents_ConnectivityChanged, |
||||||
|
}; |
||||||
|
|
||||||
|
static const INetworkListManagerEvents INetworkListManagerEvents_Instance = { |
||||||
|
.lpVtbl = &INetworkListManagerEvents_Vtbl, |
||||||
|
}; |
||||||
|
#endif |
||||||
@ -0,0 +1,100 @@ |
|||||||
|
// Microsoft Visual C++ generated resource script. |
||||||
|
// |
||||||
|
#include "resource.h" |
||||||
|
|
||||||
|
#define APSTUDIO_READONLY_SYMBOLS |
||||||
|
///////////////////////////////////////////////////////////////////////////// |
||||||
|
// |
||||||
|
// Generated from the TEXTINCLUDE 2 resource. |
||||||
|
// |
||||||
|
#include "winres.h" |
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////// |
||||||
|
#undef APSTUDIO_READONLY_SYMBOLS |
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////// |
||||||
|
// English (United States) resources |
||||||
|
|
||||||
|
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) |
||||||
|
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US |
||||||
|
#pragma code_page(1252) |
||||||
|
|
||||||
|
#ifdef APSTUDIO_INVOKED |
||||||
|
///////////////////////////////////////////////////////////////////////////// |
||||||
|
// |
||||||
|
// TEXTINCLUDE |
||||||
|
// |
||||||
|
|
||||||
|
1 TEXTINCLUDE |
||||||
|
BEGIN |
||||||
|
"resource.h\0" |
||||||
|
END |
||||||
|
|
||||||
|
2 TEXTINCLUDE |
||||||
|
BEGIN |
||||||
|
"#include ""winres.h""\r\n" |
||||||
|
"\0" |
||||||
|
END |
||||||
|
|
||||||
|
3 TEXTINCLUDE |
||||||
|
BEGIN |
||||||
|
"\r\n" |
||||||
|
"\0" |
||||||
|
END |
||||||
|
|
||||||
|
#endif // APSTUDIO_INVOKED |
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////// |
||||||
|
// |
||||||
|
// Version |
||||||
|
// |
||||||
|
|
||||||
|
VS_VERSION_INFO VERSIONINFO |
||||||
|
FILEVERSION 1,0,0,0 |
||||||
|
PRODUCTVERSION 1,0,0,0 |
||||||
|
FILEFLAGSMASK 0x3fL |
||||||
|
#ifdef _DEBUG |
||||||
|
FILEFLAGS 0x1L |
||||||
|
#else |
||||||
|
FILEFLAGS 0x0L |
||||||
|
#endif |
||||||
|
FILEOS 0x40004L |
||||||
|
FILETYPE 0x1L |
||||||
|
FILESUBTYPE 0x0L |
||||||
|
BEGIN |
||||||
|
BLOCK "StringFileInfo" |
||||||
|
BEGIN |
||||||
|
BLOCK "040904b0" |
||||||
|
BEGIN |
||||||
|
VALUE "CompanyName", "VALINET Solutions SRL" |
||||||
|
VALUE "FileDescription", "ExplorerPatcher Weather Host" |
||||||
|
VALUE "FileVersion", "1.0.0.0" |
||||||
|
VALUE "InternalName", "ep_weather_host.exe" |
||||||
|
VALUE "LegalCopyright", "Copyright (C) 2006-2022 VALINET Solutions SRL. All rights reserved." |
||||||
|
VALUE "OriginalFilename", "ep_weather_host.exe" |
||||||
|
VALUE "ProductName", "ExplorerPatcher" |
||||||
|
VALUE "ProductVersion", "1.0.0.0" |
||||||
|
END |
||||||
|
END |
||||||
|
BLOCK "VarFileInfo" |
||||||
|
BEGIN |
||||||
|
VALUE "Translation", 0x409, 1200 |
||||||
|
END |
||||||
|
END |
||||||
|
|
||||||
|
#endif // English (United States) resources |
||||||
|
///////////////////////////////////////////////////////////////////////////// |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef APSTUDIO_INVOKED |
||||||
|
///////////////////////////////////////////////////////////////////////////// |
||||||
|
// |
||||||
|
// Generated from the TEXTINCLUDE 3 resource. |
||||||
|
// |
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////// |
||||||
|
#endif // not APSTUDIO_INVOKED |
||||||
|
|
||||||
@ -0,0 +1,183 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||||
|
<ItemGroup Label="ProjectConfigurations"> |
||||||
|
<ProjectConfiguration Include="Debug|Win32"> |
||||||
|
<Configuration>Debug</Configuration> |
||||||
|
<Platform>Win32</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
<ProjectConfiguration Include="Release|Win32"> |
||||||
|
<Configuration>Release</Configuration> |
||||||
|
<Platform>Win32</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
<ProjectConfiguration Include="Debug|x64"> |
||||||
|
<Configuration>Debug</Configuration> |
||||||
|
<Platform>x64</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
<ProjectConfiguration Include="Release|x64"> |
||||||
|
<Configuration>Release</Configuration> |
||||||
|
<Platform>x64</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
</ItemGroup> |
||||||
|
<PropertyGroup Label="Globals"> |
||||||
|
<VCProjectVersion>16.0</VCProjectVersion> |
||||||
|
<Keyword>Win32Proj</Keyword> |
||||||
|
<ProjectGuid>{314a50c1-f0a0-4d0c-89e1-ad8f3951043e}</ProjectGuid> |
||||||
|
<RootNamespace>epweatherhost</RootNamespace> |
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> |
||||||
|
</PropertyGroup> |
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType> |
||||||
|
<UseDebugLibraries>true</UseDebugLibraries> |
||||||
|
<PlatformToolset>v142</PlatformToolset> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType> |
||||||
|
<UseDebugLibraries>false</UseDebugLibraries> |
||||||
|
<PlatformToolset>v142</PlatformToolset> |
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType> |
||||||
|
<UseDebugLibraries>true</UseDebugLibraries> |
||||||
|
<PlatformToolset>v142</PlatformToolset> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType> |
||||||
|
<UseDebugLibraries>false</UseDebugLibraries> |
||||||
|
<PlatformToolset>v142</PlatformToolset> |
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||||
|
<ImportGroup Label="ExtensionSettings"> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="Shared"> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||||
|
</ImportGroup> |
||||||
|
<PropertyGroup Label="UserMacros" /> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||||
|
<LinkIncremental>true</LinkIncremental> |
||||||
|
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||||
|
<LinkIncremental>false</LinkIncremental> |
||||||
|
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||||
|
<LinkIncremental>true</LinkIncremental> |
||||||
|
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||||
|
<LinkIncremental>false</LinkIncremental> |
||||||
|
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> |
||||||
|
</PropertyGroup> |
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||||
|
<ClCompile> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<ConformanceMode>true</ConformanceMode> |
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Windows</SubSystem> |
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||||
|
<ClCompile> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<ConformanceMode>true</ConformanceMode> |
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Windows</SubSystem> |
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||||
|
<ClCompile> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<ConformanceMode>true</ConformanceMode> |
||||||
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Windows</SubSystem> |
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||||
|
<ClCompile> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<ConformanceMode>true</ConformanceMode> |
||||||
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Windows</SubSystem> |
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClCompile Include="ep_weather.c" /> |
||||||
|
<ClCompile Include="ep_weather_factory.c" /> |
||||||
|
<ClCompile Include="ep_weather_host.c" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClInclude Include="..\ep_weather_host_stub\ep_weather_host_h.h" /> |
||||||
|
<ClInclude Include="ep_weather.h" /> |
||||||
|
<ClInclude Include="ep_weather_factory.h" /> |
||||||
|
<ClInclude Include="ep_weather_host.h" /> |
||||||
|
<ClInclude Include="ep_weather_provider_google_html.h" /> |
||||||
|
<ClInclude Include="ep_weather_provider_google_script.h" /> |
||||||
|
<ClInclude Include="ep_weather_utility.h" /> |
||||||
|
<ClInclude Include="resource.h" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ResourceCompile Include="ep_weather_host.rc" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Midl Include="..\ep_weather_host_stub\ep_weather_host.idl" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<None Include="packages.config" /> |
||||||
|
</ItemGroup> |
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||||
|
<ImportGroup Label="ExtensionTargets"> |
||||||
|
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.1072.54\build\native\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.1072.54\build\native\Microsoft.Web.WebView2.targets')" /> |
||||||
|
</ImportGroup> |
||||||
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
||||||
|
<PropertyGroup> |
||||||
|
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
||||||
|
</PropertyGroup> |
||||||
|
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.1072.54\build\native\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.1072.54\build\native\Microsoft.Web.WebView2.targets'))" /> |
||||||
|
</Target> |
||||||
|
</Project> |
||||||
@ -0,0 +1,67 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||||
|
<ItemGroup> |
||||||
|
<Filter Include="Source Files"> |
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> |
||||||
|
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions> |
||||||
|
</Filter> |
||||||
|
<Filter Include="Header Files"> |
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> |
||||||
|
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions> |
||||||
|
</Filter> |
||||||
|
<Filter Include="Resource Files"> |
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> |
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> |
||||||
|
</Filter> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClCompile Include="ep_weather_host.c"> |
||||||
|
<Filter>Source Files</Filter> |
||||||
|
</ClCompile> |
||||||
|
<ClCompile Include="ep_weather_factory.c"> |
||||||
|
<Filter>Source Files</Filter> |
||||||
|
</ClCompile> |
||||||
|
<ClCompile Include="ep_weather.c"> |
||||||
|
<Filter>Source Files</Filter> |
||||||
|
</ClCompile> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClInclude Include="resource.h"> |
||||||
|
<Filter>Header Files</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="ep_weather_factory.h"> |
||||||
|
<Filter>Header Files</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="ep_weather.h"> |
||||||
|
<Filter>Header Files</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="ep_weather_host.h"> |
||||||
|
<Filter>Header Files</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="..\ep_weather_host_stub\ep_weather_host_h.h"> |
||||||
|
<Filter>Header Files</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="ep_weather_utility.h"> |
||||||
|
<Filter>Header Files</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="ep_weather_provider_google_script.h"> |
||||||
|
<Filter>Header Files</Filter> |
||||||
|
</ClInclude> |
||||||
|
<ClInclude Include="ep_weather_provider_google_html.h"> |
||||||
|
<Filter>Header Files</Filter> |
||||||
|
</ClInclude> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ResourceCompile Include="ep_weather_host.rc"> |
||||||
|
<Filter>Resource Files</Filter> |
||||||
|
</ResourceCompile> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Midl Include="..\ep_weather_host_stub\ep_weather_host.idl"> |
||||||
|
<Filter>Source Files</Filter> |
||||||
|
</Midl> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<None Include="packages.config" /> |
||||||
|
</ItemGroup> |
||||||
|
</Project> |
||||||
@ -0,0 +1,51 @@ |
|||||||
|
#ifndef _H_EP_WEATHER_PROVIDER_GOOGLE_HTML_H_ |
||||||
|
#define _H_EP_WEATHER_PROVIDER_GOOGLE_HTML_H_ |
||||||
|
#include <Windows.h> |
||||||
|
#define EP_WEATHER_PROVIDER_GOOGLE_HTML_LEN 2000 |
||||||
|
LPCWSTR ep_weather_provider_google_html = L"\
|
||||||
|
<!DOCTYPE html>\n\ |
||||||
|
<html lang=\"en\" xmlns=\"http://www.w3.org/1999/xhtml\">\n\
|
||||||
|
<head>\n\ |
||||||
|
<meta charset=\"utf-8\" />\n\
|
||||||
|
<title>Weather</title>\n\ |
||||||
|
<style>\n\ |
||||||
|
html {\n\ |
||||||
|
background-color: transparent !important;\n\ |
||||||
|
}\n\ |
||||||
|
.google-weather-place {\n\ |
||||||
|
width: calc(655px); height: calc(370px);\n\ |
||||||
|
}\n\ |
||||||
|
.google-weather-crop {\n\ |
||||||
|
width: calc(655px); height: calc(370px);\n\ |
||||||
|
overflow: hidden;\n\ |
||||||
|
transition: 0.3s; \n\ |
||||||
|
position: absolute;\n\ |
||||||
|
}\n\ |
||||||
|
.google-weather-crop:hover {\n\ |
||||||
|
width: 655px; height: 370px;\n\ |
||||||
|
}\n\ |
||||||
|
.google-weather {\n\ |
||||||
|
position: relative;\n\ |
||||||
|
left: -180px; top: -180px;\n\ |
||||||
|
width: 2560px; height: 5120px;\n\ |
||||||
|
transform: scale(1.0);\n\ |
||||||
|
transform-origin: 180px 180px;\n\ |
||||||
|
transition: 0.3s;\n\ |
||||||
|
position: absolute;\n\ |
||||||
|
}\n\ |
||||||
|
.google-weather:hover { \n\ |
||||||
|
transform: scale(1); \n\ |
||||||
|
z-index: 1000; \n\ |
||||||
|
}\n\ |
||||||
|
</style>\n\ |
||||||
|
</head>\n\ |
||||||
|
<body>\n\ |
||||||
|
<div class=\"google-weather-place\">\n\
|
||||||
|
<div class=\"google-weather-crop\">\n\
|
||||||
|
<iframe id=\"frame\" allowtransparency=\"true\" class=\"google-weather\" src=\"https://www.google.com/search?igu=1&hl=%s&q=weather%s%s\">\n\
|
||||||
|
</iframe>\n\ |
||||||
|
</div>\n\ |
||||||
|
</div>\n\ |
||||||
|
</body>\n\ |
||||||
|
</html>"; |
||||||
|
#endif |
||||||
@ -0,0 +1,93 @@ |
|||||||
|
#ifndef _H_EP_WEATHER_PROVIDER_GOOGLE_SCRIPT_H_ |
||||||
|
#define _H_EP_WEATHER_PROVIDER_GOOGLE_SCRIPT_H_ |
||||||
|
#include <Windows.h> |
||||||
|
// many thanks to https://stackoverflow.com/questions/23202966/google-weather-widget-on-my-website
|
||||||
|
#define EP_WEATHER_PROVIDER_GOOGLE_SCRIPT_LEN 4000 |
||||||
|
LPCWSTR ep_weather_provider_google_script = L"\
|
||||||
|
function ep_weather_utf8ToHex(str) {\n\ |
||||||
|
return Array.from(str).map(c => \n\ |
||||||
|
c.charCodeAt(0) < 128 ? c.charCodeAt(0).toString(16) : \n\ |
||||||
|
encodeURIComponent(c).replace(/\\%%/g,'').toLowerCase()\n\ |
||||||
|
).join('');\n\ |
||||||
|
}\n\ |
||||||
|
function ep_weather_drawImageToCanvas(image) {\n\ |
||||||
|
const canvas = document.createElement('canvas');\n\ |
||||||
|
const w = image.width;\n\ |
||||||
|
const h = image.height;\n\ |
||||||
|
canvas.width = w;\n\ |
||||||
|
canvas.height = h;\n\ |
||||||
|
canvas.getContext('2d').drawImage(image, 0, 0);\n\ |
||||||
|
return canvas;\n\ |
||||||
|
}\n\ |
||||||
|
function ep_weather_toHexString (byteArray) {\n\ |
||||||
|
//const chars = new Buffer(byteArray.length * 2);\n\ |
||||||
|
const chars = new Uint8Array(byteArray.length * 2);\n\ |
||||||
|
const alpha = 'a'.charCodeAt(0) - 10;\n\ |
||||||
|
const digit = '0'.charCodeAt(0);\n\ |
||||||
|
\n\ |
||||||
|
let p = 0;\n\ |
||||||
|
for (let i = 0; i < byteArray.length; i++) {\n\ |
||||||
|
let nibble = byteArray[i] >>> 4;\n\ |
||||||
|
chars[p++] = nibble > 9 ? nibble + alpha : nibble + digit;\n\ |
||||||
|
nibble = byteArray[i] & 0xF;\n\ |
||||||
|
chars[p++] = nibble > 9 ? nibble + alpha : nibble + digit;\n\ |
||||||
|
}\n\ |
||||||
|
\n\ |
||||||
|
//return chars.toString('utf8');\n\ |
||||||
|
return String.fromCharCode.apply(null, chars);\n\ |
||||||
|
}\n\ |
||||||
|
function ep_weather_getData(imageBitmap, ch) {\n\ |
||||||
|
const canvas = ep_weather_drawImageToCanvas(imageBitmap);\n\ |
||||||
|
const ctx = canvas.getContext('2d');\n\ |
||||||
|
\n\ |
||||||
|
let result = [];\n\ |
||||||
|
for (let y = 0; y < canvas.height; y++) {\n\ |
||||||
|
for (let x = 0; x < canvas.width; x++) {\n\ |
||||||
|
let data = ctx.getImageData(x, y, 1, 1).data;\n\ |
||||||
|
result.push(data[2] * data[3] / 255);\n\ |
||||||
|
result.push(data[1] * data[3] / 255);\n\ |
||||||
|
result.push(data[0] * data[3] / 255);\n\ |
||||||
|
result.push(data[3]);\n\ |
||||||
|
}\n\ |
||||||
|
}\n\ |
||||||
|
let res = (\n\ |
||||||
|
document.getElementById(\"frame\").contentWindow.document.getElementById(ch.includes('x') ? \"wob_ttm\" : \"wob_tm\").innerText + \"#\" + \n\
|
||||||
|
Array.from(document.getElementById(\"frame\").contentWindow.document.getElementsByClassName('wob-unit')[0].getElementsByTagName('span')).filter(e => e.className == 'wob_t').filter(e => !e.style.display.toString().includes(\"none\"))[0].innerText + \"#\" + \n\
|
||||||
|
document.getElementById(\"frame\").contentWindow.document.getElementById(\"wob_tci\").alt + \"#\" + \n\
|
||||||
|
document.getElementById(\"frame\").contentWindow.document.getElementById(\"wob_loc\").innerText + \"#\" + \n\
|
||||||
|
ep_weather_toHexString(result)\n\ |
||||||
|
);\n\ |
||||||
|
console.log(res);\n\ |
||||||
|
document.body.style.backgroundColor='transparent';\n\ |
||||||
|
document.getElementById(\"frame\").contentWindow.document.body.style.backgroundColor='transparent';\n\
|
||||||
|
return res;\n\ |
||||||
|
}\n\ |
||||||
|
var ep_result;\n\ |
||||||
|
let unit = Array.from(document.getElementById(\"frame\").contentWindow.document.getElementsByClassName('wob-unit')[0].getElementsByTagName('span')).filter(e => e.className == 'wob_t')[0].innerText;\n\
|
||||||
|
let p = '%c';\n\ |
||||||
|
if (!unit.includes(p)) {\n\ |
||||||
|
Array.from(document.getElementById(\"frame\").contentWindow.document.getElementsByClassName('wob-unit')[0].getElementsByTagName('a')).filter(e => e.className == 'wob_t').filter(e => e.innerText.includes(p))[0].click();\n\
|
||||||
|
unit = 'x';\n\ |
||||||
|
}\n\ |
||||||
|
createImageBitmap(\n\ |
||||||
|
document.getElementById(\"frame\").contentWindow.document.getElementById('wob_tci'), \n\
|
||||||
|
{ resizeWidth: %d, resizeHeight: %d, resizeQuality: 'high' }\n\ |
||||||
|
)\n\ |
||||||
|
.then(imageBitmap => \n\ |
||||||
|
ep_result = ep_weather_getData(imageBitmap, unit)\n\ |
||||||
|
);\n\ |
||||||
|
function ep_weather_part1() {\n\ |
||||||
|
return \"run_part_2\";\n\
|
||||||
|
}\n\ |
||||||
|
ep_weather_part1();\n\ |
||||||
|
"; |
||||||
|
|
||||||
|
LPCWSTR ep_weather_provider_google_script2 = L"\
|
||||||
|
function ep_weather_part2() {\n\ |
||||||
|
document.getElementById(\"frame\").contentWindow.document.getElementsByClassName(\"KFFQ0c\")[0].style.display = 'none';\n\
|
||||||
|
document.getElementById(\"frame\").contentWindow.document.getElementById(\"search\").scrollIntoView(true);\n\
|
||||||
|
return ep_result;\n\ |
||||||
|
}\n\ |
||||||
|
ep_weather_part2();\n\ |
||||||
|
"; |
||||||
|
#endif |
||||||
@ -0,0 +1,34 @@ |
|||||||
|
#ifndef _H_EP_WEATHER_UTILITY_H_ |
||||||
|
#define _H_EP_WEATHER_UTILITY_H_ |
||||||
|
#include <Windows.h> |
||||||
|
#include <stdint.h> |
||||||
|
inline void QueryVersionInfo(HMODULE hModule, WORD Resource, DWORD* dwLeftMost, DWORD* dwSecondLeft, DWORD* dwSecondRight, DWORD* dwRightMost) |
||||||
|
{ |
||||||
|
HRSRC hResInfo; |
||||||
|
DWORD dwSize; |
||||||
|
HGLOBAL hResData; |
||||||
|
LPVOID pRes, pResCopy; |
||||||
|
UINT uLen; |
||||||
|
VS_FIXEDFILEINFO* lpFfi; |
||||||
|
|
||||||
|
hResInfo = FindResource(hModule, MAKEINTRESOURCE(Resource), RT_VERSION); |
||||||
|
dwSize = SizeofResource(hModule, hResInfo); |
||||||
|
hResData = LoadResource(hModule, hResInfo); |
||||||
|
pRes = LockResource(hResData); |
||||||
|
pResCopy = LocalAlloc(LMEM_FIXED, dwSize); |
||||||
|
CopyMemory(pResCopy, pRes, dwSize); |
||||||
|
FreeResource(hResData); |
||||||
|
|
||||||
|
VerQueryValue(pResCopy, TEXT("\\"), (LPVOID*)&lpFfi, &uLen); |
||||||
|
|
||||||
|
DWORD dwFileVersionMS = lpFfi->dwFileVersionMS; |
||||||
|
DWORD dwFileVersionLS = lpFfi->dwFileVersionLS; |
||||||
|
|
||||||
|
*dwLeftMost = HIWORD(dwFileVersionMS); |
||||||
|
*dwSecondLeft = LOWORD(dwFileVersionMS); |
||||||
|
*dwSecondRight = HIWORD(dwFileVersionLS); |
||||||
|
*dwRightMost = LOWORD(dwFileVersionLS); |
||||||
|
|
||||||
|
LocalFree(pResCopy); |
||||||
|
} |
||||||
|
#endif |
||||||
@ -0,0 +1,4 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<packages> |
||||||
|
<package id="Microsoft.Web.WebView2" version="1.0.1072.54" targetFramework="native" /> |
||||||
|
</packages> |
||||||
@ -0,0 +1,14 @@ |
|||||||
|
//{{NO_DEPENDENCIES}}
|
||||||
|
// Microsoft Visual C++ generated include file.
|
||||||
|
// Used by ep_weather_host.rc
|
||||||
|
|
||||||
|
// Next default values for new objects
|
||||||
|
//
|
||||||
|
#ifdef APSTUDIO_INVOKED |
||||||
|
#ifndef APSTUDIO_READONLY_SYMBOLS |
||||||
|
#define _APS_NEXT_RESOURCE_VALUE 101 |
||||||
|
#define _APS_NEXT_COMMAND_VALUE 40001 |
||||||
|
#define _APS_NEXT_CONTROL_VALUE 1001 |
||||||
|
#define _APS_NEXT_SYMED_VALUE 101 |
||||||
|
#endif |
||||||
|
#endif |
||||||
@ -0,0 +1,61 @@ |
|||||||
|
import "oaidl.idl"; |
||||||
|
import "ocidl.idl"; |
||||||
|
import "unknwn.idl"; |
||||||
|
|
||||||
|
[ |
||||||
|
object, |
||||||
|
uuid(CDBF3734-F847-4F1B-B953-A605434DC1E7), |
||||||
|
oleautomation, |
||||||
|
helpstring("ExplorerPatcher Weather Information") |
||||||
|
] interface IEPWeather : IUnknown |
||||||
|
{ |
||||||
|
HRESULT About([in] HWND hWnd); |
||||||
|
|
||||||
|
HRESULT Initialize([in] WCHAR wszName[260], [in] BOOL bAllocConsole, [in] LONG64 dwProvider, [in] LONG64 cbx, [in] LONG64 cby, [in] LONG64 dwTemperatureUnit, [in] LONG64 dwUpdateSchedule, [in] double dpi); |
||||||
|
|
||||||
|
HRESULT Show(); |
||||||
|
|
||||||
|
HRESULT Hide(); |
||||||
|
|
||||||
|
HRESULT GetWindowHandle([out] HWND* phWnd); |
||||||
|
|
||||||
|
HRESULT LockData(); |
||||||
|
|
||||||
|
HRESULT GetDataSizes( |
||||||
|
[out] LPDWORD pcbTemperature, |
||||||
|
[out] LPDWORD pcbUnit, |
||||||
|
[out] LPDWORD pcbCondition, |
||||||
|
[out] LPDWORD pcbImage |
||||||
|
); |
||||||
|
|
||||||
|
HRESULT GetData( |
||||||
|
[in] DWORD cbTemperature, |
||||||
|
[out, size_is(cbTemperature)] BYTE* wszTemperature, |
||||||
|
[in] DWORD cbUnit, |
||||||
|
[ out, size_is(cbUnit)] BYTE* wszUnit, |
||||||
|
[in] DWORD cbCondition, |
||||||
|
[out, size_is(cbCondition)] BYTE* wszCondition, |
||||||
|
[in] DWORD cbImage, |
||||||
|
[out, size_is(cbImage)] BYTE* pImage |
||||||
|
); |
||||||
|
|
||||||
|
HRESULT UnlockData(); |
||||||
|
|
||||||
|
HRESULT SetNotifyWindow([in] HWND hWndNotify); |
||||||
|
|
||||||
|
HRESULT IsInitialized([out] BOOL* bIsInitialized); |
||||||
|
|
||||||
|
HRESULT GetTitle([in] DWORD cbTitle, [out, size_is(cbTitle)] BYTE* wszTitle, [in] DWORD dwType); |
||||||
|
|
||||||
|
HRESULT SetTemperatureUnit([in] LONG64 dwTemperatureUnit); |
||||||
|
|
||||||
|
HRESULT SetTerm([in] DWORD cbTerm, [in, size_is(cbTerm)] BYTE* wszTerm); |
||||||
|
|
||||||
|
HRESULT SetLanguage([in] DWORD cblanguage, [in, size_is(cblanguage)] BYTE* wszLanguage); |
||||||
|
|
||||||
|
HRESULT SetUpdateSchedule([in] LONG64 dwUpdateSchedule); |
||||||
|
|
||||||
|
HRESULT SetIconSize([in] LONG64 cbx, [in] LONG64 cby); |
||||||
|
|
||||||
|
HRESULT GetIconSize([out] LONG64* cbx, [out] LONG64* cby); |
||||||
|
}; |
||||||
@ -0,0 +1,6 @@ |
|||||||
|
LIBRARY ep_weather_host_stub.dll |
||||||
|
DESCRIPTION 'ExplorerPatcher Weather Stub DLL' |
||||||
|
EXPORTS DllGetClassObject @1 PRIVATE |
||||||
|
DllCanUnloadNow @2 PRIVATE |
||||||
|
DllRegisterServer @4 PRIVATE |
||||||
|
DllUnregisterServer @5 PRIVATE |
||||||
@ -0,0 +1,180 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||||
|
<ItemGroup Label="ProjectConfigurations"> |
||||||
|
<ProjectConfiguration Include="Debug|Win32"> |
||||||
|
<Configuration>Debug</Configuration> |
||||||
|
<Platform>Win32</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
<ProjectConfiguration Include="Release|Win32"> |
||||||
|
<Configuration>Release</Configuration> |
||||||
|
<Platform>Win32</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
<ProjectConfiguration Include="Debug|x64"> |
||||||
|
<Configuration>Debug</Configuration> |
||||||
|
<Platform>x64</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
<ProjectConfiguration Include="Release|x64"> |
||||||
|
<Configuration>Release</Configuration> |
||||||
|
<Platform>x64</Platform> |
||||||
|
</ProjectConfiguration> |
||||||
|
</ItemGroup> |
||||||
|
<PropertyGroup Label="Globals"> |
||||||
|
<VCProjectVersion>16.0</VCProjectVersion> |
||||||
|
<Keyword>Win32Proj</Keyword> |
||||||
|
<ProjectGuid>{af02abac-eaeb-471c-9957-73d430b8b4de}</ProjectGuid> |
||||||
|
<RootNamespace>epweatherhoststub</RootNamespace> |
||||||
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> |
||||||
|
</PropertyGroup> |
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> |
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType> |
||||||
|
<UseDebugLibraries>true</UseDebugLibraries> |
||||||
|
<PlatformToolset>v142</PlatformToolset> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> |
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType> |
||||||
|
<UseDebugLibraries>false</UseDebugLibraries> |
||||||
|
<PlatformToolset>v142</PlatformToolset> |
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> |
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType> |
||||||
|
<UseDebugLibraries>true</UseDebugLibraries> |
||||||
|
<PlatformToolset>v142</PlatformToolset> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> |
||||||
|
<ConfigurationType>DynamicLibrary</ConfigurationType> |
||||||
|
<UseDebugLibraries>false</UseDebugLibraries> |
||||||
|
<PlatformToolset>v142</PlatformToolset> |
||||||
|
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||||
|
<CharacterSet>Unicode</CharacterSet> |
||||||
|
</PropertyGroup> |
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||||
|
<ImportGroup Label="ExtensionSettings"> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="Shared"> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||||
|
</ImportGroup> |
||||||
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||||
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||||
|
</ImportGroup> |
||||||
|
<PropertyGroup Label="UserMacros" /> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||||
|
<LinkIncremental>true</LinkIncremental> |
||||||
|
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||||
|
<LinkIncremental>false</LinkIncremental> |
||||||
|
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||||
|
<LinkIncremental>true</LinkIncremental> |
||||||
|
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> |
||||||
|
</PropertyGroup> |
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||||
|
<LinkIncremental>false</LinkIncremental> |
||||||
|
<OutDir>$(SolutionDir)\build\$(Configuration)</OutDir> |
||||||
|
</PropertyGroup> |
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||||
|
<ClCompile> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<ConformanceMode>true</ConformanceMode> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Console</SubSystem> |
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||||
|
<AdditionalDependencies>RpcRT4.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||||
|
<ModuleDefinitionFile>ep_weather_host_stub.def</ModuleDefinitionFile> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||||
|
<ClCompile> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<ConformanceMode>true</ConformanceMode> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Console</SubSystem> |
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||||
|
<AdditionalDependencies>RpcRT4.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||||
|
<ModuleDefinitionFile>ep_weather_host_stub.def</ModuleDefinitionFile> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||||
|
<ClCompile> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<ConformanceMode>true</ConformanceMode> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Console</SubSystem> |
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||||
|
<AdditionalDependencies>RpcRT4.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||||
|
<ModuleDefinitionFile>ep_weather_host_stub.def</ModuleDefinitionFile> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||||
|
<ClCompile> |
||||||
|
<WarningLevel>Level3</WarningLevel> |
||||||
|
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||||
|
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||||
|
<SDLCheck>true</SDLCheck> |
||||||
|
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<ConformanceMode>true</ConformanceMode> |
||||||
|
</ClCompile> |
||||||
|
<Link> |
||||||
|
<SubSystem>Console</SubSystem> |
||||||
|
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||||
|
<OptimizeReferences>true</OptimizeReferences> |
||||||
|
<GenerateDebugInformation>true</GenerateDebugInformation> |
||||||
|
<AdditionalDependencies>RpcRT4.lib;%(AdditionalDependencies)</AdditionalDependencies> |
||||||
|
<ModuleDefinitionFile>ep_weather_host_stub.def</ModuleDefinitionFile> |
||||||
|
</Link> |
||||||
|
</ItemDefinitionGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Midl Include="ep_weather_host.idl" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClCompile Include="dlldata.c"> |
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">REGISTER_PROXY_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">REGISTER_PROXY_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">REGISTER_PROXY_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">REGISTER_PROXY_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
</ClCompile> |
||||||
|
<ClCompile Include="ep_weather_host_i.c" /> |
||||||
|
<ClCompile Include="ep_weather_host_p.c"> |
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">REGISTER_PROXY_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">REGISTER_PROXY_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">REGISTER_PROXY_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">REGISTER_PROXY_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||||
|
</ClCompile> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClInclude Include="ep_weather_host_h.h" /> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<None Include="ep_weather_host_stub.def" /> |
||||||
|
</ItemGroup> |
||||||
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||||
|
<ImportGroup Label="ExtensionTargets"> |
||||||
|
</ImportGroup> |
||||||
|
</Project> |
||||||
@ -0,0 +1,43 @@ |
|||||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||||
|
<ItemGroup> |
||||||
|
<Filter Include="Source Files"> |
||||||
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> |
||||||
|
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions> |
||||||
|
</Filter> |
||||||
|
<Filter Include="Header Files"> |
||||||
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> |
||||||
|
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions> |
||||||
|
</Filter> |
||||||
|
<Filter Include="Resource Files"> |
||||||
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> |
||||||
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> |
||||||
|
</Filter> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<Midl Include="ep_weather_host.idl"> |
||||||
|
<Filter>Source Files</Filter> |
||||||
|
</Midl> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClCompile Include="dlldata.c"> |
||||||
|
<Filter>Source Files</Filter> |
||||||
|
</ClCompile> |
||||||
|
<ClCompile Include="ep_weather_host_i.c"> |
||||||
|
<Filter>Source Files</Filter> |
||||||
|
</ClCompile> |
||||||
|
<ClCompile Include="ep_weather_host_p.c"> |
||||||
|
<Filter>Source Files</Filter> |
||||||
|
</ClCompile> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<ClInclude Include="ep_weather_host_h.h"> |
||||||
|
<Filter>Header Files</Filter> |
||||||
|
</ClInclude> |
||||||
|
</ItemGroup> |
||||||
|
<ItemGroup> |
||||||
|
<None Include="ep_weather_host_stub.def"> |
||||||
|
<Filter>Source Files</Filter> |
||||||
|
</None> |
||||||
|
</ItemGroup> |
||||||
|
</Project> |
||||||
@ -1 +1 @@ |
|||||||
Subproject commit ebbdacbcabd8e0a50c470f07ccf3796d01f7324a |
Subproject commit a3e51eb335f2421d137cc9bb89ec10ca54103dd1 |
||||||
Loading…
Reference in new issue