Commit 48aec004 authored by Alexandre Julliard's avatar Alexandre Julliard

include: Use proper dllimports for shlwapi functions.

parent d92b5971
EXTRADEFS = -DWINBASEAPI= -DWINADVAPI= -DWINUSERAPI= EXTRADEFS = -DWINBASEAPI= -DWINADVAPI= -DWINUSERAPI= -DWINSHLWAPI=
MODULE = kernelbase.dll MODULE = kernelbase.dll
IMPORTLIB = kernelbase IMPORTLIB = kernelbase
IMPORTS = uuid ntdll winecrt0 IMPORTS = uuid ntdll winecrt0
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "ocidl.h" #include "ocidl.h"
#include "featurestagingapi.h" #include "featurestagingapi.h"
#include "shellscalingapi.h" #include "shellscalingapi.h"
#define WINSHLWAPI
#include "shlwapi.h" #include "shlwapi.h"
#include "wine/debug.h" #include "wine/debug.h"
......
...@@ -225,10 +225,10 @@ ...@@ -225,10 +225,10 @@
511 stdcall SHRegQueryValueExW (long wstr ptr ptr ptr ptr) 511 stdcall SHRegQueryValueExW (long wstr ptr ptr ptr ptr)
512 stdcall SHRegDeleteKeyW (long wstr) 512 stdcall SHRegDeleteKeyW (long wstr)
520 stdcall -noname SHAllocShared(ptr long long) 520 stdcall -noname -import SHAllocShared(ptr long long)
521 stdcall -noname SHLockShared(long long) 521 stdcall -noname -import SHLockShared(long long)
522 stdcall -noname SHUnlockShared(ptr) 522 stdcall -noname -import SHUnlockShared(ptr)
523 stdcall -noname SHFreeShared(long long) 523 stdcall -noname -import SHFreeShared(long long)
524 stdcall -ordinal RealDriveType(long long) 524 stdcall -ordinal RealDriveType(long long)
525 stub RealDriveTypeFlags 525 stub RealDriveTypeFlags
526 stdcall SHFlushSFCache() 526 stdcall SHFlushSFCache()
......
...@@ -84,24 +84,6 @@ extern INT WINAPI FindMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData, LPI ...@@ -84,24 +84,6 @@ extern INT WINAPI FindMRUData(HANDLE hList, LPCVOID lpData, DWORD cbData, LPI
extern INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer, DWORD nBufferSize); extern INT WINAPI EnumMRUListA(HANDLE hList, INT nItemPos, LPVOID lpBuffer, DWORD nBufferSize);
/* Get a function pointer from a DLL handle */
#define GET_FUNC(func, module, name, fail) \
do { \
if (!func) { \
if (!SHELL32_h##module && !(SHELL32_h##module = LoadLibraryA(#module ".dll"))) return fail; \
func = (void*)GetProcAddress(SHELL32_h##module, name); \
if (!func) return fail; \
} \
} while (0)
/* Function pointers for GET_FUNC macro */
static HMODULE SHELL32_hshlwapi=NULL;
static HANDLE (WINAPI *pSHAllocShared)(LPCVOID,DWORD,DWORD);
static LPVOID (WINAPI *pSHLockShared)(HANDLE,DWORD);
static BOOL (WINAPI *pSHUnlockShared)(LPVOID);
static BOOL (WINAPI *pSHFreeShared)(HANDLE,DWORD);
/************************************************************************* /*************************************************************************
* ParseFieldA [internal] * ParseFieldA [internal]
* *
...@@ -1324,50 +1306,6 @@ BOOL WINAPI IsUserAnAdmin(VOID) ...@@ -1324,50 +1306,6 @@ BOOL WINAPI IsUserAnAdmin(VOID)
} }
/************************************************************************* /*************************************************************************
* SHAllocShared [SHELL32.520]
*
* See shlwapi.SHAllocShared
*/
HANDLE WINAPI SHAllocShared(const void *lpvData, DWORD dwSize, DWORD dwProcId)
{
GET_FUNC(pSHAllocShared, shlwapi, (char*)7, NULL);
return pSHAllocShared(lpvData, dwSize, dwProcId);
}
/*************************************************************************
* SHLockShared [SHELL32.521]
*
* See shlwapi.SHLockShared
*/
LPVOID WINAPI SHLockShared(HANDLE hShared, DWORD dwProcId)
{
GET_FUNC(pSHLockShared, shlwapi, (char*)8, NULL);
return pSHLockShared(hShared, dwProcId);
}
/*************************************************************************
* SHUnlockShared [SHELL32.522]
*
* See shlwapi.SHUnlockShared
*/
BOOL WINAPI SHUnlockShared(LPVOID lpView)
{
GET_FUNC(pSHUnlockShared, shlwapi, (char*)9, FALSE);
return pSHUnlockShared(lpView);
}
/*************************************************************************
* SHFreeShared [SHELL32.523]
*
* See shlwapi.SHFreeShared
*/
BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
{
GET_FUNC(pSHFreeShared, shlwapi, (char*)10, FALSE);
return pSHFreeShared(hShared, dwProcId);
}
/*************************************************************************
* SetAppStartingCursor [SHELL32.99] * SetAppStartingCursor [SHELL32.99]
*/ */
HRESULT WINAPI SetAppStartingCursor(HWND u, DWORD v) HRESULT WINAPI SetAppStartingCursor(HWND u, DWORD v)
......
EXTRADEFS = -D_SHLWAPI_
MODULE = shlwapi.dll MODULE = shlwapi.dll
IMPORTLIB = shlwapi IMPORTLIB = shlwapi
IMPORTS = uuid shcore user32 gdi32 advapi32 kernelbase IMPORTS = uuid shcore user32 gdi32 advapi32 kernelbase
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment