diff --git a/controls/edit.c b/controls/edit.c index 1f6f4c5ad5b..0b821e49a56 100644 --- a/controls/edit.c +++ b/controls/edit.c @@ -1253,7 +1253,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 = WIN16_GlobalLock16(hglob16); + segptr = K32WOWGlobalLock16(hglob16); WideCharToMultiByte(CP_ACP, 0, es->text + start, count, MapSL(segptr), countA, NULL, NULL); ret = (INT)EDIT_CallTo16_word_lwww(es->word_break_proc16, segptr, index, countA, action); diff --git a/dlls/kernel/wowthunk.c b/dlls/kernel/wowthunk.c index e9b18ae19f9..db753fc250e 100644 --- a/dlls/kernel/wowthunk.c +++ b/dlls/kernel/wowthunk.c @@ -109,14 +109,6 @@ WORD WINAPI K32WOWGlobalFree16( WORD hMem ) return (WORD)GlobalFree16( (HGLOBAL16)hMem ); } -/********************************************************************** - * K32WOWGlobalLock16 (WOW32.11) (KERNEL32.60) - */ -DWORD WINAPI K32WOWGlobalLock16( WORD hMem ) -{ - return (DWORD)WIN16_GlobalLock16( (HGLOBAL16)hMem ); -} - /********************************************************************** * K32WOWGlobalUnlock16 (WOW32.13) (KERNEL32.61) */ diff --git a/dlls/winmm/mmio.c b/dlls/winmm/mmio.c index e05ee4455eb..188763d5b4c 100644 --- a/dlls/winmm/mmio.c +++ b/dlls/winmm/mmio.c @@ -696,7 +696,7 @@ static UINT MMIO_SetBuffer(WINE_MMIO* wm, void* pchBuffer, LONG cchBuffer, } if (wm->hMem) { - wm->buffer16 = WIN16_GlobalLock16(wm->hMem); + wm->buffer16 = K32WOWGlobalLock16(wm->hMem); wm->info.pchBuffer = MapSL(wm->buffer16); } diff --git a/files/file.c b/files/file.c index 65d7d6b3aa9..3d957aac431 100644 --- a/files/file.c +++ b/files/file.c @@ -1444,7 +1444,7 @@ UINT16 WINAPI SetHandleCount16( UINT16 count ) } else memcpy( newfiles, files, count ); if (pdb->nbFiles > 20) GlobalFree16( pdb->hFileHandles ); - pdb->fileHandlesPtr = WIN16_GlobalLock16( newhandle ); + pdb->fileHandlesPtr = K32WOWGlobalLock16( newhandle ); pdb->hFileHandles = newhandle; pdb->nbFiles = count; } diff --git a/graphics/win16drv/init.c b/graphics/win16drv/init.c index 5398302f1dd..40f9923b1f8 100644 --- a/graphics/win16drv/init.c +++ b/graphics/win16drv/init.c @@ -257,7 +257,7 @@ BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, nPDEVICEsize = dc->devCaps->pdeviceSize + sizeof(PDEVICE_HEADER); /* TTD Shouldn't really do pointer arithmetic on segment points */ - physDev->segptrPDEVICE = WIN16_GlobalLock16(GlobalAlloc16(GHND, nPDEVICEsize))+sizeof(PDEVICE_HEADER); + physDev->segptrPDEVICE = K32WOWGlobalLock16(GlobalAlloc16(GHND, nPDEVICEsize))+sizeof(PDEVICE_HEADER); *((BYTE *)MapSL(physDev->segptrPDEVICE)+0) = 'N'; *((BYTE *)MapSL(physDev->segptrPDEVICE)+1) = 'B'; @@ -273,13 +273,13 @@ BOOL WIN16DRV_CreateDC( DC *dc, LPCSTR driver, LPCSTR device, LPCSTR output, physDev->FontInfo = NULL; physDev->BrushInfo = NULL; physDev->PenInfo = NULL; - win16drv_SegPtr_TextXForm = WIN16_GlobalLock16(GlobalAlloc16(GHND, sizeof(TEXTXFORM16))); + win16drv_SegPtr_TextXForm = K32WOWGlobalLock16(GlobalAlloc16(GHND, sizeof(TEXTXFORM16))); win16drv_TextXFormP = MapSL(win16drv_SegPtr_TextXForm); InitTextXForm(win16drv_TextXFormP); /* TTD Lots more to do here */ - win16drv_SegPtr_DrawMode = WIN16_GlobalLock16(GlobalAlloc16(GHND, sizeof(DRAWMODE))); + win16drv_SegPtr_DrawMode = K32WOWGlobalLock16(GlobalAlloc16(GHND, sizeof(DRAWMODE))); win16drv_DrawModeP = MapSL(win16drv_SegPtr_DrawMode); InitDrawMode(win16drv_DrawModeP); diff --git a/include/file.h b/include/file.h index cc6de40b53b..61fc10e2e74 100644 --- a/include/file.h +++ b/include/file.h @@ -56,6 +56,8 @@ extern HANDLE FILE_CreateFile( LPCSTR filename, DWORD access, DWORD sharing, extern HFILE FILE_CreateDevice( int client_id, DWORD access, LPSECURITY_ATTRIBUTES sa ); +extern LONG WINAPI WIN16_hread(HFILE16,SEGPTR,LONG); + /* files/directory.c */ extern int DIR_Init(void); extern UINT DIR_GetWindowsUnixDir( LPSTR path, UINT count ); diff --git a/include/wine/winbase16.h b/include/wine/winbase16.h index 1bffb1ceccc..172f407310e 100644 --- a/include/wine/winbase16.h +++ b/include/wine/winbase16.h @@ -192,6 +192,7 @@ WORD WINAPI GlobalPageUnlock16(HGLOBAL16); BOOL16 WINAPI IsSharedSelector16(HANDLE16); BOOL16 WINAPI IsTask16(HTASK16); HTASK16 WINAPI IsTaskLocked16(void); +SEGPTR WINAPI K32WOWGlobalLock16(HGLOBAL16); VOID WINAPI LogError16(UINT16, LPVOID); VOID WINAPI LogParamError16(UINT16,FARPROC16,LPVOID); WORD WINAPI LocalCountFree16(void); @@ -343,13 +344,6 @@ BOOL16 WINAPI WritePrivateProfileSection16(LPCSTR,LPCSTR,LPCSTR); BOOL16 WINAPI WritePrivateProfileStruct16(LPCSTR,LPCSTR,LPVOID,UINT16,LPCSTR); BOOL16 WINAPI WriteProfileSection16(LPCSTR,LPCSTR); -/* Extra functions that don't exist in the Windows API */ - -SEGPTR WINAPI WIN16_GlobalLock16(HGLOBAL16); -SEGPTR WINAPI WIN16_LockResource16(HGLOBAL16); -LONG WINAPI WIN16_hread(HFILE16,SEGPTR,LONG); -UINT16 WINAPI WIN16_lread(HFILE16,SEGPTR,UINT16); - /* Wine-specific functions */ WORD WINAPI wine_call_to_16_word( FARPROC16 target, INT nArgs ); LONG WINAPI wine_call_to_16_long( FARPROC16 target, INT nArgs ); diff --git a/loader/resource.c b/loader/resource.c index 2a8d5910156..e405eda395d 100644 --- a/loader/resource.c +++ b/loader/resource.c @@ -383,7 +383,7 @@ SEGPTR WINAPI WIN16_LockResource16( HGLOBAL16 handle ) { TRACE("(%04x)\n", handle ); /* May need to reload the resource if discarded */ - return WIN16_GlobalLock16( handle ); + return K32WOWGlobalLock16( handle ); } /********************************************************************** diff --git a/memory/global.c b/memory/global.c index 67bf1e951bd..7fb7a3d9a3d 100644 --- a/memory/global.c +++ b/memory/global.c @@ -417,6 +417,15 @@ SEGPTR WINAPI WIN16_GlobalLock16( HGLOBAL16 handle ) } +/********************************************************************** + * K32WOWGlobalLock16 (WOW32.11) (KERNEL32.60) + */ +SEGPTR WINAPI K32WOWGlobalLock16( HGLOBAL16 hMem ) +{ + return WIN16_GlobalLock16( hMem ); +} + + /*********************************************************************** * GlobalLock16 (KERNEL.18) * diff --git a/memory/local.c b/memory/local.c index 524807fa1db..803674e3024 100644 --- a/memory/local.c +++ b/memory/local.c @@ -1740,7 +1740,7 @@ WORD WINAPI LocalHandleDelta16( WORD delta ) */ BOOL16 WINAPI LocalInfo16( LOCALINFO *pLocalInfo, HGLOBAL16 handle ) { - LOCALHEAPINFO *pInfo = LOCAL_GetHeap(SELECTOROF(WIN16_GlobalLock16(handle))); + LOCALHEAPINFO *pInfo = LOCAL_GetHeap(SELECTOROF(K32WOWGlobalLock16(handle))); if (!pInfo) return FALSE; pLocalInfo->wcItems = pInfo->items; return TRUE; diff --git a/objects/metafile.c b/objects/metafile.c index 02ad857481b..7af32a296cf 100644 --- a/objects/metafile.c +++ b/objects/metafile.c @@ -597,7 +597,7 @@ BOOL16 WINAPI EnumMetaFile16( HDC16 hdc, HMETAFILE16 hmf, hHT = GlobalAlloc16(GMEM_MOVEABLE | GMEM_ZEROINIT, sizeof(HANDLETABLE16) * mh->mtNoObjects); - spht = WIN16_GlobalLock16(hHT); + spht = K32WOWGlobalLock16(hHT); seg = GlobalHandleToSel16(hmf); offset = mh->mtHeaderSize * 2; diff --git a/windows/win.c b/windows/win.c index 99489b16e17..3ff57bba410 100644 --- a/windows/win.c +++ b/windows/win.c @@ -3276,7 +3276,7 @@ DWORD WINAPI DragObject16( HWND16 hwndScope, HWND16 hWnd, UINT16 wObj, HWND16 hCurrentWnd = 0; lpDragInfo = (LPDRAGINFO16) GlobalLock16(hDragInfo); - spDragInfo = (SEGPTR) WIN16_GlobalLock16(hDragInfo); + spDragInfo = K32WOWGlobalLock16(hDragInfo); if( !lpDragInfo || !spDragInfo ) { diff --git a/windows/x11drv/event.c b/windows/x11drv/event.c index 0ecf17e6238..9912bbdc27a 100644 --- a/windows/x11drv/event.c +++ b/windows/x11drv/event.c @@ -1541,7 +1541,7 @@ static void EVENT_DropFromOffiX( HWND hWnd, XClientMessageEvent *event ) BOOL16 bAccept; HGLOBAL16 hDragInfo = GlobalAlloc16( GMEM_SHARE | GMEM_ZEROINIT, sizeof(DRAGINFO16)); LPDRAGINFO16 lpDragInfo = (LPDRAGINFO16) GlobalLock16(hDragInfo); - SEGPTR spDragInfo = (SEGPTR) WIN16_GlobalLock16(hDragInfo); + SEGPTR spDragInfo = K32WOWGlobalLock16(hDragInfo); Window w_aux_root, w_aux_child; WND* pDropWnd; WND* pWnd;