Export DestroyIcon32 from user32 and use GetProcAddress to call it
from FreeResource16.
This commit is contained in:
parent
7e49205d5a
commit
8eeed94f5f
|
@ -672,6 +672,7 @@ debug_channels (accel caret class clipboard combo cursor dc dde ddeml dialog dri
|
||||||
@ stdcall CallWindowProc16(long long long long long) CallWindowProc16
|
@ stdcall CallWindowProc16(long long long long long) CallWindowProc16
|
||||||
@ stdcall CloseDriver16(long long long) CloseDriver16
|
@ stdcall CloseDriver16(long long long) CloseDriver16
|
||||||
@ stdcall CreateDialogIndirectParam16(long ptr long long long) CreateDialogIndirectParam16
|
@ stdcall CreateDialogIndirectParam16(long ptr long long long) CreateDialogIndirectParam16
|
||||||
|
@ stdcall DestroyIcon32(long long) DestroyIcon32
|
||||||
@ stdcall DefDriverProc16(long long long long long) DefDriverProc16
|
@ stdcall DefDriverProc16(long long long long long) DefDriverProc16
|
||||||
@ stdcall DialogBoxIndirectParam16(long long long long long) DialogBoxIndirectParam16
|
@ stdcall DialogBoxIndirectParam16(long long long long long) DialogBoxIndirectParam16
|
||||||
@ stdcall GetDriverModuleHandle16(long) GetDriverModuleHandle16
|
@ stdcall GetDriverModuleHandle16(long) GetDriverModuleHandle16
|
||||||
|
|
|
@ -80,9 +80,6 @@ extern HGLOBAL CURSORICON_Load( HINSTANCE hInstance, LPCWSTR name,
|
||||||
extern HGLOBAL CURSORICON_ExtCopy(HGLOBAL handle, UINT type,
|
extern HGLOBAL CURSORICON_ExtCopy(HGLOBAL handle, UINT type,
|
||||||
INT desiredx, INT desiredy,
|
INT desiredx, INT desiredy,
|
||||||
UINT flags);
|
UINT flags);
|
||||||
|
|
||||||
extern WORD WINAPI CURSORICON_Destroy( HGLOBAL16 handle, UINT16 flags );
|
|
||||||
|
|
||||||
extern void CURSORICON_FreeModuleIcons( HMODULE hModule );
|
extern void CURSORICON_FreeModuleIcons( HMODULE hModule );
|
||||||
|
|
||||||
#endif /* __WINE_CURSORICON_H */
|
#endif /* __WINE_CURSORICON_H */
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include "wine/winbase16.h"
|
#include "wine/winbase16.h"
|
||||||
#include "wine/exception.h"
|
#include "wine/exception.h"
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
#include "callback.h"
|
|
||||||
#include "cursoricon.h"
|
#include "cursoricon.h"
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "file.h"
|
#include "file.h"
|
||||||
|
@ -409,6 +408,9 @@ LPVOID WINAPI LockResource( HGLOBAL handle )
|
||||||
return LockResource16( handle );
|
return LockResource16( handle );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef WORD WINAPI (*pDestroyIcon32Proc)( HGLOBAL16 handle, UINT16 flags );
|
||||||
|
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* FreeResource (KERNEL.63)
|
* FreeResource (KERNEL.63)
|
||||||
* FreeResource16 (KERNEL32.@)
|
* FreeResource16 (KERNEL32.@)
|
||||||
|
@ -428,8 +430,11 @@ BOOL16 WINAPI FreeResource16( HGLOBAL16 handle )
|
||||||
GlobalFree16() */
|
GlobalFree16() */
|
||||||
if ( retv )
|
if ( retv )
|
||||||
{
|
{
|
||||||
if ( Callout.DestroyIcon32 )
|
pDestroyIcon32Proc proc;
|
||||||
retv = Callout.DestroyIcon32( handle, CID_RESOURCE );
|
HMODULE user = GetModuleHandleA( "user32.dll" );
|
||||||
|
|
||||||
|
if (user && (proc = (pDestroyIcon32Proc)GetProcAddress( user, "DestroyIcon32" )))
|
||||||
|
retv = proc( handle, CID_RESOURCE );
|
||||||
else
|
else
|
||||||
retv = GlobalFree16( handle );
|
retv = GlobalFree16( handle );
|
||||||
}
|
}
|
||||||
|
|
|
@ -1293,7 +1293,7 @@ HCURSOR16 WINAPI CopyCursor16( HINSTANCE16 hInstance, HCURSOR16 hCursor )
|
||||||
* the Win95 one exactly, especially the return values, which
|
* the Win95 one exactly, especially the return values, which
|
||||||
* depend on the setting of various flags.
|
* depend on the setting of various flags.
|
||||||
*/
|
*/
|
||||||
WORD WINAPI CURSORICON_Destroy( HGLOBAL16 handle, UINT16 flags )
|
WORD WINAPI DestroyIcon32( HGLOBAL16 handle, UINT16 flags )
|
||||||
{
|
{
|
||||||
WORD retv;
|
WORD retv;
|
||||||
|
|
||||||
|
@ -1330,7 +1330,7 @@ WORD WINAPI CURSORICON_Destroy( HGLOBAL16 handle, UINT16 flags )
|
||||||
*/
|
*/
|
||||||
BOOL16 WINAPI DestroyIcon16( HICON16 hIcon )
|
BOOL16 WINAPI DestroyIcon16( HICON16 hIcon )
|
||||||
{
|
{
|
||||||
return CURSORICON_Destroy( hIcon, 0 );
|
return DestroyIcon32( hIcon, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1338,7 +1338,7 @@ BOOL16 WINAPI DestroyIcon16( HICON16 hIcon )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI DestroyIcon( HICON hIcon )
|
BOOL WINAPI DestroyIcon( HICON hIcon )
|
||||||
{
|
{
|
||||||
return CURSORICON_Destroy( hIcon, CID_WIN32 );
|
return DestroyIcon32( hIcon, CID_WIN32 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1346,7 +1346,7 @@ BOOL WINAPI DestroyIcon( HICON hIcon )
|
||||||
*/
|
*/
|
||||||
BOOL16 WINAPI DestroyCursor16( HCURSOR16 hCursor )
|
BOOL16 WINAPI DestroyCursor16( HCURSOR16 hCursor )
|
||||||
{
|
{
|
||||||
return CURSORICON_Destroy( hCursor, 0 );
|
return DestroyIcon32( hCursor, 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -1354,7 +1354,7 @@ BOOL16 WINAPI DestroyCursor16( HCURSOR16 hCursor )
|
||||||
*/
|
*/
|
||||||
BOOL WINAPI DestroyCursor( HCURSOR hCursor )
|
BOOL WINAPI DestroyCursor( HCURSOR hCursor )
|
||||||
{
|
{
|
||||||
return CURSORICON_Destroy( hCursor, CID_WIN32 );
|
return DestroyIcon32( hCursor, CID_WIN32 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue