mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-01 11:13:37 +00:00
include: Use proper dllimports for shlwapi functions.
This commit is contained in:
parent
d92b59717d
commit
48aec00477
|
@ -1,4 +1,4 @@
|
||||||
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 @@
|
||||||
#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 @@
|
||||||
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
|
||||||
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]
|
||||||
*
|
*
|
||||||
|
@ -1323,50 +1305,6 @@ BOOL WINAPI IsUserAnAdmin(VOID)
|
||||||
return bResult;
|
return bResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* 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]
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
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
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue