Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
628939d5
Commit
628939d5
authored
Aug 10, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the proper WOW functions everywhere instead of the K32WOW variant.
parent
0df36de5
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
62 additions
and
68 deletions
+62
-68
metafile.c
dlls/gdi/metafile.c
+1
-1
kernel_main.c
dlls/kernel/kernel_main.c
+3
-2
local16.c
dlls/kernel/local16.c
+1
-1
resource16.c
dlls/kernel/resource16.c
+1
-1
task.c
dlls/kernel/task.c
+1
-1
ole16.c
dlls/ole32/ole16.c
+1
-1
storage.c
dlls/ole32/storage.c
+15
-15
edit.c
dlls/user/edit.c
+1
-1
user16.c
dlls/user/user16.c
+1
-1
mmsystem.c
dlls/winmm/mmsystem.c
+2
-2
wow_main.c
dlls/wow32/wow_main.c
+14
-14
winbase16.h
include/wine/winbase16.h
+1
-16
wownt32.h
include/wownt32.h
+20
-12
No files found.
dlls/gdi/metafile.c
View file @
628939d5
...
...
@@ -666,7 +666,7 @@ BOOL16 WINAPI EnumMetaFile16( HDC16 hdc16, HMETAFILE16 hmf,
hHT
=
GlobalAlloc16
(
GMEM_MOVEABLE
|
GMEM_ZEROINIT
,
sizeof
(
HANDLETABLE16
)
*
mh
->
mtNoObjects
);
spht
=
K32
WOWGlobalLock16
(
hHT
);
spht
=
WOWGlobalLock16
(
hHT
);
seg
=
hmf
|
7
;
offset
=
mh
->
mtHeaderSize
*
2
;
...
...
dlls/kernel/kernel_main.c
View file @
628939d5
...
...
@@ -38,6 +38,7 @@
#include "winbase.h"
#include "wincon.h"
#include "winternl.h"
#include "wownt32.h"
#include "wine/winbase16.h"
#include "wine/library.h"
...
...
@@ -82,7 +83,7 @@ static void ldt_unlock(void)
static
void
thread_attach
(
void
)
{
/* allocate the 16-bit stack (FIXME: should be done lazily) */
HGLOBAL16
hstack
=
K32
WOWGlobalAlloc16
(
GMEM_FIXED
,
0x10000
);
HGLOBAL16
hstack
=
WOWGlobalAlloc16
(
GMEM_FIXED
,
0x10000
);
kernel_get_thread_data
()
->
stack_sel
=
GlobalHandleToSel16
(
hstack
);
NtCurrentTeb
()
->
WOW32Reserved
=
(
void
*
)
MAKESEGPTR
(
kernel_get_thread_data
()
->
stack_sel
,
0x10000
-
sizeof
(
STACK16FRAME
)
);
...
...
@@ -95,7 +96,7 @@ static void thread_attach(void)
static
void
thread_detach
(
void
)
{
/* free the 16-bit stack */
K32
WOWGlobalFree16
(
kernel_get_thread_data
()
->
stack_sel
);
WOWGlobalFree16
(
kernel_get_thread_data
()
->
stack_sel
);
NtCurrentTeb
()
->
WOW32Reserved
=
0
;
if
(
NtCurrentTeb
()
->
Tib
.
SubSystemTib
)
TASK_ExitTask
();
}
...
...
dlls/kernel/local16.c
View file @
628939d5
...
...
@@ -1683,7 +1683,7 @@ WORD WINAPI LocalHandleDelta16( WORD delta )
*/
BOOL16
WINAPI
LocalInfo16
(
LOCALINFO
*
pLocalInfo
,
HGLOBAL16
handle
)
{
LOCALHEAPINFO
*
pInfo
=
LOCAL_GetHeap
(
SELECTOROF
(
K32
WOWGlobalLock16
(
handle
)));
LOCALHEAPINFO
*
pInfo
=
LOCAL_GetHeap
(
SELECTOROF
(
WOWGlobalLock16
(
handle
)));
if
(
!
pInfo
)
return
FALSE
;
pLocalInfo
->
wcItems
=
pInfo
->
items
;
return
TRUE
;
...
...
dlls/kernel/resource16.c
View file @
628939d5
...
...
@@ -1066,7 +1066,7 @@ SEGPTR WINAPI WIN16_LockResource16( HGLOBAL16 handle )
{
TRACE
(
"(%04x)
\n
"
,
handle
);
/* May need to reload the resource if discarded */
return
K32
WOWGlobalLock16
(
handle
);
return
WOWGlobalLock16
(
handle
);
}
...
...
dlls/kernel/task.c
View file @
628939d5
...
...
@@ -1612,5 +1612,5 @@ SEGPTR WINAPI GetDOSEnvironment16(void)
}
FreeEnvironmentStringsA
(
env
);
}
return
K32
WOWGlobalLock16
(
handle
);
return
WOWGlobalLock16
(
handle
);
}
dlls/ole32/ole16.c
View file @
628939d5
...
...
@@ -305,7 +305,7 @@ _xmalloc16(DWORD size, SEGPTR *ptr) {
/* No need for a Callback entry, we have WOWCallback16Ex which does
* everything we need.
*/
if
(
!
K32
WOWCallback16Ex
(
if
(
!
WOWCallback16Ex
(
(
DWORD
)((
const
IMalloc16Vtbl
*
)
MapSL
(
(
SEGPTR
)((
LPMALLOC16
)
MapSL
((
SEGPTR
)
mllc
))
->
lpVtbl
)
)
->
Alloc
,
...
...
dlls/ole32/storage.c
View file @
628939d5
...
...
@@ -369,11 +369,11 @@ STORAGE_get_big_block(stream_access16 *str,int n,BYTE *block)
args
[
0
]
=
(
DWORD
)
str
->
lockbytes
;
/* iface */
args
[
1
]
=
(
n
+
1
)
*
BIGSIZE
;
args
[
2
]
=
0
;
/* ULARGE_INTEGER offset */
args
[
3
]
=
(
DWORD
)
K32
WOWGlobalAllocLock16
(
0
,
BIGSIZE
,
&
hsig
);
/* sig */
args
[
3
]
=
WOWGlobalAllocLock16
(
0
,
BIGSIZE
,
&
hsig
);
/* sig */
args
[
4
]
=
BIGSIZE
;
args
[
5
]
=
0
;
if
(
!
K32
WOWCallback16Ex
(
if
(
!
WOWCallback16Ex
(
(
DWORD
)((
const
ILockBytes16Vtbl
*
)
MapSL
(
(
SEGPTR
)((
LPLOCKBYTES16
)
MapSL
(
str
->
lockbytes
))
->
lpVtbl
)
)
->
ReadAt
,
...
...
@@ -386,7 +386,7 @@ STORAGE_get_big_block(stream_access16 *str,int n,BYTE *block)
return
FALSE
;
}
memcpy
(
block
,
MapSL
(
args
[
3
]),
BIGSIZE
);
K32
WOWGlobalUnlockFree16
(
args
[
3
]);
WOWGlobalUnlockFree16
(
args
[
3
]);
}
return
TRUE
;
}
...
...
@@ -405,7 +405,7 @@ _ilockbytes16_writeat(SEGPTR lockbytes, DWORD offset, DWORD length, void *buffer
/* THIS_ ULARGE_INTEGER ulOffset, const void *pv, ULONG cb, ULONG *pcbWritten); */
if
(
!
K32
WOWCallback16Ex
(
if
(
!
WOWCallback16Ex
(
(
DWORD
)((
const
ILockBytes16Vtbl
*
)
MapSL
(
(
SEGPTR
)((
LPLOCKBYTES16
)
MapSL
(
lockbytes
))
->
lpVtbl
)
)
->
WriteAt
,
...
...
@@ -1098,7 +1098,7 @@ _ilockbytes16_addref(SEGPTR lockbytes) {
HRESULT
hres
;
args
[
0
]
=
(
DWORD
)
lockbytes
;
/* iface */
if
(
!
K32
WOWCallback16Ex
(
if
(
!
WOWCallback16Ex
(
(
DWORD
)((
const
ILockBytes16Vtbl
*
)
MapSL
(
(
SEGPTR
)((
LPLOCKBYTES16
)
MapSL
(
lockbytes
))
->
lpVtbl
)
)
->
AddRef
,
...
...
@@ -1116,7 +1116,7 @@ _ilockbytes16_release(SEGPTR lockbytes) {
HRESULT
hres
;
args
[
0
]
=
(
DWORD
)
lockbytes
;
/* iface */
if
(
!
K32
WOWCallback16Ex
(
if
(
!
WOWCallback16Ex
(
(
DWORD
)((
const
ILockBytes16Vtbl
*
)
MapSL
(
(
SEGPTR
)((
LPLOCKBYTES16
)
MapSL
(
lockbytes
))
->
lpVtbl
)
)
->
Release
,
...
...
@@ -1134,7 +1134,7 @@ _ilockbytes16_flush(SEGPTR lockbytes) {
HRESULT
hres
;
args
[
0
]
=
(
DWORD
)
lockbytes
;
/* iface */
if
(
!
K32
WOWCallback16Ex
(
if
(
!
WOWCallback16Ex
(
(
DWORD
)((
const
ILockBytes16Vtbl
*
)
MapSL
(
(
SEGPTR
)((
LPLOCKBYTES16
)
MapSL
(
lockbytes
))
->
lpVtbl
)
)
->
Flush
,
...
...
@@ -2155,11 +2155,11 @@ HRESULT WINAPI StgIsStorageILockBytes16(SEGPTR plkbyt)
args
[
0
]
=
(
DWORD
)
plkbyt
;
/* iface */
args
[
1
]
=
args
[
2
]
=
0
;
/* ULARGE_INTEGER offset */
args
[
3
]
=
(
DWORD
)
K32
WOWGlobalAllocLock16
(
0
,
8
,
&
hsig
);
/* sig */
args
[
3
]
=
WOWGlobalAllocLock16
(
0
,
8
,
&
hsig
);
/* sig */
args
[
4
]
=
8
;
args
[
5
]
=
0
;
if
(
!
K32
WOWCallback16Ex
(
if
(
!
WOWCallback16Ex
(
(
DWORD
)((
const
ILockBytes16Vtbl
*
)
MapSL
(
(
SEGPTR
)((
LPLOCKBYTES16
)
MapSL
(
plkbyt
))
->
lpVtbl
)
)
->
ReadAt
,
...
...
@@ -2172,10 +2172,10 @@ HRESULT WINAPI StgIsStorageILockBytes16(SEGPTR plkbyt)
return
hres
;
}
if
(
memcmp
(
MapSL
(
args
[
3
]),
STORAGE_magic
,
sizeof
(
STORAGE_magic
))
==
0
)
{
K32
WOWGlobalUnlockFree16
(
args
[
3
]);
WOWGlobalUnlockFree16
(
args
[
3
]);
return
S_OK
;
}
K32
WOWGlobalUnlockFree16
(
args
[
3
]);
WOWGlobalUnlockFree16
(
args
[
3
]);
return
S_FALSE
;
}
...
...
@@ -2239,10 +2239,10 @@ HRESULT WINAPI ReadClassStg16(SEGPTR /*IStorage **/pstg,CLSID *pclsid){
* read a STATSTG structure (contains the clsid) from the storage
*/
args
[
0
]
=
(
DWORD
)
pstg
;
/* iface */
args
[
1
]
=
(
DWORD
)
K32
WOWGlobalAllocLock16
(
0
,
sizeof
(
STATSTG16
),
&
hstatstg
);
args
[
1
]
=
WOWGlobalAllocLock16
(
0
,
sizeof
(
STATSTG16
),
&
hstatstg
);
args
[
2
]
=
STATFLAG_DEFAULT
;
if
(
!
K32
WOWCallback16Ex
(
if
(
!
WOWCallback16Ex
(
(
DWORD
)((
const
IStorage16Vtbl
*
)
MapSL
(
(
SEGPTR
)((
LPSTORAGE16
)
MapSL
(
pstg
))
->
lpVtbl
)
)
->
Stat
,
...
...
@@ -2251,12 +2251,12 @@ HRESULT WINAPI ReadClassStg16(SEGPTR /*IStorage **/pstg,CLSID *pclsid){
(
LPVOID
)
args
,
(
LPDWORD
)
&
hres
))
{
K32
WOWGlobalUnlockFree16
(
args
[
1
]);
WOWGlobalUnlockFree16
(
args
[
1
]);
ERR
(
"CallTo16 IStorage16::Stat() failed, hres %lx
\n
"
,
hres
);
return
hres
;
}
memcpy
(
&
statstg
,
MapSL
(
args
[
1
]),
sizeof
(
STATSTG16
));
K32
WOWGlobalUnlockFree16
(
args
[
1
]);
WOWGlobalUnlockFree16
(
args
[
1
]);
if
(
SUCCEEDED
(
hres
))
{
*
pclsid
=
statstg
.
clsid
;
...
...
dlls/user/edit.c
View file @
628939d5
...
...
@@ -1354,7 +1354,7 @@ static INT EDIT_CallWordBreakProc(EDITSTATE *es, INT start, INT index, INT count
countA
=
WideCharToMultiByte
(
CP_ACP
,
0
,
es
->
text
+
start
,
count
,
NULL
,
0
,
NULL
,
NULL
);
hglob16
=
GlobalAlloc16
(
GMEM_MOVEABLE
|
GMEM_ZEROINIT
,
countA
);
segptr
=
K32
WOWGlobalLock16
(
hglob16
);
segptr
=
WOWGlobalLock16
(
hglob16
);
WideCharToMultiByte
(
CP_ACP
,
0
,
es
->
text
+
start
,
count
,
MapSL
(
segptr
),
countA
,
NULL
,
NULL
);
args
[
4
]
=
SELECTOROF
(
segptr
);
args
[
3
]
=
OFFSETOF
(
segptr
);
...
...
dlls/user/user16.c
View file @
628939d5
...
...
@@ -1547,7 +1547,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj,
HWND16
hCurrentWnd
=
0
;
lpDragInfo
=
(
LPDRAGINFO16
)
GlobalLock16
(
hDragInfo
);
spDragInfo
=
K32
WOWGlobalLock16
(
hDragInfo
);
spDragInfo
=
WOWGlobalLock16
(
hDragInfo
);
if
(
!
lpDragInfo
||
!
spDragInfo
)
return
0L
;
...
...
dlls/winmm/mmsystem.c
View file @
628939d5
...
...
@@ -1863,7 +1863,7 @@ void WINAPI mmTaskYield16(void)
MSG
msg
;
if
(
PeekMessageA
(
&
msg
,
0
,
0
,
0
,
0
))
{
K32
WOWYield16
();
WOWYield16
();
}
}
...
...
@@ -2150,7 +2150,7 @@ DWORD WINAPI WINE_mmThreadEntryPoint(LPVOID p)
TRACE
(
"[30-%p]
\n
"
,
lpMMThd
->
hThread
);
while
(
lpMMThd
->
dwCounter
)
{
Sleep
(
1
);
/*
K32
WOWYield16();*/
/* WOWYield16();*/
}
TRACE
(
"[XX-%p]
\n
"
,
lpMMThd
->
hThread
);
/* paranoia */
...
...
dlls/wow32/wow_main.c
View file @
628939d5
...
...
@@ -23,24 +23,24 @@
#include "winbase.h"
#include "wownt32.h"
#undef WOWHandle32
#undef WOWHandle16
#undef WOWCallback16
#undef WOWCallback16Ex
#undef WOWDirectedYield16
#undef WOWGetVDMPointer
#undef WOWGetVDMPointerFix
#undef WOWGetVDMPointerUnfix
#undef WOWGlobalAlloc16
#undef WOWGlobalAllocLock16
#undef WOWGlobalFree16
#undef WOWGlobalLock16
#undef WOWGlobalLockSize16
#undef WOWGlobalUnlock16
#undef WOWGlobalUnlockFree16
#undef WOWHandle16
#undef WOWHandle32
#undef WOWYield16
BOOL
WINAPI
K32WOWGetDescriptor
(
DWORD
,
LPLDT_ENTRY
);
LPVOID
WINAPI
K32WOWGetVDMPointer
(
DWORD
,
DWORD
,
BOOL
);
LPVOID
WINAPI
K32WOWGetVDMPointerFix
(
DWORD
,
DWORD
,
BOOL
);
void
WINAPI
K32WOWGetVDMPointerUnfix
(
DWORD
);
WORD
WINAPI
K32WOWGlobalAlloc16
(
WORD
,
DWORD
);
WORD
WINAPI
K32WOWGlobalFree16
(
WORD
);
DWORD
WINAPI
K32WOWGlobalLock16
(
WORD
);
BOOL
WINAPI
K32WOWGlobalUnlock16
(
WORD
);
DWORD
WINAPI
K32WOWGlobalAllocLock16
(
WORD
,
DWORD
,
WORD
*
);
WORD
WINAPI
K32WOWGlobalUnlockFree16
(
DWORD
);
DWORD
WINAPI
K32WOWGlobalLockSize16
(
WORD
,
PDWORD
);
void
WINAPI
K32WOWYield16
(
void
);
void
WINAPI
K32WOWDirectedYield16
(
WORD
);
/**********************************************************************
* WOWGetDescriptor (WOW32.1)
...
...
include/wine/winbase16.h
View file @
628939d5
...
...
@@ -373,21 +373,6 @@ SEGPTR WINAPI HasGPHandler16(SEGPTR);
BOOL16
WINAPI
IsSharedSelector16
(
HANDLE16
);
BOOL16
WINAPI
IsTask16
(
HTASK16
);
HTASK16
WINAPI
IsTaskLocked16
(
void
);
DWORD
WINAPI
K32WOWCallback16
(
DWORD
,
DWORD
);
BOOL
WINAPI
K32WOWCallback16Ex
(
DWORD
,
DWORD
,
DWORD
,
LPVOID
,
LPDWORD
);
VOID
WINAPI
K32WOWDirectedYield16
(
WORD
);
BOOL
WINAPI
K32WOWGetDescriptor
(
SEGPTR
,
LPLDT_ENTRY
);
LPVOID
WINAPI
K32WOWGetVDMPointer
(
DWORD
,
DWORD
,
BOOL
);
LPVOID
WINAPI
K32WOWGetVDMPointerFix
(
DWORD
,
DWORD
,
BOOL
);
VOID
WINAPI
K32WOWGetVDMPointerUnfix
(
DWORD
);
WORD
WINAPI
K32WOWGlobalAlloc16
(
WORD
,
DWORD
);
DWORD
WINAPI
K32WOWGlobalAllocLock16
(
WORD
,
DWORD
,
WORD
*
);
WORD
WINAPI
K32WOWGlobalFree16
(
WORD
);
SEGPTR
WINAPI
K32WOWGlobalLock16
(
HGLOBAL16
);
DWORD
WINAPI
K32WOWGlobalLockSize16
(
WORD
,
PDWORD
);
BOOL
WINAPI
K32WOWGlobalUnlock16
(
WORD
);
WORD
WINAPI
K32WOWGlobalUnlockFree16
(
DWORD
);
VOID
WINAPI
K32WOWYield16
(
void
);
VOID
WINAPI
LogError16
(
UINT16
,
LPVOID
);
VOID
WINAPI
LogParamError16
(
UINT16
,
FARPROC16
,
LPVOID
);
WORD
WINAPI
LocalCountFree16
(
void
);
...
...
@@ -522,7 +507,7 @@ DWORD WINAPI SizeofResource16(HMODULE16,HRSRC16);
void
WINAPI
UnlockSegment16
(
HGLOBAL16
);
BOOL16
WINAPI
WritePrivateProfileString16
(
LPCSTR
,
LPCSTR
,
LPCSTR
,
LPCSTR
);
BOOL16
WINAPI
WriteProfileString16
(
LPCSTR
,
LPCSTR
,
LPCSTR
);
/* Yield16 will only be available from kernel module, use
K32
WOWYield instead */
/* Yield16 will only be available from kernel module, use WOWYield instead */
VOID
WINAPI
Yield16
(
void
);
SEGPTR
WINAPI
lstrcat16
(
SEGPTR
,
LPCSTR
);
SEGPTR
WINAPI
lstrcatn16
(
SEGPTR
,
LPCSTR
,
INT16
);
...
...
include/wownt32.h
View file @
628939d5
...
...
@@ -21,6 +21,26 @@
#ifndef _WOWNT32_H_
#define _WOWNT32_H_
#ifdef __WINESRC__
/* under Wine use the kernel functions directly so we don't have to import wow32 */
#define WOWCallback16 K32WOWCallback16
#define WOWCallback16Ex K32WOWCallback16Ex
#define WOWDirectedYield16 K32WOWDirectedYield16
#define WOWGetVDMPointer K32WOWGetVDMPointer
#define WOWGetVDMPointerFix K32WOWGetVDMPointerFix
#define WOWGetVDMPointerUnfix K32WOWGetVDMPointerUnfix
#define WOWGlobalAlloc16 K32WOWGlobalAlloc16
#define WOWGlobalAllocLock16 K32WOWGlobalAllocLock16
#define WOWGlobalFree16 K32WOWGlobalFree16
#define WOWGlobalLock16 K32WOWGlobalLock16
#define WOWGlobalLockSize16 K32WOWGlobalLockSize16
#define WOWGlobalUnlock16 K32WOWGlobalUnlock16
#define WOWGlobalUnlockFree16 K32WOWGlobalUnlockFree16
#define WOWHandle16 K32WOWHandle16
#define WOWHandle32 K32WOWHandle32
#define WOWYield16 K32WOWYield16
#endif
LPVOID
WINAPI
WOWGetVDMPointer
(
DWORD
,
DWORD
,
BOOL
);
LPVOID
WINAPI
WOWGetVDMPointerFix
(
DWORD
,
DWORD
,
BOOL
);
VOID
WINAPI
WOWGetVDMPointerUnfix
(
DWORD
);
...
...
@@ -60,18 +80,6 @@ HANDLE WINAPI WOWHandle32(WORD,WOW_HANDLE_TYPE);
WORD
WINAPI
WOWHandle16
(
HANDLE
,
WOW_HANDLE_TYPE
);
#ifdef __WINESRC__
/* under Wine use the kernel functions directly so we don't have to import wow32 */
HANDLE
WINAPI
K32WOWHandle32
(
WORD
,
WOW_HANDLE_TYPE
);
WORD
WINAPI
K32WOWHandle16
(
HANDLE
,
WOW_HANDLE_TYPE
);
DWORD
WINAPI
K32WOWCallback16
(
DWORD
,
DWORD
);
BOOL
WINAPI
K32WOWCallback16Ex
(
DWORD
,
DWORD
,
DWORD
,
PVOID
,
PDWORD
);
#define WOWHandle32 K32WOWHandle32
#define WOWHandle16 K32WOWHandle16
#define WOWCallback16 K32WOWCallback16
#define WOWCallback16Ex K32WOWCallback16Ex
#endif
#ifdef __WINESRC__
/* under Wine we use optimized versions where we can */
#define HWND_32(h16) ((HWND) (ULONG_PTR)(h16))
#define HMENU_32(h16) ((HMENU) (ULONG_PTR)(h16))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment