Release 960705
Fri Jul 5 16:27:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [controls/desktop.c] Use Windows file I/O routines to load the desktop bitmap. * [files/file.c] Implemented RemoveDirectory* and DeleteFile*. * [include/wine.h] Added SIGCONTEXT typedef to replace #define sigcontext_struct. * [loader/task.c] Fixed initial breakpoint setting for Win32 tasks. * [misc/wsprintf.c] Ignore Unicode formats for wsprintf16(). * [objects/font.c] Implemented Win32 version of GetTextMetrics. * [windows/winproc.c] [windows/win.c] [windows/class.c] [windows/dialog.c] Modified windows procedures to use thunks, to ensure that the procedure can be called directly from the Windows program. * [windows/win.c] Added function WIN_BuildWinArray() to make it easier to enumerate windows. Implemented Win32 version of EnumWindows() and friends. Fri Jul 5 11:56:22 1996 Andreas Kirschbaum <ank@rbg.informatik.th-darmstadt.de> * [controls/button.c] [windows/win.c] Operator precedence fixes. * [controls/edit.c] Implemented ES_PASSWORD, ES_LOWERCASE and ES_UPPERCASE styles. Fixed word wrap with long words. * [debugger/debug.l] New alias "where" for command "backtrace". * [if1632/gdi.spec] Corrected parameter of ExtTextOut. * [loader/module.c] Corrected printing of table of modules. * [misc/spy.c] Removed superfluous \n in message name. * [windows/message.c] Declared MSG_SendMessage as static. Changed parameter of DirectedYield() from queue handle to task handle. Removed warning mesages for argument of printf. * [windows/nonclient.c] Added the flag DT_NOPREFIX when drawing window titles. * [windows/win.c] WIN_WalkWindows now prints the invalid window handle. Added a warning if Get-/SetWindowWord/-Long gets an invalid offset. * [windows/winproc.c] Allows creating dialog windows with NULL as dialog function. Wed Jul 3 09:26:41 1996 Andrew Lewycky <plewycky@oise.utoronto.ca> * [windows/event.c] EVENT_key: Fixes to VK_ code generation for space bar and punctuation. * [files/file.c] GetTempFileName: first character in temporary name is "~". * [memory/heap.c] HEAP_MakeInUseBlockFree now frees the whole subheap if possible. * [objects/text.c] ExtTextOut16(): handle NULL lpRect and ETO_OPAQUE. * [misc/driver.c] Removed some bugs and reformatted. Actually loads drivers now. * [include/callback.h] Added CallDriverProc() and CallWindowsExitProc(). * [loader/module.c] MODULE_CallWEP(): new function. * [misc/lzexpand.c] LZSeek(): return new pointer, not old one. * [misc/ver.c] find_ne_resource(): fixed dependence on LZSeek() bug. GetFileResource(): initialize reslen before using it. * [windows/class.c] SetClassWord(): add missing else. * [objects/font.c] lpFontList is now MAX_FONTS+1. It used to overwrite the array. InitFontList: allocate one huge array of structures. FONT_MatchFont: uppercase the face name. Thu Jun 27 12:41:40 1996 Bruce Milner <bruce@genetics.utah.edu> * [memory/heap.c] Fixed a typo in HeapReAlloc(). Tue Jun 25 22:22:03 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [files/directory.c] [files/drive.c] [if1632/kernel.spec] [if1632/kernel32.spec] [if1632/shell.spec] [include/windows.h] GetTempPath* added GetDriveType* fixed, updated to NewNameStandard. GetCurrentDirectory* fixed (needs to prepend X:\). * [controls/listbox.c] Missing NULL check added. * [if1632/winmm.spec] [loader/builtin.c] winmm.dll (32bit mmsystem equivalent) specs added. * [memory/string.c] [if1632/kernel32.spec] [include/windows.h] Rtl{Move,Zero,Fill}Memory added. * [misc/registry.c] Some NULL ptr dereference bugs fixed. * [multimedia/mcicda.c][multimedia/mcistring.c][multimedia/mmsystem.c] Check for NULL ptr. Fill mciOpenDrv when mixing mciOpen and mciSendString("open .."). Aliasing should work for all MCI devices. * [windows/win.c] Allow passing invalid window handles to CloseWindow(). Tue Jun 25 20:02:15 1996 Jukka Iivonen <iivonen@cc.helsinki.fi> * [files/directory.c] [if1632/kernel32.spec] GetSystemDirectory32A and GetSystemDirectory32W added. * [misc/main.c] [if1632/kernel32.spec] Beep and SetEnvironmentVariable32W added.
This commit is contained in:
parent
339eefcc35
commit
3051b64489
14
ANNOUNCE
14
ANNOUNCE
|
@ -1,12 +1,12 @@
|
|||
This is release 960623 of Wine, the MS Windows emulator. This is still a
|
||||
This is release 960705 of Wine, the MS Windows emulator. This is still a
|
||||
developer's only release. There are many bugs and many unimplemented API
|
||||
features. Most applications still do not work correctly.
|
||||
|
||||
Patches should be submitted to "julliard@lrc.epfl.ch". Please don't
|
||||
forget to include a ChangeLog entry.
|
||||
|
||||
WHAT'S NEW with Wine-960623: (see ChangeLog for details)
|
||||
- More Win32 code.
|
||||
WHAT'S NEW with Wine-960705: (see ChangeLog for details)
|
||||
- New window procedure thunks.
|
||||
- Lots of bug fixes.
|
||||
|
||||
See the README file in the distribution for installation instructions.
|
||||
|
@ -15,10 +15,10 @@ Because of lags created by using mirror, this message may reach you before
|
|||
the release is available at the ftp sites. The sources will be available
|
||||
from the following locations:
|
||||
|
||||
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960623.tar.gz
|
||||
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960623.tar.gz
|
||||
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960623.tar.gz
|
||||
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960623.tar.gz
|
||||
sunsite.unc.edu:/pub/Linux/ALPHA/wine/development/Wine-960705.tar.gz
|
||||
tsx-11.mit.edu:/pub/linux/ALPHA/Wine/development/Wine-960705.tar.gz
|
||||
ftp.infomagic.com:/pub/mirrors/linux/wine/development/Wine-960705.tar.gz
|
||||
aris.com:/pub/linux/ALPHA/Wine/development/Wine-960705.tar.gz
|
||||
|
||||
It should also be available from any site that mirrors tsx-11 or sunsite.
|
||||
|
||||
|
|
146
ChangeLog
146
ChangeLog
|
@ -1,3 +1,149 @@
|
|||
----------------------------------------------------------------------
|
||||
Fri Jul 5 16:27:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
|
||||
|
||||
* [controls/desktop.c]
|
||||
Use Windows file I/O routines to load the desktop bitmap.
|
||||
|
||||
* [files/file.c]
|
||||
Implemented RemoveDirectory* and DeleteFile*.
|
||||
|
||||
* [include/wine.h]
|
||||
Added SIGCONTEXT typedef to replace #define sigcontext_struct.
|
||||
|
||||
* [loader/task.c]
|
||||
Fixed initial breakpoint setting for Win32 tasks.
|
||||
|
||||
* [misc/wsprintf.c]
|
||||
Ignore Unicode formats for wsprintf16().
|
||||
|
||||
* [objects/font.c]
|
||||
Implemented Win32 version of GetTextMetrics.
|
||||
|
||||
* [windows/winproc.c] [windows/win.c] [windows/class.c]
|
||||
[windows/dialog.c]
|
||||
Modified windows procedures to use thunks, to ensure that the
|
||||
procedure can be called directly from the Windows program.
|
||||
|
||||
* [windows/win.c]
|
||||
Added function WIN_BuildWinArray() to make it easier to enumerate
|
||||
windows. Implemented Win32 version of EnumWindows() and friends.
|
||||
|
||||
Fri Jul 5 11:56:22 1996 Andreas Kirschbaum <ank@rbg.informatik.th-darmstadt.de>
|
||||
|
||||
* [controls/button.c] [windows/win.c]
|
||||
Operator precedence fixes.
|
||||
|
||||
* [controls/edit.c]
|
||||
Implemented ES_PASSWORD, ES_LOWERCASE and ES_UPPERCASE styles.
|
||||
Fixed word wrap with long words.
|
||||
|
||||
* [debugger/debug.l]
|
||||
New alias "where" for command "backtrace".
|
||||
|
||||
* [if1632/gdi.spec]
|
||||
Corrected parameter of ExtTextOut.
|
||||
|
||||
* [loader/module.c]
|
||||
Corrected printing of table of modules.
|
||||
|
||||
* [misc/spy.c]
|
||||
Removed superfluous \n in message name.
|
||||
|
||||
* [windows/message.c]
|
||||
Declared MSG_SendMessage as static.
|
||||
Changed parameter of DirectedYield() from queue handle to task handle.
|
||||
Removed warning mesages for argument of printf.
|
||||
|
||||
* [windows/nonclient.c]
|
||||
Added the flag DT_NOPREFIX when drawing window titles.
|
||||
|
||||
* [windows/win.c]
|
||||
WIN_WalkWindows now prints the invalid window handle.
|
||||
Added a warning if Get-/SetWindowWord/-Long gets an invalid offset.
|
||||
|
||||
* [windows/winproc.c]
|
||||
Allows creating dialog windows with NULL as dialog function.
|
||||
|
||||
Wed Jul 3 09:26:41 1996 Peter Lewycky <plewycky@oise.utoronto.ca>
|
||||
|
||||
* [windows/event.c]
|
||||
EVENT_key: Fixes to VK_ code generation for space bar and
|
||||
punctuation.
|
||||
|
||||
* [files/file.c]
|
||||
GetTempFileName: first character in temporary name is "~".
|
||||
|
||||
* [memory/heap.c]
|
||||
HEAP_MakeInUseBlockFree now frees the whole subheap if possible.
|
||||
|
||||
* [objects/text.c]
|
||||
ExtTextOut16(): handle NULL lpRect and ETO_OPAQUE.
|
||||
|
||||
* [misc/driver.c]
|
||||
Removed some bugs and reformatted. Actually loads drivers now.
|
||||
|
||||
* [include/callback.h]
|
||||
Added CallDriverProc() and CallWindowsExitProc().
|
||||
|
||||
* [loader/module.c]
|
||||
MODULE_CallWEP(): new function.
|
||||
|
||||
* [misc/lzexpand.c]
|
||||
LZSeek(): return new pointer, not old one.
|
||||
|
||||
* [misc/ver.c]
|
||||
find_ne_resource(): fixed dependence on LZSeek() bug.
|
||||
GetFileResource(): initialize reslen before using it.
|
||||
|
||||
* [windows/class.c]
|
||||
SetClassWord(): add missing else.
|
||||
|
||||
* [objects/font.c]
|
||||
lpFontList is now MAX_FONTS+1. It used to overwrite the array.
|
||||
InitFontList: allocate one huge array of structures.
|
||||
FONT_MatchFont: uppercase the face name.
|
||||
|
||||
Thu Jun 27 12:41:40 1996 Bruce Milner <bruce@genetics.utah.edu>
|
||||
|
||||
* [memory/heap.c]
|
||||
Fixed a typo in HeapReAlloc().
|
||||
|
||||
Tue Jun 25 22:22:03 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
|
||||
|
||||
* [files/directory.c] [files/drive.c] [if1632/kernel.spec]
|
||||
[if1632/kernel32.spec] [if1632/shell.spec] [include/windows.h]
|
||||
GetTempPath* added
|
||||
GetDriveType* fixed, updated to NewNameStandard.
|
||||
GetCurrentDirectory* fixed (needs to prepend X:\).
|
||||
|
||||
* [controls/listbox.c]
|
||||
Missing NULL check added.
|
||||
|
||||
* [if1632/winmm.spec] [loader/builtin.c]
|
||||
winmm.dll (32bit mmsystem equivalent) specs added.
|
||||
|
||||
* [memory/string.c] [if1632/kernel32.spec] [include/windows.h]
|
||||
Rtl{Move,Zero,Fill}Memory added.
|
||||
|
||||
* [misc/registry.c]
|
||||
Some NULL ptr dereference bugs fixed.
|
||||
|
||||
* [multimedia/mcicda.c][multimedia/mcistring.c][multimedia/mmsystem.c]
|
||||
Check for NULL ptr.
|
||||
Fill mciOpenDrv when mixing mciOpen and mciSendString("open ..").
|
||||
Aliasing should work for all MCI devices.
|
||||
|
||||
* [windows/win.c]
|
||||
Allow passing invalid window handles to CloseWindow().
|
||||
|
||||
Tue Jun 25 20:02:15 1996 Jukka Iivonen <iivonen@cc.helsinki.fi>
|
||||
|
||||
* [files/directory.c] [if1632/kernel32.spec]
|
||||
GetSystemDirectory32A and GetSystemDirectory32W added.
|
||||
|
||||
* [misc/main.c] [if1632/kernel32.spec]
|
||||
Beep and SetEnvironmentVariable32W added.
|
||||
|
||||
----------------------------------------------------------------------
|
||||
Wed Jun 19 14:49:27 1996 Marcus Meissner <msmeissn@faui45.informatik.uni-erlangen.de>
|
||||
|
||||
|
|
|
@ -313,7 +313,7 @@ static void PB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
|||
{
|
||||
short xdelta, ydelta;
|
||||
dwTextSize = GetTextExtent(hDC,wndPtr->text,strlen(wndPtr->text));
|
||||
GetTextMetrics( hDC, &tm );
|
||||
GetTextMetrics16( hDC, &tm );
|
||||
xdelta = ((rc.right - rc.left) - LOWORD(dwTextSize) - 1) / 2;
|
||||
ydelta = ((rc.bottom - rc.top) - tm.tmHeight - 1) / 2;
|
||||
if (xdelta < 0) xdelta = 0;
|
||||
|
@ -382,7 +382,7 @@ static void CB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
|||
hBrush = BUTTON_SEND_CTLCOLOR( wndPtr, hDC );
|
||||
if (action == ODA_DRAWENTIRE) FillRect16( hDC, &rc, hBrush );
|
||||
|
||||
GetTextMetrics(hDC, &tm);
|
||||
GetTextMetrics16(hDC, &tm);
|
||||
delta = (rc.bottom - rc.top - tm.tmHeight) >> 1;
|
||||
|
||||
/* Draw the check-box bitmap */
|
||||
|
@ -512,9 +512,9 @@ static void OB_Paint( WND *wndPtr, HDC hDC, WORD action )
|
|||
dis.CtlID = wndPtr->wIDmenu;
|
||||
dis.itemID = 0;
|
||||
dis.itemAction = action;
|
||||
dis.itemState = (infoPtr->state & BUTTON_HASFOCUS) ? ODS_FOCUS : 0 |
|
||||
(infoPtr->state & BUTTON_HIGHLIGHTED) ? ODS_SELECTED : 0 |
|
||||
(wndPtr->dwStyle & WS_DISABLED) ? ODS_DISABLED : 0;
|
||||
dis.itemState = ((infoPtr->state & BUTTON_HASFOCUS) ? ODS_FOCUS : 0) |
|
||||
((infoPtr->state & BUTTON_HIGHLIGHTED) ? ODS_SELECTED : 0) |
|
||||
((wndPtr->dwStyle & WS_DISABLED) ? ODS_DISABLED : 0);
|
||||
dis.hwndItem = wndPtr->hwndSelf;
|
||||
dis.hDC = hDC;
|
||||
dis.itemData = 0;
|
||||
|
|
|
@ -4,16 +4,15 @@
|
|||
* Copyright 1994 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "win.h"
|
||||
#include "desktop.h"
|
||||
#include "directory.h"
|
||||
#include "dos_fs.h"
|
||||
#include "file.h"
|
||||
#include "graphics.h"
|
||||
#include "heap.h"
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
|
@ -26,47 +25,46 @@ static HBITMAP DESKTOP_LoadBitmap( HDC hdc, const char *filename )
|
|||
BITMAPFILEHEADER *fileHeader;
|
||||
BITMAPINFO *bitmapInfo;
|
||||
HBITMAP hbitmap;
|
||||
char *buffer;
|
||||
const char *unixFileName;
|
||||
int file;
|
||||
long size;
|
||||
HFILE file;
|
||||
LPSTR buffer;
|
||||
LONG size;
|
||||
|
||||
/* Read all the file into memory */
|
||||
/* Read all the file into memory */
|
||||
|
||||
if (!(unixFileName = DOSFS_GetUnixFileName( filename, TRUE )))
|
||||
if ((file = _lopen( filename, OF_READ )) == HFILE_ERROR)
|
||||
{
|
||||
int len = DIR_GetWindowsUnixDir( NULL, 0 );
|
||||
if (!(buffer = malloc( len + strlen(filename) + 2 ))) return 0;
|
||||
DIR_GetWindowsUnixDir( buffer, len + 1 );
|
||||
strcat( buffer, "/" );
|
||||
UINT32 len = GetWindowsDirectory( NULL, 0 );
|
||||
if (!(buffer = HeapAlloc( SystemHeap, 0, len + strlen(filename) + 2 )))
|
||||
return 0;
|
||||
GetWindowsDirectory( buffer, len + 1 );
|
||||
strcat( buffer, "\\" );
|
||||
strcat( buffer, filename );
|
||||
unixFileName = DOSFS_GetUnixFileName( buffer, TRUE );
|
||||
free( buffer );
|
||||
if (!unixFileName) return 0;
|
||||
file = _lopen( buffer, OF_READ );
|
||||
HeapFree( SystemHeap, 0, buffer );
|
||||
}
|
||||
if ((file = open( unixFileName, O_RDONLY )) == -1) return 0;
|
||||
size = lseek( file, 0, SEEK_END );
|
||||
if (!(buffer = (char *)malloc( size )))
|
||||
if (file == HFILE_ERROR) return 0;
|
||||
size = _llseek( file, 0, 2 );
|
||||
if (!(buffer = HeapAlloc( SystemHeap, 0, size )))
|
||||
{
|
||||
close( file );
|
||||
_lclose( file );
|
||||
return 0;
|
||||
}
|
||||
lseek( file, 0, SEEK_SET );
|
||||
size = read( file, buffer, size );
|
||||
close( file );
|
||||
_llseek( file, 0, 0 );
|
||||
size = FILE_Read( file, buffer, size );
|
||||
_lclose( file );
|
||||
fileHeader = (BITMAPFILEHEADER *)buffer;
|
||||
bitmapInfo = (BITMAPINFO *)(buffer + sizeof(BITMAPFILEHEADER));
|
||||
|
||||
/* Check header content */
|
||||
if ((fileHeader->bfType != 0x4d42) || (size < fileHeader->bfSize))
|
||||
{
|
||||
free( buffer );
|
||||
HeapFree( SystemHeap, 0, buffer );
|
||||
return 0;
|
||||
}
|
||||
hbitmap = CreateDIBitmap( hdc, &bitmapInfo->bmiHeader, CBM_INIT,
|
||||
buffer + fileHeader->bfOffBits,
|
||||
bitmapInfo, DIB_RGB_COLORS );
|
||||
free( buffer );
|
||||
HeapFree( SystemHeap, 0, buffer );
|
||||
return hbitmap;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,6 +79,9 @@ typedef struct
|
|||
#define IsHScrollBar(wndPtr) ((wndPtr)->dwStyle & WS_HSCROLL)
|
||||
#define IsReadOnly(wndPtr) ((wndPtr)->dwStyle & ES_READONLY)
|
||||
#define IsWordWrap(wndPtr) (((wndPtr)->dwStyle & ES_AUTOHSCROLL) == 0)
|
||||
#define IsPassword(wndPtr) ((wndPtr)->dwStyle & ES_PASSWORD)
|
||||
#define IsLower(wndPtr) ((wndPtr)->dwStyle & ES_LOWERCASE)
|
||||
#define IsUpper(wndPtr) ((wndPtr)->dwStyle & ES_UPPERCASE)
|
||||
|
||||
#define EDITSTATEPTR(wndPtr) (*(EDITSTATE **)((wndPtr)->wExtra))
|
||||
|
||||
|
@ -127,6 +130,7 @@ static UINT EDIT_GetAveCharWidth(WND *wndPtr);
|
|||
static UINT EDIT_GetLineHeight(WND *wndPtr);
|
||||
static void EDIT_GetLineRect(WND *wndPtr, UINT line, UINT scol, UINT ecol, LPRECT16 rc);
|
||||
static char * EDIT_GetPointer(WND *wndPtr);
|
||||
static char * EDIT_GetPasswordPointer(WND *wndPtr);
|
||||
static LRESULT EDIT_GetRect(WND *wndPtr, WPARAM wParam, LPARAM lParam);
|
||||
static BOOL EDIT_GetRedraw(WND *wndPtr);
|
||||
static UINT EDIT_GetTextWidth(WND *wndPtr);
|
||||
|
@ -504,14 +508,14 @@ LRESULT EditWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
* EDIT_BuildLineDefs
|
||||
*
|
||||
* Build array of pointers to text lines.
|
||||
* Lines can end with '\0' (last line), nothing (if it is to long),
|
||||
* Lines can end with '\0' (last line), nothing (if it is too long),
|
||||
* a delimiter (usually ' '), a soft return '\r\r\n' or a hard return '\r\n'
|
||||
*
|
||||
*/
|
||||
static void EDIT_BuildLineDefs(WND *wndPtr)
|
||||
{
|
||||
EDITSTATE *es = EDITSTATEPTR(wndPtr);
|
||||
char *text = EDIT_GetPointer(wndPtr);
|
||||
char *text = EDIT_GetPasswordPointer(wndPtr);
|
||||
int ww = EDIT_GetWndWidth(wndPtr);
|
||||
HDC hdc;
|
||||
HFONT hFont;
|
||||
|
@ -562,16 +566,23 @@ static void EDIT_BuildLineDefs(WND *wndPtr)
|
|||
width = LOWORD(GetTabbedTextExtent(hdc, start, next,
|
||||
es->NumTabStops, es->TabStops));
|
||||
} while (width <= ww);
|
||||
if (prev) {
|
||||
length = prev;
|
||||
if (EDIT_CallWordBreakProc(wndPtr, start, length - 1,
|
||||
length, WB_ISDELIMITER)) {
|
||||
length--;
|
||||
ending = END_DELIMIT;
|
||||
} else
|
||||
ending = END_NONE;
|
||||
} else {
|
||||
if (!prev) {
|
||||
next = 0;
|
||||
do {
|
||||
prev = next;
|
||||
next++;
|
||||
width = LOWORD(GetTabbedTextExtent(hdc, start, next,
|
||||
es->NumTabStops, es->TabStops));
|
||||
} while (width <= ww);
|
||||
if(!prev) prev = 1;
|
||||
}
|
||||
length = prev;
|
||||
if (EDIT_CallWordBreakProc(wndPtr, start, length - 1,
|
||||
length, WB_ISDELIMITER)) {
|
||||
length--;
|
||||
ending = END_DELIMIT;
|
||||
} else
|
||||
ending = END_NONE;
|
||||
width = LOWORD(GetTabbedTextExtent(hdc, start, length,
|
||||
es->NumTabStops, es->TabStops));
|
||||
}
|
||||
|
@ -602,6 +613,8 @@ static void EDIT_BuildLineDefs(WND *wndPtr)
|
|||
if (hFont)
|
||||
SelectObject(hdc, oldFont);
|
||||
ReleaseDC(wndPtr->hwndSelf, hdc);
|
||||
|
||||
free(text);
|
||||
}
|
||||
|
||||
|
||||
|
@ -753,6 +766,30 @@ static char *EDIT_GetPointer(WND *wndPtr)
|
|||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* EDIT_GetPasswordPointer
|
||||
*
|
||||
*
|
||||
*/
|
||||
static char *EDIT_GetPasswordPointer(WND *wndPtr)
|
||||
{
|
||||
EDITSTATE *es = EDITSTATEPTR(wndPtr);
|
||||
char *text = xstrdup(EDIT_GetPointer(wndPtr));
|
||||
char *p;
|
||||
|
||||
if(es->PasswordChar) {
|
||||
p = text;
|
||||
while(*p != '\0') {
|
||||
if(*p != '\r' && *p != '\n')
|
||||
*p = es->PasswordChar;
|
||||
p++;
|
||||
}
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* EDIT_GetRect
|
||||
|
@ -1272,11 +1309,12 @@ static UINT EDIT_PaintText(WND *wndPtr, HDC hdc, INT x, INT y, UINT line, UINT c
|
|||
SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
|
||||
SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
|
||||
}
|
||||
text = EDIT_GetPointer(wndPtr);
|
||||
text = EDIT_GetPasswordPointer(wndPtr);
|
||||
li = (UINT)EDIT_EM_LineIndex(wndPtr, line, 0L);
|
||||
xoff = EDIT_GetXOffset(wndPtr);
|
||||
ret = LOWORD(TabbedTextOut(hdc, x, y, text + li + col, count,
|
||||
es->NumTabStops, es->TabStops, -xoff));
|
||||
es->NumTabStops, es->TabStops, -xoff));
|
||||
free(text);
|
||||
if (rev) {
|
||||
SetBkColor(hdc, BkColor);
|
||||
SetTextColor(hdc, TextColor);
|
||||
|
@ -1341,6 +1379,10 @@ static LRESULT EDIT_ReplaceSel(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
|||
p[strl] = p[0];
|
||||
for (i = 0 , p = text + e ; i < strl ; i++)
|
||||
p[i] = str[i];
|
||||
if(IsUpper(wndPtr))
|
||||
AnsiUpperBuff(p, strl);
|
||||
else if(IsLower(wndPtr))
|
||||
AnsiLowerBuff(p, strl);
|
||||
EDIT_BuildLineDefs(wndPtr);
|
||||
e += strl;
|
||||
EDIT_EM_SetSel(wndPtr, 0, MAKELPARAM(e, e));
|
||||
|
@ -1403,7 +1445,7 @@ static void EDIT_ScrollIntoView(WND *wndPtr)
|
|||
static INT EDIT_WndXFromCol(WND *wndPtr, UINT line, UINT col)
|
||||
{
|
||||
EDITSTATE *es = EDITSTATEPTR(wndPtr);
|
||||
char *text = EDIT_GetPointer(wndPtr);
|
||||
char *text = EDIT_GetPasswordPointer(wndPtr);
|
||||
INT ret;
|
||||
HDC hdc;
|
||||
HFONT hFont;
|
||||
|
@ -1425,6 +1467,7 @@ static INT EDIT_WndXFromCol(WND *wndPtr, UINT line, UINT col)
|
|||
if (hFont)
|
||||
SelectObject(hdc, oldFont);
|
||||
ReleaseDC(wndPtr->hwndSelf, hdc);
|
||||
free(text);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2753,7 +2796,7 @@ static LRESULT EDIT_WM_SetFont(WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
|||
hdc = GetDC(wndPtr->hwndSelf);
|
||||
if (es->hFont)
|
||||
oldFont = SelectObject(hdc, es->hFont);
|
||||
GetTextMetrics(hdc, &tm);
|
||||
GetTextMetrics16(hdc, &tm);
|
||||
es->LineHeight = HIWORD(GetTextExtent(hdc, "X", 1));
|
||||
es->AveCharWidth = tm.tmAveCharWidth;
|
||||
if (es->hFont)
|
||||
|
|
|
@ -107,7 +107,7 @@ void CreateListBoxStruct(HWND hwnd, WORD CtlType, LONG styles, HWND parent)
|
|||
if ((hdc = GetDC(0)))
|
||||
{
|
||||
TEXTMETRIC16 tm;
|
||||
GetTextMetrics( hdc, &tm );
|
||||
GetTextMetrics16( hdc, &tm );
|
||||
lphl->StdItemHeight = tm.tmHeight;
|
||||
dprintf_listbox(stddeb,"CreateListBoxStruct: font height %d\n",
|
||||
lphl->StdItemHeight);
|
||||
|
@ -1273,7 +1273,7 @@ static LONG LBSetFont(HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
if ((hdc = GetDC(0)))
|
||||
{
|
||||
TEXTMETRIC16 tm;
|
||||
GetTextMetrics( hdc, &tm );
|
||||
GetTextMetrics16( hdc, &tm );
|
||||
lphl->StdItemHeight = tm.tmHeight;
|
||||
dprintf_listbox(stddeb,"LBSetFont: new font %d with height %d\n",
|
||||
lphl->hFont, lphl->StdItemHeight);
|
||||
|
@ -2094,7 +2094,7 @@ INT DlgDirList( HWND hDlg, SEGPTR spec, INT idLBox, INT idStatic, UINT attrib )
|
|||
{
|
||||
char mask[20];
|
||||
|
||||
if (!filespec[0]) strcpy( mask, "*.*" );
|
||||
if (!filespec || !filespec[0]) strcpy( mask, "*.*" );
|
||||
else
|
||||
{
|
||||
/* If the path exists and is a directory, chdir to it */
|
||||
|
|
|
@ -732,7 +732,7 @@ UINT MENU_DrawMenuBar(HDC hDC, LPRECT16 lprect, HWND hwnd, BOOL suppress_draw)
|
|||
/***********************************************************************
|
||||
* MENU_SwitchTPWndTo
|
||||
*/
|
||||
BOOL MENU_SwitchTPWndTo( HTASK hTask)
|
||||
static BOOL MENU_SwitchTPWndTo( HTASK hTask)
|
||||
{
|
||||
/* This is supposed to be called when popup is hidden */
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ static void DEBUG_SetOpcode( const DBG_ADDR *addr, BYTE op )
|
|||
* Determine if the instruction at CS:EIP is an instruction that
|
||||
* we need to step over (like a call or a repetitive string move).
|
||||
*/
|
||||
static BOOL DEBUG_IsStepOverInstr( struct sigcontext_struct *context )
|
||||
static BOOL DEBUG_IsStepOverInstr( SIGCONTEXT *context )
|
||||
{
|
||||
BYTE *instr = (BYTE *)PTR_SEG_OFF_TO_LIN(CS_reg(context),EIP_reg(context));
|
||||
|
||||
|
@ -135,7 +135,7 @@ static BOOL DEBUG_IsStepOverInstr( struct sigcontext_struct *context )
|
|||
*
|
||||
* Set or remove all the breakpoints.
|
||||
*/
|
||||
void DEBUG_SetBreakpoints( BOOL set )
|
||||
void DEBUG_SetBreakpoints( BOOL32 set )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -236,7 +236,7 @@ void DEBUG_DelBreakpoint( int num )
|
|||
*
|
||||
* Enable or disable a break point.
|
||||
*/
|
||||
void DEBUG_EnableBreakpoint( int num, BOOL enable )
|
||||
void DEBUG_EnableBreakpoint( int num, BOOL32 enable )
|
||||
{
|
||||
if ((num <= 0) || (num >= next_bp) || !breakpoints[num].in_use)
|
||||
{
|
||||
|
@ -275,8 +275,7 @@ void DEBUG_InfoBreakpoints(void)
|
|||
* Determine if we should continue execution after a SIGTRAP signal when
|
||||
* executing in the given mode.
|
||||
*/
|
||||
BOOL DEBUG_ShouldContinue( struct sigcontext_struct *context,
|
||||
enum exec_mode mode )
|
||||
BOOL32 DEBUG_ShouldContinue( SIGCONTEXT *context, enum exec_mode mode )
|
||||
{
|
||||
DBG_ADDR addr;
|
||||
int bpnum;
|
||||
|
@ -316,8 +315,8 @@ BOOL DEBUG_ShouldContinue( struct sigcontext_struct *context,
|
|||
* Set the breakpoints to the correct state to restart execution
|
||||
* in the given mode.
|
||||
*/
|
||||
void DEBUG_RestartExecution( struct sigcontext_struct *context,
|
||||
enum exec_mode mode, int instr_len )
|
||||
void DEBUG_RestartExecution( SIGCONTEXT *context, enum exec_mode mode,
|
||||
int instr_len )
|
||||
{
|
||||
DBG_ADDR addr;
|
||||
|
||||
|
|
|
@ -229,7 +229,7 @@ void DEBUG_EnterDebugger(void)
|
|||
}
|
||||
|
||||
|
||||
void wine_debug( int signal, struct sigcontext_struct *regs )
|
||||
void wine_debug( int signal, SIGCONTEXT *regs )
|
||||
{
|
||||
static int loaded_symbols = 0;
|
||||
char SymbolTableFile[256];
|
||||
|
@ -239,7 +239,7 @@ void wine_debug( int signal, struct sigcontext_struct *regs )
|
|||
#endif
|
||||
|
||||
yyin = stdin;
|
||||
DEBUG_context = (struct sigcontext_struct *)regs;
|
||||
DEBUG_context = regs;
|
||||
|
||||
DEBUG_SetBreakpoints( FALSE );
|
||||
|
||||
|
|
|
@ -103,7 +103,8 @@ window|windo|wind|win|wnd { return tWND; }
|
|||
|
||||
help|hel|he|"?" { return tHELP; }
|
||||
|
||||
backtrace|bt { return tBACKTRACE; }
|
||||
backtrace|backtrac|backtra|backt|back|bac|ba|bt { return tBACKTRACE; }
|
||||
where|wher|whe { return tBACKTRACE; }
|
||||
|
||||
cont|con|co|c { return tCONT; }
|
||||
step|ste|st|s { return tSTEP; }
|
||||
|
|
|
@ -66,7 +66,7 @@ void DEBUG_AddSymbol( const char * name, const DBG_ADDR *addr )
|
|||
*
|
||||
* Get the address of a named symbol.
|
||||
*/
|
||||
BOOL DEBUG_GetSymbolValue( const char * name, DBG_ADDR *addr )
|
||||
BOOL32 DEBUG_GetSymbolValue( const char * name, DBG_ADDR *addr )
|
||||
{
|
||||
char buffer[256];
|
||||
struct name_hash *nh;
|
||||
|
@ -93,7 +93,7 @@ BOOL DEBUG_GetSymbolValue( const char * name, DBG_ADDR *addr )
|
|||
*
|
||||
* Set the address of a named symbol.
|
||||
*/
|
||||
BOOL DEBUG_SetSymbolValue( const char * name, const DBG_ADDR *addr )
|
||||
BOOL32 DEBUG_SetSymbolValue( const char * name, const DBG_ADDR *addr )
|
||||
{
|
||||
char buffer[256];
|
||||
struct name_hash *nh;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* Check if we are allowed to read memory at 'address'.
|
||||
*/
|
||||
BOOL DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size )
|
||||
BOOL32 DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size )
|
||||
{
|
||||
if (address->seg) /* segmented addr */
|
||||
return IsBadReadPtr( (SEGPTR)MAKELONG( (WORD)address->off,
|
||||
|
@ -31,7 +31,7 @@ BOOL DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size )
|
|||
*
|
||||
* Check if we are allowed to write memory at 'address'.
|
||||
*/
|
||||
BOOL DEBUG_IsBadWritePtr( const DBG_ADDR *address, int size )
|
||||
BOOL32 DEBUG_IsBadWritePtr( const DBG_ADDR *address, int size )
|
||||
{
|
||||
if (address->seg) /* segmented addr */
|
||||
/* Note: we use IsBadReadPtr here because we are */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "debugger.h"
|
||||
|
||||
|
||||
struct sigcontext_struct *DEBUG_context;
|
||||
SIGCONTEXT *DEBUG_context;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -15,8 +15,10 @@
|
|||
#include "msdos.h"
|
||||
#include "options.h"
|
||||
#include "xmalloc.h"
|
||||
#include "string32.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
#include "string32.h"
|
||||
|
||||
#define MAX_PATH_ELEMENTS 20
|
||||
|
||||
|
@ -178,15 +180,28 @@ int DIR_Init(void)
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* DIR_GetTempDosDir
|
||||
* GetTempPath32A (KERNEL32.292)
|
||||
*/
|
||||
UINT DIR_GetTempDosDir( LPSTR path, UINT count )
|
||||
UINT32 GetTempPath32A( UINT32 count, LPSTR path )
|
||||
{
|
||||
if (path) lstrcpyn32A( path, DIR_TempDosDir, count );
|
||||
return strlen( DIR_TempDosDir );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetTempPath32W (KERNEL32.293)
|
||||
*/
|
||||
UINT32 GetTempPath32W( UINT32 count, LPWSTR path )
|
||||
{
|
||||
LPSTR tmp = (char*)xmalloc(count);
|
||||
UINT32 len = GetTempPath32A( count, tmp );
|
||||
if (path) STRING32_AnsiToUni( path, tmp );
|
||||
free(tmp);
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DIR_GetTempUnixDir
|
||||
*/
|
||||
|
@ -248,10 +263,34 @@ UINT GetWindowsDirectory( LPSTR path, UINT count )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* GetSystemDirectory (KERNEL.135)
|
||||
* GetSystemDirectory16 (KERNEL.135)
|
||||
*/
|
||||
UINT GetSystemDirectory( LPSTR path, UINT count )
|
||||
UINT16 GetSystemDirectory16( LPSTR path, UINT16 count )
|
||||
{
|
||||
return (UINT16)GetSystemDirectory32A( path, count );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetSystemDirectory32A (KERNEL32.282)
|
||||
*/
|
||||
UINT32 GetSystemDirectory32A( LPSTR path, UINT32 count )
|
||||
{
|
||||
if (path) lstrcpyn32A( path, DIR_SystemDosDir, count );
|
||||
return strlen( DIR_SystemDosDir );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetSystemDirectory32W (KERNEL32.283)
|
||||
*/
|
||||
UINT32 GetSystemDirectory32W( LPWSTR path, UINT32 count )
|
||||
{
|
||||
if (path)
|
||||
{
|
||||
LPWSTR tmp = STRING32_DupAnsiToUni( DIR_SystemDosDir );
|
||||
lstrcpyn32W( path, tmp, count );
|
||||
free (tmp);
|
||||
}
|
||||
return strlen( DIR_SystemDosDir );
|
||||
}
|
||||
|
|
|
@ -525,9 +525,9 @@ BOOL32 GetDiskFreeSpace32W( LPCWSTR root, LPDWORD cluster_sectors,
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDriveType (KERNEL.136)
|
||||
* GetDriveType16 (KERNEL.136)
|
||||
*/
|
||||
WORD GetDriveType( INT drive )
|
||||
UINT16 GetDriveType16( UINT16 drive )
|
||||
{
|
||||
dprintf_dosfs( stddeb, "GetDriveType(%c:)\n", 'A' + drive );
|
||||
switch(DRIVE_GetType(drive))
|
||||
|
@ -543,9 +543,9 @@ WORD GetDriveType( INT drive )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* GetDriveType32A (KERNEL32.)
|
||||
* GetDriveType32A (KERNEL32.208)
|
||||
*/
|
||||
WORD GetDriveType32A( LPCSTR root )
|
||||
UINT32 GetDriveType32A( LPCSTR root )
|
||||
{
|
||||
dprintf_dosfs( stddeb, "GetDriveType32A(%s)\n", root );
|
||||
if ((root[1] != ':') || (root[2] != '\\'))
|
||||
|
@ -566,18 +566,61 @@ WORD GetDriveType32A( LPCSTR root )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* GetCurrentDirectory (KERNEL.411) (KERNEL32.196)
|
||||
* GetDriveType32W (KERNEL32.209)
|
||||
*/
|
||||
UINT32 GetCurrentDirectory( UINT32 buflen, LPSTR buf )
|
||||
UINT32 GetDriveType32W( LPCWSTR root )
|
||||
{
|
||||
LPSTR xpath=STRING32_DupUniToAnsi(root);
|
||||
UINT32 ret;
|
||||
|
||||
ret = GetDriveType32A(xpath);
|
||||
free(xpath);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetCurrentDirectory16 (KERNEL.411)
|
||||
*/
|
||||
UINT16 GetCurrentDirectory16( UINT16 buflen, LPSTR buf )
|
||||
{
|
||||
return (UINT16)GetCurrentDirectory32A( buflen, buf );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetCurrentDirectory32A (KERNEL32.196)
|
||||
*
|
||||
* Returns "X:\\path\\etc\\".
|
||||
*/
|
||||
UINT32 GetCurrentDirectory32A( UINT32 buflen, LPSTR buf )
|
||||
{
|
||||
char *pref = "A:\\";
|
||||
const char *s = DRIVE_GetDosCwd( DRIVE_GetCurrentDrive() );
|
||||
if (!s)
|
||||
{
|
||||
*buf = '\0';
|
||||
return 0;
|
||||
}
|
||||
lstrcpyn32A( buf, s, buflen );
|
||||
return strlen(s); /* yes */
|
||||
lstrcpyn32A( buf, pref, 3 );
|
||||
if (buflen) buf[0] += DRIVE_GetCurrentDrive();
|
||||
if (buflen >= 3) lstrcpyn32A( buf + 3, s, buflen - 3 );
|
||||
return strlen(s) + 3; /* length of WHOLE current directory */
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetCurrentDirectory32W (KERNEL32.197)
|
||||
*/
|
||||
UINT32 GetCurrentDirectory32W( UINT32 buflen, LPWSTR buf )
|
||||
{
|
||||
LPSTR xpath=(char*)xmalloc(buflen+1);
|
||||
UINT32 ret;
|
||||
|
||||
ret = GetCurrentDirectory32A(buflen,xpath);
|
||||
STRING32_AnsiToUni(buf,xpath);
|
||||
free(xpath);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
151
files/file.c
151
files/file.c
|
@ -384,32 +384,6 @@ static DOS_FILE *FILE_Create( LPCSTR path, int mode, int unique )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FILE_Unlink
|
||||
*/
|
||||
int FILE_Unlink( LPCSTR path )
|
||||
{
|
||||
const char *unixName;
|
||||
|
||||
dprintf_file(stddeb, "FILE_Unlink: '%s'\n", path );
|
||||
|
||||
if ((unixName = DOSFS_IsDevice( path )) != NULL)
|
||||
{
|
||||
dprintf_file(stddeb, "FILE_Unlink: removing device '%s'!\n", unixName);
|
||||
DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(unixName = DOSFS_GetUnixFileName( path, TRUE ))) return 0;
|
||||
if (unlink( unixName ) == -1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FILE_Stat
|
||||
*
|
||||
|
@ -484,31 +458,6 @@ int FILE_SetDateTime( HFILE hFile, WORD date, WORD time )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FILE_RemoveDir
|
||||
*/
|
||||
int FILE_RemoveDir( LPCSTR path )
|
||||
{
|
||||
const char *unixName;
|
||||
|
||||
dprintf_file(stddeb, "FILE_RemoveDir: '%s'\n", path );
|
||||
|
||||
if ((unixName = DOSFS_IsDevice( path )) != NULL)
|
||||
{
|
||||
dprintf_file(stddeb, "FILE_RemoveDir: device '%s'!\n", unixName);
|
||||
DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
|
||||
return 0;
|
||||
}
|
||||
if (!(unixName = DOSFS_GetUnixFileName( path, TRUE ))) return 0;
|
||||
if (rmdir( unixName ) == -1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* FILE_Dup
|
||||
*
|
||||
|
@ -599,11 +548,12 @@ INT GetTempFileName( BYTE drive, LPCSTR prefix, UINT unique, LPSTR buffer )
|
|||
}
|
||||
else
|
||||
{
|
||||
DIR_GetTempDosDir( buffer, 132 ); /* buffer must be at least 144 */
|
||||
GetTempPath32A( 132, buffer ); /* buffer must be at least 144 */
|
||||
strcat( buffer, "\\" );
|
||||
}
|
||||
|
||||
p = buffer + strlen(buffer);
|
||||
*p++ = '~';
|
||||
for (i = 3; (i > 0) && (*prefix); i--) *p++ = *prefix++;
|
||||
sprintf( p, "%04x.tmp", num );
|
||||
|
||||
|
@ -668,7 +618,7 @@ HFILE OpenFile( LPCSTR name, OFSTRUCT *ofs, UINT mode )
|
|||
{
|
||||
if (!(dosName = DOSFS_GetDosTrueName( name, FALSE ))) goto error;
|
||||
lstrcpyn32A( ofs->szPathName, dosName, sizeof(ofs->szPathName) );
|
||||
ofs->fFixedDisk = (GetDriveType( dosName[0]-'A' ) != DRIVE_REMOVABLE);
|
||||
ofs->fFixedDisk = (GetDriveType16( dosName[0]-'A' ) != DRIVE_REMOVABLE);
|
||||
dprintf_file( stddeb, "OpenFile(%s): OF_PARSE, res = '%s', %d\n",
|
||||
name, ofs->szPathName, hFileRet );
|
||||
/* Return the handle, but close it first */
|
||||
|
@ -723,7 +673,7 @@ HFILE OpenFile( LPCSTR name, OFSTRUCT *ofs, UINT mode )
|
|||
|
||||
/* Try the Windows system directory */
|
||||
|
||||
GetSystemDirectory( ofs->szPathName, len );
|
||||
GetSystemDirectory32A( ofs->szPathName, len );
|
||||
strcat( ofs->szPathName, "\\" );
|
||||
strcat( ofs->szPathName, name );
|
||||
if ((unixName = DOSFS_GetUnixFileName( ofs->szPathName, TRUE )) != NULL)
|
||||
|
@ -1079,6 +1029,53 @@ BOOL32 FlushFileBuffers( HFILE hFile )
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DeleteFile16 (KERNEL.146)
|
||||
*/
|
||||
BOOL16 DeleteFile16( LPCSTR path )
|
||||
{
|
||||
return DeleteFile32A( path );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DeleteFile32A (KERNEL32.71)
|
||||
*/
|
||||
BOOL32 DeleteFile32A( LPCSTR path )
|
||||
{
|
||||
const char *unixName;
|
||||
|
||||
dprintf_file(stddeb, "DeleteFile: '%s'\n", path );
|
||||
|
||||
if ((unixName = DOSFS_IsDevice( path )) != NULL)
|
||||
{
|
||||
dprintf_file(stddeb, "DeleteFile: removing device '%s'!\n", unixName);
|
||||
DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!(unixName = DOSFS_GetUnixFileName( path, TRUE ))) return FALSE;
|
||||
if (unlink( unixName ) == -1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DeleteFile32W (KERNEL32.72)
|
||||
*/
|
||||
BOOL32 DeleteFile32W( LPCWSTR path )
|
||||
{
|
||||
LPSTR xpath = STRING32_DupUniToAnsi(path);
|
||||
BOOL32 ret = RemoveDirectory32A( xpath );
|
||||
free(xpath);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* CreateDirectory16 (KERNEL.144)
|
||||
*/
|
||||
|
@ -1123,3 +1120,49 @@ BOOL32 CreateDirectory32W( LPCWSTR path, LPSECURITY_ATTRIBUTES lpsecattribs )
|
|||
free(xpath);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RemoveDirectory16 (KERNEL)
|
||||
*/
|
||||
BOOL16 RemoveDirectory16( LPCSTR path )
|
||||
{
|
||||
return (BOOL16)RemoveDirectory32A( path );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RemoveDirectory32A (KERNEL32.437)
|
||||
*/
|
||||
BOOL32 RemoveDirectory32A( LPCSTR path )
|
||||
{
|
||||
const char *unixName;
|
||||
|
||||
dprintf_file(stddeb, "RemoveDirectory: '%s'\n", path );
|
||||
|
||||
if ((unixName = DOSFS_IsDevice( path )) != NULL)
|
||||
{
|
||||
dprintf_file(stddeb, "RemoveDirectory: device '%s'!\n", unixName);
|
||||
DOS_ERROR( ER_FileNotFound, EC_NotFound, SA_Abort, EL_Disk );
|
||||
return FALSE;
|
||||
}
|
||||
if (!(unixName = DOSFS_GetUnixFileName( path, TRUE ))) return FALSE;
|
||||
if (rmdir( unixName ) == -1)
|
||||
{
|
||||
FILE_SetDosError();
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RemoveDirectory32W (KERNEL32.438)
|
||||
*/
|
||||
BOOL32 RemoveDirectory32W( LPCWSTR path )
|
||||
{
|
||||
LPSTR xpath = STRING32_DupUniToAnsi(path);
|
||||
BOOL32 ret = RemoveDirectory32A( xpath );
|
||||
free(xpath);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@ DLLS = \
|
|||
version.spec \
|
||||
w32sys.spec \
|
||||
win87em.spec \
|
||||
winmm.spec \
|
||||
winsock.spec \
|
||||
winspool.spec \
|
||||
wprocs.spec \
|
||||
|
|
|
@ -100,7 +100,7 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
|||
90 pascal GetTextColor(word) GetTextColor
|
||||
91 pascal GetTextExtent(word ptr s_word) GetTextExtent
|
||||
92 pascal16 GetTextFace(word s_word ptr) GetTextFace
|
||||
93 pascal16 GetTextMetrics(word ptr) GetTextMetrics
|
||||
93 pascal16 GetTextMetrics(word ptr) GetTextMetrics16
|
||||
94 pascal GetViewportExt(word) GetViewportExt
|
||||
95 pascal GetViewportOrg(word) GetViewportOrg
|
||||
96 pascal GetWindowExt(word) GetWindowExt
|
||||
|
@ -235,7 +235,7 @@ heap 65488 # 65536 - 16 (instance data) - 32 (stock objects)
|
|||
s_word s_word) Chord
|
||||
349 pascal SetMapperFlags(word long) SetMapperFlags
|
||||
350 pascal16 GetCharWidth(word word word ptr) GetCharWidth
|
||||
351 pascal16 ExtTextOut(word s_word s_word word ptr ptr s_word ptr) ExtTextOut16
|
||||
351 pascal16 ExtTextOut(word s_word s_word word ptr ptr word ptr) ExtTextOut16
|
||||
352 stub GetPhysicalFontHandle
|
||||
353 stub GetAspectRatioFilter
|
||||
354 stub ShrinkGDIHeap
|
||||
|
|
|
@ -238,8 +238,8 @@ base 1
|
|||
0233 stdcall GetTextExtentPointW(long ptr long ptr) GetTextExtentPoint32W
|
||||
0234 stub GetTextFaceA
|
||||
0235 stub GetTextFaceW
|
||||
0236 stub GetTextMetricsA
|
||||
0237 stub GetTextMetricsW
|
||||
0236 stdcall GetTextMetricsA(long ptr) GetTextMetrics32A
|
||||
0237 stdcall GetTextMetricsW(long ptr) GetTextMetrics32W
|
||||
0238 stub GetTransform
|
||||
0239 stub GetViewportExtEx
|
||||
0240 stub GetViewportOrgEx
|
||||
|
@ -314,8 +314,9 @@ base 1
|
|||
0309 stub SetColorAdjustment
|
||||
0310 stub SetColorSpace
|
||||
0311 stub SetDIBColorTable
|
||||
0312 stub SetDIBits
|
||||
0313 stub SetDIBitsToDevice
|
||||
0312 stdcall SetDIBits(long long long long ptr ptr long) SetDIBits
|
||||
0313 stdcall SetDIBitsToDevice(long long long long long long long long long
|
||||
ptr ptr long) SetDIBitsToDevice
|
||||
0314 stub SetDeviceGammaRamp
|
||||
0315 stub SetEnhMetaFileBits
|
||||
0316 stub SetFontEnumeration
|
||||
|
|
|
@ -23,8 +23,8 @@ type win16
|
|||
20 pascal GlobalSize(word) GlobalSize16
|
||||
21 pascal GlobalHandle(word) GlobalHandle16
|
||||
22 pascal16 GlobalFlags(word) GlobalFlags16
|
||||
23 pascal16 LockSegment(word) LockSegment
|
||||
24 pascal16 UnlockSegment(word) UnlockSegment
|
||||
23 pascal16 LockSegment(word) LockSegment16
|
||||
24 pascal16 UnlockSegment(word) UnlockSegment16
|
||||
25 pascal GlobalCompact(long) GlobalCompact16
|
||||
26 pascal16 GlobalFreeAll(word) GlobalFreeAll
|
||||
27 stub GetModuleName
|
||||
|
@ -42,13 +42,13 @@ type win16
|
|||
41 return EnableDos 0 0
|
||||
42 return DisableDos 0 0
|
||||
45 pascal16 LoadModule(ptr ptr) LoadModule
|
||||
46 pascal16 FreeModule(word) FreeModule
|
||||
46 pascal16 FreeModule(word) FreeModule16
|
||||
47 pascal16 GetModuleHandle(segptr) WIN16_GetModuleHandle
|
||||
48 pascal16 GetModuleUsage(word) GetModuleUsage
|
||||
49 pascal16 GetModuleFileName(word ptr s_word) GetModuleFileName
|
||||
50 pascal GetProcAddress(word segptr) GetProcAddress
|
||||
51 pascal MakeProcInstance(segptr word) MakeProcInstance
|
||||
52 pascal16 FreeProcInstance(segptr) FreeProcInstance
|
||||
51 pascal MakeProcInstance(segptr word) MakeProcInstance16
|
||||
52 pascal16 FreeProcInstance(segptr) FreeProcInstance16
|
||||
53 stub CallProcInstance
|
||||
54 pascal16 GetInstanceData(word word word) GetInstanceData
|
||||
55 pascal16 Catch(ptr) Catch
|
||||
|
@ -133,8 +133,8 @@ type win16
|
|||
132 pascal GetWinFlags() GetWinFlags
|
||||
133 pascal16 GetExePtr(word) GetExePtr
|
||||
134 pascal16 GetWindowsDirectory(ptr word) GetWindowsDirectory
|
||||
135 pascal16 GetSystemDirectory(ptr word) GetSystemDirectory
|
||||
136 pascal16 GetDriveType(byte) GetDriveType
|
||||
135 pascal16 GetSystemDirectory(ptr word) GetSystemDirectory16
|
||||
136 pascal16 GetDriveType(byte) GetDriveType16
|
||||
137 pascal FatalAppExit(word ptr) FatalAppExit
|
||||
138 pascal GetHeapSpaces(word) GetHeapSpaces
|
||||
139 stub DoSignal
|
||||
|
@ -143,8 +143,8 @@ type win16
|
|||
142 stub GetProfileSectionNames
|
||||
143 stub GetPrivateProfileSectionNames
|
||||
144 pascal16 CreateDirectory(ptr ptr) CreateDirectory16
|
||||
145 stub RemoveDirectory
|
||||
146 stub DeleteFile
|
||||
145 pascal16 RemoveDirectory(ptr) RemoveDirectory16
|
||||
146 pascal16 DeleteFile(ptr) DeleteFile16
|
||||
147 stub SetLastError
|
||||
148 stub GetLastError
|
||||
149 stub GetVersionEx
|
||||
|
@ -270,7 +270,7 @@ type win16
|
|||
404 pascal16 FarGetOwner(word) FarGetOwner
|
||||
406 stub WritePrivateProfileStruct
|
||||
407 stub GetPrivateProfileStruct
|
||||
411 pascal GetCurrentDirectory(long ptr) GetCurrentDirectory
|
||||
411 pascal GetCurrentDirectory(long ptr) GetCurrentDirectory16
|
||||
412 pascal16 SetCurrentDirectory(ptr) SetCurrentDirectory
|
||||
413 stub FindFirstFile
|
||||
414 stub FindNextFile
|
||||
|
|
|
@ -13,7 +13,7 @@ base 1
|
|||
0008 stub BackupWrite
|
||||
0009 stub BaseAttachCompleteThunk
|
||||
0010 stub BasepDebugDump
|
||||
0011 stub Beep
|
||||
0011 stdcall Beep(long long) Beep
|
||||
0012 stub BeginUpdateResourceA
|
||||
0013 stub BeginUpdateResourceW
|
||||
0014 stub BuildCommDCBA
|
||||
|
@ -73,8 +73,8 @@ base 1
|
|||
0068 stub DefineDosDeviceW
|
||||
0069 stub DeleteAtom
|
||||
0070 stdcall DeleteCriticalSection(ptr) DeleteCriticalSection
|
||||
0071 stub DeleteFileA
|
||||
0072 stub DeleteFileW
|
||||
0071 stdcall DeleteFileA(ptr) DeleteFile32A
|
||||
0072 stdcall DeleteFileW(ptr) DeleteFile32W
|
||||
0073 stub DeviceIoControl
|
||||
0074 stub DisableThreadLibraryCalls
|
||||
0075 stub DisconnectNamedPipe
|
||||
|
@ -198,9 +198,9 @@ base 1
|
|||
0193 stub GetCurrencyFormatA
|
||||
0194 stub GetCurrencyFormatW
|
||||
0195 stub GetCurrentConsoleFont
|
||||
0196 stdcall GetCurrentDirectoryA(ptr ptr) GetCurrentDirectory
|
||||
0197 stub GetCurrentDirectoryW
|
||||
0198 stdcall GetCurrentProcess() GetCurrentProcess
|
||||
0196 stdcall GetCurrentDirectoryA(long ptr) GetCurrentDirectory32A
|
||||
0197 stdcall GetCurrentDirectoryW(long ptr) GetCurrentDirectory32W
|
||||
0198 stdcall GetCurrentProcess() GetCurrentProcess
|
||||
0199 stdcall GetCurrentProcessId() GetCurrentThreadId
|
||||
0200 stdcall GetCurrentThread() GetCurrentThread
|
||||
0201 stdcall GetCurrentThreadId() GetCurrentThreadId
|
||||
|
@ -211,7 +211,7 @@ base 1
|
|||
0206 stdcall GetDiskFreeSpaceA(ptr ptr ptr ptr ptr) GetDiskFreeSpace32A
|
||||
0207 stdcall GetDiskFreeSpaceW(ptr ptr ptr ptr ptr) GetDiskFreeSpace32W
|
||||
0208 stdcall GetDriveTypeA(ptr) GetDriveType32A
|
||||
0209 stub GetDriveTypeW
|
||||
0209 stdcall GetDriveTypeW(ptr) GetDriveType32W
|
||||
0210 stdcall GetEnvironmentStrings() GetEnvironmentStrings
|
||||
0211 stub GetEnvironmentStringsA
|
||||
0212 stdcall GetEnvironmentStringsW() GetEnvironmentStringsW
|
||||
|
@ -284,8 +284,8 @@ base 1
|
|||
0279 stub GetStringTypeW
|
||||
0280 stdcall GetSystemDefaultLCID() GetSystemDefaultLCID
|
||||
0281 stub GetSystemDefaultLangID
|
||||
0282 stub GetSystemDirectoryA
|
||||
0283 stub GetSystemDirectoryW
|
||||
0282 stdcall GetSystemDirectoryA(ptr long) GetSystemDirectory32A
|
||||
0283 stdcall GetSystemDirectoryW(ptr long) GetSystemDirectory32W
|
||||
0284 stub GetSystemInfo
|
||||
0285 stdcall GetSystemTime(ptr) GetSystemTime
|
||||
0286 stub GetSystemTimeAdjustment
|
||||
|
@ -294,8 +294,8 @@ base 1
|
|||
0289 stub GetTapeStatus
|
||||
0290 stub GetTempFileNameA
|
||||
0291 stub GetTempFileNameW
|
||||
0292 stub GetTempPathA
|
||||
0293 stub GetTempPathW
|
||||
0292 stdcall GetTempPathA(long ptr) GetTempPath32A
|
||||
0293 stdcall GetTempPathW(long ptr) GetTempPath32W
|
||||
0294 stdcall GetThreadContext(long ptr) GetThreadContext
|
||||
0295 stub GetThreadLocale
|
||||
0296 stub GetThreadPriority
|
||||
|
@ -439,14 +439,14 @@ base 1
|
|||
0434 stub RegisterWowExec
|
||||
0435 stdcall ReleaseMutex(long) ReleaseMutex
|
||||
0436 stub ReleaseSemaphore
|
||||
0437 stub RemoveDirectoryA
|
||||
0438 stub RemoveDirectoryW
|
||||
0437 stdcall RemoveDirectoryA(ptr) RemoveDirectory32A
|
||||
0438 stdcall RemoveDirectoryW(ptr) RemoveDirectory32W
|
||||
0439 stdcall ResetEvent(long) ResetEvent
|
||||
0440 stub ResumeThread
|
||||
0441 stub RtlFillMemory
|
||||
0442 stub RtlMoveMemory
|
||||
0443 stdcall RtlUnwind(ptr long ptr long) RtlUnwind
|
||||
0444 stub RtlZeroMemory
|
||||
0441 stdcall RtlFillMemory(ptr long long) RtlFillMemory
|
||||
0442 stdcall RtlMoveMemory(ptr ptr long) RtlMoveMemory
|
||||
0443 stdcall RtlUnwind(ptr long ptr long) RtlUnwind
|
||||
0444 stdcall RtlZeroMemory(ptr long) RtlZeroMemory
|
||||
0445 stub ScrollConsoleScreenBufferA
|
||||
0446 stub ScrollConsoleScreenBufferW
|
||||
0447 stub SearchPathA
|
||||
|
@ -486,8 +486,8 @@ base 1
|
|||
0481 stub SetDefaultCommConfigA
|
||||
0482 stub SetDefaultCommConfigW
|
||||
0483 stub SetEndOfFile
|
||||
0484 stdcall SetEnvironmentVariableA(ptr ptr) SetEnvironmentVariableA
|
||||
0485 stub SetEnvironmentVariableW
|
||||
0484 stdcall SetEnvironmentVariableA(ptr ptr) SetEnvironmentVariable32A
|
||||
0485 stdcall SetEnvironmentVariableW(ptr ptr) SetEnvironmentVariable32W
|
||||
0486 stdcall SetErrorMode(long) SetErrorMode
|
||||
0487 stdcall SetEvent(long) SetEvent
|
||||
0488 stub SetFileApisToANSI
|
||||
|
|
|
@ -362,7 +362,7 @@ base 0
|
|||
358 stub RtlExtendedIntegerMultiply
|
||||
359 stub RtlExtendedLargeIntegerDivide
|
||||
360 stub RtlExtendedMagicDivide
|
||||
361 stub RtlFillMemory
|
||||
361 stdcall RtlFillMemory(ptr long long) RtlFillMemory
|
||||
362 stub RtlFillMemoryUlong
|
||||
363 stub RtlFindClearBits
|
||||
364 stub RtlFindClearBitsAndSet
|
||||
|
@ -436,7 +436,7 @@ base 0
|
|||
432 stub RtlLookupElementGenericTable
|
||||
433 stub RtlMakeSelfRelativeSD
|
||||
434 stub RtlMapGenericMask
|
||||
435 stub RtlMoveMemory
|
||||
435 stdcall RtlMoveMemory(ptr ptr long) RtlMoveMemory
|
||||
436 stub RtlMultiByteToUnicodeN
|
||||
437 stub RtlMultiByteToUnicodeSize
|
||||
438 stub RtlNewInstanceSecurityObject
|
||||
|
@ -539,7 +539,7 @@ base 0
|
|||
535 stub RtlWalkHeap
|
||||
536 stub RtlWriteRegistryValue
|
||||
537 stub RtlZeroHeap
|
||||
538 stub RtlZeroMemory
|
||||
538 stdcall RtlZeroMemory(ptr long) RtlZeroMemory
|
||||
539 stub RtlpInitializeRtl
|
||||
540 stub RtlpNtCreateKey
|
||||
541 stub RtlpNtEnumerateSubKey
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "module.h"
|
||||
#include "registers.h"
|
||||
#include "stackframe.h"
|
||||
#include "task.h"
|
||||
#include "stddebug.h"
|
||||
/* #define DEBUG_RELAY */
|
||||
#include "debug.h"
|
||||
|
@ -122,7 +123,7 @@ void RELAY_DebugCallFrom16( int func_type, char *args,
|
|||
|
||||
if (func_type == 2) /* register function */
|
||||
{
|
||||
struct sigcontext_struct *context = (struct sigcontext_struct *)&args32;
|
||||
SIGCONTEXT *context = (SIGCONTEXT *)&args32;
|
||||
printf( " AX=%04x BX=%04x CX=%04x DX=%04x SI=%04x DI=%04x ES=%04x EFL=%08lx\n",
|
||||
AX_reg(context), BX_reg(context), CX_reg(context),
|
||||
DX_reg(context), SI_reg(context), DI_reg(context),
|
||||
|
@ -170,7 +171,7 @@ void RELAY_DebugCallFrom16Ret( int func_type, int ret_val, int args32 )
|
|||
printf( "retval=none ret=%04x:%04x ds=%04x\n",
|
||||
frame->cs, frame->ip, frame->ds );
|
||||
{
|
||||
struct sigcontext_struct *context = (struct sigcontext_struct *)&args32;
|
||||
SIGCONTEXT *context = (SIGCONTEXT *)&args32;
|
||||
printf( " AX=%04x BX=%04x CX=%04x DX=%04x SI=%04x DI=%04x ES=%04x EFL=%08lx\n",
|
||||
AX_reg(context), BX_reg(context), CX_reg(context),
|
||||
DX_reg(context), SI_reg(context), DI_reg(context),
|
||||
|
@ -195,11 +196,11 @@ void RELAY_Unimplemented16(void)
|
|||
NE_MODULE *pModule = BUILTIN_GetEntryPoint( frame->entry_cs,
|
||||
frame->entry_ip,
|
||||
&ordinal, &name );
|
||||
fprintf( stderr, "No handler for routine %.*s.%d (%.*s)\n",
|
||||
fprintf( stderr, "No handler for Win16 routine %.*s.%d (%.*s) called from %04x:%04x\n",
|
||||
*((BYTE *)pModule + pModule->name_table),
|
||||
(char *)pModule + pModule->name_table + 1,
|
||||
ordinal, *name, name + 1 );
|
||||
exit(1);
|
||||
ordinal, *name, name + 1, frame->cs, frame->ip );
|
||||
TASK_KillCurrentTask(1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -211,10 +212,11 @@ void RELAY_Unimplemented16(void)
|
|||
* (The args are the same than for RELAY_DebugCallFrom32).
|
||||
*/
|
||||
void RELAY_Unimplemented32( int nb_args, void *entry_point,
|
||||
const char *func_name )
|
||||
const char *func_name, int ebp, int ret_addr )
|
||||
{
|
||||
fprintf( stderr, "No handler for Win32 routine %s\n", func_name );
|
||||
exit(1);
|
||||
fprintf( stderr, "No handler for Win32 routine %s called from %08x\n",
|
||||
func_name, ret_addr );
|
||||
TASK_KillCurrentTask(1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ type win16
|
|||
# 157 RESTARTDIALOG
|
||||
# 166 PICKICONDLG
|
||||
|
||||
262 pascal16 DriveType(long) GetDriveType
|
||||
262 pascal16 DriveType(long) GetDriveType16
|
||||
|
||||
# 263 SH16TO32DRIVEIOCTL
|
||||
# 264 SH16TO32INT2526
|
||||
|
|
|
@ -54,8 +54,8 @@ heap 65520
|
|||
#51 BEAR51
|
||||
52 pascal16 AnyPopup() AnyPopup
|
||||
53 pascal16 DestroyWindow(word) DestroyWindow
|
||||
54 pascal16 EnumWindows(segptr long) EnumWindows
|
||||
55 pascal16 EnumChildWindows(word segptr long) EnumChildWindows
|
||||
54 pascal16 EnumWindows(segptr long) EnumWindows16
|
||||
55 pascal16 EnumChildWindows(word segptr long) EnumChildWindows16
|
||||
56 pascal16 MoveWindow(word word word word word word) MoveWindow
|
||||
57 pascal16 RegisterClass(ptr) RegisterClass16
|
||||
58 pascal16 GetClassName(word ptr word) GetClassName16
|
||||
|
@ -225,7 +225,7 @@ heap 65520
|
|||
222 pascal16 GetKeyboardState(ptr) GetKeyboardState
|
||||
223 pascal16 SetKeyboardState(ptr) SetKeyboardState
|
||||
224 pascal16 GetWindowTask(word) GetWindowTask
|
||||
225 pascal16 EnumTaskWindows(word segptr long) EnumTaskWindows
|
||||
225 pascal16 EnumTaskWindows(word segptr long) EnumTaskWindows16
|
||||
226 stub LockInput
|
||||
227 pascal16 GetNextDlgGroupItem(word word word) GetNextDlgGroupItem
|
||||
228 pascal16 GetNextDlgTabItem(word word word) GetNextDlgTabItem
|
||||
|
|
|
@ -181,7 +181,7 @@ base 1
|
|||
0174 stub EndMenu
|
||||
0175 stdcall EndPaint(long ptr) EndPaint32
|
||||
0176 stub EndTask
|
||||
0177 stub EnumChildWindows
|
||||
0177 stdcall EnumChildWindows(long ptr long) EnumChildWindows32
|
||||
0178 stub EnumClipboardFormats
|
||||
0179 stub EnumDesktopsA
|
||||
0180 stub EnumDesktopsW
|
||||
|
@ -193,10 +193,10 @@ base 1
|
|||
0186 stub EnumPropsExA
|
||||
0187 stub EnumPropsExW
|
||||
0188 stub EnumPropsW
|
||||
0189 stub EnumThreadWindows
|
||||
0189 stdcall EnumThreadWindows(long ptr long) EnumThreadWindows
|
||||
0190 stub EnumWindowStationsA
|
||||
0191 stub EnumWindowStationsW
|
||||
0192 stub EnumWindows
|
||||
0192 stdcall EnumWindows(ptr long) EnumWindows32
|
||||
0193 stdcall EqualRect(ptr ptr) EqualRect32
|
||||
0194 stdcall ExcludeUpdateRgn(long long) ExcludeUpdateRgn
|
||||
0195 stub ExitWindowsEx
|
||||
|
|
|
@ -0,0 +1,185 @@
|
|||
name winmm
|
||||
type win32
|
||||
|
||||
0004 stub CloseDriver
|
||||
0005 stub DefDriverProc
|
||||
0006 stub DriverCallback
|
||||
0007 stub DrvClose
|
||||
0008 stub DrvDefDriverProc
|
||||
0009 stub DrvGetModuleHandle
|
||||
0010 stub DrvOpen
|
||||
0011 stub DrvOpenA
|
||||
0012 stub DrvSendMessage
|
||||
0013 stub GetDriverFlags
|
||||
0014 stub GetDriverModuleHandle
|
||||
0015 stub OpenDriver
|
||||
0016 stub OpenDriverA
|
||||
0017 stub PlaySound
|
||||
0001 stub PlaySoundA
|
||||
0018 stub PlaySoundW
|
||||
0019 stub SendDriverMessage
|
||||
0020 stub auxGetDevCapsA
|
||||
0021 stub auxGetDevCapsW
|
||||
0022 stub auxGetNumDevs
|
||||
0023 stub auxGetVolume
|
||||
0024 stub auxOutMessage
|
||||
0025 stub auxSetVolume
|
||||
0026 stub joyConfigChanged
|
||||
0027 stub joyGetDevCapsA
|
||||
0028 stub joyGetDevCapsW
|
||||
0029 stub joyGetNumDevs
|
||||
0030 stub joyGetPos
|
||||
0031 stub joyGetPosEx
|
||||
0032 stub joyGetThreshold
|
||||
0033 stub joyReleaseCapture
|
||||
0034 stub joySetCapture
|
||||
0035 stub joySetThreshold
|
||||
0036 stub mciDriverNotify
|
||||
0037 stub mciDriverYield
|
||||
0038 stub mciExecute
|
||||
0039 stub mciFreeCommandResource
|
||||
0040 stub mciGetCreatorTask
|
||||
0041 stub mciGetDeviceIDA
|
||||
0042 stub mciGetDeviceIDFromElementIDW
|
||||
0043 stub mciGetDeviceIDW
|
||||
0044 stub mciGetDriverData
|
||||
0045 stub mciGetErrorStringA
|
||||
0046 stub mciGetErrorStringW
|
||||
0047 stub mciGetYieldProc
|
||||
0048 stub mciLoadCommandResource
|
||||
0049 stub mciSendCommandA
|
||||
0050 stub mciSendCommandW
|
||||
0051 stub mciSendStringA
|
||||
0052 stub mciSendStringW
|
||||
0053 stub mciSetDriverData
|
||||
0054 stub mciSetYieldProc
|
||||
0055 stub midiConnect
|
||||
0056 stub midiDisconnect
|
||||
0057 stub midiInAddBuffer
|
||||
0058 stub midiInClose
|
||||
0059 stub midiInGetDevCapsA
|
||||
0060 stub midiInGetDevCapsW
|
||||
0061 stub midiInGetErrorTextA
|
||||
0062 stub midiInGetErrorTextW
|
||||
0063 stub midiInGetID
|
||||
0064 stub midiInGetNumDevs
|
||||
0065 stub midiInMessage
|
||||
0066 stub midiInOpen
|
||||
0067 stub midiInPrepareHeader
|
||||
0068 stub midiInReset
|
||||
0069 stub midiInStart
|
||||
0070 stub midiInStop
|
||||
0071 stub midiInUnprepareHeader
|
||||
0072 stub midiOutCacheDrumPatches
|
||||
0073 stub midiOutCachePatches
|
||||
0074 stub midiOutClose
|
||||
0075 stub midiOutGetDevCapsA
|
||||
0076 stub midiOutGetDevCapsW
|
||||
0077 stub midiOutGetErrorTextA
|
||||
0078 stub midiOutGetErrorTextW
|
||||
0079 stub midiOutGetID
|
||||
0080 stub midiOutGetNumDevs
|
||||
0081 stub midiOutGetVolume
|
||||
0082 stub midiOutLongMsg
|
||||
0083 stub midiOutMessage
|
||||
0084 stub midiOutOpen
|
||||
0085 stub midiOutPrepareHeader
|
||||
0086 stub midiOutReset
|
||||
0087 stub midiOutSetVolume
|
||||
0088 stub midiOutShortMsg
|
||||
0089 stub midiOutUnprepareHeader
|
||||
0090 stub midiStreamClose
|
||||
0091 stub midiStreamOpen
|
||||
0092 stub midiStreamOut
|
||||
0093 stub midiStreamPause
|
||||
0094 stub midiStreamPosition
|
||||
0095 stub midiStreamProperty
|
||||
0096 stub midiStreamRestart
|
||||
0097 stub midiStreamStop
|
||||
0098 stub mixerClose
|
||||
0099 stub mixerGetControlDetailsA
|
||||
0100 stub mixerGetControlDetailsW
|
||||
0101 stub mixerGetDevCapsA
|
||||
0102 stub mixerGetDevCapsW
|
||||
0103 stub mixerGetID
|
||||
0104 stub mixerGetLineControlsA
|
||||
0105 stub mixerGetLineControlsW
|
||||
0106 stub mixerGetLineInfoA
|
||||
0107 stub mixerGetLineInfoW
|
||||
0108 stub mixerGetNumDevs
|
||||
0109 stub mixerMessage
|
||||
0110 stub mixerOpen
|
||||
0111 stub mixerSetControlDetails
|
||||
0112 stub mmioAdvance
|
||||
0113 stub mmioAscend
|
||||
0114 stub mmioClose
|
||||
0115 stub mmioCreateChunk
|
||||
0116 stub mmioDescend
|
||||
0117 stub mmioFlush
|
||||
0118 stub mmioGetInfo
|
||||
0119 stub mmioInstallIOProc16
|
||||
0120 stub mmioInstallIOProcA
|
||||
0121 stub mmioInstallIOProcW
|
||||
0122 stub mmioOpenA
|
||||
0123 stub mmioOpenW
|
||||
0124 stub mmioRead
|
||||
0125 stub mmioRenameA
|
||||
0126 stub mmioRenameW
|
||||
0127 stub mmioSeek
|
||||
0128 stub mmioSendMessage
|
||||
0129 stub mmioSetBuffer
|
||||
0130 stub mmioSetInfo
|
||||
0131 stub mmioStringToFOURCCA
|
||||
0132 stub mmioStringToFOURCCW
|
||||
0133 stub mmioWrite
|
||||
0134 stub mmsystemGetVersion
|
||||
0135 stub sndPlaySoundA
|
||||
0136 stub sndPlaySoundW
|
||||
0137 stub timeBeginPeriod
|
||||
0138 stub timeEndPeriod
|
||||
0139 stub timeGetDevCaps
|
||||
0140 stub timeGetSystemTime
|
||||
0141 stub timeGetTime
|
||||
0142 stub timeKillEvent
|
||||
0143 stub timeSetEvent
|
||||
0144 stub waveInAddBuffer
|
||||
0145 stub waveInClose
|
||||
0146 stub waveInGetDevCapsA
|
||||
0147 stub waveInGetDevCapsW
|
||||
0148 stub waveInGetErrorTextA
|
||||
0149 stub waveInGetErrorTextW
|
||||
0150 stub waveInGetID
|
||||
0151 stub waveInGetNumDevs
|
||||
0152 stub waveInGetPosition
|
||||
0153 stub waveInMessage
|
||||
0154 stub waveInOpen
|
||||
0155 stub waveInPrepareHeader
|
||||
0156 stub waveInReset
|
||||
0157 stub waveInStart
|
||||
0158 stub waveInStop
|
||||
0159 stub waveInUnprepareHeader
|
||||
0160 stub waveOutBreakLoop
|
||||
0161 stub waveOutClose
|
||||
0162 stub waveOutGetDevCapsA
|
||||
0163 stub waveOutGetDevCapsW
|
||||
0164 stub waveOutGetErrorTextA
|
||||
0165 stub waveOutGetErrorTextW
|
||||
0166 stub waveOutGetID
|
||||
0167 stdcall waveOutGetNumDevs() waveOutGetNumDevs
|
||||
0168 stub waveOutGetPitch
|
||||
0169 stub waveOutGetPlaybackRate
|
||||
0170 stub waveOutGetPosition
|
||||
0171 stub waveOutGetVolume
|
||||
0172 stub waveOutMessage
|
||||
0173 stub waveOutOpen
|
||||
0174 stub waveOutPause
|
||||
0175 stub waveOutPrepareHeader
|
||||
0176 stub waveOutReset
|
||||
0177 stub waveOutRestart
|
||||
0178 stub waveOutSetPitch
|
||||
0179 stub waveOutSetPlaybackRate
|
||||
0180 stub waveOutSetVolume
|
||||
0181 stub waveOutUnprepareHeader
|
||||
0182 stub waveOutWrite
|
||||
0183 stub winmmf_ThunkData32
|
||||
0184 stub winmmsl_ThunkData32
|
|
@ -1,6 +1,7 @@
|
|||
name wprocs
|
||||
type win16
|
||||
|
||||
1 pascal WINPROC_CallProc16To32A(word word word long long) WINPROC_CallProc16To32A
|
||||
2 pascal StaticWndProc(word word word long) StaticWndProc
|
||||
3 pascal ScrollBarWndProc(word word word long) ScrollBarWndProc
|
||||
4 pascal ListBoxWndProc(word word word long) ListBoxWndProc
|
||||
|
@ -25,7 +26,6 @@ type win16
|
|||
26 register Win32CallToStart() PE_Win32CallToStart
|
||||
27 pascal EntryAddrProc(word word) MODULE_GetEntryPoint
|
||||
28 pascal MyAlloc(word word word) MODULE_AllocateSegment
|
||||
29 pascal16 ActivateAppProc(word long) ACTIVATEAPP_callback
|
||||
30 pascal FormatCharDlgProc(word word word long) FormatCharDlgProc
|
||||
31 pascal16 FontStyleEnumProc(ptr ptr word long) FontStyleEnumProc
|
||||
32 pascal16 FontFamilyEnumProc(ptr ptr word long) FontFamilyEnumProc
|
||||
|
|
|
@ -24,6 +24,7 @@ extern WORD CallTo16_word_ ( FARPROC16, WORD );
|
|||
|
||||
#ifndef WINELIB
|
||||
|
||||
extern WORD CallTo16_word_w (FARPROC16, WORD, WORD);
|
||||
extern WORD CallTo16_word_ww (FARPROC16, WORD, WORD, WORD);
|
||||
extern WORD CallTo16_word_wl (FARPROC16, WORD, WORD, LONG);
|
||||
extern WORD CallTo16_word_ll (FARPROC16, WORD, LONG, LONG);
|
||||
|
@ -36,6 +37,7 @@ extern LONG CallTo16_long_wwwl (FARPROC16, WORD, WORD, WORD, WORD, LONG);
|
|||
extern WORD CallTo16_word_lwww (FARPROC16, WORD, LONG, WORD, WORD, WORD);
|
||||
extern WORD CallTo16_word_wwll (FARPROC16, WORD, WORD, WORD, LONG, LONG);
|
||||
extern WORD CallTo16_word_wllwl(FARPROC16, WORD, WORD, LONG, LONG, WORD, LONG);
|
||||
extern LONG CallTo16_long_lwwll(FARPROC16, WORD, LONG, WORD, WORD, LONG, LONG);
|
||||
extern WORD CallTo16_word_wwlll(FARPROC16, WORD, WORD, WORD, LONG, LONG, LONG);
|
||||
extern LONG CallTo16_long_lllllllwlwwwl( FARPROC16, WORD, LONG, LONG, LONG,
|
||||
LONG, LONG, LONG, LONG, WORD, LONG,
|
||||
|
@ -44,6 +46,10 @@ extern LONG CallTo16_long_lllllllwlwwwl( FARPROC16, WORD, LONG, LONG, LONG,
|
|||
extern WORD CallTo16_regs_( FARPROC16 func, WORD ds, WORD es, WORD bp, WORD ax,
|
||||
WORD bx, WORD cx, WORD dx, WORD si, WORD di );
|
||||
|
||||
#define CallDCHookProc( func, hdc, code, data, lparam) \
|
||||
CallTo16_word_wwll( func, CURRENT_DS, hdc, code, data, lparam )
|
||||
#define CallDriverProc( func, dwId, msg, hdrvr, lparam1, lparam2 ) \
|
||||
CallTo16_long_lwwll( func, CURRENT_DS, dwId, msg, hdrvr, lparam1, lparam2 )
|
||||
#define CallEnumChildProc( func, hwnd, lParam ) \
|
||||
CallTo16_word_wl( func, CURRENT_DS, hwnd, lParam )
|
||||
#define CallEnumFontFamProc( func, lpfont, lpmetric, type, lParam ) \
|
||||
|
@ -58,7 +64,7 @@ extern WORD CallTo16_regs_( FARPROC16 func, WORD ds, WORD es, WORD bp, WORD ax,
|
|||
CallTo16_word_wlw( func, CURRENT_DS, hwnd, lpstr, data )
|
||||
#define CallEnumTaskWndProc( func, hwnd, lParam ) \
|
||||
CallTo16_word_wl( func, CURRENT_DS, hwnd, lParam )
|
||||
#define CallEnumWindowsProc( func, hwnd, lParam ) \
|
||||
#define CallEnumWindowsProc16( func, hwnd, lParam ) \
|
||||
CallTo16_word_wl( func, CURRENT_DS, hwnd, lParam )
|
||||
#define CallLineDDAProc( func, xPos, yPos, lParam ) \
|
||||
CallTo16_word_wwl( func, CURRENT_DS, xPos, yPos, lParam )
|
||||
|
@ -68,12 +74,12 @@ extern WORD CallTo16_regs_( FARPROC16 func, WORD ds, WORD es, WORD bp, WORD ax,
|
|||
CallTo16_long_wwl( func, CURRENT_DS, code, wParam, lParam )
|
||||
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
|
||||
CallTo16_word_wwlll( func, CURRENT_DS, id, msg, dwUser, dw1, dw2 )
|
||||
#define CallWindowsExitProc( func, nExitType ) \
|
||||
CallTo16_word_w( func, CURRENT_DS, nExitType )
|
||||
#define CallWndProc16( func, ds, hwnd, msg, wParam, lParam ) \
|
||||
CallTo16_long_wwwl( func, ds, hwnd, msg, wParam, lParam )
|
||||
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
|
||||
CallTo16_word_lwww( func, CURRENT_DS, lpch, ichCurrent, cch, code )
|
||||
#define CallDCHookProc( func, hdc, code, data, lparam) \
|
||||
CallTo16_word_wwll( func, CURRENT_DS, hdc, code, data, lparam )
|
||||
#define CallWndProcNCCREATE16( func, ds, exStyle, clsName, winName, style, \
|
||||
x, y, cx, cy, hparent, hmenu, instance, \
|
||||
params, hwnd, msg, wParam, lParam ) \
|
||||
|
@ -86,6 +92,7 @@ extern WORD CallTo16_regs_( FARPROC16 func, WORD ds, WORD es, WORD bp, WORD ax,
|
|||
/* by the build program to generate the file if1632/callto32.S */
|
||||
|
||||
extern LONG CallTo32_0( FARPROC32 );
|
||||
extern LONG CallTo32_2( FARPROC32, DWORD, DWORD );
|
||||
extern LONG CallTo32_3( FARPROC32, DWORD, DWORD, DWORD );
|
||||
extern LONG CallTo32_4( FARPROC32, DWORD, DWORD, DWORD, DWORD );
|
||||
|
||||
|
@ -93,12 +100,18 @@ extern LONG CallTo32_4( FARPROC32, DWORD, DWORD, DWORD, DWORD );
|
|||
CallTo32_0( func )
|
||||
#define CallDLLEntryProc32( func, hmodule, a, b ) \
|
||||
CallTo32_3( func, hmodule, a, b )
|
||||
#define CallEnumWindowsProc32( func, hwnd, lParam ) \
|
||||
CallTo32_2( func, hwnd, lParam )
|
||||
#define CallWndProc32( func, hwnd, msg, wParam, lParam ) \
|
||||
CallTo32_4( func, hwnd, msg, wParam, lParam )
|
||||
|
||||
|
||||
#else /* WINELIB */
|
||||
|
||||
#define CallDCHookProc( func, hdc, code, data, lparam ) \
|
||||
(*func)( hdc, code, data, lparam )
|
||||
#define CallDriverProc( func, dwId, msg, hdrvr, lparam1, lparam2 ) \
|
||||
(*func)( dwId, msg, hdrvr, lparam1, lparam2 )
|
||||
#define CallEnumChildProc( func, hwnd, lParam ) \
|
||||
(*func)( hwnd, lParam )
|
||||
#define CallEnumFontFamProc( func, lpfont, lpmetric, type, lParam ) \
|
||||
|
@ -113,7 +126,9 @@ extern LONG CallTo32_4( FARPROC32, DWORD, DWORD, DWORD, DWORD );
|
|||
(*func)( hwnd, (LPCTSTR)(lpstr), data )
|
||||
#define CallEnumTaskWndProc( func, hwnd, lParam ) \
|
||||
(*func)( hwnd, lParam )
|
||||
#define CallEnumWindowsProc( func, hwnd, lParam ) \
|
||||
#define CallEnumWindowsProc16( func, hwnd, lParam ) \
|
||||
(*func)( hwnd, lParam )
|
||||
#define CallEnumWindowsProc32( func, hwnd, lParam ) \
|
||||
(*func)( hwnd, lParam )
|
||||
#define CallLineDDAProc( func, xPos, yPos, lParam ) \
|
||||
(*func)( xPos, yPos, lParam )
|
||||
|
@ -123,16 +138,15 @@ extern LONG CallTo32_4( FARPROC32, DWORD, DWORD, DWORD, DWORD );
|
|||
(*func)( code, wParam, lParam )
|
||||
#define CallTimeFuncProc( func, id, msg, dwUser, dw1, dw2 ) \
|
||||
(*func)( id, msg, dwUser, dw1, dw2 )
|
||||
#define CallWindowsExitProc( func, nExitType ) \
|
||||
(*func)( nExitType )
|
||||
#define CallWndProc16( func, ds, hwnd, msg, wParam, lParam ) \
|
||||
(*func)( hwnd, msg, wParam, lParam )
|
||||
#define CallWndProc32( func, hwnd, msg, wParam, lParam ) \
|
||||
(*func)( hwnd, msg, wParam, lParam )
|
||||
#define CallDCHookProc( func, hdc, code, data, lparam ) \
|
||||
(*func)( hdc, code, data, lparam )
|
||||
#define CallWordBreakProc( func, lpch, ichCurrent, cch, code ) \
|
||||
(*func)( lpch, ichCurrent, cch, code )
|
||||
|
||||
|
||||
#endif /* WINELIB */
|
||||
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define CLASS_H
|
||||
|
||||
#include "windows.h"
|
||||
#include "winproc.h"
|
||||
|
||||
#define CLASS_MAGIC ('C' | ('L' << 8) | ('A' << 16) | ('S' << 24))
|
||||
|
||||
|
@ -17,7 +18,7 @@ typedef struct tagCLASS
|
|||
UINT32 magic; /* Magic number */
|
||||
UINT32 cWindows; /* Count of existing windows */
|
||||
UINT32 style; /* Class style */
|
||||
HANDLE32 winproc; /* Window procedure */
|
||||
HWINDOWPROC winproc; /* Window procedure */
|
||||
INT32 cbClsExtra; /* Class extra bytes */
|
||||
INT32 cbWndExtra; /* Window extra bytes */
|
||||
LPSTR menuNameA; /* Default menu name (ASCII string) */
|
||||
|
@ -34,7 +35,7 @@ typedef struct tagCLASS
|
|||
|
||||
extern void CLASS_DumpClass( CLASS *class );
|
||||
extern void CLASS_WalkClasses(void);
|
||||
extern void CLASS_FreeModuleClasses( HMODULE hModule );
|
||||
extern void CLASS_FreeModuleClasses( HMODULE16 hModule );
|
||||
extern CLASS *CLASS_FindClassByAtom( ATOM atom, HINSTANCE16 hinstance );
|
||||
extern CLASS * CLASS_FindClassByName( SEGPTR name, HINSTANCE hinstance );
|
||||
|
||||
|
|
|
@ -61,29 +61,28 @@ enum exec_mode
|
|||
EXEC_STEP_INSTR /* Single-stepping an instruction */
|
||||
};
|
||||
|
||||
extern struct sigcontext_struct *DEBUG_context; /* debugger/registers.c */
|
||||
extern SIGCONTEXT *DEBUG_context; /* debugger/registers.c */
|
||||
extern unsigned int dbg_mode;
|
||||
|
||||
/* debugger/break.c */
|
||||
extern void DEBUG_SetBreakpoints( BOOL set );
|
||||
extern void DEBUG_SetBreakpoints( BOOL32 set );
|
||||
extern int DEBUG_FindBreakpoint( const DBG_ADDR *addr );
|
||||
extern void DEBUG_AddBreakpoint( const DBG_ADDR *addr );
|
||||
extern void DEBUG_DelBreakpoint( int num );
|
||||
extern void DEBUG_EnableBreakpoint( int num, BOOL enable );
|
||||
extern void DEBUG_EnableBreakpoint( int num, BOOL32 enable );
|
||||
extern void DEBUG_InfoBreakpoints(void);
|
||||
extern BOOL DEBUG_HandleTrap( struct sigcontext_struct *context );
|
||||
extern BOOL DEBUG_ShouldContinue( struct sigcontext_struct *context,
|
||||
enum exec_mode mode );
|
||||
extern void DEBUG_RestartExecution( struct sigcontext_struct *context,
|
||||
enum exec_mode mode, int instr_len );
|
||||
extern BOOL32 DEBUG_HandleTrap( SIGCONTEXT *context );
|
||||
extern BOOL32 DEBUG_ShouldContinue( SIGCONTEXT *context, enum exec_mode mode );
|
||||
extern void DEBUG_RestartExecution( SIGCONTEXT *context, enum exec_mode mode,
|
||||
int instr_len );
|
||||
|
||||
/* debugger/db_disasm.c */
|
||||
extern void DEBUG_Disasm( DBG_ADDR *addr );
|
||||
|
||||
/* debugger/hash.c */
|
||||
extern void DEBUG_AddSymbol( const char *name, const DBG_ADDR *addr );
|
||||
extern BOOL DEBUG_GetSymbolValue( const char * name, DBG_ADDR *addr );
|
||||
extern BOOL DEBUG_SetSymbolValue( const char * name, const DBG_ADDR *addr );
|
||||
extern BOOL32 DEBUG_GetSymbolValue( const char * name, DBG_ADDR *addr );
|
||||
extern BOOL32 DEBUG_SetSymbolValue( const char * name, const DBG_ADDR *addr );
|
||||
extern const char * DEBUG_FindNearestSymbol( const DBG_ADDR *addr );
|
||||
extern void DEBUG_ReadSymbolTable( const char * filename );
|
||||
extern void DEBUG_LoadEntryPoints(void);
|
||||
|
@ -95,8 +94,8 @@ extern void DEBUG_Help(void);
|
|||
extern void DEBUG_List( DBG_ADDR *addr, int count );
|
||||
|
||||
/* debugger/memory.c */
|
||||
extern BOOL DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size );
|
||||
extern BOOL DEBUG_IsBadWritePtr( const DBG_ADDR *address, int size );
|
||||
extern BOOL32 DEBUG_IsBadReadPtr( const DBG_ADDR *address, int size );
|
||||
extern BOOL32 DEBUG_IsBadWritePtr( const DBG_ADDR *address, int size );
|
||||
extern int DEBUG_ReadMemory( const DBG_ADDR *address );
|
||||
extern void DEBUG_WriteMemory( const DBG_ADDR *address, int value );
|
||||
extern void DEBUG_ExamineMemory( const DBG_ADDR *addr, int count, char format);
|
||||
|
@ -112,6 +111,6 @@ extern void DEBUG_BackTrace(void);
|
|||
|
||||
/* debugger/dbg.y */
|
||||
extern void DEBUG_EnterDebugger(void);
|
||||
extern void wine_debug( int signal, struct sigcontext_struct * regs );
|
||||
extern void wine_debug( int signal, SIGCONTEXT *regs );
|
||||
|
||||
#endif /* DEBUGGER_H */
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define DIALOG_H
|
||||
|
||||
#include "windows.h"
|
||||
#include "winproc.h"
|
||||
|
||||
/* Dialog info structure.
|
||||
* This structure is stored into the window extra bytes (cbWndExtra).
|
||||
|
@ -15,16 +16,16 @@
|
|||
*/
|
||||
typedef struct
|
||||
{
|
||||
INT32 msgResult; /* Result of EndDialog() / Default button id */
|
||||
HANDLE32 dlgProc; /* Dialog procedure */
|
||||
LONG userInfo; /* User information (for DWL_USER) */
|
||||
HWND hwndFocus; /* Current control with focus */
|
||||
HFONT hUserFont; /* Dialog font */
|
||||
HMENU hMenu; /* Dialog menu */
|
||||
WORD xBaseUnit; /* Dialog units (depends on the font) */
|
||||
WORD yBaseUnit;
|
||||
WORD fEnd; /* EndDialog() called for this dialog */
|
||||
HANDLE hDialogHeap;
|
||||
INT32 msgResult; /* Result of EndDialog() / Default button id */
|
||||
HWINDOWPROC dlgProc; /* Dialog procedure */
|
||||
LONG userInfo; /* User information (for DWL_USER) */
|
||||
HWND hwndFocus; /* Current control with focus */
|
||||
HFONT hUserFont; /* Dialog font */
|
||||
HMENU hMenu; /* Dialog menu */
|
||||
WORD xBaseUnit; /* Dialog units (depends on the font) */
|
||||
WORD yBaseUnit;
|
||||
WORD fEnd; /* EndDialog() called for this dialog */
|
||||
HANDLE hDialogHeap;
|
||||
} DIALOGINFO;
|
||||
|
||||
extern BOOL DIALOG_Init(void);
|
||||
|
|
|
@ -11,7 +11,6 @@ extern int DIR_Init(void);
|
|||
extern UINT DIR_GetWindowsUnixDir( LPSTR path, UINT count );
|
||||
extern UINT DIR_GetSystemUnixDir( LPSTR path, UINT count );
|
||||
extern UINT DIR_GetTempUnixDir( LPSTR path, UINT count );
|
||||
extern UINT DIR_GetTempDosDir( LPSTR path, UINT count );
|
||||
extern UINT DIR_GetDosPath( int element, LPSTR path, UINT count );
|
||||
extern UINT DIR_GetUnixPath( int element, LPSTR path, UINT count );
|
||||
|
||||
|
|
|
@ -37,29 +37,32 @@ typedef struct {
|
|||
LPCSTR lpszDCIAliasName;
|
||||
} DRVCONFIGINFO, *LPDRVCONFIGINFO;
|
||||
|
||||
typedef struct {
|
||||
UINT length;
|
||||
HDRVR hDriver;
|
||||
HINSTANCE hModule;
|
||||
char szAliasName[128];
|
||||
} DRIVERINFOSTRUCT, *LPDRIVERINFOSTRUCT;
|
||||
typedef struct
|
||||
{
|
||||
UINT16 length;
|
||||
HDRVR16 hDriver;
|
||||
HINSTANCE16 hModule;
|
||||
CHAR szAliasName[128];
|
||||
} DRIVERINFOSTRUCT16, *LPDRIVERINFOSTRUCT16;
|
||||
|
||||
typedef struct {
|
||||
DRIVERINFOSTRUCT dis;
|
||||
WORD count;
|
||||
void *lpPrevItem;
|
||||
void *lpNextItem;
|
||||
DRIVERPROC lpDrvProc;
|
||||
typedef struct tagDRIVERITEM
|
||||
{
|
||||
DRIVERINFOSTRUCT16 dis;
|
||||
WORD count;
|
||||
struct tagDRIVERITEM *lpPrevItem;
|
||||
struct tagDRIVERITEM *lpNextItem;
|
||||
DRIVERPROC lpDrvProc;
|
||||
} DRIVERITEM, *LPDRIVERITEM;
|
||||
|
||||
LRESULT DefDriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
HDRVR OpenDriver(LPSTR szDriverName, LPSTR szSectionName, LPARAM lParam2);
|
||||
LRESULT CloseDriver(HDRVR hDriver, LPARAM lParam1, LPARAM lParam2);
|
||||
LRESULT SendDriverMessage(HDRVR hDriver, WORD message, LPARAM lParam1, LPARAM lParam2);
|
||||
HINSTANCE GetDriverModuleHandle(HDRVR hDriver);
|
||||
HDRVR GetNextDriver(HDRVR, DWORD);
|
||||
BOOL GetDriverInfo(HDRVR, DRIVERINFOSTRUCT *);
|
||||
LRESULT DefDriverProc(DWORD dwDevID, HDRVR hDriv, UINT16 wMsg,
|
||||
LPARAM dwParam1, LPARAM dwParam2);
|
||||
HDRVR16 OpenDriver(LPSTR szDriverName, LPSTR szSectionName, LPARAM lParam2);
|
||||
LRESULT CloseDriver(HDRVR16 hDriver, LPARAM lParam1, LPARAM lParam2);
|
||||
LRESULT SendDriverMessage( HDRVR16 hDriver, UINT16 message, LPARAM lParam1,
|
||||
LPARAM lParam2 );
|
||||
HMODULE16 GetDriverModuleHandle(HDRVR16 hDriver);
|
||||
HDRVR16 GetNextDriver(HDRVR16, DWORD);
|
||||
BOOL16 GetDriverInfo(HDRVR16, DRIVERINFOSTRUCT16 *);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -18,8 +18,6 @@ extern int FILE_GetDateTime( HFILE hFile, WORD *pdate, WORD *ptime,
|
|||
extern int FILE_SetDateTime( HFILE hFile, WORD date, WORD time );
|
||||
extern int FILE_Fstat( HFILE hFile, BYTE *pattr, DWORD *psize,
|
||||
WORD *pdate, WORD *ptime );
|
||||
extern int FILE_Unlink( LPCSTR path );
|
||||
extern int FILE_RemoveDir( LPCSTR path );
|
||||
extern HFILE FILE_Dup( HFILE hFile );
|
||||
extern HFILE FILE_Dup2( HFILE hFile1, HFILE hFile2 );
|
||||
extern INT32 FILE_Read( HFILE hFile, LPVOID buffer, UINT32 count );
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
typedef struct tagGDIOBJHDR
|
||||
{
|
||||
HANDLE hNext;
|
||||
HANDLE16 hNext;
|
||||
WORD wMagic;
|
||||
DWORD dwCount;
|
||||
WORD wMetaList;
|
||||
|
@ -86,16 +86,16 @@ typedef struct
|
|||
int flags;
|
||||
DeviceCaps *devCaps;
|
||||
|
||||
HANDLE hMetaFile;
|
||||
HRGN hClipRgn; /* Clip region (may be 0) */
|
||||
HRGN hVisRgn; /* Visible region (must never be 0) */
|
||||
HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
|
||||
HANDLE16 hMetaFile;
|
||||
HRGN16 hClipRgn; /* Clip region (may be 0) */
|
||||
HRGN16 hVisRgn; /* Visible region (must never be 0) */
|
||||
HRGN16 hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */
|
||||
HPEN16 hPen;
|
||||
HBRUSH hBrush;
|
||||
HFONT hFont;
|
||||
HBITMAP hBitmap;
|
||||
HBITMAP hFirstBitmap; /* Bitmap selected at creation of the DC */
|
||||
HANDLE hDevice;
|
||||
HBRUSH16 hBrush;
|
||||
HFONT16 hFont;
|
||||
HBITMAP16 hBitmap;
|
||||
HBITMAP16 hFirstBitmap; /* Bitmap selected at creation of the DC */
|
||||
HANDLE16 hDevice;
|
||||
HPALETTE16 hPalette;
|
||||
|
||||
WORD ROPmode;
|
||||
|
@ -164,8 +164,8 @@ typedef struct
|
|||
/* X physical palette information */
|
||||
typedef struct
|
||||
{
|
||||
HANDLE hMapping; /* Color mapping table (or 0 for identity) */
|
||||
HANDLE hRevMapping; /* Reverse color mapping table */
|
||||
HANDLE16 hMapping; /* Color mapping table (or 0 for identity) */
|
||||
HANDLE16 hRevMapping; /* Reverse color mapping table */
|
||||
WORD mappingSize;
|
||||
} X_PHYSPALETTE;
|
||||
|
||||
|
@ -187,7 +187,7 @@ typedef struct tagDC
|
|||
WORD saveLevel;
|
||||
DWORD dwHookData;
|
||||
FARPROC16 hookProc;
|
||||
HDC hSelf;
|
||||
HDC16 hSelf;
|
||||
WIN_DC_INFO w;
|
||||
union
|
||||
{
|
||||
|
@ -275,10 +275,10 @@ extern WORD GDI_HeapSel;
|
|||
|
||||
#endif /* WINELIB */
|
||||
|
||||
extern BOOL GDI_Init(void);
|
||||
extern HANDLE GDI_AllocObject( WORD, WORD );
|
||||
extern BOOL GDI_FreeObject( HANDLE );
|
||||
extern GDIOBJHDR * GDI_GetObjPtr( HANDLE, WORD );
|
||||
extern BOOL32 GDI_Init(void);
|
||||
extern HANDLE16 GDI_AllocObject( WORD, WORD );
|
||||
extern BOOL32 GDI_FreeObject( HANDLE16 );
|
||||
extern GDIOBJHDR * GDI_GetObjPtr( HANDLE16, WORD );
|
||||
extern FARPROC16 GDI_GetDefDCHook(void);
|
||||
|
||||
extern Display * display;
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
/* Hook data (pointed to by a HHOOK) */
|
||||
typedef struct
|
||||
{
|
||||
HANDLE next; /* 00 Next hook in chain */
|
||||
HOOKPROC proc WINE_PACKED; /* 02 Hook procedure */
|
||||
short id; /* 06 Hook id (WH_xxx) */
|
||||
HQUEUE ownerQueue; /* 08 Owner queue (0 for system hook) */
|
||||
HMODULE ownerModule; /* 0a Owner module */
|
||||
WORD inHookProc; /* 0c TRUE if in this->proc */
|
||||
HANDLE16 next; /* 00 Next hook in chain */
|
||||
HOOKPROC proc WINE_PACKED; /* 02 Hook procedure */
|
||||
short id; /* 06 Hook id (WH_xxx) */
|
||||
HQUEUE16 ownerQueue; /* 08 Owner queue (0 for system hook) */
|
||||
HMODULE16 ownerModule; /* 0a Owner module */
|
||||
WORD inHookProc; /* 0c TRUE if in this->proc */
|
||||
} HOOKDATA;
|
||||
|
||||
#ifndef WINELIB
|
||||
|
@ -35,7 +35,7 @@ typedef struct
|
|||
extern HANDLE HOOK_GetHook( short id , HQUEUE hQueue );
|
||||
extern DWORD HOOK_CallHooks( short id, short code,
|
||||
WPARAM wParam, LPARAM lParam );
|
||||
extern void HOOK_FreeModuleHooks( HMODULE hModule );
|
||||
extern void HOOK_FreeQueueHooks( HQUEUE hQueue );
|
||||
extern void HOOK_FreeModuleHooks( HMODULE16 hModule );
|
||||
extern void HOOK_FreeQueueHooks( HQUEUE16 hQueue );
|
||||
|
||||
#endif /* __WINE_HOOK_H */
|
||||
|
|
|
@ -27,7 +27,7 @@ typedef struct {
|
|||
DWORD InternalHigh;
|
||||
DWORD Offset;
|
||||
DWORD OffsetHigh;
|
||||
HANDLE hEvent;
|
||||
HANDLE32 hEvent;
|
||||
} OVERLAPPED, *LPOVERLAPPED;
|
||||
|
||||
/* Process startup information.
|
||||
|
@ -48,9 +48,9 @@ typedef struct {
|
|||
WORD wShowWindow;
|
||||
WORD cbReserved2;
|
||||
BYTE *lpReserved2;
|
||||
HANDLE hStdInput;
|
||||
HANDLE hStdOutput;
|
||||
HANDLE hStdError;
|
||||
HANDLE32 hStdInput;
|
||||
HANDLE32 hStdOutput;
|
||||
HANDLE32 hStdError;
|
||||
} STARTUPINFO, *LPSTARTUPINFO;
|
||||
|
||||
typedef struct {
|
||||
|
@ -119,6 +119,6 @@ typedef struct
|
|||
#define FILE_ATTRIBUTE_ATOMIC_WRITE 0x0200
|
||||
#define FILE_ATTRIBUTE_XACTION_WRITE 0x0400
|
||||
|
||||
BOOL SetTimeZoneInformation(const TIME_ZONE_INFORMATION*);
|
||||
BOOL32 SetTimeZoneInformation(const TIME_ZONE_INFORMATION*);
|
||||
|
||||
#endif /* __WINE_KERNEL32_H */
|
||||
|
|
|
@ -23,6 +23,6 @@ extern UINT16 LOCAL_Flags( HANDLE16 ds, HLOCAL16 handle );
|
|||
extern UINT16 LOCAL_HeapSize( HANDLE16 ds );
|
||||
extern UINT16 LOCAL_CountFree( HANDLE16 ds );
|
||||
extern LPSTR LOCAL_Lock( HANDLE16 ds, HLOCAL16 handle );
|
||||
extern BOOL LOCAL_Unlock( HANDLE16 ds, HLOCAL16 handle );
|
||||
extern BOOL16 LOCAL_Unlock( HANDLE16 ds, HLOCAL16 handle );
|
||||
|
||||
#endif /* __WINE_LOCAL_H */
|
||||
|
|
|
@ -17,7 +17,7 @@ extern void DOSMEM_FillBiosSegment(void);
|
|||
extern HANDLE DOSMEM_BiosSeg;
|
||||
|
||||
/* miscemu/instr.c */
|
||||
extern BOOL INSTR_EmulateInstruction( struct sigcontext_struct *context );
|
||||
extern BOOL INSTR_EmulateInstruction( SIGCONTEXT *context );
|
||||
|
||||
/* miscemu/interrupts.c */
|
||||
extern BOOL INT_Init(void);
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef struct
|
|||
WORD magic; /* 00 'NE' signature */
|
||||
WORD count; /* 02 Usage count */
|
||||
WORD entry_table; /* 04 Near ptr to entry table */
|
||||
HMODULE next; /* 06 Selector to next module */
|
||||
HMODULE16 next; /* 06 Selector to next module */
|
||||
WORD dgroup_entry; /* 08 Near ptr to segment entry for DGROUP */
|
||||
WORD fileinfo; /* 0a Near ptr to file info (OFSTRUCT) */
|
||||
WORD flags; /* 0c Module flags */
|
||||
|
@ -45,13 +45,13 @@ typedef struct
|
|||
WORD truetype; /* 34 Set to 2 if TrueType font */
|
||||
BYTE os_flags; /* 36 Operating system flags */
|
||||
BYTE misc_flags; /* 37 Misc. flags */
|
||||
HANDLE dlls_to_init; /* 38 List of DLLs to initialize */
|
||||
HANDLE nrname_handle; /* 3a Handle to non-resident name table */
|
||||
HANDLE16 dlls_to_init; /* 38 List of DLLs to initialize */
|
||||
HANDLE16 nrname_handle; /* 3a Handle to non-resident name table */
|
||||
WORD min_swap_area; /* 3c Min. swap area size */
|
||||
WORD expected_version; /* 3e Expected Windows version */
|
||||
/* From here, these are extra fields not present in normal Windows */
|
||||
PE_MODULE *pe_module; /* 40 PE module handle for Win32 modules */
|
||||
HMODULE self; /* 44 Handle for this module */
|
||||
HMODULE16 self; /* 44 Handle for this module */
|
||||
WORD self_loading_sel; /* 46 Selector used for self-loading apps. */
|
||||
} NE_MODULE;
|
||||
|
||||
|
@ -59,11 +59,11 @@ typedef struct
|
|||
/* In-memory segment table */
|
||||
typedef struct
|
||||
{
|
||||
WORD filepos; /* Position in file, in sectors */
|
||||
WORD size; /* Segment size on disk */
|
||||
WORD flags; /* Segment flags */
|
||||
WORD minsize; /* Min. size of segment in memory */
|
||||
HANDLE selector; /* Selector of segment in memory */
|
||||
WORD filepos; /* Position in file, in sectors */
|
||||
WORD size; /* Segment size on disk */
|
||||
WORD flags; /* Segment flags */
|
||||
WORD minsize; /* Min. size of segment in memory */
|
||||
HANDLE16 selector; /* Selector of segment in memory */
|
||||
} SEGTABLEENTRY;
|
||||
|
||||
|
||||
|
@ -71,27 +71,27 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
WORD version; /* Must be 0xA0 */
|
||||
WORD reserved;
|
||||
FARPROC BootApp; /* startup procedure */
|
||||
FARPROC LoadAppSeg; /* procedure to load a segment */
|
||||
FARPROC reserved2;
|
||||
FARPROC MyAlloc; /* memory allocation procedure,
|
||||
* wine must write this field */
|
||||
FARPROC EntryAddrProc;
|
||||
FARPROC ExitProc; /* exit procedure */
|
||||
WORD reserved3[4];
|
||||
FARPROC SetOwner; /* Set Owner procedure, exported by wine */
|
||||
WORD version; /* Must be 0xA0 */
|
||||
WORD reserved;
|
||||
FARPROC16 BootApp; /* startup procedure */
|
||||
FARPROC16 LoadAppSeg; /* procedure to load a segment */
|
||||
FARPROC16 reserved2;
|
||||
FARPROC16 MyAlloc; /* memory allocation procedure,
|
||||
* wine must write this field */
|
||||
FARPROC16 EntryAddrProc;
|
||||
FARPROC16 ExitProc; /* exit procedure */
|
||||
WORD reserved3[4];
|
||||
FARPROC16 SetOwner; /* Set Owner procedure, exported by wine */
|
||||
} SELFLOADHEADER;
|
||||
|
||||
/* Parameters for LoadModule() */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HANDLE hEnvironment; /* Environment segment */
|
||||
SEGPTR cmdLine; /* Command-line */
|
||||
SEGPTR showCmd; /* Code for ShowWindow() */
|
||||
SEGPTR reserved;
|
||||
HANDLE16 hEnvironment; /* Environment segment */
|
||||
SEGPTR cmdLine; /* Command-line */
|
||||
SEGPTR showCmd; /* Code for ShowWindow() */
|
||||
SEGPTR reserved;
|
||||
} LOADPARAMS;
|
||||
|
||||
/* Resource types */
|
||||
|
@ -116,30 +116,31 @@ typedef struct resource_nameinfo_s NE_NAMEINFO;
|
|||
#endif
|
||||
|
||||
/* module.c */
|
||||
extern NE_MODULE *MODULE_GetPtr( HMODULE hModule );
|
||||
extern void MODULE_DumpModule( HMODULE hmodule );
|
||||
extern NE_MODULE *MODULE_GetPtr( HMODULE16 hModule );
|
||||
extern void MODULE_DumpModule( HMODULE16 hmodule );
|
||||
extern void MODULE_WalkModules(void);
|
||||
extern int MODULE_OpenFile( HMODULE hModule );
|
||||
extern LPSTR MODULE_GetModuleName( HMODULE hModule );
|
||||
extern int MODULE_OpenFile( HMODULE16 hModule );
|
||||
extern LPSTR MODULE_GetModuleName( HMODULE16 hModule );
|
||||
extern void MODULE_RegisterModule( NE_MODULE *pModule );
|
||||
extern HINSTANCE MODULE_GetInstance( HMODULE hModule );
|
||||
extern WORD MODULE_GetOrdinal( HMODULE hModule, const char *name );
|
||||
extern SEGPTR MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal );
|
||||
extern BOOL MODULE_SetEntryPoint( HMODULE hModule, WORD ordinal, WORD offset );
|
||||
extern HINSTANCE16 MODULE_GetInstance( HMODULE16 hModule );
|
||||
extern WORD MODULE_GetOrdinal( HMODULE16 hModule, const char *name );
|
||||
extern SEGPTR MODULE_GetEntryPoint( HMODULE16 hModule, WORD ordinal );
|
||||
extern BOOL16 MODULE_SetEntryPoint( HMODULE16 hModule, WORD ordinal,
|
||||
WORD offset );
|
||||
extern FARPROC16 MODULE_GetWndProcEntry16( const char *name );
|
||||
|
||||
/* builtin.c */
|
||||
extern BOOL BUILTIN_Init(void);
|
||||
extern HMODULE BUILTIN_LoadModule( LPCSTR name, BOOL force );
|
||||
extern BOOL16 BUILTIN_Init(void);
|
||||
extern HMODULE16 BUILTIN_LoadModule( LPCSTR name, BOOL16 force );
|
||||
extern NE_MODULE *BUILTIN_GetEntryPoint( WORD cs, WORD ip,
|
||||
WORD *pOrd, char **ppName );
|
||||
extern DWORD BUILTIN_GetProcAddress32( NE_MODULE *pModule, char *function );
|
||||
extern BOOL BUILTIN_ParseDLLOptions( const char *str );
|
||||
extern BOOL16 BUILTIN_ParseDLLOptions( const char *str );
|
||||
extern void BUILTIN_PrintDLLs(void);
|
||||
|
||||
/* ne_image.c */
|
||||
extern BOOL NE_LoadSegment( HMODULE hModule, WORD segnum );
|
||||
extern BOOL16 NE_LoadSegment( HMODULE16 hModule, WORD segnum );
|
||||
extern void NE_FixupPrologs( NE_MODULE *pModule );
|
||||
extern void NE_InitializeDLLs( HMODULE hModule );
|
||||
extern void NE_InitializeDLLs( HMODULE16 hModule );
|
||||
|
||||
#endif /* _WINE_MODULE_H */
|
||||
|
|
|
@ -19,7 +19,7 @@ struct pe_data {
|
|||
|
||||
typedef struct pe_data PE_MODULE;
|
||||
|
||||
extern int PE_unloadImage(HMODULE hModule);
|
||||
extern int PE_unloadImage(HMODULE32 hModule);
|
||||
extern void my_wcstombs(char * result, u_short * source, int len);
|
||||
|
||||
#endif /* __WINE_PE_IMAGE_H */
|
||||
|
|
|
@ -54,8 +54,8 @@ typedef struct tagMESSAGEQUEUE
|
|||
WORD wakeBits; /* 44 Queue wake-up bits */
|
||||
WORD wakeMask; /* 46 Queue wake-up mask */
|
||||
WORD SendMsgReturnPtrs[3]; /* 48 Near ptr to return values (?) */
|
||||
HANDLE hCurHook; /* 4e Current hook */
|
||||
HANDLE hooks[WH_NB_HOOKS]; /* 50 Task hooks list */
|
||||
HANDLE16 hCurHook; /* 4e Current hook */
|
||||
HANDLE16 hooks[WH_NB_HOOKS]; /* 50 Task hooks list */
|
||||
WORD reserved4[3]; /* 68 Unknown */
|
||||
QMSG messages[1]; /* 6e Queue messages */
|
||||
} MESSAGEQUEUE;
|
||||
|
|
|
@ -17,7 +17,7 @@ typedef struct
|
|||
} RGNOBJ;
|
||||
|
||||
|
||||
extern BOOL REGION_DeleteObject( HRGN hrgn, RGNOBJ * obj );
|
||||
extern BOOL REGION_FrameRgn( HRGN dest, HRGN src, INT32 x, INT32 y );
|
||||
extern BOOL16 REGION_DeleteObject( HRGN32 hrgn, RGNOBJ * obj );
|
||||
extern BOOL16 REGION_FrameRgn( HRGN32 dest, HRGN32 src, INT32 x, INT32 y );
|
||||
|
||||
#endif /* __WINE_REGION_H */
|
||||
|
|
|
@ -62,9 +62,6 @@
|
|||
#define IP_reg(context) (*(WORD*)(&(context)->sc_eip))
|
||||
#define SP_reg(context) (*(WORD*)(&(context)->sc_esp))
|
||||
|
||||
#define SET_CFLAG(context) (EFL_reg(context) |= 0x0001)
|
||||
#define RESET_CFLAG(context) (EFL_reg(context) &= 0xfffffffe)
|
||||
|
||||
#else /* __svr4__ || _SCO_DS */
|
||||
|
||||
#ifdef _SCO_DS
|
||||
|
@ -123,9 +120,9 @@
|
|||
#define SP_reg(context) (*(WORD*)(&(context)->uc_mcontext.gregs[ESP]))
|
||||
#endif
|
||||
|
||||
#endif /* __svr4__ || _SCO_DS */
|
||||
|
||||
#define SET_CFLAG(context) (EFL_reg(context) |= 0x0001)
|
||||
#define RESET_CFLAG(context) (EFL_reg(context) &= 0xfffffffe)
|
||||
|
||||
#endif /* __svr4__ || _SCO_DS */
|
||||
|
||||
#endif /* __WINE_REGISTERS_H */
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
#include "ldt.h"
|
||||
|
||||
extern WORD SELECTOR_AllocBlock( const void *base, DWORD size,
|
||||
enum seg_type type, BOOL is32bit,
|
||||
BOOL readonly );
|
||||
enum seg_type type, BOOL32 is32bit,
|
||||
BOOL32 readonly );
|
||||
extern WORD SELECTOR_ReallocBlock( WORD sel, const void *base, DWORD size,
|
||||
enum seg_type type, BOOL is32bit,
|
||||
BOOL readonly );
|
||||
enum seg_type type, BOOL32 is32bit,
|
||||
BOOL32 readonly );
|
||||
|
||||
#endif /* __WINE_SELECTORS_H */
|
||||
|
|
|
@ -13,10 +13,6 @@
|
|||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
|
||||
extern BOOL TASK_Init(void);
|
||||
extern void TASK_KillCurrentTask( int exitCode );
|
||||
|
||||
/* Process database (i.e. a normal DOS PSP) */
|
||||
|
||||
typedef struct
|
||||
|
@ -115,8 +111,10 @@ typedef struct
|
|||
#pragma pack(4)
|
||||
#endif
|
||||
|
||||
extern BOOL TASK_Init(void);
|
||||
extern HTASK TASK_CreateTask( HMODULE hModule, HANDLE hInstance,
|
||||
HANDLE hPrevInstance, HANDLE hEnvironment,
|
||||
char *cmdLine, WORD cmdShow );
|
||||
extern void TASK_KillCurrentTask( int exitCode );
|
||||
|
||||
#endif /* _WINE_TASK_H */
|
||||
|
|
|
@ -20,19 +20,19 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwSize;
|
||||
DWORD dwAddress;
|
||||
DWORD dwBlockSize;
|
||||
HGLOBAL hBlock;
|
||||
WORD wcLock;
|
||||
WORD wcPageLock;
|
||||
WORD wFlags;
|
||||
BOOL wHeapPresent;
|
||||
HGLOBAL hOwner;
|
||||
WORD wType;
|
||||
WORD wData;
|
||||
DWORD dwNext;
|
||||
DWORD dwNextAlt;
|
||||
DWORD dwSize;
|
||||
DWORD dwAddress;
|
||||
DWORD dwBlockSize;
|
||||
HGLOBAL16 hBlock;
|
||||
WORD wcLock;
|
||||
WORD wcPageLock;
|
||||
WORD wFlags;
|
||||
BOOL16 wHeapPresent;
|
||||
HGLOBAL16 hOwner;
|
||||
WORD wType;
|
||||
WORD wData;
|
||||
DWORD dwNext;
|
||||
DWORD dwNextAlt;
|
||||
} GLOBALENTRY;
|
||||
|
||||
/* GlobalFirst()/GlobalNext() flags */
|
||||
|
@ -74,11 +74,11 @@ typedef struct
|
|||
/* wFlags values */
|
||||
#define GF_PDB_OWNER 0x0100 /* Low byte is KERNEL flags */
|
||||
|
||||
BOOL GlobalInfo( GLOBALINFO *pInfo );
|
||||
BOOL GlobalFirst( GLOBALENTRY *pGlobal, WORD wFlags );
|
||||
BOOL GlobalNext( GLOBALENTRY *pGlobal, WORD wFlags) ;
|
||||
BOOL GlobalEntryHandle( GLOBALENTRY *pGlobal, HGLOBAL16 hItem );
|
||||
BOOL GlobalEntryModule( GLOBALENTRY *pGlobal, HMODULE16 hModule, WORD wSeg );
|
||||
BOOL16 GlobalInfo( GLOBALINFO *pInfo );
|
||||
BOOL16 GlobalFirst( GLOBALENTRY *pGlobal, WORD wFlags );
|
||||
BOOL16 GlobalNext( GLOBALENTRY *pGlobal, WORD wFlags) ;
|
||||
BOOL16 GlobalEntryHandle( GLOBALENTRY *pGlobal, HGLOBAL16 hItem );
|
||||
BOOL16 GlobalEntryModule( GLOBALENTRY *pGlobal, HMODULE16 hModule, WORD wSeg );
|
||||
|
||||
/* Local heap */
|
||||
|
||||
|
@ -152,55 +152,55 @@ typedef struct
|
|||
#define LT_USER_HANDLETABLE 32
|
||||
#define LT_USER_MAX LT_USER_HANDLETABLE
|
||||
|
||||
BOOL LocalInfo( LOCALINFO *pLocalInfo, HGLOBAL handle );
|
||||
BOOL LocalFirst( LOCALENTRY *pLocalEntry, HGLOBAL handle );
|
||||
BOOL LocalNext( LOCALENTRY *pLocalEntry );
|
||||
BOOL16 LocalInfo( LOCALINFO *pLocalInfo, HGLOBAL16 handle );
|
||||
BOOL16 LocalFirst( LOCALENTRY *pLocalEntry, HGLOBAL16 handle );
|
||||
BOOL16 LocalNext( LOCALENTRY *pLocalEntry );
|
||||
|
||||
|
||||
/* modules */
|
||||
|
||||
typedef struct {
|
||||
DWORD dwSize;
|
||||
char szModule[MAX_MODULE_NAME + 1];
|
||||
HMODULE hModule;
|
||||
WORD wcUsage;
|
||||
char szExePath[MAX_PATH + 1];
|
||||
HANDLE wNext;
|
||||
} MODULEENTRY;
|
||||
typedef MODULEENTRY *LPMODULEENTRY;
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwSize;
|
||||
char szModule[MAX_MODULE_NAME + 1];
|
||||
HMODULE16 hModule;
|
||||
WORD wcUsage;
|
||||
char szExePath[MAX_PATH + 1];
|
||||
HANDLE16 wNext;
|
||||
} MODULEENTRY, *LPMODULEENTRY;
|
||||
|
||||
BOOL ModuleFirst(MODULEENTRY *lpModule);
|
||||
BOOL ModuleNext(MODULEENTRY *lpModule);
|
||||
BOOL ModuleFindName(MODULEENTRY *lpModule, LPCSTR lpstrName);
|
||||
BOOL ModuleFindHandle(MODULEENTRY *lpModule, HMODULE hModule);
|
||||
BOOL16 ModuleFirst(MODULEENTRY *lpModule);
|
||||
BOOL16 ModuleNext(MODULEENTRY *lpModule);
|
||||
BOOL16 ModuleFindName(MODULEENTRY *lpModule, LPCSTR lpstrName);
|
||||
BOOL16 ModuleFindHandle(MODULEENTRY *lpModule, HMODULE16 hModule);
|
||||
|
||||
/* tasks */
|
||||
|
||||
typedef struct tagTASKENTRY {
|
||||
DWORD dwSize;
|
||||
HTASK hTask;
|
||||
HTASK hTaskParent;
|
||||
HINSTANCE hInst;
|
||||
HMODULE hModule;
|
||||
WORD wSS;
|
||||
WORD wSP;
|
||||
WORD wStackTop;
|
||||
WORD wStackMinimum;
|
||||
WORD wStackBottom;
|
||||
WORD wcEvents;
|
||||
HGLOBAL hQueue;
|
||||
char szModule[MAX_MODULE_NAME + 1];
|
||||
WORD wPSPOffset;
|
||||
HANDLE hNext;
|
||||
} TASKENTRY;
|
||||
typedef TASKENTRY *LPTASKENTRY;
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwSize;
|
||||
HTASK16 hTask;
|
||||
HTASK16 hTaskParent;
|
||||
HINSTANCE16 hInst;
|
||||
HMODULE16 hModule;
|
||||
WORD wSS;
|
||||
WORD wSP;
|
||||
WORD wStackTop;
|
||||
WORD wStackMinimum;
|
||||
WORD wStackBottom;
|
||||
WORD wcEvents;
|
||||
HGLOBAL16 hQueue;
|
||||
char szModule[MAX_MODULE_NAME + 1];
|
||||
WORD wPSPOffset;
|
||||
HANDLE16 hNext;
|
||||
} TASKENTRY, *LPTASKENTRY;
|
||||
|
||||
BOOL TaskFirst(LPTASKENTRY lpTask);
|
||||
BOOL TaskNext(LPTASKENTRY lpTask);
|
||||
BOOL TaskFindHandle(LPTASKENTRY lpTask, HTASK hTask);
|
||||
DWORD TaskSetCSIP(HTASK hTask, WORD wCS, WORD wIP);
|
||||
DWORD TaskGetCSIP(HTASK hTask);
|
||||
BOOL TaskSwitch(HTASK hTask, DWORD dwNewCSIP);
|
||||
BOOL16 TaskFirst(LPTASKENTRY lpTask);
|
||||
BOOL16 TaskNext(LPTASKENTRY lpTask);
|
||||
BOOL16 TaskFindHandle(LPTASKENTRY lpTask, HTASK16 hTask);
|
||||
DWORD TaskSetCSIP(HTASK16 hTask, WORD wCS, WORD wIP);
|
||||
DWORD TaskGetCSIP(HTASK16 hTask);
|
||||
BOOL16 TaskSwitch(HTASK16 hTask, DWORD dwNewCSIP);
|
||||
|
||||
/* mem info */
|
||||
|
||||
|
@ -221,15 +221,15 @@ typedef MEMMANINFO *LPMEMMANINFO;
|
|||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwSize;
|
||||
WORD wUserFreePercent;
|
||||
WORD wGDIFreePercent;
|
||||
HGLOBAL hUserSegment;
|
||||
HGLOBAL hGDISegment;
|
||||
DWORD dwSize;
|
||||
WORD wUserFreePercent;
|
||||
WORD wGDIFreePercent;
|
||||
HGLOBAL16 hUserSegment;
|
||||
HGLOBAL16 hGDISegment;
|
||||
} SYSHEAPINFO;
|
||||
|
||||
BOOL MemManInfo(LPMEMMANINFO lpEnhMode);
|
||||
BOOL SystemHeapInfo( SYSHEAPINFO *pHeapInfo );
|
||||
BOOL16 MemManInfo(LPMEMMANINFO lpEnhMode);
|
||||
BOOL16 SystemHeapInfo( SYSHEAPINFO *pHeapInfo );
|
||||
|
||||
/* timer info */
|
||||
|
||||
|
@ -239,20 +239,20 @@ typedef struct tagTIMERINFO {
|
|||
DWORD dwmsThisVM;
|
||||
} TIMERINFO;
|
||||
|
||||
BOOL TimerCount( TIMERINFO *pTimerInfo );
|
||||
BOOL16 TimerCount( TIMERINFO *pTimerInfo );
|
||||
|
||||
/* Window classes */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwSize;
|
||||
HMODULE hInst; /* This is really an hModule */
|
||||
HMODULE16 hInst; /* This is really an hModule */
|
||||
char szClassName[MAX_CLASSNAME + 1];
|
||||
HANDLE wNext;
|
||||
HANDLE16 wNext;
|
||||
} CLASSENTRY;
|
||||
|
||||
BOOL ClassFirst( CLASSENTRY *pClassEntry );
|
||||
BOOL ClassNext( CLASSENTRY *pClassEntry );
|
||||
BOOL16 ClassFirst( CLASSENTRY *pClassEntry );
|
||||
BOOL16 ClassNext( CLASSENTRY *pClassEntry );
|
||||
|
||||
|
||||
/* Memory read/write */
|
||||
|
@ -267,7 +267,7 @@ DWORD MemoryWrite( WORD sel, DWORD offset, void *buffer, DWORD count );
|
|||
#define NF_TASKSWITCH 1 /* get taskswitch information */
|
||||
#define NF_RIP 2 /* get debugerrors of system */
|
||||
|
||||
BOOL NotifyRegister(HTASK htask,FARPROC lpfnCallback,WORD wFlags);
|
||||
BOOL16 NotifyRegister(HTASK16 htask,FARPROC16 lpfnCallback,WORD wFlags);
|
||||
|
||||
#define NFY_UNKNOWN 0
|
||||
#define NFY_LOADSEG 1
|
||||
|
@ -285,10 +285,10 @@ struct {
|
|||
/* called when loading/starting a DLL */
|
||||
#define NFY_STARTDLL 3
|
||||
struct {
|
||||
DWORD dwSize;
|
||||
HMODULE hModule;
|
||||
WORD wCS;
|
||||
WORD wIP;
|
||||
DWORD dwSize;
|
||||
HMODULE16 hModule;
|
||||
WORD wCS;
|
||||
WORD wIP;
|
||||
} NFYSTARTDLL;
|
||||
|
||||
/* called when starting a task. dwData is CS:IP */
|
||||
|
@ -331,16 +331,16 @@ struct {
|
|||
#define NFY_LOGERROR 12
|
||||
struct {
|
||||
DWORD dwSize;
|
||||
UINT wErrCode;
|
||||
UINT16 wErrCode;
|
||||
VOID *lpInfo; /* depends on wErrCode */
|
||||
} NFYLOGERROR;
|
||||
|
||||
/* called for parameter errors? */
|
||||
#define NFY_LOGPARAMERROR 13
|
||||
struct {
|
||||
DWORD dwSize;
|
||||
UINT wErrCode;
|
||||
FARPROC lpfnErrorAddr;
|
||||
void **lpBadParam;
|
||||
DWORD dwSize;
|
||||
UINT16 wErrCode;
|
||||
FARPROC16 lpfnErrorAddr;
|
||||
void **lpBadParam;
|
||||
} NFYLOGPARAMERROR;
|
||||
#endif /* __TOOLHELP_H */
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include "ldt.h"
|
||||
#include "class.h"
|
||||
#include "winproc.h"
|
||||
|
||||
#define WND_MAGIC 0x444e4957 /* 'WIND' */
|
||||
|
||||
|
@ -34,7 +35,7 @@ typedef struct tagWND
|
|||
struct tagWND *parent; /* Window parent (from CreateWindow) */
|
||||
struct tagWND *owner; /* Window owner */
|
||||
CLASS *class; /* Window class */
|
||||
HANDLE32 winproc; /* Window procedure */
|
||||
HWINDOWPROC winproc; /* Window procedure */
|
||||
DWORD dwMagic; /* Magic number (must be WND_MAGIC) */
|
||||
HWND16 hwndSelf; /* Handle of this window */
|
||||
HINSTANCE16 hInstance; /* Window hInstance (from CreateWindow) */
|
||||
|
@ -71,6 +72,7 @@ typedef struct tagWND
|
|||
#define WIN_NEED_SIZE 0x0040 /* Internal WM_SIZE is needed */
|
||||
#define WIN_NCACTIVATED 0x0080 /* last WM_NCACTIVATE was positive */
|
||||
#define WIN_MANAGED 0x0100 /* Window managed by the X wm */
|
||||
#define WIN_ISDIALOG 0x0200 /* Window is a dialog */
|
||||
|
||||
/* Window functions */
|
||||
extern WND *WIN_FindWndPtr( HWND hwnd );
|
||||
|
@ -86,6 +88,7 @@ extern void WIN_SendParentNotify( HWND hwnd, WORD event,
|
|||
extern BOOL WIN_CreateDesktopWindow(void);
|
||||
extern HWND WIN_GetTopParent( HWND hwnd );
|
||||
extern HINSTANCE WIN_GetWindowInstance( HWND hwnd );
|
||||
extern WND **WIN_BuildWinArray( WND *wndPtr );
|
||||
|
||||
extern void DEFWND_SetText( WND *wndPtr, LPCSTR text ); /* windows/defwnd.c */
|
||||
|
||||
|
|
|
@ -3,14 +3,6 @@
|
|||
|
||||
#include "wintypes.h"
|
||||
|
||||
#ifdef UNICODE
|
||||
#define LoadAccelerators LoadAcceleratorsW
|
||||
#define TranslateAccelat
|
||||
#else
|
||||
#define LoadAccelerators LoadAcceleratorsA
|
||||
#endif
|
||||
|
||||
|
||||
#define INVALID_HANDLE_VALUE ((HANDLE32) -1)
|
||||
|
||||
#define WAIT_FAILED 0xffffffff
|
||||
|
@ -116,8 +108,8 @@ typedef struct {
|
|||
LPVOID DebugInfo;
|
||||
LONG LockCount;
|
||||
LONG RecursionCount;
|
||||
HANDLE OwningThread;
|
||||
HANDLE LockSemaphore;
|
||||
HANDLE32 OwningThread;
|
||||
HANDLE32 LockSemaphore;
|
||||
DWORD Reserved;
|
||||
}CRITICAL_SECTION;
|
||||
|
||||
|
@ -150,36 +142,16 @@ BOOL32 GetVersionEx32A(OSVERSIONINFO32A*);
|
|||
BOOL32 GetVersionEx32W(OSVERSIONINFO32W*);
|
||||
#define GetVersionEx WINELIB_NAME_AW(GetVersionEx)
|
||||
|
||||
int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);
|
||||
|
||||
#define GMEM_FIXED 0x0000
|
||||
#define GMEM_MOVEABLE 0x0002
|
||||
|
||||
HACCEL32 LoadAcceleratorsA( HINSTANCE, const char *);
|
||||
#define FreeModule(hLibModule) FreeLibrary((hLibModule))
|
||||
#define MakeProcInstance(lpProc,hInstance) (lpProc)
|
||||
#define FreeProcInstance(lpProc) (lpProc)
|
||||
/*int WinMain(HINSTANCE, HINSTANCE prev, char *cmd, int show);*/
|
||||
|
||||
HACCEL32 LoadAcceleratorsA( HINSTANCE32, const char *);
|
||||
|
||||
void DeleteCriticalSection(CRITICAL_SECTION *lpCrit);
|
||||
void EnterCriticalSection(CRITICAL_SECTION *lpCrit);
|
||||
int GetCurrentProcessId(void);
|
||||
HANDLE32 GetProcessHeap(void);
|
||||
LPVOID HeapAlloc(HANDLE32,DWORD,DWORD);
|
||||
DWORD HeapCompact(HANDLE32,DWORD);
|
||||
HANDLE32 HeapCreate(DWORD,DWORD,DWORD);
|
||||
BOOL HeapDestroy(HANDLE32);
|
||||
BOOL HeapFree(HANDLE32,DWORD,LPVOID);
|
||||
BOOL HeapLock(HANDLE32);
|
||||
LPVOID HeapReAlloc(HANDLE32,DWORD,LPVOID,DWORD);
|
||||
DWORD HeapSize(HANDLE32,DWORD,LPVOID);
|
||||
BOOL HeapUnlock(HANDLE32);
|
||||
BOOL HeapValidate(HANDLE32,DWORD,LPVOID);
|
||||
void InitializeCriticalSection(CRITICAL_SECTION *lpCrit);
|
||||
void LeaveCriticalSection(CRITICAL_SECTION *lpCrit);
|
||||
HANDLE OpenProcess(DWORD access, BOOL inherit, DWORD id);
|
||||
int TerminateProcess(HANDLE h, int ret);
|
||||
LPVOID VirtualAlloc(LPVOID addr,DWORD size,DWORD type,DWORD protect);
|
||||
BOOL VirtualFree( LPVOID addr, DWORD size, DWORD type );
|
||||
HANDLE32 OpenProcess(DWORD access, BOOL32 inherit, DWORD id);
|
||||
int TerminateProcess(HANDLE32 h, int ret);
|
||||
|
||||
#endif /* __WINE_WINBASE_H */
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
/* Initial draft attempt of windows.h, by Peter MacDonald, pmacdona@sanjuan.uvic.ca */
|
||||
|
||||
#ifndef __WINE_WINDOWS_H
|
||||
#define __WINE_WINDOWS_H
|
||||
|
||||
|
@ -478,6 +476,10 @@ DECL_WINELIB_TYPE(LPNCCALCSIZE_PARAMS);
|
|||
#define MSGF_MAINLOOP 8
|
||||
#define MSGF_USER 4096
|
||||
|
||||
/* Windows Exit Procedure flag values */
|
||||
#define WEP_FREE_DLL 0
|
||||
#define WEP_SYSTEM_EXIT 1
|
||||
|
||||
/* Journalling hook structure */
|
||||
|
||||
typedef struct
|
||||
|
@ -3145,8 +3147,13 @@ typedef struct _SYSTEM_POWER_STATUS
|
|||
|
||||
/* Declarations for functions that exist only in Win16 */
|
||||
|
||||
WORD AllocSelector(WORD);
|
||||
WORD AllocSelectorArray(WORD);
|
||||
VOID FillWindow(HWND16,HWND16,HDC16,HBRUSH16);
|
||||
WORD FreeSelector(WORD);
|
||||
DWORD GetBitmapDimension(HBITMAP16);
|
||||
HTASK16 GetCurrentTask(void);
|
||||
BOOL16 LocalInit(HANDLE16,WORD,WORD);
|
||||
DWORD OffsetViewportOrg(HDC16,INT16,INT16);
|
||||
DWORD OffsetWindowOrg(HDC16,INT16,INT16);
|
||||
VOID PaintRect(HWND16,HWND16,HDC16,HBRUSH16,const RECT16*);
|
||||
|
@ -3161,15 +3168,38 @@ VOID hmemcpy(LPVOID,LPCVOID,LONG);
|
|||
|
||||
/* Declarations for functions that exist only in Win32 */
|
||||
|
||||
BOOL32 Beep(DWORD,DWORD);
|
||||
BOOL32 EnumThreadWindows(DWORD,WNDENUMPROC32,LPARAM);
|
||||
BOOL32 FlushFileBuffers(HFILE);
|
||||
DWORD GetLogicalDrives(void);
|
||||
HANDLE32 GetProcessHeap(void);
|
||||
LPVOID HeapAlloc(HANDLE32,DWORD,DWORD);
|
||||
DWORD HeapCompact(HANDLE32,DWORD);
|
||||
HANDLE32 HeapCreate(DWORD,DWORD,DWORD);
|
||||
BOOL32 HeapDestroy(HANDLE32);
|
||||
BOOL32 HeapFree(HANDLE32,DWORD,LPVOID);
|
||||
BOOL32 HeapLock(HANDLE32);
|
||||
LPVOID HeapReAlloc(HANDLE32,DWORD,LPVOID,DWORD);
|
||||
DWORD HeapSize(HANDLE32,DWORD,LPVOID);
|
||||
BOOL32 HeapUnlock(HANDLE32);
|
||||
BOOL32 HeapValidate(HANDLE32,DWORD,LPVOID);
|
||||
VOID RtlFillMemory(LPVOID,UINT32,UINT32);
|
||||
VOID RtlMoveMemory(LPVOID,LPCVOID,UINT32);
|
||||
VOID RtlZeroMemory(LPVOID,UINT32);
|
||||
LPVOID VirtualAlloc(LPVOID,DWORD,DWORD,DWORD);
|
||||
BOOL32 VirtualFree(LPVOID,DWORD,DWORD);
|
||||
|
||||
/* Declarations for functions that are the same in Win16 and Win32 */
|
||||
|
||||
INT16 CombineRgn(HRGN32,HRGN32,HRGN32,INT32);
|
||||
HBITMAP16 CreateBitmap(INT32,INT32,UINT32,UINT32,LPCVOID);
|
||||
HBITMAP16 CreateCompatibleBitmap(HDC32,INT32,INT32);
|
||||
HBITMAP16 CreateDiscardableBitmap(HDC32,INT32,INT32);
|
||||
HRGN16 CreateEllipticRgn(INT32,INT32,INT32,INT32);
|
||||
HRGN16 CreateRectRgn(INT32,INT32,INT32,INT32);
|
||||
HRGN16 CreateRoundRectRgn(INT32,INT32,INT32,INT32,INT32,INT32);
|
||||
BOOL16 EndDialog(HWND32,INT32);
|
||||
BOOL16 EqualRgn(HRGN32,HRGN32);
|
||||
INT16 ExcludeUpdateRgn(HDC32,HWND32);
|
||||
DWORD GetAppCompatFlags(HTASK32);
|
||||
LONG GetBitmapBits(HBITMAP32,LONG,LPVOID);
|
||||
|
@ -3177,10 +3207,14 @@ WORD GetClassWord(HWND32,INT32);
|
|||
INT16 GetUpdateRgn(HWND32,HRGN32,BOOL32);
|
||||
WORD GetWindowWord(HWND32,INT32);
|
||||
INT16 OffsetRgn(HRGN32,INT32,INT32);
|
||||
BOOL16 PtInRegion(HRGN32,INT32,INT32);
|
||||
DWORD RegCloseKey(HKEY);
|
||||
DWORD RegFlushKey(HKEY);
|
||||
LONG SetBitmapBits(HBITMAP32,LONG,LPCVOID);
|
||||
WORD SetClassWord(HWND32,INT32,WORD);
|
||||
INT16 SetDIBits(HDC32,HBITMAP32,UINT32,UINT32,LPCVOID,const BITMAPINFO*,UINT32);
|
||||
INT16 SetDIBitsToDevice(HDC32,INT32,INT32,DWORD,DWORD,INT32,INT32,UINT32,UINT32,LPCVOID,const BITMAPINFO*,UINT32);
|
||||
VOID SetRectRgn(HRGN32,INT32,INT32,INT32,INT32);
|
||||
WORD SetWindowWord(HWND32,INT32,WORD);
|
||||
|
||||
/* Declarations for functions that change between Win16 and Win32 */
|
||||
|
@ -3287,6 +3321,10 @@ LRESULT DefWindowProc16(HWND16,UINT16,WPARAM16,LPARAM);
|
|||
LRESULT DefWindowProc32A(HWND32,UINT32,WPARAM32,LPARAM);
|
||||
LRESULT DefWindowProc32W(HWND32,UINT32,WPARAM32,LPARAM);
|
||||
#define DefWindowProc WINELIB_NAME_AW(DefWindowProc)
|
||||
BOOL16 DeleteFile16(LPCSTR);
|
||||
BOOL32 DeleteFile32A(LPCSTR);
|
||||
BOOL32 DeleteFile32W(LPCWSTR);
|
||||
#define DeleteFile WINELIB_NAME_AW(DeleteFile)
|
||||
INT16 DialogBox16(HINSTANCE16,SEGPTR,HWND16,DLGPROC16);
|
||||
#define DialogBox32A(inst,template,owner,func) \
|
||||
DialogBoxParam32A(inst,template,owner,func,0)
|
||||
|
@ -3324,6 +3362,16 @@ INT32 DrawText32W(HDC32,LPCWSTR,INT32,LPRECT32,UINT32);
|
|||
BOOL16 EndPaint16(HWND16,const PAINTSTRUCT16*);
|
||||
BOOL32 EndPaint32(HWND32,const PAINTSTRUCT32*);
|
||||
#define EndPaint WINELIB_NAME(EndPaint)
|
||||
BOOL16 EnumChildWindows16(HWND16,WNDENUMPROC16,LPARAM);
|
||||
BOOL32 EnumChildWindows32(HWND32,WNDENUMPROC32,LPARAM);
|
||||
#define EnumChildWindows WINELIB_NAME(EnumChildWindows)
|
||||
BOOL16 EnumTaskWindows16(HTASK16,WNDENUMPROC16,LPARAM);
|
||||
#define EnumTaskWindows32(handle,proc,lparam) \
|
||||
EnumThreadWindows(handle,proc,lparam)
|
||||
#define EnumTaskWindows WINELIB_NAME(EnumTaskWindows)
|
||||
BOOL16 EnumWindows16(WNDENUMPROC16,LPARAM);
|
||||
BOOL32 EnumWindows32(WNDENUMPROC32,LPARAM);
|
||||
#define EnumWindows WINELIB_NAME(EnumWindows)
|
||||
BOOL16 EqualRect16(const RECT16*,const RECT16*);
|
||||
BOOL32 EqualRect32(const RECT32*,const RECT32*);
|
||||
#define EqualRect WINELIB_NAME(EqualRect)
|
||||
|
@ -3345,6 +3393,12 @@ HWND32 FindWindowEx32W(HWND32,HWND32,LPCWSTR,LPCWSTR);
|
|||
INT16 FrameRect16(HDC16,const RECT16*,HBRUSH16);
|
||||
INT32 FrameRect32(HDC32,const RECT32*,HBRUSH32);
|
||||
#define FrameRect WINELIB_NAME(FrameRect)
|
||||
BOOL16 FreeModule16(HMODULE16);
|
||||
#define FreeModule32(handle) FreeLibrary32(handle)
|
||||
#define FreeModule WINELIB_NAME(FreeModule)
|
||||
void FreeProcInstance16(FARPROC16);
|
||||
#define FreeProcInstance32(proc) (proc)
|
||||
#define FreeProcInstance WINELIB_NAME(FreeProcInstance)
|
||||
BOOL16 GetBitmapDimensionEx16(HBITMAP16,LPSIZE16);
|
||||
BOOL32 GetBitmapDimensionEx32(HBITMAP32,LPSIZE32);
|
||||
#define GetBitmapDimensionEx WINELIB_NAME(GetBitmapDimensionEx)
|
||||
|
@ -3379,6 +3433,10 @@ INT32 GetClipBox32(HDC32,LPRECT32);
|
|||
void GetClipCursor16(LPRECT16);
|
||||
void GetClipCursor32(LPRECT32);
|
||||
#define GetClipCursor WINELIB_NAME(GetClipCursor)
|
||||
UINT16 GetCurrentDirectory16(UINT16,LPSTR);
|
||||
UINT32 GetCurrentDirectory32A(UINT32,LPSTR);
|
||||
UINT32 GetCurrentDirectory32W(UINT32,LPWSTR);
|
||||
#define GetCurrentDirectory WINELIB_NAME_AW(GetCurrentDirectory)
|
||||
BOOL16 GetCurrentPositionEx16(HDC16,LPPOINT16);
|
||||
BOOL32 GetCurrentPositionEx32(HDC32,LPPOINT32);
|
||||
#define GetCurrentPositionEx WINELIB_NAME(GetCurrentPositionEx)
|
||||
|
@ -3393,6 +3451,10 @@ INT16 GetDlgItemText16(HWND16,INT16,SEGPTR,UINT16);
|
|||
INT32 GetDlgItemText32A(HWND32,INT32,LPSTR,UINT32);
|
||||
INT32 GetDlgItemText32W(HWND32,INT32,LPWSTR,UINT32);
|
||||
#define GetDlgItemText WINELIB_NAME_AW(GetDlgItemText)
|
||||
UINT16 GetDriveType16(UINT16); /* yes, the arguments differ */
|
||||
UINT32 GetDriveType32A(LPCSTR);
|
||||
UINT32 GetDriveType32W(LPCWSTR);
|
||||
#define GetDriveType WINELIB_NAME_AW(GetDriveType)
|
||||
UINT16 GetInternalWindowPos16(HWND16,LPRECT16,LPPOINT16);
|
||||
UINT32 GetInternalWindowPos32(HWND32,LPRECT32,LPPOINT32);
|
||||
#define GetInternalWindowPos WINELIB_NAME(GetInternalWindowPos)
|
||||
|
@ -3406,10 +3468,21 @@ INT32 GetObject32W(HANDLE32,INT32,LPVOID);
|
|||
INT16 GetRgnBox16(HRGN16,LPRECT16);
|
||||
INT32 GetRgnBox32(HRGN32,LPRECT32);
|
||||
#define GetRgnBox WINELIB_NAME(GetRgnBox)
|
||||
UINT16 GetSystemDirectory16(LPSTR,UINT16);
|
||||
UINT32 GetSystemDirectory32A(LPSTR,UINT32);
|
||||
UINT32 GetSystemDirectory32W(LPWSTR,UINT32);
|
||||
#define GetSystemDirectory WINELIB_NAME_AW(GetSystemDirectory)
|
||||
UINT32 GetTempPath32A(UINT32,LPSTR);
|
||||
UINT32 GetTempPath32W(UINT32,LPWSTR);
|
||||
#define GetTempPath WINELIB_NAME_AW(GetTempPath)
|
||||
BOOL16 GetTextExtentPoint16(HDC16,LPCSTR,INT16,LPSIZE16);
|
||||
BOOL32 GetTextExtentPoint32A(HDC32,LPCSTR,INT32,LPSIZE32);
|
||||
BOOL32 GetTextExtentPoint32W(HDC32,LPCWSTR,INT32,LPSIZE32);
|
||||
#define GetTextExtentPoint WINELIB_NAME_AW(GetTextExtentPoint)
|
||||
BOOL16 GetTextMetrics16(HDC16,LPTEXTMETRIC16);
|
||||
BOOL32 GetTextMetrics32A(HDC32,LPTEXTMETRIC32A);
|
||||
BOOL32 GetTextMetrics32W(HDC32,LPTEXTMETRIC32W);
|
||||
#define GetTextMetrics WINELIB_NAME_AW(GetTextMetrics)
|
||||
BOOL16 GetUpdateRect16(HWND16,LPRECT16,BOOL16);
|
||||
BOOL32 GetUpdateRect32(HWND32,LPRECT32,BOOL32);
|
||||
#define GetUpdateRect WINELIB_NAME(GetUpdateRect)
|
||||
|
@ -3534,9 +3607,15 @@ UINT32 LocalSize32(HLOCAL32);
|
|||
BOOL16 LocalUnlock16(HLOCAL16);
|
||||
BOOL32 LocalUnlock32(HLOCAL32);
|
||||
#define LocalUnlock WINELIB_NAME(LocalUnlock)
|
||||
HGLOBAL16 LockSegment16(HGLOBAL16);
|
||||
#define LockSegment32(handle) GlobalFix((HANDLE32)(handle))
|
||||
#define LockSegment WINELIB_NAME(LockSegment)
|
||||
BOOL16 LPtoDP16(HDC16,LPPOINT16,INT16);
|
||||
BOOL32 LPtoDP32(HDC32,LPPOINT32,INT32);
|
||||
#define LPtoDP WINELIB_NAME(LPtoDP)
|
||||
FARPROC16 MakeProcInstance16(FARPROC16,HANDLE16);
|
||||
#define MakeProcInstance32(proc,inst) (proc)
|
||||
#define MakeProcInstance WINELIB_NAME(MakeProcInstance)
|
||||
void MapDialogRect16(HWND16,LPRECT16);
|
||||
void MapDialogRect32(HWND32,LPRECT32);
|
||||
#define MapDialogRect WINELIB_NAME(MapDialogRect)
|
||||
|
@ -3659,6 +3738,10 @@ DWORD RegSetValueEx16(HKEY,LPSTR,DWORD,DWORD,LPBYTE,DWORD);
|
|||
DWORD RegSetValueEx32A(HKEY,LPSTR,DWORD,DWORD,LPBYTE,DWORD);
|
||||
DWORD RegSetValueEx32W(HKEY,LPWSTR,DWORD,DWORD,LPBYTE,DWORD);
|
||||
#define RegSetValueEx WINELIB_NAME_AW(RegSetValueEx)
|
||||
BOOL16 RemoveDirectory16(LPCSTR);
|
||||
BOOL32 RemoveDirectory32A(LPCSTR);
|
||||
BOOL32 RemoveDirectory32W(LPCWSTR);
|
||||
#define RemoveDirectory WINELIB_NAME_AW(RemoveDirectory)
|
||||
BOOL16 ScaleViewportExtEx16(HDC16,INT16,INT16,INT16,INT16,LPSIZE16);
|
||||
BOOL32 ScaleViewportExtEx32(HDC32,INT32,INT32,INT32,INT32,LPSIZE32);
|
||||
#define ScaleViewportExtEx WINELIB_NAME(ScaleViewportExtEx)
|
||||
|
@ -3690,6 +3773,9 @@ void SetDlgItemText16(HWND16,INT16,SEGPTR);
|
|||
void SetDlgItemText32A(HWND32,INT32,LPCSTR);
|
||||
void SetDlgItemText32W(HWND32,INT32,LPCWSTR);
|
||||
#define SetDlgItemText WINELIB_NAME_AW(SetDlgItemText)
|
||||
BOOL32 SetEnvironmentVariable32A(LPCSTR,LPCSTR);
|
||||
BOOL32 SetEnvironmentVariable32W(LPCWSTR,LPCWSTR);
|
||||
#define SetEnvironmentVariable WINELIB_NAME_AW(SetEnvironmentVariable)
|
||||
void SetInternalWindowPos16(HWND16,UINT16,LPRECT16,LPPOINT16);
|
||||
void SetInternalWindowPos32(HWND32,UINT32,LPRECT32,LPPOINT32);
|
||||
#define SetInternalWindowPos WINELIB_NAME(SetInternalWindowPos)
|
||||
|
@ -3735,6 +3821,9 @@ BOOL32 TrackPopupMenu32(HMENU32,UINT32,INT32,INT32,INT32,HWND32,const RECT32
|
|||
BOOL16 UnionRect16(LPRECT16,const RECT16*,const RECT16*);
|
||||
BOOL32 UnionRect32(LPRECT32,const RECT32*,const RECT32*);
|
||||
#define UnionRect WINELIB_NAME(UnionRect)
|
||||
void UnlockSegment16(HGLOBAL16);
|
||||
#define UnlockSegment32(handle) GlobalUnfix((HANDLE32)(handle))
|
||||
#define UnlockSegment WINELIB_NAME(UnlockSegment)
|
||||
BOOL16 UnregisterClass16(SEGPTR,HINSTANCE16);
|
||||
BOOL32 UnregisterClass32A(LPCSTR,HINSTANCE32);
|
||||
BOOL32 UnregisterClass32W(LPCWSTR,HINSTANCE32);
|
||||
|
@ -3847,7 +3936,6 @@ typedef int (*GOBJENUMPROC)(LPVOID,LPARAM);
|
|||
/*typedef int (*MFENUMPROC)(HDC,HANDLETABLE*,METARECORD*,int,LPARAM);*/
|
||||
typedef int (*MFENUMPROC)(HDC,void*,void*,int,LPARAM);
|
||||
typedef BOOL (*PROPENUMPROC)(HWND,LPCTSTR,HANDLE);
|
||||
typedef LRESULT (*WNDENUMPROC)(HWND,LPARAM);
|
||||
#else
|
||||
typedef SEGPTR DRIVERPROC;
|
||||
typedef SEGPTR EDITWORDBREAKPROC;
|
||||
|
@ -3855,12 +3943,9 @@ typedef SEGPTR FONTENUMPROC;
|
|||
typedef SEGPTR GOBJENUMPROC;
|
||||
typedef SEGPTR MFENUMPROC;
|
||||
typedef SEGPTR PROPENUMPROC;
|
||||
typedef SEGPTR WNDENUMPROC;
|
||||
#endif
|
||||
typedef FARPROC HOOKPROC;
|
||||
|
||||
#endif /* NO_TRANSITION_TYPES */
|
||||
|
||||
|
||||
INT AccessResource(HINSTANCE,HRSRC);
|
||||
ATOM AddAtom(SEGPTR);
|
||||
|
@ -3868,8 +3953,6 @@ INT AddFontResource(LPCSTR);
|
|||
WORD AllocCStoDSAlias(WORD);
|
||||
WORD AllocDStoCSAlias(WORD);
|
||||
HGLOBAL AllocResource(HINSTANCE,HRSRC,DWORD);
|
||||
WORD AllocSelector(WORD);
|
||||
WORD AllocSelectorArray(WORD);
|
||||
BOOL AnimatePalette(HPALETTE16,UINT,UINT,LPPALETTEENTRY);
|
||||
LPSTR AnsiLower(LPSTR);
|
||||
UINT AnsiLowerBuff(LPSTR,UINT);
|
||||
|
@ -3902,7 +3985,6 @@ int CloseComm(int);
|
|||
HMETAFILE CloseMetaFile(HDC);
|
||||
void CloseSound(void);
|
||||
BOOL CloseWindow(HWND);
|
||||
INT16 CombineRgn(HRGN32,HRGN32,HRGN32,INT32);
|
||||
int ConvertRequest(HWND,LPKANJISTRUCT);
|
||||
#ifdef WINELIB32
|
||||
HCURSOR CopyCursor(HCURSOR); /* Win32 */
|
||||
|
@ -3922,7 +4004,6 @@ HANDLE CreateCursorIconIndirect(HANDLE,CURSORICONINFO*,const BYTE*,const BYT
|
|||
HDC CreateDC(LPCSTR,LPCSTR,LPCSTR,const DEVMODE*);
|
||||
HBRUSH CreateDIBPatternBrush(HGLOBAL,UINT);
|
||||
HBITMAP CreateDIBitmap(HDC,BITMAPINFOHEADER*,DWORD,LPVOID,BITMAPINFO*,UINT);
|
||||
HRGN CreateEllipticRgn(INT32,INT32,INT32,INT32);
|
||||
HFONT CreateFont(INT,INT,INT,INT,INT,BYTE,BYTE,BYTE,BYTE,BYTE,BYTE,BYTE,BYTE,LPCSTR);
|
||||
HFONT CreateFontIndirect(const LOGFONT16*);
|
||||
HBRUSH CreateHatchBrush(INT,COLORREF);
|
||||
|
@ -3935,8 +4016,6 @@ HBRUSH CreatePatternBrush(HBITMAP);
|
|||
HPEN16 CreatePen(INT,INT,COLORREF);
|
||||
HPEN16 CreatePenIndirect(const LOGPEN16*);
|
||||
HMENU CreatePopupMenu(void);
|
||||
HRGN CreateRectRgn(INT32,INT32,INT32,INT32);
|
||||
HRGN CreateRoundRectRgn(INT32,INT32,INT32,INT32,INT32,INT32);
|
||||
HBRUSH CreateSolidBrush(COLORREF);
|
||||
void DebugBreak(void);
|
||||
DWORD DefHookProc(short,WORD,DWORD,HHOOK*);
|
||||
|
@ -3969,16 +4048,12 @@ BOOL EnableMenuItem(HMENU,UINT,UINT);
|
|||
BOOL EnableScrollBar(HWND,UINT,UINT);
|
||||
BOOL EnableWindow(HWND,BOOL);
|
||||
BOOL EndDeferWindowPos(HDWP16);
|
||||
BOOL EnumChildWindows(HWND,WNDENUMPROC,LPARAM);
|
||||
UINT EnumClipboardFormats(UINT);
|
||||
INT EnumFontFamilies(HDC,LPCSTR,FONTENUMPROC,LPARAM);
|
||||
INT EnumFonts(HDC,LPCSTR,FONTENUMPROC,LPARAM);
|
||||
BOOL EnumMetaFile(HDC,HMETAFILE,MFENUMPROC,LPARAM);
|
||||
INT EnumObjects(HDC,INT,GOBJENUMPROC,LPARAM);
|
||||
INT EnumProps(HWND,PROPENUMPROC);
|
||||
BOOL EnumTaskWindows(HTASK,WNDENUMPROC,LPARAM);
|
||||
BOOL EnumWindows(WNDENUMPROC,LPARAM);
|
||||
BOOL EqualRgn(HRGN32,HRGN32);
|
||||
INT Escape(HDC,INT,INT,LPCSTR,LPVOID);
|
||||
LONG EscapeCommFunction(int,int);
|
||||
int ExcludeClipRect(HDC,short,short,short,short);
|
||||
|
@ -3986,8 +4061,8 @@ int ExcludeVisRect(HDC,short,short,short,short);
|
|||
BOOL ExitWindows(DWORD,WORD);
|
||||
BOOL ExtFloodFill(HDC,INT,INT,COLORREF,WORD);
|
||||
HICON ExtractIcon(HINSTANCE,LPCSTR,WORD);
|
||||
WORD FarGetOwner(HANDLE);
|
||||
void FarSetOwner(HANDLE,HANDLE);
|
||||
HANDLE16 FarGetOwner(HANDLE16);
|
||||
void FarSetOwner(HANDLE16,HANDLE16);
|
||||
void FatalAppExit(UINT,LPCSTR);
|
||||
void FatalExit(int);
|
||||
BOOL FillRgn(HDC,HRGN,HBRUSH);
|
||||
|
@ -3999,10 +4074,7 @@ BOOL FloodFill(HDC,INT,INT,COLORREF);
|
|||
int FlushComm(int,int);
|
||||
BOOL FrameRgn(HDC,HRGN,HBRUSH,int,int);
|
||||
void FreeLibrary(HANDLE);
|
||||
BOOL FreeModule(HANDLE);
|
||||
void FreeProcInstance(FARPROC);
|
||||
BOOL FreeResource(HGLOBAL);
|
||||
WORD FreeSelector(WORD);
|
||||
UINT GDIRealizePalette(HDC);
|
||||
HPALETTE16 GDISelectPalette(HDC,HPALETTE16);
|
||||
HWND GetActiveWindow(void);
|
||||
|
@ -4028,10 +4100,8 @@ int GetCommError(int,COMSTAT*);
|
|||
UINT GetCommEventMask(int,int);
|
||||
int GetCommState(int,DCB*);
|
||||
HBRUSH GetControlBrush(HWND,HDC,WORD);
|
||||
UINT32 GetCurrentDirectory(UINT32,LPSTR);
|
||||
HANDLE GetCurrentPDB(void);
|
||||
DWORD GetCurrentPosition(HDC);
|
||||
HANDLE GetCurrentTask(void);
|
||||
DWORD GetCurrentTime(void);
|
||||
HCURSOR GetCursor(void);
|
||||
HDC GetDC(HWND);
|
||||
|
@ -4049,12 +4119,11 @@ int GetDlgCtrlID(HWND);
|
|||
HWND GetDlgItem(HWND,WORD);
|
||||
WORD GetDlgItemInt(HWND,WORD,BOOL*,BOOL);
|
||||
WORD GetDoubleClickTime(void);
|
||||
WORD GetDriveType(INT);
|
||||
int GetEnvironment(LPSTR,LPSTR,WORD);
|
||||
HMODULE GetExePtr(HANDLE);
|
||||
HWND GetFocus(void);
|
||||
DWORD GetFreeSpace(UINT16);
|
||||
DWORD GetHeapSpaces(HMODULE);
|
||||
DWORD GetHeapSpaces(HMODULE16);
|
||||
BOOL GetInputState(void);
|
||||
int GetInstanceData(HANDLE,WORD,int);
|
||||
int GetKBCodePage(void);
|
||||
|
@ -4079,7 +4148,7 @@ LONG GetMessageTime(void);
|
|||
HANDLE GetMetaFile(LPSTR);
|
||||
HANDLE GetMetaFileBits(HANDLE);
|
||||
int GetModuleFileName(HANDLE,LPSTR,short);
|
||||
HANDLE GetModuleHandle(LPCSTR);
|
||||
HMODULE16 GetModuleHandle(LPCSTR);
|
||||
int GetModuleUsage(HANDLE);
|
||||
FARPROC GetMouseEventProc(void);
|
||||
DWORD GetNearestColor(HDC,DWORD);
|
||||
|
@ -4113,7 +4182,6 @@ WORD GetStretchBltMode(HDC);
|
|||
HMENU GetSubMenu(HMENU,short);
|
||||
COLORREF GetSysColor(short);
|
||||
HWND GetSysModalWindow(void);
|
||||
UINT GetSystemDirectory(LPSTR,UINT);
|
||||
HMENU GetSystemMenu(HWND,BOOL);
|
||||
int GetSystemMetrics(WORD);
|
||||
WORD GetSystemPaletteEntries(HDC,WORD,WORD,LPPALETTEENTRY);
|
||||
|
@ -4130,7 +4198,6 @@ short GetTextCharacterExtra(HDC);
|
|||
COLORREF GetTextColor(HDC);
|
||||
DWORD GetTextExtent(HDC,LPCSTR,short);
|
||||
INT GetTextFace(HDC,INT,LPSTR);
|
||||
BOOL GetTextMetrics(HDC,LPTEXTMETRIC16);
|
||||
LPINT16 GetThresholdEvent(void);
|
||||
int GetThresholdStatus(void);
|
||||
DWORD GetTickCount(void);
|
||||
|
@ -4157,7 +4224,7 @@ HGLOBAL16 GlobalLRUOldest(HGLOBAL16);
|
|||
void GlobalNotify(FARPROC);
|
||||
WORD GlobalPageLock(HGLOBAL16);
|
||||
WORD GlobalPageUnlock(HGLOBAL16);
|
||||
BOOL GlobalUnWire(HGLOBAL16);
|
||||
BOOL16 GlobalUnWire(HGLOBAL16);
|
||||
void GlobalUnfix(HGLOBAL16);
|
||||
SEGPTR GlobalWire(HGLOBAL16);
|
||||
BOOL GrayString(HDC,HBRUSH,FARPROC,LPARAM,INT,INT,INT,INT,INT);
|
||||
|
@ -4208,12 +4275,9 @@ HMENU LoadMenu(HANDLE,SEGPTR);
|
|||
HANDLE LoadModule(LPCSTR,LPVOID);
|
||||
HGLOBAL LoadResource(HINSTANCE,HRSRC);
|
||||
int LoadString(HANDLE,WORD,LPSTR,int);
|
||||
BOOL LocalInit(HANDLE,WORD,WORD);
|
||||
FARPROC LocalNotify(FARPROC);
|
||||
LPVOID LockResource(HGLOBAL);
|
||||
HGLOBAL LockSegment(HGLOBAL);
|
||||
HMENU LookupMenuHandle(HMENU,INT);
|
||||
FARPROC MakeProcInstance(FARPROC,HANDLE);
|
||||
WORD MapVirtualKey(WORD,WORD);
|
||||
void MessageBeep(WORD);
|
||||
int MessageBox(HWND,LPCSTR,LPCSTR,WORD);
|
||||
|
@ -4247,7 +4311,6 @@ void ProfSampRate(int,int);
|
|||
void ProfSetup(int,int);
|
||||
void ProfStart(void);
|
||||
void ProfStop(void);
|
||||
BOOL PtInRegion(HRGN32,INT32,INT32);
|
||||
BOOL PtVisible(HDC,short,short);
|
||||
int ReadComm(int,LPSTR,int);
|
||||
WORD RealizeDefaultPalette(HDC);
|
||||
|
@ -4295,12 +4358,10 @@ HCURSOR SetCursor(HCURSOR);
|
|||
void SetCursorPos(short,short);
|
||||
BOOL SetDCHook(HDC,FARPROC16,DWORD);
|
||||
void SetDCState(HDC,HDC);
|
||||
int SetDIBits(HDC,HANDLE,WORD,WORD,LPSTR,LPBITMAPINFO,WORD);
|
||||
int SetDIBitsToDevice(HDC,short,short,WORD,WORD,WORD,WORD,WORD,WORD,LPSTR,LPBITMAPINFO,WORD);
|
||||
BOOL SetDeskPattern(void);
|
||||
BOOL SetDeskWallPaper(LPCSTR);
|
||||
void SetDoubleClickTime(WORD);
|
||||
int SetEnvironment(LPSTR,LPSTR,WORD);
|
||||
int SetEnvironment(LPCSTR,LPCSTR,WORD);
|
||||
UINT SetErrorMode(UINT);
|
||||
HWND SetFocus(HWND);
|
||||
WORD SetHandleCount(WORD);
|
||||
|
@ -4318,7 +4379,6 @@ COLORREF SetPixel(HDC,short,short,COLORREF);
|
|||
WORD SetPolyFillMode(HDC,WORD);
|
||||
BOOL SetProp(HWND,SEGPTR,HANDLE);
|
||||
WORD SetROP2(HDC,WORD);
|
||||
void SetRectRgn(HRGN32,INT32,INT32,INT32,INT32);
|
||||
WORD SetRelAbs(HDC,WORD);
|
||||
FARPROC SetResourceHandler(HANDLE,LPSTR,FARPROC);
|
||||
int SetScrollPos(HWND,int,int,BOOL);
|
||||
|
@ -4378,7 +4438,6 @@ int TransmitCommChar(int,char);
|
|||
int UngetCommChar(int,char);
|
||||
BOOL UnhookWindowsHook(short,FARPROC);
|
||||
BOOL UnhookWindowsHookEx(HHOOK);
|
||||
void UnlockSegment(HGLOBAL);
|
||||
BOOL UnrealizeObject(HBRUSH);
|
||||
int UpdateColors(HDC);
|
||||
void UpdateWindow(HWND32);
|
||||
|
@ -4408,6 +4467,7 @@ HFILE _lopen(LPCSTR,INT);
|
|||
INT _lread(HFILE,SEGPTR,WORD);
|
||||
INT _lwrite(HFILE,LPCSTR,WORD);
|
||||
|
||||
#endif /* NO_TRANSITION_TYPES */
|
||||
|
||||
#ifdef WINELIB
|
||||
#define WINELIB_UNIMP(x) fprintf (stderr, "WineLib: Unimplemented %s\n", x)
|
||||
|
|
|
@ -9,8 +9,8 @@ static inline int runtime_cpu(void) { return 3; }
|
|||
|
||||
#ifndef WINELIB
|
||||
|
||||
#if defined ( linux)
|
||||
struct sigcontext_struct
|
||||
#ifdef linux
|
||||
typedef struct
|
||||
{
|
||||
unsigned short sc_gs, __gsh;
|
||||
unsigned short sc_fs, __fsh;
|
||||
|
@ -34,17 +34,17 @@ struct sigcontext_struct
|
|||
unsigned long i387;
|
||||
unsigned long oldmask;
|
||||
unsigned long cr2;
|
||||
};
|
||||
} SIGCONTEXT;
|
||||
#define WINE_DATA_SELECTOR 0x2b
|
||||
#define WINE_CODE_SELECTOR 0x23
|
||||
#endif /* linux */
|
||||
|
||||
#ifdef __NetBSD__
|
||||
#include <signal.h>
|
||||
#define sigcontext_struct sigcontext
|
||||
typedef struct sigcontext SIGCONTEXT;
|
||||
#define WINE_DATA_SELECTOR 0x1f
|
||||
#define WINE_CODE_SELECTOR 0x17
|
||||
#endif
|
||||
#endif /* NetBSD */
|
||||
|
||||
#if defined(__svr4__) || defined(_SCO_DS)
|
||||
#include <signal.h>
|
||||
|
@ -52,17 +52,23 @@ struct sigcontext_struct
|
|||
#include <sys/regset.h>
|
||||
#endif
|
||||
#include <sys/ucontext.h>
|
||||
#define sigcontext_struct ucontext
|
||||
typedef struct ucontext SIGCONTEXT;
|
||||
#define WINE_DATA_SELECTOR 0x1f
|
||||
#define WINE_CODE_SELECTOR 0x17
|
||||
#endif
|
||||
#endif /* svr4 || SCO_DS */
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <signal.h>
|
||||
#define sigcontext_struct sigcontext
|
||||
typedef struct sigcontext SIGCONTEXT;
|
||||
#define WINE_DATA_SELECTOR 0x27
|
||||
#define WINE_CODE_SELECTOR 0x1f
|
||||
#endif
|
||||
#endif /* FreeBSD */
|
||||
|
||||
#else /* WINELIB */
|
||||
|
||||
typedef void SIGCONTEXT;
|
||||
#define WINE_DATA_SELECTOR 0x00
|
||||
#define WINE_CODE_SELECTOR 0x00
|
||||
|
||||
#endif /* WINELIB */
|
||||
|
||||
|
|
|
@ -25,13 +25,6 @@ typedef struct
|
|||
WINDOWPOS16 winPos[1];
|
||||
} DWP;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HTASK hWindowTask;
|
||||
HTASK hTaskSendTo;
|
||||
BOOL wFlag;
|
||||
} ACTIVATESTRUCT, *LPACTIVATESTRUCT;
|
||||
|
||||
extern void WINPOS_FindIconPos( HWND hwnd );
|
||||
extern BOOL WINPOS_SetActiveWindow( HWND hWnd, BOOL fMouse, BOOL fChangeFocus);
|
||||
extern BOOL WINPOS_ChangeActiveWindow( HWND hwnd, BOOL mouseMsg );
|
||||
|
|
|
@ -17,11 +17,13 @@ typedef enum
|
|||
WIN_PROC_32W
|
||||
} WINDOWPROCTYPE;
|
||||
|
||||
extern HANDLE32 WINPROC_AllocWinProc( UINT32 func, WINDOWPROCTYPE type );
|
||||
extern HANDLE32 WINPROC_CopyWinProc( HANDLE32 handle );
|
||||
extern void WINPROC_FreeWinProc( HANDLE32 handle );
|
||||
extern WINDOWPROCTYPE WINPROC_GetWinProcType( HANDLE32 handle );
|
||||
extern WNDPROC16 WINPROC_GetFunc16( HANDLE32 handle );
|
||||
extern WNDPROC32 WINPROC_GetFunc32( HANDLE32 handle );
|
||||
typedef void *HWINDOWPROC; /* Really a pointer to a WINDOWPROC */
|
||||
|
||||
extern BOOL32 WINPROC_Init(void);
|
||||
extern WNDPROC16 WINPROC_GetProc( HWINDOWPROC proc, WINDOWPROCTYPE type );
|
||||
extern BOOL32 WINPROC_SetProc( HWINDOWPROC *pFirst, WNDPROC16 func,
|
||||
WINDOWPROCTYPE type );
|
||||
extern void WINPROC_FreeProc( HWINDOWPROC proc );
|
||||
extern WINDOWPROCTYPE WINPROC_GetProcType( HWINDOWPROC proc );
|
||||
|
||||
#endif /* __WINE_WINPROC_H */
|
||||
|
|
|
@ -154,11 +154,13 @@ DECLARE_HANDLE(HWND);
|
|||
#ifdef WINELIB
|
||||
typedef LRESULT (*DLGPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
|
||||
typedef LRESULT (*FARPROC16)();
|
||||
typedef LRESULT (*WNDENUMPROC16)(HWND16,LPARAM);
|
||||
typedef LRESULT (*WNDPROC16)(HWND16,UINT16,WPARAM16,LPARAM);
|
||||
#else
|
||||
/* Function pointers are SEGPTR in Win16 */
|
||||
typedef SEGPTR DLGPROC16;
|
||||
typedef SEGPTR FARPROC16;
|
||||
typedef SEGPTR WNDENUMPROC16;
|
||||
typedef SEGPTR WNDPROC16;
|
||||
#endif
|
||||
|
||||
|
@ -166,6 +168,7 @@ typedef SEGPTR WNDPROC16;
|
|||
|
||||
typedef LRESULT (*DLGPROC32)(HWND32,UINT32,WPARAM32,LPARAM);
|
||||
typedef LRESULT (*FARPROC32)();
|
||||
typedef LRESULT (*WNDENUMPROC32)(HWND32,LPARAM);
|
||||
typedef LRESULT (*WNDPROC32)(HWND32,UINT32,WPARAM32,LPARAM);
|
||||
|
||||
/* TCHAR data types definitions for Winelib. */
|
||||
|
@ -226,7 +229,9 @@ DECL_WINELIB_TYPE(HWAVEIN);
|
|||
DECL_WINELIB_TYPE(HWAVEOUT);
|
||||
DECL_WINELIB_TYPE(HWND);
|
||||
|
||||
DECL_WINELIB_TYPE(DLGPROC);
|
||||
DECL_WINELIB_TYPE(FARPROC);
|
||||
DECL_WINELIB_TYPE(WNDENUMPROC);
|
||||
DECL_WINELIB_TYPE(WNDPROC);
|
||||
|
||||
/* Misc. constants. */
|
||||
|
|
|
@ -43,7 +43,6 @@ int CallTo32_LargeStack( int (*func)(), int nbargs, ...)
|
|||
|
||||
WORD CallTo16_word_ ( FARPROC func, WORD arg ) { return func(arg); }
|
||||
|
||||
extern LRESULT ACTIVATEAPP_callback(HWND,UINT,WPARAM,LPARAM);
|
||||
extern LRESULT AboutDlgProc(HWND,UINT,WPARAM,LPARAM);
|
||||
extern LRESULT CARET_Callback(HWND,UINT,WPARAM,LPARAM);
|
||||
extern LRESULT ColorDlgProc(HWND,UINT,WPARAM,LPARAM);
|
||||
|
@ -78,7 +77,6 @@ LRESULT ErrorProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
|
|||
WNDPROC MODULE_GetWndProcEntry16( char *name )
|
||||
{
|
||||
#define MAP_STR_TO_PROC(str,proc) if(!strcmp(name,str))return proc
|
||||
MAP_STR_TO_PROC("ActivateAppProc",ACTIVATEAPP_callback);
|
||||
MAP_STR_TO_PROC("AboutDlgProc",AboutDlgProc);
|
||||
MAP_STR_TO_PROC("CARET_Callback",CARET_Callback);
|
||||
MAP_STR_TO_PROC("ColorDlgProc",ColorDlgProc);
|
||||
|
|
|
@ -105,6 +105,7 @@ extern const DLL_DESCRIPTOR NTDLL_Descriptor;
|
|||
extern const DLL_DESCRIPTOR SHELL32_Descriptor;
|
||||
extern const DLL_DESCRIPTOR USER32_Descriptor;
|
||||
extern const DLL_DESCRIPTOR VERSION_Descriptor;
|
||||
extern const DLL_DESCRIPTOR WINMM_Descriptor;
|
||||
extern const DLL_DESCRIPTOR WINSPOOL_Descriptor;
|
||||
extern const DLL_DESCRIPTOR WSOCK32_Descriptor;
|
||||
|
||||
|
@ -154,6 +155,7 @@ static BUILTIN_DLL BuiltinDLLs[] =
|
|||
{ &SHELL32_Descriptor, 0 },
|
||||
{ &USER32_Descriptor, 0 },
|
||||
{ &VERSION_Descriptor, 0 },
|
||||
{ &WINMM_Descriptor, 0 },
|
||||
{ &WINSPOOL_Descriptor, 0 },
|
||||
{ &WSOCK32_Descriptor, 0 },
|
||||
/* Last entry */
|
||||
|
@ -166,7 +168,7 @@ static BUILTIN_DLL BuiltinDLLs[] =
|
|||
*
|
||||
* Load all built-in modules marked as 'always used'.
|
||||
*/
|
||||
BOOL BUILTIN_Init(void)
|
||||
BOOL16 BUILTIN_Init(void)
|
||||
{
|
||||
BUILTIN_DLL *dll;
|
||||
NE_MODULE *pModule;
|
||||
|
@ -196,7 +198,7 @@ BOOL BUILTIN_Init(void)
|
|||
* Load a built-in module. If the 'force' parameter is FALSE, we only
|
||||
* load the module if it has not been disabled via the -dll option.
|
||||
*/
|
||||
HMODULE BUILTIN_LoadModule( LPCSTR name, BOOL force )
|
||||
HMODULE16 BUILTIN_LoadModule( LPCSTR name, BOOL16 force )
|
||||
{
|
||||
HMODULE hModule;
|
||||
NE_MODULE *pModule;
|
||||
|
@ -377,7 +379,7 @@ DWORD BUILTIN_GetProcAddress32( NE_MODULE *pModule, char *function )
|
|||
*
|
||||
* Set runtime DLL usage flags
|
||||
*/
|
||||
BOOL BUILTIN_ParseDLLOptions( const char *str )
|
||||
BOOL16 BUILTIN_ParseDLLOptions( const char *str )
|
||||
{
|
||||
BUILTIN_DLL *dll;
|
||||
const char *p;
|
||||
|
|
|
@ -36,6 +36,7 @@ static char Copyright[] = "Copyright Robert J. Amstadt, 1993";
|
|||
#include "dce.h"
|
||||
#include "pe_image.h"
|
||||
#include "shell.h"
|
||||
#include "winproc.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -117,7 +118,10 @@ int MAIN_Init(void)
|
|||
|
||||
/* Create the DCEs */
|
||||
DCE_Init();
|
||||
|
||||
|
||||
/* Initialize window procedures */
|
||||
if (!WINPROC_Init()) return 0;
|
||||
|
||||
/* Initialize dialog manager */
|
||||
if (!DIALOG_Init()) return 0;
|
||||
|
||||
|
|
133
loader/module.c
133
loader/module.c
|
@ -30,8 +30,8 @@
|
|||
|
||||
extern HINSTANCE PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params );
|
||||
|
||||
static HMODULE hFirstModule = 0;
|
||||
static HMODULE hCachedModule = 0; /* Module cached by MODULE_OpenFile */
|
||||
static HMODULE16 hFirstModule = 0;
|
||||
static HMODULE16 hCachedModule = 0; /* Module cached by MODULE_OpenFile */
|
||||
|
||||
#ifndef WINELIB
|
||||
static HANDLE hInitialStack32 = 0;
|
||||
|
@ -41,7 +41,7 @@ static HANDLE hInitialStack32 = 0;
|
|||
/***********************************************************************
|
||||
* MODULE_GetPtr
|
||||
*/
|
||||
NE_MODULE *MODULE_GetPtr( HMODULE hModule )
|
||||
NE_MODULE *MODULE_GetPtr( HMODULE16 hModule )
|
||||
{
|
||||
NE_MODULE *pModule = (NE_MODULE *)GlobalLock16( hModule );
|
||||
if (!pModule || (pModule->magic != NE_SIGNATURE) ||
|
||||
|
@ -53,7 +53,7 @@ NE_MODULE *MODULE_GetPtr( HMODULE hModule )
|
|||
/***********************************************************************
|
||||
* MODULE_DumpModule
|
||||
*/
|
||||
void MODULE_DumpModule( HMODULE hmodule )
|
||||
void MODULE_DumpModule( HMODULE16 hmodule )
|
||||
{
|
||||
int i, ordinal;
|
||||
SEGTABLEENTRY *pSeg;
|
||||
|
@ -134,9 +134,8 @@ void MODULE_DumpModule( HMODULE hmodule )
|
|||
pword = (WORD *)((BYTE *)pModule + pModule->modref_table);
|
||||
for (i = 0; i < pModule->modref_count; i++, pword++)
|
||||
{
|
||||
char *name = (char *)pModule + pModule->import_table + *pword;
|
||||
printf( "%d: %04x -> '%*.*s'\n",
|
||||
i, *pword, *name, *name, name + 1 );
|
||||
printf( "%d: %04x -> '%s'\n", i, *pword,
|
||||
MODULE_GetModuleName(*pword));
|
||||
}
|
||||
}
|
||||
else printf( "None\n" );
|
||||
|
@ -217,7 +216,7 @@ void MODULE_WalkModules(void)
|
|||
/***********************************************************************
|
||||
* MODULE_OpenFile
|
||||
*/
|
||||
int MODULE_OpenFile( HMODULE hModule )
|
||||
int MODULE_OpenFile( HMODULE16 hModule )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
char *name;
|
||||
|
@ -288,7 +287,7 @@ DWORD MODULE_AllocateSegment(WORD wFlags, WORD wSize, WORD wElem)
|
|||
* MODULE_CreateSegments
|
||||
*/
|
||||
#ifndef WINELIB32
|
||||
static BOOL MODULE_CreateSegments( HMODULE hModule )
|
||||
static BOOL MODULE_CreateSegments( HMODULE16 hModule )
|
||||
{
|
||||
SEGTABLEENTRY *pSegment;
|
||||
NE_MODULE *pModule;
|
||||
|
@ -321,7 +320,7 @@ static BOOL MODULE_CreateSegments( HMODULE hModule )
|
|||
* MODULE_GetInstance
|
||||
*/
|
||||
#ifndef WINELIB32
|
||||
HINSTANCE MODULE_GetInstance( HMODULE hModule )
|
||||
HINSTANCE16 MODULE_GetInstance( HMODULE16 hModule )
|
||||
{
|
||||
SEGTABLEENTRY *pSegment;
|
||||
NE_MODULE *pModule;
|
||||
|
@ -339,7 +338,7 @@ HINSTANCE MODULE_GetInstance( HMODULE hModule )
|
|||
/***********************************************************************
|
||||
* MODULE_CreateInstance
|
||||
*/
|
||||
HINSTANCE MODULE_CreateInstance( HMODULE hModule, LOADPARAMS *params )
|
||||
HINSTANCE16 MODULE_CreateInstance( HMODULE16 hModule, LOADPARAMS *params )
|
||||
{
|
||||
SEGTABLEENTRY *pSegment;
|
||||
NE_MODULE *pModule;
|
||||
|
@ -373,12 +372,12 @@ HINSTANCE MODULE_CreateInstance( HMODULE hModule, LOADPARAMS *params )
|
|||
/***********************************************************************
|
||||
* MODULE_LoadExeHeader
|
||||
*/
|
||||
static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
||||
static HMODULE16 MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
||||
{
|
||||
struct mz_header_s mz_header;
|
||||
struct ne_header_s ne_header;
|
||||
int size;
|
||||
HMODULE hModule;
|
||||
HMODULE16 hModule;
|
||||
NE_MODULE *pModule;
|
||||
BYTE *pData;
|
||||
char *buffer, *fastload = NULL;
|
||||
|
@ -394,14 +393,15 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
|
||||
_llseek( hFile, 0, SEEK_SET );
|
||||
if ((FILE_Read(hFile,&mz_header,sizeof(mz_header)) != sizeof(mz_header)) ||
|
||||
(mz_header.mz_magic != MZ_SIGNATURE)) return (HMODULE)11; /* invalid exe */
|
||||
(mz_header.mz_magic != MZ_SIGNATURE))
|
||||
return (HMODULE16)11; /* invalid exe */
|
||||
|
||||
_llseek( hFile, mz_header.ne_offset, SEEK_SET );
|
||||
if (FILE_Read( hFile, &ne_header, sizeof(ne_header) ) != sizeof(ne_header))
|
||||
return (HMODULE)11; /* invalid exe */
|
||||
return (HMODULE16)11; /* invalid exe */
|
||||
|
||||
if (ne_header.ne_magic == PE_SIGNATURE) return (HMODULE)21; /* win32 exe */
|
||||
if (ne_header.ne_magic != NE_SIGNATURE) return (HMODULE)11; /* invalid exe */
|
||||
if (ne_header.ne_magic == PE_SIGNATURE) return (HMODULE16)21; /* win32 exe */
|
||||
if (ne_header.ne_magic != NE_SIGNATURE) return (HMODULE16)11; /* invalid exe */
|
||||
|
||||
/* We now have a valid NE header */
|
||||
|
||||
|
@ -422,7 +422,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
ne_header.entry_tab_length;
|
||||
|
||||
hModule = GlobalAlloc16( GMEM_MOVEABLE | GMEM_ZEROINIT, size );
|
||||
if (!hModule) return (HMODULE)11; /* invalid exe */
|
||||
if (!hModule) return (HMODULE16)11; /* invalid exe */
|
||||
FarSetOwner( hModule, hModule );
|
||||
pModule = (NE_MODULE *)GlobalLock16( hModule );
|
||||
memcpy( pModule, &ne_header, sizeof(ne_header) );
|
||||
|
@ -474,7 +474,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
|
||||
if (!READ( ne_header.segment_tab_offset,
|
||||
ne_header.n_segment_tab * sizeof(struct ne_segment_table_entry_s),
|
||||
buffer )) return (HMODULE)11; /* invalid exe */
|
||||
buffer )) return (HMODULE16)11; /* invalid exe */
|
||||
pSeg = (struct ne_segment_table_entry_s *)buffer;
|
||||
for (i = ne_header.n_segment_tab; i > 0; i--, pSeg++)
|
||||
{
|
||||
|
@ -486,7 +486,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
else
|
||||
{
|
||||
GlobalFree16( hModule );
|
||||
return (HMODULE)11; /* invalid exe */
|
||||
return (HMODULE16)11; /* invalid exe */
|
||||
}
|
||||
|
||||
/* Get the resource table */
|
||||
|
@ -496,7 +496,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
pModule->res_table = (int)pData - (int)pModule;
|
||||
if (!READ(ne_header.resource_tab_offset,
|
||||
ne_header.rname_tab_offset - ne_header.resource_tab_offset,
|
||||
pData )) return (HMODULE)11; /* invalid exe */
|
||||
pData )) return (HMODULE16)11; /* invalid exe */
|
||||
pData += ne_header.rname_tab_offset - ne_header.resource_tab_offset;
|
||||
}
|
||||
else pModule->res_table = 0; /* No resource table */
|
||||
|
@ -509,7 +509,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
pData ))
|
||||
{
|
||||
GlobalFree16( hModule );
|
||||
return (HMODULE)11; /* invalid exe */
|
||||
return (HMODULE16)11; /* invalid exe */
|
||||
}
|
||||
pData += ne_header.moduleref_tab_offset - ne_header.rname_tab_offset;
|
||||
|
||||
|
@ -520,7 +520,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
pModule->modref_table = (int)pData - (int)pModule;
|
||||
if (!READ( ne_header.moduleref_tab_offset,
|
||||
ne_header.n_mod_ref_tab * sizeof(WORD),
|
||||
pData )) return (HMODULE)11; /* invalid exe */
|
||||
pData )) return (HMODULE16)11; /* invalid exe */
|
||||
pData += ne_header.n_mod_ref_tab * sizeof(WORD);
|
||||
}
|
||||
else pModule->modref_table = 0; /* No module references */
|
||||
|
@ -533,7 +533,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
pData ))
|
||||
{
|
||||
GlobalFree16( hModule );
|
||||
return (HMODULE)11; /* invalid exe */
|
||||
return (HMODULE16)11; /* invalid exe */
|
||||
}
|
||||
pData += ne_header.entry_tab_offset - ne_header.iname_tab_offset;
|
||||
|
||||
|
@ -545,7 +545,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
pData ))
|
||||
{
|
||||
GlobalFree16( hModule );
|
||||
return (HMODULE)11; /* invalid exe */
|
||||
return (HMODULE16)11; /* invalid exe */
|
||||
}
|
||||
pData += ne_header.entry_tab_length;
|
||||
|
||||
|
@ -558,7 +558,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
if (!pModule->nrname_handle)
|
||||
{
|
||||
GlobalFree16( hModule );
|
||||
return (HMODULE)11; /* invalid exe */
|
||||
return (HMODULE16)11; /* invalid exe */
|
||||
}
|
||||
buffer = GlobalLock16( pModule->nrname_handle );
|
||||
_llseek( hFile, ne_header.nrname_tab_offset, SEEK_SET );
|
||||
|
@ -567,7 +567,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
{
|
||||
GlobalFree16( pModule->nrname_handle );
|
||||
GlobalFree16( hModule );
|
||||
return (HMODULE)11; /* invalid exe */
|
||||
return (HMODULE16)11; /* invalid exe */
|
||||
}
|
||||
}
|
||||
else pModule->nrname_handle = 0;
|
||||
|
@ -577,13 +577,13 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
if (pModule->modref_count)
|
||||
{
|
||||
pModule->dlls_to_init = GLOBAL_Alloc(GMEM_ZEROINIT,
|
||||
(pModule->modref_count+1)*sizeof(HMODULE),
|
||||
(pModule->modref_count+1)*sizeof(HMODULE16),
|
||||
hModule, FALSE, FALSE, FALSE );
|
||||
if (!pModule->dlls_to_init)
|
||||
{
|
||||
if (pModule->nrname_handle) GlobalFree16( pModule->nrname_handle );
|
||||
GlobalFree16( hModule );
|
||||
return (HMODULE)11; /* invalid exe */
|
||||
return (HMODULE16)11; /* invalid exe */
|
||||
}
|
||||
}
|
||||
else pModule->dlls_to_init = 0;
|
||||
|
@ -599,7 +599,7 @@ static HMODULE MODULE_LoadExeHeader( HFILE hFile, OFSTRUCT *ofs )
|
|||
*
|
||||
* Lookup the ordinal for a given name.
|
||||
*/
|
||||
WORD MODULE_GetOrdinal( HMODULE hModule, const char *name )
|
||||
WORD MODULE_GetOrdinal( HMODULE16 hModule, const char *name )
|
||||
{
|
||||
char buffer[256], *cpnt;
|
||||
BYTE len;
|
||||
|
@ -663,7 +663,7 @@ WORD MODULE_GetOrdinal( HMODULE hModule, const char *name )
|
|||
*
|
||||
* Return the entry point for a given ordinal.
|
||||
*/
|
||||
SEGPTR MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal )
|
||||
SEGPTR MODULE_GetEntryPoint( HMODULE16 hModule, WORD ordinal )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
WORD curOrdinal = 1;
|
||||
|
@ -714,7 +714,7 @@ SEGPTR MODULE_GetEntryPoint( HMODULE hModule, WORD ordinal )
|
|||
* Change the value of an entry point. Use with caution!
|
||||
* It can only change the offset value, not the selector.
|
||||
*/
|
||||
BOOL MODULE_SetEntryPoint( HMODULE hModule, WORD ordinal, WORD offset )
|
||||
BOOL16 MODULE_SetEntryPoint( HMODULE16 hModule, WORD ordinal, WORD offset )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
WORD curOrdinal = 1;
|
||||
|
@ -763,7 +763,7 @@ FARPROC16 MODULE_GetWndProcEntry16( const char *name )
|
|||
{
|
||||
WORD ordinal;
|
||||
FARPROC16 ret;
|
||||
static HMODULE hModule = 0;
|
||||
static HMODULE16 hModule = 0;
|
||||
|
||||
if (!hModule) hModule = GetModuleHandle( "WPROCS" );
|
||||
ordinal = MODULE_GetOrdinal( hModule, name );
|
||||
|
@ -777,7 +777,7 @@ FARPROC16 MODULE_GetWndProcEntry16( const char *name )
|
|||
/***********************************************************************
|
||||
* MODULE_GetModuleName
|
||||
*/
|
||||
LPSTR MODULE_GetModuleName( HMODULE hModule )
|
||||
LPSTR MODULE_GetModuleName( HMODULE16 hModule )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
BYTE *p, len;
|
||||
|
@ -807,9 +807,9 @@ void MODULE_RegisterModule( NE_MODULE *pModule )
|
|||
*
|
||||
* Find a module from a path name.
|
||||
*/
|
||||
HMODULE MODULE_FindModule( LPCSTR path )
|
||||
HMODULE16 MODULE_FindModule( LPCSTR path )
|
||||
{
|
||||
HMODULE hModule = hFirstModule;
|
||||
HMODULE16 hModule = hFirstModule;
|
||||
LPCSTR filename, dotptr, modulepath, modulename;
|
||||
BYTE len, *name_table;
|
||||
|
||||
|
@ -838,24 +838,45 @@ HMODULE MODULE_FindModule( LPCSTR path )
|
|||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* MODULE_CallWEP
|
||||
*
|
||||
* Call a DLL's WEP, allowing it to shut down.
|
||||
* FIXME: we always pass the WEP WEP_FREE_DLL, never WEP_SYSTEM_EXIT
|
||||
*/
|
||||
static BOOL16 MODULE_CallWEP( HMODULE16 hModule )
|
||||
{
|
||||
FARPROC16 WEP = (FARPROC16)0;
|
||||
WORD ordinal = MODULE_GetOrdinal( hModule, "WEP" );
|
||||
|
||||
if (ordinal) WEP = MODULE_GetEntryPoint( hModule, ordinal );
|
||||
if (!WEP)
|
||||
{
|
||||
dprintf_module( stddeb, "module %04x doesn't have a WEP\n", hModule );
|
||||
return FALSE;
|
||||
}
|
||||
return CallWindowsExitProc( WEP, WEP_FREE_DLL );
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
* MODULE_FreeModule
|
||||
*
|
||||
* Remove a module from memory.
|
||||
*/
|
||||
static void MODULE_FreeModule( HMODULE hModule )
|
||||
static void MODULE_FreeModule( HMODULE16 hModule )
|
||||
{
|
||||
HMODULE *hPrevModule;
|
||||
HMODULE16 *hPrevModule;
|
||||
NE_MODULE *pModule;
|
||||
SEGTABLEENTRY *pSegment;
|
||||
HMODULE *pModRef;
|
||||
HMODULE16 *pModRef;
|
||||
int i;
|
||||
|
||||
if (!(pModule = MODULE_GetPtr( hModule ))) return;
|
||||
if (pModule->flags & NE_FFLAGS_BUILTIN)
|
||||
return; /* Can't free built-in module */
|
||||
|
||||
/* FIXME: should call the exit code for the library here */
|
||||
if (pModule->flags & NE_FFLAGS_LIBMODULE) MODULE_CallWEP( hModule );
|
||||
|
||||
/* Free the objects owned by the module */
|
||||
|
||||
|
@ -885,10 +906,10 @@ static void MODULE_FreeModule( HMODULE hModule )
|
|||
|
||||
/* Free the referenced modules */
|
||||
|
||||
pModRef = (HMODULE*)NE_MODULE_TABLE( pModule );
|
||||
pModRef = (HMODULE16*)NE_MODULE_TABLE( pModule );
|
||||
for (i = 0; i < pModule->modref_count; i++, pModRef++)
|
||||
{
|
||||
FreeModule( *pModRef );
|
||||
FreeModule16( *pModRef );
|
||||
}
|
||||
|
||||
/* Free the module storage */
|
||||
|
@ -908,7 +929,7 @@ static void MODULE_FreeModule( HMODULE hModule )
|
|||
*/
|
||||
HINSTANCE LoadModule( LPCSTR name, LPVOID paramBlock )
|
||||
{
|
||||
HMODULE hModule;
|
||||
HMODULE16 hModule;
|
||||
HANDLE hInstance, hPrevInstance;
|
||||
NE_MODULE *pModule;
|
||||
LOADPARAMS *params = (LOADPARAMS *)paramBlock;
|
||||
|
@ -977,7 +998,7 @@ HINSTANCE LoadModule( LPCSTR name, LPVOID paramBlock )
|
|||
{
|
||||
/* If the DLL is not loaded yet, load it and store */
|
||||
/* its handle in the list of DLLs to initialize. */
|
||||
HMODULE hDLL;
|
||||
HMODULE16 hDLL;
|
||||
|
||||
if ((hDLL = LoadModule( buffer, (LPVOID)-1 )) == 2) /* file not found */
|
||||
{
|
||||
|
@ -1015,7 +1036,7 @@ HINSTANCE LoadModule( LPCSTR name, LPVOID paramBlock )
|
|||
SEGTABLEENTRY * pSegTable = (SEGTABLEENTRY *) NE_SEG_TABLE(pModule);
|
||||
SELFLOADHEADER *selfloadheader;
|
||||
STACK16FRAME *stack16Top;
|
||||
HMODULE hselfload = GetModuleHandle("WPROCS");
|
||||
HMODULE16 hselfload = GetModuleHandle("WPROCS");
|
||||
WORD oldss, oldsp, saved_dgroup = pSegTable[pModule->dgroup - 1].selector;
|
||||
fprintf (stderr, "Warning: %*.*s is a self-loading module\n"
|
||||
"Support for self-loading modules is very experimental\n",
|
||||
|
@ -1138,16 +1159,16 @@ HINSTANCE LoadModule( LPCSTR name, LPVOID paramBlock )
|
|||
|
||||
|
||||
/**********************************************************************
|
||||
* FreeModule (KERNEL.46)
|
||||
* FreeModule16 (KERNEL.46)
|
||||
*/
|
||||
BOOL FreeModule( HANDLE hModule )
|
||||
BOOL16 FreeModule16( HMODULE16 hModule )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
|
||||
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
|
||||
if (!(pModule = MODULE_GetPtr( hModule ))) return FALSE;
|
||||
|
||||
dprintf_module( stddeb, "FreeModule: %s count %d\n",
|
||||
dprintf_module( stddeb, "FreeModule16: %s count %d\n",
|
||||
MODULE_GetModuleName(hModule), pModule->count );
|
||||
if (--pModule->count == 0) MODULE_FreeModule( hModule );
|
||||
return TRUE;
|
||||
|
@ -1157,13 +1178,13 @@ BOOL FreeModule( HANDLE hModule )
|
|||
/**********************************************************************
|
||||
* GetModuleHandle (KERNEL.47)
|
||||
*/
|
||||
HMODULE WIN16_GetModuleHandle( SEGPTR name )
|
||||
HMODULE16 WIN16_GetModuleHandle( SEGPTR name )
|
||||
{
|
||||
if (HIWORD(name) == 0) return GetExePtr( (HANDLE)name );
|
||||
return MODULE_FindModule( PTR_SEG_TO_LIN(name) );
|
||||
}
|
||||
|
||||
HMODULE GetModuleHandle( LPCSTR name )
|
||||
HMODULE16 GetModuleHandle( LPCSTR name )
|
||||
{
|
||||
return MODULE_FindModule( name );
|
||||
}
|
||||
|
@ -1237,7 +1258,7 @@ HANDLE LoadLibrary( LPCSTR libname )
|
|||
void FreeLibrary( HANDLE handle )
|
||||
{
|
||||
dprintf_module( stddeb,"FreeLibrary: %04x\n", handle );
|
||||
FreeModule( handle );
|
||||
FreeModule16( handle );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1416,7 +1437,7 @@ FARPROC GetProcAddress( HANDLE hModule, SEGPTR name )
|
|||
/**********************************************************************
|
||||
* GetExpWinVer (KERNEL.167)
|
||||
*/
|
||||
WORD GetExpWinVer( HMODULE hModule )
|
||||
WORD GetExpWinVer( HMODULE16 hModule )
|
||||
{
|
||||
NE_MODULE *pModule = MODULE_GetPtr( hModule );
|
||||
return pModule ? pModule->expected_version : 0;
|
||||
|
@ -1426,7 +1447,7 @@ WORD GetExpWinVer( HMODULE hModule )
|
|||
/**********************************************************************
|
||||
* ModuleFirst (TOOLHELP.59)
|
||||
*/
|
||||
BOOL ModuleFirst( MODULEENTRY *lpme )
|
||||
BOOL16 ModuleFirst( MODULEENTRY *lpme )
|
||||
{
|
||||
lpme->wNext = hFirstModule;
|
||||
return ModuleNext( lpme );
|
||||
|
@ -1436,7 +1457,7 @@ BOOL ModuleFirst( MODULEENTRY *lpme )
|
|||
/**********************************************************************
|
||||
* ModuleNext (TOOLHELP.60)
|
||||
*/
|
||||
BOOL ModuleNext( MODULEENTRY *lpme )
|
||||
BOOL16 ModuleNext( MODULEENTRY *lpme )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
|
||||
|
@ -1457,7 +1478,7 @@ BOOL ModuleNext( MODULEENTRY *lpme )
|
|||
/**********************************************************************
|
||||
* ModuleFindName (TOOLHELP.61)
|
||||
*/
|
||||
BOOL ModuleFindName( MODULEENTRY *lpme, LPCSTR name )
|
||||
BOOL16 ModuleFindName( MODULEENTRY *lpme, LPCSTR name )
|
||||
{
|
||||
lpme->wNext = GetModuleHandle( name );
|
||||
return ModuleNext( lpme );
|
||||
|
@ -1467,7 +1488,7 @@ BOOL ModuleFindName( MODULEENTRY *lpme, LPCSTR name )
|
|||
/**********************************************************************
|
||||
* ModuleFindHandle (TOOLHELP.62)
|
||||
*/
|
||||
BOOL ModuleFindHandle( MODULEENTRY *lpme, HMODULE hModule )
|
||||
BOOL16 ModuleFindHandle( MODULEENTRY *lpme, HMODULE16 hModule )
|
||||
{
|
||||
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
|
||||
lpme->wNext = hModule;
|
||||
|
|
|
@ -533,7 +533,7 @@ static struct pe_data *PE_LoadImage( int fd, HMODULE hModule, WORD offset )
|
|||
}
|
||||
|
||||
HINSTANCE MODULE_CreateInstance(HMODULE hModule,LOADPARAMS *params);
|
||||
void InitTask(struct sigcontext_struct context);
|
||||
void InitTask(SIGCONTEXT context);
|
||||
|
||||
HINSTANCE PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params )
|
||||
{
|
||||
|
@ -604,7 +604,7 @@ HINSTANCE PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params )
|
|||
pSegment->selector=(void*)cts;
|
||||
pModule->ip=0;
|
||||
#else
|
||||
pSegment->selector=cts>>16;
|
||||
pSegment->selector=cts>>16; /* FIXME!! */
|
||||
pModule->ip=cts & 0xFFFF;
|
||||
#endif
|
||||
pSegment++;
|
||||
|
@ -644,7 +644,7 @@ HINSTANCE PE_LoadModule( int fd, OFSTRUCT *ofs, LOADPARAMS* params )
|
|||
int USER_InitApp(HINSTANCE hInstance);
|
||||
void PE_InitTEB(int hTEB);
|
||||
|
||||
void PE_Win32CallToStart(struct sigcontext_struct context)
|
||||
void PE_Win32CallToStart(SIGCONTEXT context)
|
||||
{
|
||||
int fs;
|
||||
HMODULE hModule;
|
||||
|
|
|
@ -54,13 +54,13 @@ wine_sigaction(int sig,struct sigaction * new, struct sigaction * old)
|
|||
* SIGALRM handler.
|
||||
*/
|
||||
#ifdef linux
|
||||
static void wine_timer(int signal, struct sigcontext_struct context_struct)
|
||||
static void wine_timer(int signal, SIGCONTEXT context_struct)
|
||||
{
|
||||
#elif defined(__svr4__)
|
||||
static void wine_timer(int signal, void *siginfo, ucontext_t *context)
|
||||
static void wine_timer(int signal, void *siginfo, SIGCONTEXT *context)
|
||||
{
|
||||
#else
|
||||
static void wine_timer(int signal, int code, struct sigcontext *context)
|
||||
static void wine_timer(int signal, int code, SIGCONTEXT *context)
|
||||
{
|
||||
#endif
|
||||
/* Should do real-time timers here */
|
||||
|
@ -75,14 +75,14 @@ static void wine_timer(int signal, int code, struct sigcontext *context)
|
|||
* SIGTRAP handler.
|
||||
*/
|
||||
#ifdef linux
|
||||
static void SIGNAL_trap(int signal, struct sigcontext_struct context_struct)
|
||||
static void SIGNAL_trap(int signal, SIGCONTEXT context_struct)
|
||||
{
|
||||
struct sigcontext_struct *context = &context_struct;
|
||||
SIGCONTEXT *context = &context_struct;
|
||||
#elif defined(__svr4__) || defined(_SCO_DS)
|
||||
static void SIGNAL_trap(int signal, void *siginfo, ucontext_t *context)
|
||||
static void SIGNAL_trap(int signal, void *siginfo, SIGCONTEXT *context)
|
||||
{
|
||||
#else
|
||||
static void SIGNAL_trap(int signal, int code, struct sigcontext *context)
|
||||
static void SIGNAL_trap(int signal, int code, SIGCONTEXT *context)
|
||||
{
|
||||
#endif
|
||||
wine_debug( signal, context ); /* Enter our debugger */
|
||||
|
@ -95,14 +95,14 @@ static void SIGNAL_trap(int signal, int code, struct sigcontext *context)
|
|||
* Segfault handler.
|
||||
*/
|
||||
#ifdef linux
|
||||
static void SIGNAL_fault(int signal, struct sigcontext_struct context_struct)
|
||||
static void SIGNAL_fault(int signal, SIGCONTEXT context_struct)
|
||||
{
|
||||
struct sigcontext_struct *context = &context_struct;
|
||||
SIGCONTEXT *context = &context_struct;
|
||||
#elif defined(__svr4__) || defined(_SCO_DS)
|
||||
static void SIGNAL_fault(int signal, void *siginfo, ucontext_t *context)
|
||||
static void SIGNAL_fault(int signal, void *siginfo, SIGCONTEXT *context)
|
||||
{
|
||||
#else
|
||||
static void SIGNAL_fault(int signal, int code, struct sigcontext *context)
|
||||
static void SIGNAL_fault(int signal, int code, SIGCONTEXT *context)
|
||||
{
|
||||
#endif
|
||||
if (CS_reg(context) == WINE_CODE_SELECTOR)
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
#include "module.h"
|
||||
#include "neexe.h"
|
||||
#include "options.h"
|
||||
#include "peexe.h"
|
||||
#include "pe_image.h"
|
||||
#include "queue.h"
|
||||
#include "toolhelp.h"
|
||||
#include "stddebug.h"
|
||||
|
@ -116,7 +118,7 @@ static HANDLE TASK_CreateDOSEnvironment(void)
|
|||
winpathlen += len + 1;
|
||||
}
|
||||
if (!winpathlen) winpathlen = 1;
|
||||
sysdirlen = GetSystemDirectory( NULL, 0 ) + 1;
|
||||
sysdirlen = GetSystemDirectory32A( NULL, 0 ) + 1;
|
||||
initial_size = 5 + winpathlen + /* PATH=xxxx */
|
||||
1 + /* BYTE 0 at end */
|
||||
sizeof(WORD) + /* WORD 1 */
|
||||
|
@ -176,7 +178,7 @@ static HANDLE TASK_CreateDOSEnvironment(void)
|
|||
*p++ = '\0';
|
||||
PUT_WORD( p, 1 );
|
||||
p += sizeof(WORD);
|
||||
GetSystemDirectory( p, sysdirlen );
|
||||
GetSystemDirectory32A( p, sysdirlen );
|
||||
strcat( p, "\\" );
|
||||
strcat( p, program_name );
|
||||
|
||||
|
@ -554,9 +556,19 @@ HTASK TASK_CreateTask( HMODULE hModule, HANDLE hInstance, HANDLE hPrevInstance,
|
|||
|
||||
if (Options.debug)
|
||||
{
|
||||
DBG_ADDR addr = { pSegTable[pModule->cs-1].selector, pModule->ip };
|
||||
fprintf( stderr, "Task '%s': ", name );
|
||||
DEBUG_AddBreakpoint( &addr );
|
||||
if (pModule->flags & NE_FFLAGS_WIN32)
|
||||
{
|
||||
DBG_ADDR addr = { 0, pModule->pe_module->load_addr +
|
||||
pModule->pe_module->pe_header->opt_coff.AddressOfEntryPoint };
|
||||
fprintf( stderr, "Win32 task '%s': ", name );
|
||||
DEBUG_AddBreakpoint( &addr );
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG_ADDR addr = { pSegTable[pModule->cs-1].selector, pModule->ip };
|
||||
fprintf( stderr, "Win16 task '%s': ", name );
|
||||
DEBUG_AddBreakpoint( &addr );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -584,7 +596,7 @@ static void TASK_DeleteTask( HTASK hTask )
|
|||
|
||||
/* Free the task module */
|
||||
|
||||
FreeModule( pTask->hModule );
|
||||
FreeModule16( pTask->hModule );
|
||||
|
||||
/* Close all open files of this task */
|
||||
|
||||
|
@ -619,6 +631,7 @@ void TASK_KillCurrentTask( int exitCode )
|
|||
extern void EXEC_ExitWindows( int retCode );
|
||||
|
||||
TDB* pTask = (TDB*) GlobalLock16( hCurrentTask );
|
||||
if (!pTask) EXEC_ExitWindows(0); /* No current task yet */
|
||||
|
||||
/* Perform USER cleanup */
|
||||
|
||||
|
@ -753,7 +766,7 @@ void TASK_Reschedule(void)
|
|||
#ifdef WINELIB
|
||||
void InitTask(void)
|
||||
#else
|
||||
void InitTask( struct sigcontext_struct context )
|
||||
void InitTask( SIGCONTEXT context )
|
||||
#endif
|
||||
{
|
||||
static int firstTask = 1;
|
||||
|
@ -959,12 +972,12 @@ void Yield(void)
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* MakeProcInstance (KERNEL.51)
|
||||
* MakeProcInstance16 (KERNEL.51)
|
||||
*/
|
||||
FARPROC MakeProcInstance( FARPROC func, HANDLE hInstance )
|
||||
FARPROC16 MakeProcInstance16( FARPROC16 func, HANDLE16 hInstance )
|
||||
{
|
||||
#ifdef WINELIB32
|
||||
return func; /* func can be called directly in Win32 */
|
||||
#ifdef WINELIB
|
||||
return func; /* func can be called directly in Winelib */
|
||||
#else
|
||||
BYTE *thunk;
|
||||
SEGPTR thunkaddr;
|
||||
|
@ -987,11 +1000,11 @@ FARPROC MakeProcInstance( FARPROC func, HANDLE hInstance )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* FreeProcInstance (KERNEL.52)
|
||||
* FreeProcInstance16 (KERNEL.52)
|
||||
*/
|
||||
void FreeProcInstance( FARPROC func )
|
||||
void FreeProcInstance16( FARPROC16 func )
|
||||
{
|
||||
#ifndef WINELIB32
|
||||
#ifndef WINELIB
|
||||
dprintf_task( stddeb, "FreeProcInstance(%08lx)\n", (DWORD)func );
|
||||
TASK_FreeThunk( hCurrentTask, (SEGPTR)func );
|
||||
#endif
|
||||
|
@ -1060,7 +1073,7 @@ HQUEUE GetTaskQueue( HANDLE hTask )
|
|||
* GetTaskQueueDS (KERNEL.118)
|
||||
*/
|
||||
#ifndef WINELIB
|
||||
void GetTaskQueueDS( struct sigcontext_struct context )
|
||||
void GetTaskQueueDS( SIGCONTEXT context )
|
||||
{
|
||||
DS_reg(&context) = GlobalHandleToSel( GetTaskQueue(0) );
|
||||
}
|
||||
|
@ -1071,7 +1084,7 @@ void GetTaskQueueDS( struct sigcontext_struct context )
|
|||
* GetTaskQueueES (KERNEL.119)
|
||||
*/
|
||||
#ifndef WINELIB
|
||||
void GetTaskQueueES( struct sigcontext_struct context )
|
||||
void GetTaskQueueES( SIGCONTEXT context )
|
||||
{
|
||||
ES_reg(&context) = GlobalHandleToSel( GetTaskQueue(0) );
|
||||
}
|
||||
|
@ -1081,7 +1094,7 @@ void GetTaskQueueES( struct sigcontext_struct context )
|
|||
/***********************************************************************
|
||||
* GetCurrentTask (KERNEL.36)
|
||||
*/
|
||||
HTASK GetCurrentTask(void)
|
||||
HTASK16 GetCurrentTask(void)
|
||||
{
|
||||
return hCurrentTask;
|
||||
}
|
||||
|
@ -1223,7 +1236,7 @@ HMODULE GetExePtr( HANDLE handle )
|
|||
/***********************************************************************
|
||||
* TaskFirst (TOOLHELP.63)
|
||||
*/
|
||||
BOOL TaskFirst( TASKENTRY *lpte )
|
||||
BOOL16 TaskFirst( TASKENTRY *lpte )
|
||||
{
|
||||
lpte->hNext = hFirstTask;
|
||||
return TaskNext( lpte );
|
||||
|
@ -1233,7 +1246,7 @@ BOOL TaskFirst( TASKENTRY *lpte )
|
|||
/***********************************************************************
|
||||
* TaskNext (TOOLHELP.64)
|
||||
*/
|
||||
BOOL TaskNext( TASKENTRY *lpte )
|
||||
BOOL16 TaskNext( TASKENTRY *lpte )
|
||||
{
|
||||
TDB *pTask;
|
||||
INSTANCEDATA *pInstData;
|
||||
|
@ -1265,7 +1278,7 @@ BOOL TaskNext( TASKENTRY *lpte )
|
|||
/***********************************************************************
|
||||
* TaskFindHandle (TOOLHELP.65)
|
||||
*/
|
||||
BOOL TaskFindHandle( TASKENTRY *lpte, HTASK hTask )
|
||||
BOOL16 TaskFindHandle( TASKENTRY *lpte, HTASK16 hTask )
|
||||
{
|
||||
lpte->hNext = hTask;
|
||||
return TaskNext( lpte );
|
||||
|
|
|
@ -485,24 +485,24 @@ UINT16 GlobalFlags16( HGLOBAL16 handle )
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* LockSegment (KERNEL.23)
|
||||
* LockSegment16 (KERNEL.23)
|
||||
*/
|
||||
HGLOBAL LockSegment( HGLOBAL handle )
|
||||
HGLOBAL16 LockSegment16( HGLOBAL16 handle )
|
||||
{
|
||||
dprintf_global( stddeb, "LockSegment: %04x\n", handle );
|
||||
if (handle == (HGLOBAL)-1) handle = CURRENT_DS;
|
||||
if (handle == (HGLOBAL16)-1) handle = CURRENT_DS;
|
||||
GET_ARENA_PTR(handle)->lockCount++;
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* UnlockSegment (KERNEL.24)
|
||||
* UnlockSegment16 (KERNEL.24)
|
||||
*/
|
||||
void UnlockSegment( HGLOBAL handle )
|
||||
void UnlockSegment16( HGLOBAL16 handle )
|
||||
{
|
||||
dprintf_global( stddeb, "UnlockSegment: %04x\n", handle );
|
||||
if (handle == (HGLOBAL)-1) handle = CURRENT_DS;
|
||||
if (handle == (HGLOBAL16)-1) handle = CURRENT_DS;
|
||||
GET_ARENA_PTR(handle)->lockCount--;
|
||||
/* FIXME: this ought to return the lock count in CX (go figure...) */
|
||||
}
|
||||
|
@ -546,7 +546,7 @@ SEGPTR GlobalWire( HGLOBAL16 handle )
|
|||
/***********************************************************************
|
||||
* GlobalUnWire (KERNEL.112)
|
||||
*/
|
||||
BOOL GlobalUnWire( HGLOBAL16 handle )
|
||||
BOOL16 GlobalUnWire( HGLOBAL16 handle )
|
||||
{
|
||||
return GlobalUnlock16( handle );
|
||||
}
|
||||
|
@ -588,7 +588,7 @@ LONG SetSwapAreaSize( WORD size )
|
|||
HGLOBAL16 GlobalLRUOldest( HGLOBAL16 handle )
|
||||
{
|
||||
dprintf_global( stddeb, "GlobalLRUOldest: %04x\n", handle );
|
||||
if (handle == (HGLOBAL)-1) handle = CURRENT_DS;
|
||||
if (handle == (HGLOBAL16)-1) handle = CURRENT_DS;
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
@ -599,7 +599,7 @@ HGLOBAL16 GlobalLRUOldest( HGLOBAL16 handle )
|
|||
HGLOBAL16 GlobalLRUNewest( HGLOBAL16 handle )
|
||||
{
|
||||
dprintf_global( stddeb, "GlobalLRUNewest: %04x\n", handle );
|
||||
if (handle == (HGLOBAL)-1) handle = CURRENT_DS;
|
||||
if (handle == (HGLOBAL16)-1) handle = CURRENT_DS;
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
@ -656,7 +656,7 @@ void GlobalUnfix( HGLOBAL16 handle )
|
|||
/***********************************************************************
|
||||
* FarSetOwner (KERNEL.403)
|
||||
*/
|
||||
void FarSetOwner( HANDLE handle, HANDLE hOwner )
|
||||
void FarSetOwner( HANDLE16 handle, HANDLE16 hOwner )
|
||||
{
|
||||
GET_ARENA_PTR(handle)->hOwner = hOwner;
|
||||
}
|
||||
|
@ -665,7 +665,7 @@ void FarSetOwner( HANDLE handle, HANDLE hOwner )
|
|||
/***********************************************************************
|
||||
* FarGetOwner (KERNEL.404)
|
||||
*/
|
||||
WORD FarGetOwner( HANDLE handle )
|
||||
HANDLE16 FarGetOwner( HANDLE16 handle )
|
||||
{
|
||||
return GET_ARENA_PTR(handle)->hOwner;
|
||||
}
|
||||
|
@ -693,7 +693,7 @@ WORD GlobalHandleToSel( HGLOBAL16 handle )
|
|||
/***********************************************************************
|
||||
* GlobalFirst (TOOLHELP.51)
|
||||
*/
|
||||
BOOL GlobalFirst( GLOBALENTRY *pGlobal, WORD wFlags )
|
||||
BOOL16 GlobalFirst( GLOBALENTRY *pGlobal, WORD wFlags )
|
||||
{
|
||||
if (wFlags == GLOBAL_LRU) return FALSE;
|
||||
pGlobal->dwNext = 0;
|
||||
|
@ -704,7 +704,7 @@ BOOL GlobalFirst( GLOBALENTRY *pGlobal, WORD wFlags )
|
|||
/***********************************************************************
|
||||
* GlobalNext (TOOLHELP.52)
|
||||
*/
|
||||
BOOL GlobalNext( GLOBALENTRY *pGlobal, WORD wFlags)
|
||||
BOOL16 GlobalNext( GLOBALENTRY *pGlobal, WORD wFlags)
|
||||
{
|
||||
GLOBALARENA *pArena;
|
||||
|
||||
|
@ -737,7 +737,7 @@ BOOL GlobalNext( GLOBALENTRY *pGlobal, WORD wFlags)
|
|||
/***********************************************************************
|
||||
* GlobalInfo (TOOLHELP.53)
|
||||
*/
|
||||
BOOL GlobalInfo( GLOBALINFO *pInfo )
|
||||
BOOL16 GlobalInfo( GLOBALINFO *pInfo )
|
||||
{
|
||||
int i;
|
||||
GLOBALARENA *pArena;
|
||||
|
@ -754,7 +754,7 @@ BOOL GlobalInfo( GLOBALINFO *pInfo )
|
|||
/***********************************************************************
|
||||
* GlobalEntryHandle (TOOLHELP.54)
|
||||
*/
|
||||
BOOL GlobalEntryHandle( GLOBALENTRY *pGlobal, HGLOBAL16 hItem )
|
||||
BOOL16 GlobalEntryHandle( GLOBALENTRY *pGlobal, HGLOBAL16 hItem )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ BOOL GlobalEntryHandle( GLOBALENTRY *pGlobal, HGLOBAL16 hItem )
|
|||
/***********************************************************************
|
||||
* GlobalEntryModule (TOOLHELP.55)
|
||||
*/
|
||||
BOOL GlobalEntryModule( GLOBALENTRY *pGlobal, HMODULE16 hModule, WORD wSeg )
|
||||
BOOL16 GlobalEntryModule( GLOBALENTRY *pGlobal, HMODULE16 hModule, WORD wSeg )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -772,7 +772,7 @@ BOOL GlobalEntryModule( GLOBALENTRY *pGlobal, HMODULE16 hModule, WORD wSeg )
|
|||
/***********************************************************************
|
||||
* MemManInfo (TOOLHELP.72)
|
||||
*/
|
||||
BOOL MemManInfo( MEMMANINFO *pInfo )
|
||||
BOOL16 MemManInfo( MEMMANINFO *pInfo )
|
||||
{
|
||||
#ifdef linux
|
||||
/* FIXME: does not take into account the dwSize member
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright 1996 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#define NO_TRANSITION_TYPES /* This file is Win32-clean */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -236,7 +237,7 @@ static SUBHEAP *HEAP_FindSubHeap( HEAP *heap, LPCVOID ptr )
|
|||
*
|
||||
* Make sure the heap storage is committed up to (not including) ptr.
|
||||
*/
|
||||
static BOOL HEAP_Commit( SUBHEAP *subheap, void *ptr )
|
||||
static BOOL32 HEAP_Commit( SUBHEAP *subheap, void *ptr )
|
||||
{
|
||||
DWORD size = (DWORD)((char *)ptr - (char *)subheap);
|
||||
size = (size + 0xfff) & 0xfffff000; /* Align size on a page boundary */
|
||||
|
@ -262,7 +263,7 @@ static BOOL HEAP_Commit( SUBHEAP *subheap, void *ptr )
|
|||
*
|
||||
* If possible, decommit the heap storage from (including) 'ptr'.
|
||||
*/
|
||||
static BOOL HEAP_Decommit( SUBHEAP *subheap, void *ptr )
|
||||
static BOOL32 HEAP_Decommit( SUBHEAP *subheap, void *ptr )
|
||||
{
|
||||
DWORD size = (DWORD)((char *)ptr - (char *)subheap);
|
||||
size = (size + 0xfff) & 0xfffff000; /* Align size on a page boundary */
|
||||
|
@ -373,7 +374,18 @@ static void HEAP_MakeInUseBlockFree( SUBHEAP *subheap, ARENA_INUSE *pArena )
|
|||
if (((char *)pFree == (char *)subheap + subheap->headerSize) &&
|
||||
(subheap != &subheap->heap->subheap))
|
||||
{
|
||||
/* FIXME: free the sub-heap here */
|
||||
SUBHEAP *pPrev = &subheap->heap->subheap;
|
||||
/* Remove the free block from the list */
|
||||
pFree->next->prev = pFree->prev;
|
||||
pFree->prev->next = pFree->next;
|
||||
/* Remove the subheap from the list */
|
||||
while (pPrev && (pPrev->next != subheap)) pPrev = pPrev->next;
|
||||
if (pPrev) pPrev->next = subheap->next;
|
||||
/* Free the memory */
|
||||
subheap->magic = 0;
|
||||
if (subheap->selector) FreeSelector( subheap->selector );
|
||||
VirtualFree( subheap, subheap->size, MEM_DECOMMIT );
|
||||
VirtualFree( subheap, 0, MEM_RELEASE );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -541,7 +553,7 @@ static ARENA_FREE *HEAP_FindFreeBlock( HEAP *heap, DWORD size,
|
|||
*
|
||||
* Check that the pointer is inside the range possible for arenas.
|
||||
*/
|
||||
static BOOL HEAP_IsValidArenaPtr( HEAP *heap, void *ptr )
|
||||
static BOOL32 HEAP_IsValidArenaPtr( HEAP *heap, void *ptr )
|
||||
{
|
||||
int i;
|
||||
SUBHEAP *subheap = HEAP_FindSubHeap( heap, ptr );
|
||||
|
@ -557,7 +569,7 @@ static BOOL HEAP_IsValidArenaPtr( HEAP *heap, void *ptr )
|
|||
/***********************************************************************
|
||||
* HEAP_ValidateFreeArena
|
||||
*/
|
||||
static BOOL HEAP_ValidateFreeArena( SUBHEAP *subheap, ARENA_FREE *pArena )
|
||||
static BOOL32 HEAP_ValidateFreeArena( SUBHEAP *subheap, ARENA_FREE *pArena )
|
||||
{
|
||||
char *heapEnd = (char *)subheap + subheap->size;
|
||||
|
||||
|
@ -639,7 +651,7 @@ static BOOL HEAP_ValidateFreeArena( SUBHEAP *subheap, ARENA_FREE *pArena )
|
|||
/***********************************************************************
|
||||
* HEAP_ValidateInUseArena
|
||||
*/
|
||||
static BOOL HEAP_ValidateInUseArena( SUBHEAP *subheap, ARENA_INUSE *pArena )
|
||||
static BOOL32 HEAP_ValidateInUseArena( SUBHEAP *subheap, ARENA_INUSE *pArena )
|
||||
{
|
||||
char *heapEnd = (char *)subheap + subheap->size;
|
||||
|
||||
|
@ -829,7 +841,7 @@ HANDLE32 HeapCreate( DWORD flags, DWORD initialSize, DWORD maxSize )
|
|||
/***********************************************************************
|
||||
* HeapDestroy (KERNEL32.337)
|
||||
*/
|
||||
BOOL HeapDestroy( HANDLE32 heap )
|
||||
BOOL32 HeapDestroy( HANDLE32 heap )
|
||||
{
|
||||
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||
SUBHEAP *subheap;
|
||||
|
@ -842,6 +854,7 @@ BOOL HeapDestroy( HANDLE32 heap )
|
|||
while (subheap)
|
||||
{
|
||||
SUBHEAP *next = subheap->next;
|
||||
if (subheap->selector) FreeSelector( subheap->selector );
|
||||
VirtualFree( subheap, subheap->commitSize, MEM_DECOMMIT );
|
||||
VirtualFree( subheap, 0, MEM_RELEASE );
|
||||
subheap = next;
|
||||
|
@ -913,7 +926,7 @@ LPVOID HeapAlloc( HANDLE32 heap, DWORD flags, DWORD size )
|
|||
/***********************************************************************
|
||||
* HeapFree (KERNEL32.338)
|
||||
*/
|
||||
BOOL HeapFree( HANDLE32 heap, DWORD flags, LPVOID ptr )
|
||||
BOOL32 HeapFree( HANDLE32 heap, DWORD flags, LPVOID ptr )
|
||||
{
|
||||
ARENA_INUSE *pInUse;
|
||||
SUBHEAP *subheap;
|
||||
|
@ -1030,7 +1043,7 @@ LPVOID HeapReAlloc( HANDLE32 heap, DWORD flags, LPVOID ptr, DWORD size )
|
|||
+ sizeof(ARENA_FREE) - sizeof(ARENA_INUSE);
|
||||
pInUse->threadId = GetCurrentTask();
|
||||
pInUse->magic = ARENA_INUSE_MAGIC;
|
||||
HEAP_ShrinkBlock( subheap, pInUse, size );
|
||||
HEAP_ShrinkBlock( newsubheap, pInUse, size );
|
||||
memcpy( pInUse + 1, pArena + 1, oldSize );
|
||||
|
||||
/* Free the previous block */
|
||||
|
@ -1077,7 +1090,7 @@ DWORD HeapCompact( HANDLE32 heap, DWORD flags )
|
|||
/***********************************************************************
|
||||
* HeapLock (KERNEL32.339)
|
||||
*/
|
||||
BOOL HeapLock( HANDLE32 heap )
|
||||
BOOL32 HeapLock( HANDLE32 heap )
|
||||
{
|
||||
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||
|
||||
|
@ -1090,7 +1103,7 @@ BOOL HeapLock( HANDLE32 heap )
|
|||
/***********************************************************************
|
||||
* HeapUnlock (KERNEL32.342)
|
||||
*/
|
||||
BOOL HeapUnlock( HANDLE32 heap )
|
||||
BOOL32 HeapUnlock( HANDLE32 heap )
|
||||
{
|
||||
HEAP *heapPtr = HEAP_GetPtr( heap );
|
||||
|
||||
|
@ -1133,7 +1146,7 @@ DWORD HeapSize( HANDLE32 heap, DWORD flags, LPVOID ptr )
|
|||
/***********************************************************************
|
||||
* HeapValidate (KERNEL32.343)
|
||||
*/
|
||||
BOOL HeapValidate( HANDLE32 heap, DWORD flags, LPVOID block )
|
||||
BOOL32 HeapValidate( HANDLE32 heap, DWORD flags, LPVOID block )
|
||||
{
|
||||
SUBHEAP *subheap;
|
||||
HEAP *heapPtr = (HEAP *)heap;
|
||||
|
@ -1185,7 +1198,7 @@ BOOL HeapValidate( HANDLE32 heap, DWORD flags, LPVOID block )
|
|||
/***********************************************************************
|
||||
* HeapWalk (KERNEL32.344)
|
||||
*/
|
||||
BOOL HeapWalk( HANDLE32 heap, void *entry )
|
||||
BOOL32 HeapWalk( HANDLE32 heap, void *entry )
|
||||
{
|
||||
fprintf( stderr, "HeapWalk(%08x): not implemented\n", heap );
|
||||
return FALSE;
|
||||
|
|
|
@ -78,7 +78,7 @@ typedef struct
|
|||
WORD hdelta; /* 18 Delta to expand the handle table */
|
||||
WORD expand; /* 1a Pointer to expand function (unused) */
|
||||
WORD pstat; /* 1c Pointer to status structure (unused) */
|
||||
FARPROC notify WINE_PACKED; /* 1e Pointer to LocalNotify() function */
|
||||
FARPROC16 notify WINE_PACKED; /* 1e Pointer to LocalNotify() function */
|
||||
WORD lock; /* 22 Lock count for the heap */
|
||||
WORD extra; /* 24 Extra bytes to allocate when expanding */
|
||||
WORD minsize; /* 26 Minimum size of the heap */
|
||||
|
@ -294,7 +294,7 @@ static void LOCAL_PrintHeap( HANDLE16 ds )
|
|||
/***********************************************************************
|
||||
* LocalInit (KERNEL.4)
|
||||
*/
|
||||
BOOL LocalInit( HANDLE selector, WORD start, WORD end )
|
||||
BOOL16 LocalInit( HANDLE16 selector, WORD start, WORD end )
|
||||
{
|
||||
char *ptr;
|
||||
WORD heapInfoArena, freeArena, lastArena;
|
||||
|
@ -410,7 +410,7 @@ BOOL LocalInit( HANDLE selector, WORD start, WORD end )
|
|||
*/
|
||||
static void LOCAL_GrowHeap( HANDLE16 ds )
|
||||
{
|
||||
HANDLE hseg = GlobalHandle16( ds );
|
||||
HANDLE16 hseg = GlobalHandle16( ds );
|
||||
LONG oldsize = GlobalSize16( hseg );
|
||||
LONG end;
|
||||
LOCALHEAPINFO *pHeapInfo;
|
||||
|
@ -814,7 +814,7 @@ static HLOCAL16 LOCAL_GetBlock( HANDLE16 ds, WORD size, WORD flags )
|
|||
/***********************************************************************
|
||||
* LOCAL_NewHTable
|
||||
*/
|
||||
static BOOL LOCAL_NewHTable( HANDLE16 ds )
|
||||
static BOOL16 LOCAL_NewHTable( HANDLE16 ds )
|
||||
{
|
||||
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
LOCALHEAPINFO *pInfo;
|
||||
|
@ -1230,7 +1230,7 @@ LPSTR LOCAL_Lock( HANDLE16 ds, HLOCAL16 handle )
|
|||
/***********************************************************************
|
||||
* LOCAL_Unlock
|
||||
*/
|
||||
BOOL LOCAL_Unlock( HANDLE16 ds, HLOCAL16 handle )
|
||||
BOOL16 LOCAL_Unlock( HANDLE16 ds, HLOCAL16 handle )
|
||||
{
|
||||
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
|
||||
|
@ -1460,10 +1460,10 @@ UINT16 LocalCompact16( UINT16 minfree )
|
|||
/***********************************************************************
|
||||
* LocalNotify (KERNEL.14)
|
||||
*/
|
||||
FARPROC LocalNotify( FARPROC func )
|
||||
FARPROC16 LocalNotify( FARPROC16 func )
|
||||
{
|
||||
LOCALHEAPINFO *pInfo;
|
||||
FARPROC oldNotify;
|
||||
FARPROC16 oldNotify;
|
||||
HANDLE16 ds = CURRENT_DS;
|
||||
|
||||
if (!(pInfo = LOCAL_GetHeap( ds )))
|
||||
|
@ -1492,7 +1492,7 @@ UINT16 LocalShrink16( HGLOBAL16 handle, UINT16 newsize )
|
|||
/***********************************************************************
|
||||
* GetHeapSpaces (KERNEL.138)
|
||||
*/
|
||||
DWORD GetHeapSpaces( HMODULE module )
|
||||
DWORD GetHeapSpaces( HMODULE16 module )
|
||||
{
|
||||
NE_MODULE *pModule;
|
||||
WORD ds;
|
||||
|
@ -1545,7 +1545,7 @@ WORD LocalHandleDelta( WORD delta )
|
|||
/***********************************************************************
|
||||
* LocalInfo (TOOLHELP.56)
|
||||
*/
|
||||
BOOL LocalInfo( LOCALINFO *pLocalInfo, HGLOBAL handle )
|
||||
BOOL16 LocalInfo( LOCALINFO *pLocalInfo, HGLOBAL16 handle )
|
||||
{
|
||||
LOCALHEAPINFO *pInfo = LOCAL_GetHeap(SELECTOROF(WIN16_GlobalLock16(handle)));
|
||||
if (!pInfo) return FALSE;
|
||||
|
@ -1557,7 +1557,7 @@ BOOL LocalInfo( LOCALINFO *pLocalInfo, HGLOBAL handle )
|
|||
/***********************************************************************
|
||||
* LocalFirst (TOOLHELP.57)
|
||||
*/
|
||||
BOOL LocalFirst( LOCALENTRY *pLocalEntry, HGLOBAL handle )
|
||||
BOOL16 LocalFirst( LOCALENTRY *pLocalEntry, HGLOBAL16 handle )
|
||||
{
|
||||
WORD ds = GlobalHandleToSel( handle );
|
||||
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
|
@ -1580,7 +1580,7 @@ BOOL LocalFirst( LOCALENTRY *pLocalEntry, HGLOBAL handle )
|
|||
/***********************************************************************
|
||||
* LocalNext (TOOLHELP.58)
|
||||
*/
|
||||
BOOL LocalNext( LOCALENTRY *pLocalEntry )
|
||||
BOOL16 LocalNext( LOCALENTRY *pLocalEntry )
|
||||
{
|
||||
WORD ds = GlobalHandleToSel( pLocalEntry->hHeap );
|
||||
char *ptr = PTR_SEG_OFF_TO_LIN( ds, 0 );
|
||||
|
|
|
@ -101,8 +101,8 @@ WORD FreeSelector( WORD sel )
|
|||
* Set the LDT entries for an array of selectors.
|
||||
*/
|
||||
static void SELECTOR_SetEntries( WORD sel, const void *base, DWORD size,
|
||||
enum seg_type type, BOOL is32bit,
|
||||
BOOL readonly )
|
||||
enum seg_type type, BOOL32 is32bit,
|
||||
BOOL32 readonly )
|
||||
{
|
||||
ldt_entry entry;
|
||||
WORD i, count;
|
||||
|
@ -136,7 +136,7 @@ static void SELECTOR_SetEntries( WORD sel, const void *base, DWORD size,
|
|||
* Allocate selectors for a block of linear memory.
|
||||
*/
|
||||
WORD SELECTOR_AllocBlock( const void *base, DWORD size, enum seg_type type,
|
||||
BOOL is32bit, BOOL readonly )
|
||||
BOOL32 is32bit, BOOL32 readonly )
|
||||
{
|
||||
WORD sel, count;
|
||||
|
||||
|
@ -154,7 +154,7 @@ WORD SELECTOR_AllocBlock( const void *base, DWORD size, enum seg_type type,
|
|||
* Change the size of a block of selectors.
|
||||
*/
|
||||
WORD SELECTOR_ReallocBlock( WORD sel, const void *base, DWORD size,
|
||||
enum seg_type type, BOOL is32bit, BOOL readonly )
|
||||
enum seg_type type, BOOL32 is32bit, BOOL32 readonly)
|
||||
{
|
||||
WORD i, oldcount, newcount;
|
||||
ldt_entry entry;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright 1996 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#define NO_TRANSITION_TYPES /* This file is Win32-clean */
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include "windows.h"
|
||||
|
@ -333,3 +334,39 @@ INT32 lstrncmpi32W( LPCWSTR str1, LPCWSTR str2, INT32 n )
|
|||
}
|
||||
return toupper(*str1) - toupper(*str2);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RtlFillMemory (KERNEL32.441)
|
||||
*/
|
||||
VOID RtlFillMemory( LPVOID ptr, UINT32 len, UINT32 fill )
|
||||
{
|
||||
memset( ptr, fill, len );
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RtlMoveMemory (KERNEL32.442)
|
||||
*/
|
||||
VOID RtlMoveMemory( LPVOID dst, LPCVOID src, UINT32 len )
|
||||
{
|
||||
/* memcpy does not support overlapped copies, */
|
||||
/* and memmove is not portable. */
|
||||
if (((BYTE *)dst + len <= (BYTE *)src) ||
|
||||
((BYTE *)src + len <= (BYTE *)dst))
|
||||
{
|
||||
memcpy( dst, src, len );
|
||||
return;
|
||||
}
|
||||
/* do it the hard way (FIXME: could do better than this) */
|
||||
while (len--) *((BYTE *)dst)++ = *((BYTE *)src)++;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* RtlZeroMemory (KERNEL32.444)
|
||||
*/
|
||||
VOID RtlZeroMemory( LPVOID ptr, UINT32 len )
|
||||
{
|
||||
memset( ptr, 0, len );
|
||||
}
|
||||
|
|
|
@ -2292,7 +2292,7 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, LPLOGFONT16 lplf ,LPTEXTMET
|
|||
lplf->lfWeight=fontstyles[i].weight;
|
||||
hf=CreateFontIndirect(lplf);
|
||||
hf=SelectObject(hdc,hf);
|
||||
GetTextMetrics(hdc,lptm);
|
||||
GetTextMetrics16(hdc,lptm);
|
||||
hf=SelectObject(hdc,hf);
|
||||
DeleteObject(hf);
|
||||
|
||||
|
|
411
misc/driver.c
411
misc/driver.c
|
@ -2,14 +2,14 @@
|
|||
* Wine Drivers functions
|
||||
*
|
||||
* Copyright 1994 Martin Ayotte
|
||||
static char Copyright[] = "Copyright Martin Ayotte, 1994";
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "windows.h"
|
||||
#include "win.h"
|
||||
#include "user.h"
|
||||
#include "callback.h"
|
||||
#include "driver.h"
|
||||
#include "module.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
@ -17,205 +17,294 @@ LPDRIVERITEM lpDrvItemList = NULL;
|
|||
|
||||
void LoadStartupDrivers(void)
|
||||
{
|
||||
HDRVR hDrv;
|
||||
char str[256];
|
||||
LPSTR ptr = str;
|
||||
LPSTR file = "SYSTEM.INI";
|
||||
if (GetPrivateProfileString("drivers", NULL,
|
||||
"", str, sizeof(str), file) < 2) {
|
||||
fprintf(stderr,
|
||||
"LoadStartupDrivers // can't find drivers section in '%s'\n",
|
||||
file);
|
||||
return;
|
||||
}
|
||||
while(strlen(ptr) != 0) {
|
||||
dprintf_driver(stddeb,"LoadStartupDrivers // str='%s'\n", ptr);
|
||||
hDrv = OpenDriver(ptr, "drivers", 0L);
|
||||
dprintf_driver(stddeb,
|
||||
"LoadStartupDrivers // hDrv=%04x\n", hDrv);
|
||||
ptr += strlen(ptr) + 1;
|
||||
}
|
||||
dprintf_driver(stddeb,"LoadStartupDrivers // end of list !\n");
|
||||
HDRVR16 hDrv;
|
||||
char str[256];
|
||||
LPSTR ptr;
|
||||
|
||||
if (GetPrivateProfileString( "drivers", NULL, "", str, sizeof(str),
|
||||
"SYSTEM.INI" ) < 2)
|
||||
{
|
||||
fprintf( stderr,
|
||||
"LoadStartupDrivers // can't find drivers section in system.ini\n" );
|
||||
return;
|
||||
}
|
||||
|
||||
ptr = str;
|
||||
while (lstrlen32A( ptr ) != 0)
|
||||
{
|
||||
dprintf_driver( stddeb, "LoadStartupDrivers // str='%s'\n", ptr );
|
||||
hDrv = OpenDriver( ptr, "drivers", 0L );
|
||||
dprintf_driver( stddeb, "LoadStartupDrivers // hDrv=%04x\n", hDrv );
|
||||
ptr += lstrlen32A(ptr) + 1;
|
||||
}
|
||||
dprintf_driver( stddeb, "LoadStartupDrivers // end of list !\n" );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* SendDriverMessage [USER.251]
|
||||
*/
|
||||
LRESULT SendDriverMessage(HDRVR hDriver, WORD msg, LPARAM lParam1, LPARAM lParam2)
|
||||
LRESULT SendDriverMessage(HDRVR16 hDriver, UINT16 msg, LPARAM lParam1,
|
||||
LPARAM lParam2)
|
||||
{
|
||||
dprintf_driver(stdnimp,"SendDriverMessage(%04x, %04X, %08lX, %08lX);\n",
|
||||
hDriver, msg, lParam1, lParam2);
|
||||
return 0;
|
||||
LPDRIVERITEM lpdrv;
|
||||
LRESULT retval;
|
||||
|
||||
dprintf_driver( stddeb, "SendDriverMessage(%04x, %04X, %08lX, %08lX)\n",
|
||||
hDriver, msg, lParam1, lParam2 );
|
||||
|
||||
lpdrv = (LPDRIVERITEM)GlobalLock16( hDriver );
|
||||
if (lpdrv == NULL || lpdrv->dis.hDriver != hDriver)
|
||||
{
|
||||
GlobalUnlock16( hDriver );
|
||||
return 0;
|
||||
}
|
||||
|
||||
retval = CallDriverProc( lpdrv->lpDrvProc, 0L /* FIXME */, hDriver, msg,
|
||||
lParam1, lParam2 );
|
||||
|
||||
dprintf_driver( stddeb, "SendDriverMessage // retval = %ld\n", retval );
|
||||
|
||||
GlobalUnlock16( hDriver );
|
||||
return retval;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* OpenDriver [USER.252]
|
||||
*/
|
||||
HDRVR OpenDriver(LPSTR lpDriverName, LPSTR lpSectionName, LPARAM lParam)
|
||||
HDRVR16 OpenDriver(LPSTR lpDriverName, LPSTR lpSectionName, LPARAM lParam)
|
||||
{
|
||||
HDRVR hDrvr;
|
||||
LPDRIVERITEM lpnewdrv;
|
||||
LPDRIVERITEM lpdrv = lpDrvItemList;
|
||||
char DrvName[128];
|
||||
dprintf_driver(stddeb,"OpenDriver('%s', '%s', %08lX);\n",
|
||||
lpDriverName, lpSectionName, lParam);
|
||||
if (lpSectionName == NULL) lpSectionName = "drivers";
|
||||
GetPrivateProfileString(lpSectionName, lpDriverName,
|
||||
"", DrvName, sizeof(DrvName), "SYSTEM.INI");
|
||||
dprintf_driver(stddeb,"OpenDriver // DrvName='%s'\n", DrvName);
|
||||
if (strlen(DrvName) < 1) return 0;
|
||||
while (lpdrv != NULL) {
|
||||
if (lpdrv->lpNextItem == NULL) break;
|
||||
lpdrv = lpdrv->lpNextItem;
|
||||
}
|
||||
hDrvr = GlobalAlloc16(GMEM_MOVEABLE, sizeof(DRIVERITEM));
|
||||
lpnewdrv = (LPDRIVERITEM) GlobalLock16(hDrvr);
|
||||
if (lpnewdrv == NULL) return 0;
|
||||
lpnewdrv->dis.length = sizeof(DRIVERINFOSTRUCT);
|
||||
lpnewdrv->dis.hModule = 0;
|
||||
/* lpnewdrv->dis.hModule = LoadImage(DrvName, DLL, 0);
|
||||
if (lpnewdrv->dis.hModule == 0) {
|
||||
GlobalUnlock(hDrvr);
|
||||
GlobalFree(hDrvr);
|
||||
return 0;
|
||||
} */
|
||||
lpnewdrv->dis.hDriver = hDrvr;
|
||||
strcpy(lpnewdrv->dis.szAliasName, lpDriverName);
|
||||
lpnewdrv->count = 0;
|
||||
lpnewdrv->lpNextItem = NULL;
|
||||
if (lpDrvItemList == NULL || lpdrv == NULL) {
|
||||
lpDrvItemList = lpnewdrv;
|
||||
lpnewdrv->lpPrevItem = NULL;
|
||||
}
|
||||
else {
|
||||
lpdrv->lpNextItem = lpnewdrv;
|
||||
lpnewdrv->lpPrevItem = lpdrv;
|
||||
}
|
||||
lpnewdrv->lpDrvProc = (DRIVERPROC)NULL;
|
||||
dprintf_driver(stddeb,"OpenDriver // hDrvr=%04x loaded !\n", hDrvr);
|
||||
return hDrvr;
|
||||
HDRVR16 hDrvr;
|
||||
LPDRIVERITEM lpdrv, lpnewdrv;
|
||||
char DrvName[128];
|
||||
WORD ordinal;
|
||||
|
||||
dprintf_driver( stddeb,"OpenDriver('%s', '%s', %08lX);\n",
|
||||
lpDriverName, lpSectionName, lParam );
|
||||
|
||||
if (lpSectionName == NULL) lpSectionName = "drivers";
|
||||
GetPrivateProfileString( lpSectionName, lpDriverName, "", DrvName,
|
||||
sizeof(DrvName), "SYSTEM.INI" );
|
||||
dprintf_driver( stddeb,"OpenDriver // DrvName='%s'\n", DrvName );
|
||||
if (lstrlen32A(DrvName) < 1) return 0;
|
||||
|
||||
lpdrv = lpDrvItemList;
|
||||
while (lpdrv) /* XXX find it... like this? */
|
||||
{
|
||||
if (!lstrcmpi32A( lpDriverName, lpdrv->dis.szAliasName ))
|
||||
{
|
||||
lpdrv->count++;
|
||||
SendDriverMessage( lpdrv->dis.hDriver, DRV_OPEN, 0L, lParam );
|
||||
return lpdrv->dis.hDriver;
|
||||
}
|
||||
lpdrv = lpdrv->lpNextItem;
|
||||
}
|
||||
|
||||
lpdrv = lpDrvItemList; /* find end of list */
|
||||
if (lpdrv != NULL)
|
||||
while (lpdrv->lpNextItem != NULL)
|
||||
lpdrv = lpdrv->lpNextItem;
|
||||
|
||||
hDrvr = GlobalAlloc16( GMEM_MOVEABLE, sizeof(DRIVERITEM) );
|
||||
lpnewdrv = (LPDRIVERITEM)GlobalLock16( hDrvr );
|
||||
if (lpnewdrv == NULL) return 0;
|
||||
lpnewdrv->dis.length = sizeof( DRIVERINFOSTRUCT16 );
|
||||
lpnewdrv->dis.hModule = LoadModule( DrvName, (LPVOID)-1 );
|
||||
if (!lpnewdrv->dis.hModule)
|
||||
{
|
||||
GlobalUnlock16( hDrvr );
|
||||
GlobalFree16( hDrvr );
|
||||
return 0;
|
||||
}
|
||||
lpnewdrv->dis.hDriver = hDrvr;
|
||||
lstrcpy32A( lpnewdrv->dis.szAliasName, lpDriverName );
|
||||
lpnewdrv->count = 1;
|
||||
ordinal = MODULE_GetOrdinal( lpnewdrv->dis.hModule, "DRIVERPROC" );
|
||||
if (!ordinal ||
|
||||
!(lpnewdrv->lpDrvProc = MODULE_GetEntryPoint( lpnewdrv->dis.hModule,
|
||||
ordinal )))
|
||||
{
|
||||
FreeModule16( lpnewdrv->dis.hModule );
|
||||
GlobalUnlock16( hDrvr );
|
||||
GlobalFree16( hDrvr );
|
||||
return 0;
|
||||
}
|
||||
|
||||
lpnewdrv->lpNextItem = NULL;
|
||||
if (lpDrvItemList == NULL)
|
||||
{
|
||||
lpDrvItemList = lpnewdrv;
|
||||
lpnewdrv->lpPrevItem = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
lpdrv->lpNextItem = lpnewdrv;
|
||||
lpnewdrv->lpPrevItem = lpdrv;
|
||||
}
|
||||
|
||||
SendDriverMessage( hDrvr, DRV_LOAD, 0L, lParam );
|
||||
SendDriverMessage( hDrvr, DRV_ENABLE, 0L, lParam );
|
||||
SendDriverMessage( hDrvr, DRV_OPEN, 0L, lParam );
|
||||
|
||||
dprintf_driver( stddeb, "OpenDriver // hDrvr=%04x loaded !\n", hDrvr );
|
||||
return hDrvr;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* CloseDriver [USER.253]
|
||||
*/
|
||||
LRESULT CloseDriver(HDRVR hDrvr, LPARAM lParam1, LPARAM lParam2)
|
||||
LRESULT CloseDriver(HDRVR16 hDrvr, LPARAM lParam1, LPARAM lParam2)
|
||||
{
|
||||
LPDRIVERITEM lpdrv;
|
||||
dprintf_driver(stddeb,
|
||||
"CloseDriver(%04x, %08lX, %08lX);\n", hDrvr, lParam1, lParam2);
|
||||
lpdrv = (LPDRIVERITEM) GlobalLock16(hDrvr);
|
||||
if (lpdrv != NULL && lpdrv->dis.hDriver == hDrvr) {
|
||||
if (lpdrv->lpPrevItem)
|
||||
((LPDRIVERITEM)lpdrv->lpPrevItem)->lpNextItem = lpdrv->lpNextItem;
|
||||
if (lpdrv->lpNextItem)
|
||||
((LPDRIVERITEM)lpdrv->lpNextItem)->lpPrevItem = lpdrv->lpPrevItem;
|
||||
GlobalUnlock16(hDrvr);
|
||||
GlobalFree16(hDrvr);
|
||||
dprintf_driver(stddeb,"CloseDriver // hDrvr=%04x closed !\n", hDrvr);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
LPDRIVERITEM lpdrv;
|
||||
|
||||
dprintf_driver( stddeb, "CloseDriver(%04x, %08lX, %08lX);\n",
|
||||
hDrvr, lParam1, lParam2 );
|
||||
|
||||
lpdrv = (LPDRIVERITEM)GlobalLock16( hDrvr );
|
||||
if (lpdrv != NULL && lpdrv->dis.hDriver == hDrvr)
|
||||
{
|
||||
SendDriverMessage( hDrvr, DRV_CLOSE, lParam1, lParam2 );
|
||||
if (--lpdrv->count == 0)
|
||||
{
|
||||
SendDriverMessage( hDrvr, DRV_DISABLE, lParam1, lParam2 );
|
||||
SendDriverMessage( hDrvr, DRV_FREE, lParam1, lParam2 );
|
||||
|
||||
if (lpdrv->lpPrevItem)
|
||||
lpdrv->lpPrevItem->lpNextItem = lpdrv->lpNextItem;
|
||||
else
|
||||
lpDrvItemList = lpdrv->lpNextItem;
|
||||
if (lpdrv->lpNextItem)
|
||||
lpdrv->lpNextItem->lpPrevItem = lpdrv->lpPrevItem;
|
||||
|
||||
FreeModule16( lpdrv->dis.hModule );
|
||||
GlobalUnlock16( hDrvr );
|
||||
GlobalFree16( hDrvr );
|
||||
}
|
||||
|
||||
dprintf_driver( stddeb, "CloseDriver // hDrvr=%04x closed !\n",
|
||||
hDrvr );
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* GetDriverModuleHandle [USER.254]
|
||||
*/
|
||||
HANDLE GetDriverModuleHandle(HDRVR hDrvr)
|
||||
HMODULE16 GetDriverModuleHandle(HDRVR16 hDrvr)
|
||||
{
|
||||
LPDRIVERITEM lpdrv;
|
||||
HANDLE hModule = 0;
|
||||
dprintf_driver(stddeb,"GetDriverModuleHandle(%04x);\n", hDrvr);
|
||||
lpdrv = (LPDRIVERITEM) GlobalLock16(hDrvr);
|
||||
if (lpdrv != NULL) {
|
||||
hModule = lpdrv->dis.hModule;
|
||||
GlobalUnlock16(hDrvr);
|
||||
}
|
||||
return hModule;
|
||||
LPDRIVERITEM lpdrv;
|
||||
HMODULE hModule = 0;
|
||||
|
||||
dprintf_driver( stddeb, "GetDriverModuleHandle(%04x);\n", hDrvr);
|
||||
|
||||
lpdrv = (LPDRIVERITEM)GlobalLock16( hDrvr );
|
||||
if (lpdrv != NULL && lpdrv->dis.hDriver == hDrvr)
|
||||
{
|
||||
hModule = lpdrv->dis.hModule;
|
||||
GlobalUnlock16( hDrvr );
|
||||
}
|
||||
return hModule;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* DefDriverProc [USER.255]
|
||||
*/
|
||||
LRESULT DefDriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2)
|
||||
LRESULT DefDriverProc(DWORD dwDevID, HDRVR hDriv, UINT16 wMsg,
|
||||
LPARAM lParam1, LPARAM lParam2)
|
||||
{
|
||||
switch(wMsg) {
|
||||
case DRV_LOAD:
|
||||
return (LRESULT)0L;
|
||||
case DRV_FREE:
|
||||
return (LRESULT)0L;
|
||||
case DRV_OPEN:
|
||||
return (LRESULT)0L;
|
||||
case DRV_CLOSE:
|
||||
return (LRESULT)0L;
|
||||
case DRV_ENABLE:
|
||||
return (LRESULT)0L;
|
||||
case DRV_DISABLE:
|
||||
return (LRESULT)0L;
|
||||
case DRV_QUERYCONFIGURE:
|
||||
return (LRESULT)0L;
|
||||
case DRV_CONFIGURE:
|
||||
MessageBox((HWND)NULL, "Driver isn't configurable !",
|
||||
"Wine Driver", MB_OK);
|
||||
return (LRESULT)0L;
|
||||
case DRV_INSTALL:
|
||||
return (LRESULT)DRVCNF_RESTART;
|
||||
case DRV_REMOVE:
|
||||
return (LRESULT)DRVCNF_RESTART;
|
||||
default:
|
||||
return (LRESULT)0L;
|
||||
}
|
||||
switch(wMsg)
|
||||
{
|
||||
case DRV_LOAD:
|
||||
return (LRESULT)0L;
|
||||
case DRV_FREE:
|
||||
return (LRESULT)0L;
|
||||
case DRV_OPEN:
|
||||
return (LRESULT)0L;
|
||||
case DRV_CLOSE:
|
||||
return (LRESULT)0L;
|
||||
case DRV_ENABLE:
|
||||
return (LRESULT)0L;
|
||||
case DRV_DISABLE:
|
||||
return (LRESULT)0L;
|
||||
case DRV_QUERYCONFIGURE:
|
||||
return (LRESULT)0L;
|
||||
|
||||
case DRV_CONFIGURE:
|
||||
MessageBox( (HWND)NULL, "Driver isn't configurable !",
|
||||
"Wine Driver", MB_OK );
|
||||
return (LRESULT)0L;
|
||||
|
||||
case DRV_INSTALL:
|
||||
return (LRESULT)DRVCNF_RESTART;
|
||||
|
||||
case DRV_REMOVE:
|
||||
return (LRESULT)DRVCNF_RESTART;
|
||||
|
||||
default:
|
||||
return (LRESULT)0L;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* GetDriverInfo [USER.256]
|
||||
*/
|
||||
BOOL GetDriverInfo(HDRVR hDrvr, LPDRIVERINFOSTRUCT lpDrvInfo)
|
||||
BOOL16 GetDriverInfo(HDRVR16 hDrvr, LPDRIVERINFOSTRUCT16 lpDrvInfo)
|
||||
{
|
||||
LPDRIVERITEM lpdrv;
|
||||
dprintf_driver(stddeb,"GetDriverInfo(%04x, %p);\n", hDrvr, lpDrvInfo);
|
||||
if (lpDrvInfo == NULL) return FALSE;
|
||||
lpdrv = (LPDRIVERITEM) GlobalLock16(hDrvr);
|
||||
if (lpdrv == NULL) return FALSE;
|
||||
memcpy(lpDrvInfo, &lpdrv->dis, sizeof(DRIVERINFOSTRUCT));
|
||||
GlobalUnlock16(hDrvr);
|
||||
return TRUE;
|
||||
LPDRIVERITEM lpdrv;
|
||||
|
||||
dprintf_driver( stddeb, "GetDriverInfo(%04x, %p);\n", hDrvr, lpDrvInfo );
|
||||
|
||||
if (lpDrvInfo == NULL) return FALSE;
|
||||
|
||||
lpdrv = (LPDRIVERITEM)GlobalLock16( hDrvr );
|
||||
if (lpdrv == NULL) return FALSE;
|
||||
memcpy( lpDrvInfo, &lpdrv->dis, sizeof(DRIVERINFOSTRUCT16) );
|
||||
GlobalUnlock16( hDrvr );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
* GetNextDriver [USER.257]
|
||||
*/
|
||||
HDRVR GetNextDriver(HDRVR hDrvr, DWORD dwFlags)
|
||||
HDRVR16 GetNextDriver(HDRVR16 hDrvr, DWORD dwFlags)
|
||||
{
|
||||
LPDRIVERITEM lpdrv;
|
||||
HDRVR hRetDrv = 0;
|
||||
dprintf_driver(stddeb,"GetNextDriver(%04x, %08lX);\n", hDrvr, dwFlags);
|
||||
if (hDrvr == 0) {
|
||||
if (lpDrvItemList == NULL) {
|
||||
dprintf_driver(stddeb,
|
||||
"GetNextDriver // drivers list empty !\n");
|
||||
LoadStartupDrivers();
|
||||
if (lpDrvItemList == NULL) return 0;
|
||||
}
|
||||
dprintf_driver(stddeb,"GetNextDriver // return first %04x !\n",
|
||||
lpDrvItemList->dis.hDriver);
|
||||
return lpDrvItemList->dis.hDriver;
|
||||
}
|
||||
lpdrv = (LPDRIVERITEM) GlobalLock16(hDrvr);
|
||||
if (lpdrv != NULL) {
|
||||
if (dwFlags & GND_REVERSE) {
|
||||
if (lpdrv->lpPrevItem)
|
||||
hRetDrv = ((LPDRIVERITEM)lpdrv->lpPrevItem)->dis.hDriver;
|
||||
}
|
||||
else {
|
||||
if (lpdrv->lpNextItem)
|
||||
hRetDrv = ((LPDRIVERITEM)lpdrv->lpNextItem)->dis.hDriver;
|
||||
}
|
||||
GlobalUnlock16(hDrvr);
|
||||
}
|
||||
dprintf_driver(stddeb,"GetNextDriver // return %04x !\n", hRetDrv);
|
||||
return hRetDrv;
|
||||
LPDRIVERITEM lpdrv;
|
||||
HDRVR16 hRetDrv = 0;
|
||||
|
||||
dprintf_driver( stddeb, "GetNextDriver(%04x, %08lX);\n", hDrvr, dwFlags );
|
||||
|
||||
if (hDrvr == 0)
|
||||
{
|
||||
if (lpDrvItemList == NULL)
|
||||
{
|
||||
dprintf_driver(stddeb, "GetNextDriver // drivers list empty !\n");
|
||||
LoadStartupDrivers();
|
||||
if (lpDrvItemList == NULL) return 0;
|
||||
}
|
||||
dprintf_driver( stddeb,"GetNextDriver // return first %04x !\n",
|
||||
lpDrvItemList->dis.hDriver );
|
||||
return lpDrvItemList->dis.hDriver;
|
||||
}
|
||||
|
||||
lpdrv = (LPDRIVERITEM)GlobalLock16( hDrvr );
|
||||
if (lpdrv != NULL)
|
||||
{
|
||||
if (dwFlags & GND_REVERSE)
|
||||
{
|
||||
if (lpdrv->lpPrevItem)
|
||||
hRetDrv = lpdrv->lpPrevItem->dis.hDriver;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lpdrv->lpNextItem)
|
||||
hRetDrv = lpdrv->lpNextItem->dis.hDriver;
|
||||
}
|
||||
GlobalUnlock16( hDrvr );
|
||||
}
|
||||
|
||||
dprintf_driver( stddeb, "GetNextDriver // return %04x !\n", hRetDrv );
|
||||
return hRetDrv;
|
||||
}
|
||||
|
||||
|
||||
|
|
47
misc/exec.c
47
misc/exec.c
|
@ -7,9 +7,10 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "windows.h"
|
||||
#include "heap.h"
|
||||
#include "neexe.h"
|
||||
#include "shell.h"
|
||||
#include "windows.h"
|
||||
#include "callback.h"
|
||||
#include "stddebug.h"
|
||||
#include "debug.h"
|
||||
|
@ -54,50 +55,36 @@ void EXEC_ExitWindows( int retCode )
|
|||
*/
|
||||
BOOL ExitWindows( DWORD dwReturnCode, WORD wReserved )
|
||||
{
|
||||
HWND hwndDesktop;
|
||||
WND *wndPtr;
|
||||
HWND *list, *pWnd;
|
||||
int count, i;
|
||||
BOOL result;
|
||||
int i;
|
||||
BOOL16 result;
|
||||
WND **list, **ppWnd;
|
||||
|
||||
api_assert("ExitWindows", wReserved == 0);
|
||||
api_assert("ExitWindows", HIWORD(dwReturnCode) == 0);
|
||||
|
||||
/* We have to build a list of all windows first, as in EnumWindows */
|
||||
|
||||
/* First count the windows */
|
||||
if (!(list = WIN_BuildWinArray( WIN_GetDesktop() ))) return FALSE;
|
||||
|
||||
hwndDesktop = GetDesktopWindow();
|
||||
count = 0;
|
||||
for (wndPtr = WIN_GetDesktop()->child; wndPtr; wndPtr = wndPtr->next)
|
||||
count++;
|
||||
if (!count) /* No windows, we can exit at once */
|
||||
EXEC_ExitWindows( LOWORD(dwReturnCode) );
|
||||
/* Send a WM_QUERYENDSESSION message to every window */
|
||||
|
||||
/* Now build the list of all windows */
|
||||
|
||||
if (!(pWnd = list = (HWND *)malloc( sizeof(HWND) * count ))) return FALSE;
|
||||
for (wndPtr = WIN_GetDesktop()->child; wndPtr; wndPtr = wndPtr->next)
|
||||
*pWnd++ = wndPtr->hwndSelf;
|
||||
|
||||
/* Now send a WM_QUERYENDSESSION message to every window */
|
||||
|
||||
for (pWnd = list, i = 0; i < count; i++, pWnd++)
|
||||
for (ppWnd = list, i = 0; *ppWnd; ppWnd++, i++)
|
||||
{
|
||||
/* Make sure that window still exists */
|
||||
if (!IsWindow(*pWnd)) continue;
|
||||
if (!SendMessage16( *pWnd, WM_QUERYENDSESSION, 0, 0 )) break;
|
||||
/* Make sure that the window still exists */
|
||||
if (!IsWindow( (*ppWnd)->hwndSelf )) continue;
|
||||
if (!SendMessage16( (*ppWnd)->hwndSelf, WM_QUERYENDSESSION, 0, 0 ))
|
||||
break;
|
||||
}
|
||||
result = (i == count);
|
||||
result = !(*ppWnd);
|
||||
|
||||
/* Now notify all windows that got a WM_QUERYENDSESSION of the result */
|
||||
|
||||
for (pWnd = list; i > 0; i--, pWnd++)
|
||||
for (ppWnd = list; i > 0; i--, ppWnd++)
|
||||
{
|
||||
if (!IsWindow(*pWnd)) continue;
|
||||
SendMessage16( *pWnd, WM_ENDSESSION, result, 0 );
|
||||
if (!IsWindow( (*ppWnd)->hwndSelf )) continue;
|
||||
SendMessage16( (*ppWnd)->hwndSelf, WM_ENDSESSION, result, 0 );
|
||||
}
|
||||
free( list );
|
||||
HeapFree( SystemHeap, 0, list );
|
||||
|
||||
if (result) EXEC_ExitWindows( LOWORD(dwReturnCode) );
|
||||
return FALSE;
|
||||
|
|
|
@ -396,7 +396,7 @@ LONG
|
|||
LZSeek(HFILE fd,LONG off,INT32 type) {
|
||||
int i;
|
||||
struct lzstate *lzs;
|
||||
LONG lastwanted,newwanted;
|
||||
LONG newwanted;
|
||||
|
||||
dprintf_file(stddeb,"LZSeek(%d,%ld,%d)\n",fd,off,type);
|
||||
for (i=0;i<nroflzstates;i++)
|
||||
|
@ -406,7 +406,6 @@ LZSeek(HFILE fd,LONG off,INT32 type) {
|
|||
if (i==nroflzstates)
|
||||
return _llseek(fd,off,type);
|
||||
lzs = lzstates+i;
|
||||
lastwanted = lzs->realwanted;
|
||||
newwanted = lzs->realwanted;
|
||||
switch (type) {
|
||||
case 1: /* SEEK_CUR */
|
||||
|
@ -424,7 +423,7 @@ LZSeek(HFILE fd,LONG off,INT32 type) {
|
|||
if (newwanted<0)
|
||||
return LZERROR_BADVALUE;
|
||||
lzs->realwanted = newwanted;
|
||||
return lastwanted;
|
||||
return newwanted;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
38
misc/main.c
38
misc/main.c
|
@ -227,7 +227,7 @@ static int MAIN_GetResource( XrmDatabase db, char *name, XrmValue *value )
|
|||
* ParseDebugOptions
|
||||
*
|
||||
* Turns specific debug messages on or off, according to "options".
|
||||
* Returns TRUE if parsing was successfull
|
||||
* Returns TRUE if parsing was successful
|
||||
*/
|
||||
#ifdef DEBUG_RUNTIME
|
||||
|
||||
|
@ -654,6 +654,17 @@ void MessageBeep(WORD i)
|
|||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* Beep (KERNEL32.11)
|
||||
*/
|
||||
BOOL32 Beep( DWORD dwFreq, DWORD dwDur )
|
||||
{
|
||||
/* dwFreq and dwDur are ignored by Win95 */
|
||||
XBell(display, 100);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetVersion (KERNEL.3)
|
||||
*/
|
||||
|
@ -761,7 +772,7 @@ LONG GetWinFlags(void)
|
|||
/***********************************************************************
|
||||
* SetEnvironment (GDI.132)
|
||||
*/
|
||||
int SetEnvironment(LPSTR lpPortName, LPSTR lpEnviron, WORD nCount)
|
||||
int SetEnvironment(LPCSTR lpPortName, LPCSTR lpEnviron, WORD nCount)
|
||||
{
|
||||
LPENVENTRY lpNewEnv;
|
||||
LPENVENTRY lpEnv = lpEnvList;
|
||||
|
@ -826,10 +837,11 @@ int SetEnvironment(LPSTR lpPortName, LPSTR lpEnviron, WORD nCount)
|
|||
return nCount;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetEnvironmentVariableA (KERNEL32.484)
|
||||
* SetEnvironmentVariable32A (KERNEL32.484)
|
||||
*/
|
||||
BOOL SetEnvironmentVariableA(LPSTR lpName, LPSTR lpValue)
|
||||
BOOL32 SetEnvironmentVariable32A( LPCSTR lpName, LPCSTR lpValue )
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
@ -837,6 +849,24 @@ BOOL SetEnvironmentVariableA(LPSTR lpName, LPSTR lpValue)
|
|||
return (rc > 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* SetEnvironmentVariable32W (KERNEL32.485)
|
||||
*/
|
||||
BOOL32 SetEnvironmentVariable32W( LPCWSTR lpName, LPCWSTR lpValue )
|
||||
{
|
||||
LPSTR lpAName, lpAValue;
|
||||
BOOL ret;
|
||||
|
||||
lpAName = STRING32_DupUniToAnsi( lpName );
|
||||
lpAValue = STRING32_DupUniToAnsi ( lpValue );
|
||||
ret = SetEnvironment(lpAName, lpAValue, strlen(lpAValue) + 1);
|
||||
free (lpAName);
|
||||
free (lpAValue);
|
||||
return (ret > 0) ? 1 : 0;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* GetEnvironment (GDI.134)
|
||||
*/
|
||||
|
|
|
@ -161,7 +161,7 @@ int WNetGetConnection(LPSTR lpLocalName,
|
|||
if (lpLocalName[1] == ':')
|
||||
{
|
||||
int drive = toupper(lpLocalName[0]) - 'A';
|
||||
switch(GetDriveType(drive))
|
||||
switch(GetDriveType16(drive))
|
||||
{
|
||||
case DRIVE_CANNOTDETERMINE:
|
||||
case DRIVE_DOESNOTEXIST:
|
||||
|
|
|
@ -1714,9 +1714,12 @@ DWORD RegQueryValueEx32W(
|
|||
}
|
||||
if (i==lpkey->nrofvalues) {
|
||||
if (lpszValueName==NULL) {
|
||||
*(WCHAR*)lpbData = 0;
|
||||
*lpcbData = 2;
|
||||
*lpdwType = REG_SZ;
|
||||
if (lpbData) {
|
||||
*(WCHAR*)lpbData = 0;
|
||||
*lpcbData = 2;
|
||||
}
|
||||
if (lpdwType)
|
||||
*lpdwType = REG_SZ;
|
||||
return SHELL_ERROR_SUCCESS;
|
||||
}
|
||||
return SHELL_ERROR_BADKEY;/*FIXME: correct return? */
|
||||
|
@ -1790,6 +1793,7 @@ DWORD RegQueryValueEx32A(
|
|||
LPBYTE buf;
|
||||
DWORD ret,myxlen;
|
||||
DWORD *mylen;
|
||||
DWORD type;
|
||||
|
||||
dprintf_reg(stddeb,"RegQueryValueEx32A(%x,%s,%p,%p,%p,%ld)\n->",
|
||||
hkey,lpszValueName,lpdwReserved,lpdwType,lpbData,
|
||||
|
@ -1813,18 +1817,21 @@ DWORD RegQueryValueEx32A(
|
|||
else
|
||||
lpszValueNameW=NULL;
|
||||
|
||||
if (lpdwType)
|
||||
type=*lpdwType;
|
||||
ret=RegQueryValueEx32W(
|
||||
hkey,
|
||||
lpszValueNameW,
|
||||
lpdwReserved,
|
||||
lpdwType,
|
||||
&type,
|
||||
buf,
|
||||
mylen
|
||||
);
|
||||
|
||||
if (lpdwType)
|
||||
*lpdwType=type;
|
||||
if (ret==ERROR_SUCCESS) {
|
||||
if (buf) {
|
||||
if (UNICONVMASK & (1<<(*lpdwType))) {
|
||||
if (UNICONVMASK & (1<<(type))) {
|
||||
/* convert UNICODE to ASCII */
|
||||
strcpyWA(lpbData,(LPWSTR)buf);
|
||||
*lpcbData = myxlen/2;
|
||||
|
@ -1837,11 +1844,11 @@ DWORD RegQueryValueEx32A(
|
|||
*lpcbData = myxlen;
|
||||
}
|
||||
} else {
|
||||
if ((UNICONVMASK & (1<<(*lpdwType))) && lpcbData)
|
||||
if ((UNICONVMASK & (1<<(type))) && lpcbData)
|
||||
*lpcbData = myxlen/2;
|
||||
}
|
||||
} else {
|
||||
if ((UNICONVMASK & (1<<(*lpdwType))) && lpcbData)
|
||||
if ((UNICONVMASK & (1<<(type))) && lpcbData)
|
||||
*lpcbData = myxlen/2;
|
||||
}
|
||||
if (buf)
|
||||
|
|
|
@ -429,7 +429,7 @@ static const char *SPY_GetMsgName( UINT msg )
|
|||
if (!MessageTypeNames[msg]) return "???";
|
||||
return MessageTypeNames[msg];
|
||||
}
|
||||
sprintf( buffer, "WM_USER+%04x\n", msg - WM_USER );
|
||||
sprintf( buffer, "WM_USER+%04x", msg - WM_USER );
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ DWORD InquireSystem( WORD code, WORD drive, BOOL enable )
|
|||
return 54925;
|
||||
|
||||
case 1: /* Get drive type */
|
||||
drivetype = GetDriveType( drive );
|
||||
drivetype = GetDriveType16( drive );
|
||||
return MAKELONG( drivetype, drivetype );
|
||||
|
||||
case 2: /* Enable one-drive logic */
|
||||
|
|
|
@ -29,8 +29,7 @@ static struct notify
|
|||
|
||||
static int nrofnotifys = 0;
|
||||
|
||||
BOOL
|
||||
NotifyRegister(HTASK htask,FARPROC lpfnCallback,WORD wFlags)
|
||||
BOOL16 NotifyRegister( HTASK16 htask, FARPROC16 lpfnCallback, WORD wFlags )
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ BOOL SystemHeapInfo( SYSHEAPINFO *pHeapInfo )
|
|||
/***********************************************************************
|
||||
* TimerCount (TOOLHELP.80)
|
||||
*/
|
||||
BOOL TimerCount( TIMERINFO *pTimerInfo )
|
||||
BOOL16 TimerCount( TIMERINFO *pTimerInfo )
|
||||
{
|
||||
/* FIXME
|
||||
* In standard mode, dwmsSinceStart = dwmsThisVM
|
||||
|
|
17
misc/ver.c
17
misc/ver.c
|
@ -21,7 +21,9 @@
|
|||
#include "winreg.h"
|
||||
#include "string32.h"
|
||||
|
||||
#define LZREAD(what) if (sizeof(*what)!=LZRead32(lzfd,what,sizeof(*what))) return 0;
|
||||
#define LZREAD(what) \
|
||||
if (sizeof(*what)!=LZRead32(lzfd,what,sizeof(*what))) return 0;
|
||||
#define LZTELL(lzfd) LZSeek(lzfd, 0, SEEK_CUR);
|
||||
|
||||
#define strdupW2A(x) STRING32_DupUniToAnsi(x)
|
||||
#define strdupA2W(x) STRING32_DupAnsiToUni(x)
|
||||
|
@ -57,7 +59,8 @@ find_ne_resource(
|
|||
WORD shiftcount;
|
||||
DWORD nehdoffset;
|
||||
|
||||
nehdoffset=LZSeek(lzfd,nehd->resource_tab_offset,SEEK_CUR);
|
||||
nehdoffset = LZTELL(lzfd);
|
||||
LZSeek(lzfd,nehd->resource_tab_offset,SEEK_CUR);
|
||||
LZREAD(&shiftcount);
|
||||
dprintf_resource(stderr,"shiftcount is %d\n",shiftcount);
|
||||
dprintf_resource(stderr,"reading resource typeinfo dir.\n");
|
||||
|
@ -83,7 +86,8 @@ find_ne_resource(
|
|||
char *str;
|
||||
DWORD whereleft;
|
||||
|
||||
whereleft=LZSeek(
|
||||
whereleft = LZTELL(lzfd);
|
||||
LZSeek(
|
||||
lzfd,
|
||||
nehdoffset+nehd->resource_tab_offset+ti.type_id,
|
||||
SEEK_SET
|
||||
|
@ -123,7 +127,8 @@ find_ne_resource(
|
|||
char *str;
|
||||
DWORD whereleft;
|
||||
|
||||
whereleft=LZSeek(
|
||||
whereleft = LZTELL(lzfd);
|
||||
LZSeek(
|
||||
lzfd,
|
||||
nehdoffset+nehd->resource_tab_offset+ni.id,
|
||||
SEEK_SET
|
||||
|
@ -187,7 +192,7 @@ GetFileResourceSize(LPCSTR filename,SEGPTR restype,SEGPTR resid,LPDWORD off) {
|
|||
return reslen;
|
||||
}
|
||||
|
||||
/* GetFileResourceSize [VER.3] */
|
||||
/* GetFileResource [VER.3] */
|
||||
DWORD
|
||||
GetFileResource(LPCSTR filename,SEGPTR restype,SEGPTR resid,
|
||||
DWORD off,DWORD datalen,LPVOID data
|
||||
|
@ -195,7 +200,7 @@ GetFileResource(LPCSTR filename,SEGPTR restype,SEGPTR resid,
|
|||
HFILE lzfd;
|
||||
OFSTRUCT ofs;
|
||||
BYTE *resdata;
|
||||
int reslen;
|
||||
int reslen=datalen;
|
||||
struct ne_header_s nehd;
|
||||
fprintf(stderr,"GetFileResource(%s,%lx,%lx,%ld,%ld,%p)\n",
|
||||
filename,(LONG)restype,(LONG)resid,off,datalen,data
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright 1996 Alexandre Julliard
|
||||
*/
|
||||
|
||||
#define NO_TRANSITION_TYPES /* This file is Win32-clean */
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -246,10 +247,12 @@ INT16 wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec, LPCVOID args )
|
|||
spec += WPRINTF_ParseFormatA( spec, &format );
|
||||
switch(format.type)
|
||||
{
|
||||
case WPR_WCHAR: /* No Unicode in Win16 */
|
||||
case WPR_CHAR:
|
||||
cur_arg = (DWORD)*(CHAR *)args;
|
||||
args = (WORD *)args + 1;
|
||||
break;
|
||||
case WPR_WSTRING: /* No Unicode in Win16 */
|
||||
case WPR_STRING:
|
||||
cur_arg = (DWORD)PTR_SEG_TO_LIN( *(SEGPTR *)args );
|
||||
args = (SEGPTR *)args + 1;
|
||||
|
@ -268,10 +271,6 @@ INT16 wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec, LPCVOID args )
|
|||
args = (UINT16 *)args + 1;
|
||||
}
|
||||
break;
|
||||
case WPR_WCHAR:
|
||||
case WPR_WSTRING:
|
||||
fprintf( stderr, "Unicode not supported in wsprintf16\n" );
|
||||
continue;
|
||||
}
|
||||
len = WPRINTF_GetLen( &format, &cur_arg, number, maxlen - 1 );
|
||||
if (!(format.flags & WPRINTF_LEFTALIGN))
|
||||
|
|
|
@ -86,7 +86,7 @@ static BIOSDATA *pBiosData = NULL;
|
|||
*/
|
||||
BOOL DOSMEM_Init(void)
|
||||
{
|
||||
HMODULE hModule = GetModuleHandle( "KERNEL" );
|
||||
HMODULE16 hModule = GetModuleHandle( "KERNEL" );
|
||||
char *dosmem;
|
||||
|
||||
/* Allocate 7 64k segments for 0000, A000, B000, C000, D000, E000, F000. */
|
||||
|
|
|
@ -41,14 +41,14 @@ typedef struct
|
|||
WORD ss;
|
||||
} REALMODECALL;
|
||||
|
||||
extern void do_mscdex(struct sigcontext_struct *context);
|
||||
extern void do_mscdex( SIGCONTEXT *context );
|
||||
|
||||
/**********************************************************************
|
||||
* INT_Int31Handler
|
||||
*
|
||||
* Handler for int 31h (DPMI).
|
||||
*/
|
||||
void INT_Int31Handler( struct sigcontext_struct context )
|
||||
void INT_Int31Handler( SIGCONTEXT context )
|
||||
{
|
||||
DWORD dw;
|
||||
BYTE *ptr;
|
||||
|
@ -199,7 +199,7 @@ void INT_Int31Handler( struct sigcontext_struct context )
|
|||
*/
|
||||
if ((BL_reg(&context) == 0x2f) && ((p->eax & 0xFF00) == 0x1500))
|
||||
{
|
||||
struct sigcontext_struct context2;
|
||||
SIGCONTEXT context2;
|
||||
EAX_reg(&context2) = p->eax;
|
||||
EBX_reg(&context2) = p->ebx;
|
||||
ECX_reg(&context2) = p->ecx;
|
||||
|
|
|
@ -30,7 +30,7 @@ struct Win87EmInfoStruct
|
|||
*/
|
||||
/* FIXME: Only skeletal implementation for now */
|
||||
|
||||
void WIN87_fpmath( struct sigcontext_struct context )
|
||||
void WIN87_fpmath( SIGCONTEXT context )
|
||||
{
|
||||
dprintf_int(stddeb, "_fpmath: (cs:eip=%x:%lx es=%x bx=%04x ax=%04x dx==%04x)\n",
|
||||
CS_reg(&context), EIP_reg(&context),
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
* Try to replace an invalid selector by a valid one.
|
||||
* For now, only selector 0x40 is handled here.
|
||||
*/
|
||||
static WORD INSTR_ReplaceSelector( struct sigcontext_struct *context, WORD sel)
|
||||
static WORD INSTR_ReplaceSelector( SIGCONTEXT *context, WORD sel)
|
||||
{
|
||||
if (sel == 0x40)
|
||||
{
|
||||
|
@ -43,9 +43,8 @@ static WORD INSTR_ReplaceSelector( struct sigcontext_struct *context, WORD sel)
|
|||
*
|
||||
* Return the address of an instruction operand (from the mod/rm byte).
|
||||
*/
|
||||
static BYTE *INSTR_GetOperandAddr( struct sigcontext_struct *context,
|
||||
BYTE *instr, int long_addr,
|
||||
int segprefix, int *len )
|
||||
static BYTE *INSTR_GetOperandAddr( SIGCONTEXT *context, BYTE *instr,
|
||||
int long_addr, int segprefix, int *len )
|
||||
{
|
||||
int mod, rm, base, index = 0, ss = 0, seg = 0, off;
|
||||
|
||||
|
@ -197,14 +196,16 @@ static BYTE *INSTR_GetOperandAddr( struct sigcontext_struct *context,
|
|||
*
|
||||
* Emulate the LDS (and LES,LFS,etc.) instruction.
|
||||
*/
|
||||
static BOOL INSTR_EmulateLDS( struct sigcontext_struct *context,
|
||||
BYTE *instr, int long_op, int long_addr,
|
||||
int segprefix, int *len )
|
||||
static BOOL INSTR_EmulateLDS( SIGCONTEXT *context, BYTE *instr, int long_op,
|
||||
int long_addr, int segprefix, int *len )
|
||||
{
|
||||
WORD seg;
|
||||
BYTE *regmodrm = instr + 1 + (*instr == 0x0f);
|
||||
BYTE *addr = INSTR_GetOperandAddr( context, regmodrm,
|
||||
long_addr, segprefix, len );
|
||||
WORD seg = *(WORD *)(addr + (long_op ? 4 : 2));
|
||||
if (!addr)
|
||||
return FALSE; /* Unable to emulate it */
|
||||
seg = *(WORD *)(addr + (long_op ? 4 : 2));
|
||||
|
||||
if (!(seg = INSTR_ReplaceSelector( context, seg )))
|
||||
return FALSE; /* Unable to emulate it */
|
||||
|
@ -278,7 +279,7 @@ static BOOL INSTR_EmulateLDS( struct sigcontext_struct *context,
|
|||
*
|
||||
* Emulate a priviledged instruction. Returns TRUE if emulation successful.
|
||||
*/
|
||||
BOOL INSTR_EmulateInstruction( struct sigcontext_struct *context )
|
||||
BOOL INSTR_EmulateInstruction( SIGCONTEXT *context )
|
||||
{
|
||||
int prefix, segprefix, prefixlen, len, repX, long_op, long_addr;
|
||||
BYTE *instr;
|
||||
|
@ -489,8 +490,12 @@ BOOL INSTR_EmulateInstruction( struct sigcontext_struct *context )
|
|||
|
||||
case 0x8e: /* mov XX,segment_reg */
|
||||
{
|
||||
WORD seg = *(WORD *)INSTR_GetOperandAddr( context, instr + 1,
|
||||
WORD seg;
|
||||
BYTE *addr = INSTR_GetOperandAddr(context, instr + 1,
|
||||
long_addr, segprefix, &len );
|
||||
if (!addr)
|
||||
break; /* Unable to emulate it */
|
||||
seg = *(WORD *)addr;
|
||||
if (!(seg = INSTR_ReplaceSelector( context, seg )))
|
||||
break; /* Unable to emulate it */
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* Handler for int 10h (video).
|
||||
*/
|
||||
void INT_Int10Handler( struct sigcontext_struct context )
|
||||
void INT_Int10Handler( SIGCONTEXT context )
|
||||
{
|
||||
switch(AH_reg(&context))
|
||||
{
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* Handler for int 13h (disk I/O).
|
||||
*/
|
||||
void INT_Int13Handler( struct sigcontext_struct context )
|
||||
void INT_Int13Handler( SIGCONTEXT context )
|
||||
{
|
||||
switch(AH_reg(&context))
|
||||
{
|
||||
|
|
|
@ -42,7 +42,7 @@ DWORD INT1A_GetTicksSinceMidnight(void)
|
|||
*
|
||||
* Handler for int 1ah (date and time).
|
||||
*/
|
||||
void INT_Int1aHandler( struct sigcontext_struct context )
|
||||
void INT_Int1aHandler( SIGCONTEXT context )
|
||||
{
|
||||
time_t ltime;
|
||||
DWORD ticks;
|
||||
|
|
|
@ -134,7 +134,7 @@ static void CreateBPB(int drive, BYTE *data)
|
|||
}
|
||||
}
|
||||
|
||||
static int INT21_GetFreeDiskSpace(struct sigcontext_struct *context)
|
||||
static int INT21_GetFreeDiskSpace( SIGCONTEXT *context )
|
||||
{
|
||||
DWORD cluster_sectors, sector_bytes, free_clusters, total_clusters;
|
||||
char root[] = "A:\\";
|
||||
|
@ -149,7 +149,7 @@ static int INT21_GetFreeDiskSpace(struct sigcontext_struct *context)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int INT21_GetDriveAllocInfo(struct sigcontext_struct *context)
|
||||
static int INT21_GetDriveAllocInfo( SIGCONTEXT *context )
|
||||
{
|
||||
if (!INT21_GetFreeDiskSpace( context )) return 0;
|
||||
heap->mediaID = 0xf0;
|
||||
|
@ -158,7 +158,7 @@ static int INT21_GetDriveAllocInfo(struct sigcontext_struct *context)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void GetDrivePB(struct sigcontext_struct *context, int drive)
|
||||
static void GetDrivePB( SIGCONTEXT *context, int drive )
|
||||
{
|
||||
if(!DRIVE_IsValid(drive))
|
||||
{
|
||||
|
@ -201,7 +201,7 @@ static void GetDrivePB(struct sigcontext_struct *context, int drive)
|
|||
}
|
||||
|
||||
|
||||
static void ioctlGetDeviceInfo(struct sigcontext_struct *context)
|
||||
static void ioctlGetDeviceInfo( SIGCONTEXT *context )
|
||||
{
|
||||
dprintf_int (stddeb, "int21: ioctl (%d, GetDeviceInfo)\n", BX_reg(context));
|
||||
|
||||
|
@ -214,7 +214,7 @@ static void ioctlGetDeviceInfo(struct sigcontext_struct *context)
|
|||
RESET_CFLAG(context);
|
||||
}
|
||||
|
||||
static void ioctlGenericBlkDevReq(struct sigcontext_struct *context)
|
||||
static void ioctlGenericBlkDevReq( SIGCONTEXT *context )
|
||||
{
|
||||
BYTE *dataptr = PTR_SEG_OFF_TO_LIN(DS_reg(context), DX_reg(context));
|
||||
int drive = DOS_GET_DRIVE( BL_reg(context) );
|
||||
|
@ -258,7 +258,7 @@ static void ioctlGenericBlkDevReq(struct sigcontext_struct *context)
|
|||
}
|
||||
}
|
||||
|
||||
static void GetSystemDate(struct sigcontext_struct *context)
|
||||
static void GetSystemDate( SIGCONTEXT *context )
|
||||
{
|
||||
struct tm *now;
|
||||
time_t ltime;
|
||||
|
@ -271,7 +271,7 @@ static void GetSystemDate(struct sigcontext_struct *context)
|
|||
AX_reg(context) = now->tm_wday;
|
||||
}
|
||||
|
||||
static void INT21_GetSystemTime(struct sigcontext_struct *context)
|
||||
static void INT21_GetSystemTime( SIGCONTEXT *context )
|
||||
{
|
||||
struct tm *now;
|
||||
struct timeval tv;
|
||||
|
@ -286,7 +286,7 @@ static void INT21_GetSystemTime(struct sigcontext_struct *context)
|
|||
/* Note hundredths of seconds */
|
||||
}
|
||||
|
||||
static void CreateFile(struct sigcontext_struct *context)
|
||||
static void CreateFile( SIGCONTEXT *context )
|
||||
{
|
||||
AX_reg(context) = _lcreat( PTR_SEG_OFF_TO_LIN( DS_reg(context),
|
||||
DX_reg(context) ), CX_reg(context) );
|
||||
|
@ -298,7 +298,7 @@ static void CreateFile(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
|
||||
void OpenExistingFile(struct sigcontext_struct *context)
|
||||
void OpenExistingFile( SIGCONTEXT *context )
|
||||
{
|
||||
AX_reg(context) = _lopen( PTR_SEG_OFF_TO_LIN(DS_reg(context),DX_reg(context)),
|
||||
AL_reg(context) );
|
||||
|
@ -379,7 +379,7 @@ void OpenExistingFile(struct sigcontext_struct *context)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void CloseFile(struct sigcontext_struct *context)
|
||||
static void CloseFile( SIGCONTEXT *context )
|
||||
{
|
||||
if ((AX_reg(context) = _lclose( BX_reg(context) )) != 0)
|
||||
{
|
||||
|
@ -388,7 +388,7 @@ static void CloseFile(struct sigcontext_struct *context)
|
|||
}
|
||||
}
|
||||
|
||||
void ExtendedOpenCreateFile(struct sigcontext_struct *context)
|
||||
void ExtendedOpenCreateFile(SIGCONTEXT *context )
|
||||
{
|
||||
BYTE action=DL_reg(context);
|
||||
dprintf_int(stddeb, "int21: extended open/create: file= %s \n",
|
||||
|
@ -478,7 +478,7 @@ void ExtendedOpenCreateFile(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
|
||||
static int INT21_RenameFile(struct sigcontext_struct *context)
|
||||
static int INT21_RenameFile( SIGCONTEXT *context )
|
||||
{
|
||||
const char *newname, *oldname;
|
||||
char *buffer;
|
||||
|
@ -511,7 +511,7 @@ static int INT21_RenameFile(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
|
||||
static void INT21_ChangeDir(struct sigcontext_struct *context)
|
||||
static void INT21_ChangeDir( SIGCONTEXT *context )
|
||||
{
|
||||
int drive;
|
||||
char *dirname = PTR_SEG_OFF_TO_LIN(DS_reg(context),DX_reg(context));
|
||||
|
@ -531,7 +531,7 @@ static void INT21_ChangeDir(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
|
||||
static int INT21_FindFirst(struct sigcontext_struct *context)
|
||||
static int INT21_FindFirst( SIGCONTEXT *context )
|
||||
{
|
||||
const char *path, *unixPath, *mask;
|
||||
char *p;
|
||||
|
@ -566,7 +566,7 @@ static int INT21_FindFirst(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
|
||||
static int INT21_FindNext(struct sigcontext_struct *context)
|
||||
static int INT21_FindNext( SIGCONTEXT *context )
|
||||
{
|
||||
FINDFILE_DTA *dta = (FINDFILE_DTA *)GetCurrentDTA();
|
||||
DOS_DIRENT entry;
|
||||
|
@ -597,7 +597,7 @@ static int INT21_FindNext(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
|
||||
static int INT21_CreateTempFile(struct sigcontext_struct *context)
|
||||
static int INT21_CreateTempFile( SIGCONTEXT *context )
|
||||
{
|
||||
static int counter = 0;
|
||||
char *name = PTR_SEG_OFF_TO_LIN( DS_reg(context), DX_reg(context) );
|
||||
|
@ -618,7 +618,7 @@ static int INT21_CreateTempFile(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
|
||||
static int INT21_GetCurrentDirectory(struct sigcontext_struct *context)
|
||||
static int INT21_GetCurrentDirectory( SIGCONTEXT *context )
|
||||
{
|
||||
int drive = DOS_GET_DRIVE( DL_reg(context) );
|
||||
char *ptr = (char *)PTR_SEG_OFF_TO_LIN( DS_reg(context), SI_reg(context) );
|
||||
|
@ -635,7 +635,7 @@ static int INT21_GetCurrentDirectory(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
|
||||
static int INT21_GetDiskSerialNumber(struct sigcontext_struct *context)
|
||||
static int INT21_GetDiskSerialNumber( SIGCONTEXT *context )
|
||||
{
|
||||
BYTE *dataptr = PTR_SEG_OFF_TO_LIN(DS_reg(context), DX_reg(context));
|
||||
int drive = DOS_GET_DRIVE( BL_reg(context) );
|
||||
|
@ -654,7 +654,7 @@ static int INT21_GetDiskSerialNumber(struct sigcontext_struct *context)
|
|||
}
|
||||
|
||||
|
||||
static int INT21_SetDiskSerialNumber(struct sigcontext_struct *context)
|
||||
static int INT21_SetDiskSerialNumber( SIGCONTEXT *context )
|
||||
{
|
||||
BYTE *dataptr = PTR_SEG_OFF_TO_LIN(DS_reg(context), DX_reg(context));
|
||||
int drive = DOS_GET_DRIVE( BL_reg(context) );
|
||||
|
@ -673,7 +673,7 @@ static int INT21_SetDiskSerialNumber(struct sigcontext_struct *context)
|
|||
/* microsoft's programmers should be shot for using CP/M style int21
|
||||
calls in Windows for Workgroup's winfile.exe */
|
||||
|
||||
static int INT21_FindFirstFCB( struct sigcontext_struct *context )
|
||||
static int INT21_FindFirstFCB( SIGCONTEXT *context )
|
||||
{
|
||||
BYTE *fcb = (BYTE *)PTR_SEG_OFF_TO_LIN(DS_reg(context), DX_reg(context));
|
||||
FINDFILE_FCB *pFCB;
|
||||
|
@ -701,7 +701,7 @@ static int INT21_FindFirstFCB( struct sigcontext_struct *context )
|
|||
}
|
||||
|
||||
|
||||
static int INT21_FindNextFCB( struct sigcontext_struct *context )
|
||||
static int INT21_FindNextFCB( SIGCONTEXT *context )
|
||||
{
|
||||
BYTE *fcb = (BYTE *)PTR_SEG_OFF_TO_LIN(DS_reg(context), DX_reg(context));
|
||||
FINDFILE_FCB *pFCB;
|
||||
|
@ -743,7 +743,7 @@ static int INT21_FindNextFCB( struct sigcontext_struct *context )
|
|||
}
|
||||
|
||||
|
||||
static void DeleteFileFCB(struct sigcontext_struct *context)
|
||||
static void DeleteFileFCB( SIGCONTEXT *context )
|
||||
{
|
||||
fprintf( stderr, "DeleteFileFCB: not implemented yet\n" );
|
||||
#if 0
|
||||
|
@ -785,7 +785,7 @@ static void DeleteFileFCB(struct sigcontext_struct *context)
|
|||
#endif
|
||||
}
|
||||
|
||||
static void RenameFileFCB(struct sigcontext_struct *context)
|
||||
static void RenameFileFCB( SIGCONTEXT *context )
|
||||
{
|
||||
fprintf( stderr, "RenameFileFCB: not implemented yet\n" );
|
||||
#if 0
|
||||
|
@ -831,7 +831,7 @@ static void RenameFileFCB(struct sigcontext_struct *context)
|
|||
|
||||
|
||||
|
||||
static void fLock (struct sigcontext_struct * context)
|
||||
static void fLock( SIGCONTEXT * context )
|
||||
{
|
||||
#if 0
|
||||
struct flock f;
|
||||
|
@ -882,7 +882,7 @@ static void fLock (struct sigcontext_struct * context)
|
|||
}
|
||||
|
||||
|
||||
static int INT21_GetFileAttribute (struct sigcontext_struct * context)
|
||||
static int INT21_GetFileAttribute( SIGCONTEXT * context )
|
||||
{
|
||||
const char *unixName;
|
||||
|
||||
|
@ -901,7 +901,7 @@ extern void LOCAL_PrintHeap (WORD ds);
|
|||
/***********************************************************************
|
||||
* DOS3Call (KERNEL.102)
|
||||
*/
|
||||
void DOS3Call( struct sigcontext_struct context )
|
||||
void DOS3Call( SIGCONTEXT context )
|
||||
{
|
||||
dprintf_int( stddeb, "int21: AX=%04x BX=%04x CX=%04x DX=%04x "
|
||||
"SI=%04x DI=%04x DS=%04x ES=%04x EFL=%08lx\n",
|
||||
|
@ -1136,8 +1136,8 @@ void DOS3Call( struct sigcontext_struct context )
|
|||
break;
|
||||
|
||||
case 0x3a: /* "RMDIR" - REMOVE SUBDIRECTORY */
|
||||
if (!FILE_RemoveDir( PTR_SEG_OFF_TO_LIN( DS_reg(&context),
|
||||
DX_reg(&context) )))
|
||||
if (!RemoveDirectory32A( PTR_SEG_OFF_TO_LIN( DS_reg(&context),
|
||||
DX_reg(&context) )))
|
||||
{
|
||||
AX_reg(&context) = DOS_ExtendedError;
|
||||
SET_CFLAG(&context);
|
||||
|
@ -1201,8 +1201,8 @@ void DOS3Call( struct sigcontext_struct context )
|
|||
break;
|
||||
|
||||
case 0x41: /* "UNLINK" - DELETE FILE */
|
||||
if (!FILE_Unlink( PTR_SEG_OFF_TO_LIN( DS_reg(&context),
|
||||
DX_reg(&context) )))
|
||||
if (!DeleteFile32A( PTR_SEG_OFF_TO_LIN( DS_reg(&context),
|
||||
DX_reg(&context) )))
|
||||
{
|
||||
AX_reg(&context) = DOS_ExtendedError;
|
||||
SET_CFLAG(&context);
|
||||
|
@ -1252,7 +1252,7 @@ void DOS3Call( struct sigcontext_struct context )
|
|||
break;
|
||||
|
||||
case 0x08: /* Check if drive is removable. */
|
||||
switch(GetDriveType( DOS_GET_DRIVE( BL_reg(&context) )))
|
||||
switch(GetDriveType16( DOS_GET_DRIVE( BL_reg(&context) )))
|
||||
{
|
||||
case DRIVE_CANNOTDETERMINE:
|
||||
DOS_ERROR( ER_InvalidDrive, EC_NotFound, SA_Abort, EL_Disk );
|
||||
|
@ -1269,7 +1269,7 @@ void DOS3Call( struct sigcontext_struct context )
|
|||
break;
|
||||
|
||||
case 0x09: /* CHECK IF BLOCK DEVICE REMOTE */
|
||||
switch(GetDriveType( DOS_GET_DRIVE( BL_reg(&context) )))
|
||||
switch(GetDriveType16( DOS_GET_DRIVE( BL_reg(&context) )))
|
||||
{
|
||||
case DRIVE_CANNOTDETERMINE:
|
||||
DOS_ERROR( ER_InvalidDrive, EC_NotFound, SA_Abort, EL_Disk );
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* Handler for int 25h (absolute disk read).
|
||||
*/
|
||||
void INT_Int25Handler( struct sigcontext_struct context )
|
||||
void INT_Int25Handler( SIGCONTEXT context )
|
||||
{
|
||||
BYTE *dataptr = PTR_SEG_OFF_TO_LIN( DS_reg(&context), BX_reg(&context) );
|
||||
DWORD begin, length;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* Handler for int 26h (absolute disk read).
|
||||
*/
|
||||
void INT_Int26Handler( struct sigcontext_struct context )
|
||||
void INT_Int26Handler( SIGCONTEXT context )
|
||||
{
|
||||
BYTE *dataptr = PTR_SEG_OFF_TO_LIN( DS_reg(&context), BX_reg(&context) );
|
||||
DWORD begin, length;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*
|
||||
* Handler for int 2ah (network).
|
||||
*/
|
||||
void INT_Int2aHandler( struct sigcontext_struct context )
|
||||
void INT_Int2aHandler( SIGCONTEXT context )
|
||||
{
|
||||
switch(AH_reg(&context))
|
||||
{
|
||||
|
|
|
@ -17,15 +17,15 @@
|
|||
/* base WPROCS.DLL ordinal number for VxDs */
|
||||
#define VXD_BASE 400
|
||||
|
||||
static void do_int2f_16(struct sigcontext_struct *context);
|
||||
void do_mscdex(struct sigcontext_struct *context);
|
||||
static void do_int2f_16( SIGCONTEXT *context );
|
||||
void do_mscdex( SIGCONTEXT *context );
|
||||
|
||||
/**********************************************************************
|
||||
* INT_Int2fHandler
|
||||
*
|
||||
* Handler for int 2fh (multiplex).
|
||||
*/
|
||||
void INT_Int2fHandler( struct sigcontext_struct context )
|
||||
void INT_Int2fHandler( SIGCONTEXT context )
|
||||
{
|
||||
switch(AH_reg(&context))
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ void INT_Int2fHandler( struct sigcontext_struct context )
|
|||
/**********************************************************************
|
||||
* do_int2f_16
|
||||
*/
|
||||
static void do_int2f_16(struct sigcontext_struct *context)
|
||||
static void do_int2f_16( SIGCONTEXT *context )
|
||||
{
|
||||
DWORD addr;
|
||||
|
||||
|
@ -138,7 +138,7 @@ static void do_int2f_16(struct sigcontext_struct *context)
|
|||
}
|
||||
}
|
||||
|
||||
void do_mscdex(struct sigcontext_struct *context)
|
||||
void do_mscdex( SIGCONTEXT *context )
|
||||
{
|
||||
int drive, count;
|
||||
char *p;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* INT_Int4bHandler
|
||||
*
|
||||
*/
|
||||
void INT_Int4bHandler( struct sigcontext_struct context )
|
||||
void INT_Int4bHandler( SIGCONTEXT context )
|
||||
{
|
||||
|
||||
switch(AH_reg(&context))
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*
|
||||
* Also handler for interrupt 5c.
|
||||
*/
|
||||
void NetBIOSCall( struct sigcontext_struct context )
|
||||
void NetBIOSCall( SIGCONTEXT context )
|
||||
{
|
||||
BYTE* ptr;
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ static SEGPTR INT_Vectors[256];
|
|||
BOOL INT_Init(void)
|
||||
{
|
||||
WORD vector;
|
||||
HMODULE hModule = GetModuleHandle( "WPROCS" );
|
||||
HMODULE16 hModule = GetModuleHandle( "WPROCS" );
|
||||
|
||||
for (vector = 0; vector < 256; vector++)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ void INT_SetHandler( BYTE intnum, SEGPTR handler )
|
|||
/**********************************************************************
|
||||
* INT_DummyHandler
|
||||
*/
|
||||
void INT_DummyHandler( struct sigcontext_struct context )
|
||||
void INT_DummyHandler( SIGCONTEXT context )
|
||||
{
|
||||
WORD ordinal;
|
||||
char *name;
|
||||
|
@ -85,7 +85,7 @@ void INT_DummyHandler( struct sigcontext_struct context )
|
|||
*
|
||||
* Handler for int 11h (get equipment list).
|
||||
*/
|
||||
void INT_Int11Handler( struct sigcontext_struct context )
|
||||
void INT_Int11Handler( SIGCONTEXT context )
|
||||
{
|
||||
int diskdrives = 0;
|
||||
int parallelports = 0;
|
||||
|
@ -144,7 +144,7 @@ void INT_Int11Handler( struct sigcontext_struct context )
|
|||
*
|
||||
* Handler for int 12h (get memory size).
|
||||
*/
|
||||
void INT_Int12Handler( struct sigcontext_struct context )
|
||||
void INT_Int12Handler( SIGCONTEXT context )
|
||||
{
|
||||
AX_reg(&context) = 640;
|
||||
}
|
||||
|
@ -155,7 +155,7 @@ void INT_Int12Handler( struct sigcontext_struct context )
|
|||
*
|
||||
* Handler for int 15h.
|
||||
*/
|
||||
void INT_Int15Handler( struct sigcontext_struct context )
|
||||
void INT_Int15Handler( SIGCONTEXT context )
|
||||
{
|
||||
INT_BARF( &context, 0x15 );
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ void INT_Int15Handler( struct sigcontext_struct context )
|
|||
*
|
||||
* Handler for int 16h (keyboard).
|
||||
*/
|
||||
void INT_Int16Handler( struct sigcontext_struct context )
|
||||
void INT_Int16Handler( SIGCONTEXT context )
|
||||
{
|
||||
INT_BARF( &context, 0x16 );
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
/***********************************************************************
|
||||
* VXD_PageFile
|
||||
*/
|
||||
void VXD_PageFile( struct sigcontext_struct context )
|
||||
void VXD_PageFile( SIGCONTEXT context )
|
||||
{
|
||||
/* taken from Ralf Brown's Interrupt List */
|
||||
|
||||
|
@ -62,7 +62,7 @@ void VXD_PageFile( struct sigcontext_struct context )
|
|||
/***********************************************************************
|
||||
* VXD_Shell
|
||||
*/
|
||||
void VXD_Shell( struct sigcontext_struct context )
|
||||
void VXD_Shell( SIGCONTEXT context )
|
||||
{
|
||||
dprintf_vxd(stddeb,"VxD Shell called ...\n");
|
||||
|
||||
|
@ -120,7 +120,7 @@ void VXD_Shell( struct sigcontext_struct context )
|
|||
/***********************************************************************
|
||||
* VXD_Comm
|
||||
*/
|
||||
void VXD_Comm( struct sigcontext_struct context )
|
||||
void VXD_Comm( SIGCONTEXT context )
|
||||
{
|
||||
dprintf_vxd(stddeb,"VxD Comm called ...\n");
|
||||
|
||||
|
|
|
@ -394,8 +394,9 @@ static BOOL CDAUDIO_GetCDStatus(UINT wDevID)
|
|||
}
|
||||
switch (CDADev[wDevID].sc.cdsc_audiostatus) {
|
||||
case CDROM_AUDIO_INVALID:
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // device doesn't support status !\n");
|
||||
return FALSE;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // device doesn't support status, returning NOT_READY.\n");
|
||||
CDADev[wDevID].mode = MCI_MODE_NOT_READY;
|
||||
break;
|
||||
case CDROM_AUDIO_NO_STATUS:
|
||||
CDADev[wDevID].mode = MCI_MODE_STOP;
|
||||
dprintf_cdaudio(stddeb,"CDAUDIO_GetCDStatus // MCI_MODE_STOP !\n");
|
||||
|
@ -737,7 +738,10 @@ static DWORD CDAUDIO_mciSeek(UINT wDevID, DWORD dwFlags, LPMCI_SEEK_PARMS lpParm
|
|||
dprintf_cdaudio(stddeb,"CDAUDIO_mciSeek(%u, %08lX, %p);\n",
|
||||
wDevID, dwFlags, lpParms);
|
||||
if (lpParms == NULL) return MCIERR_INTERNAL;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMRESUME)) return MCIERR_HARDWARE;
|
||||
if (ioctl(CDADev[wDevID].unixdev, CDROMRESUME)) {
|
||||
perror("ioctl CDROMRESUME");
|
||||
return MCIERR_HARDWARE;
|
||||
}
|
||||
CDADev[wDevID].mode = MCI_MODE_SEEK;
|
||||
switch(dwFlags) {
|
||||
case MCI_SEEK_TO_START:
|
||||
|
|
|
@ -35,7 +35,7 @@ extern MCI_OPEN_DRIVER_PARMS mciDrv[MAXMCIDRIVERS];
|
|||
/* FIXME: I need to remember the aliasname of a spec. driver.
|
||||
* and this is the easiest way. *sigh*
|
||||
*/
|
||||
static MCI_OPEN_PARMS mciOpenDrv[MAXMCIDRIVERS];
|
||||
extern MCI_OPEN_PARMS mciOpenDrv[MAXMCIDRIVERS];
|
||||
|
||||
LONG DrvDefDriverProc(DWORD dwDevID, HDRVR hDriv, WORD wMsg,
|
||||
DWORD dwParam1, DWORD dwParam2);
|
||||
|
@ -2087,7 +2087,7 @@ DWORD mciSendString (LPCSTR lpstrCommand, LPSTR lpstrReturnString,
|
|||
DWORD dwFlags;
|
||||
int res=0,i,nrofkeywords;
|
||||
|
||||
dprintf_mci(stdnimp,"mciSendString('%s', %p, %d, %X)\n", lpstrCommand,
|
||||
dprintf_mci(stddeb,"mciSendString('%s', %p, %d, %X)\n", lpstrCommand,
|
||||
lpstrReturnString, uReturnLength, hwndCallback
|
||||
);
|
||||
/* format is <command> <device> <optargs> */
|
||||
|
@ -2146,7 +2146,7 @@ DWORD mciSendString (LPCSTR lpstrCommand, LPSTR lpstrReturnString,
|
|||
dname=(SEGPTR)mciOpenDrv[wDevID].lpstrAlias;
|
||||
if (dname==NULL)
|
||||
dname=(SEGPTR)mciOpenDrv[wDevID].lpstrDeviceType;
|
||||
if (!STRCMP(PTR_SEG_TO_LIN(dname),dev))
|
||||
if ((dname!=NULL)&&(!STRCMP(PTR_SEG_TO_LIN(dname),dev)))
|
||||
break;
|
||||
if (++wDevID >= MAXMCIDRIVERS) {
|
||||
dprintf_mci(stddeb, __FILE__":mciSendString:MAXMCIDRIVERS reached!\n");
|
||||
|
|
|
@ -31,6 +31,10 @@ static int InstalledListLen;
|
|||
static LPSTR lpInstallNames = NULL;
|
||||
|
||||
MCI_OPEN_DRIVER_PARMS mciDrv[MAXMCIDRIVERS];
|
||||
/* struct below is to remember alias/devicenames for mcistring.c
|
||||
* FIXME: should use some internal struct ...
|
||||
*/
|
||||
MCI_OPEN_PARMS mciOpenDrv[MAXMCIDRIVERS];
|
||||
|
||||
UINT midiGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
UINT waveGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
|
||||
|
@ -547,12 +551,21 @@ BOOL mciDriverNotify(HWND hWndCallBack, UINT wDevID, UINT wStatus)
|
|||
/**************************************************************************
|
||||
* mciOpen [internal]
|
||||
*/
|
||||
|
||||
#define _MCI_STRDUP_TO_SEG(dest,source) {\
|
||||
HANDLE x;\
|
||||
x=USER_HEAP_ALLOC(strlen(source));\
|
||||
dest=(LPSTR)MAKELONG(x,USER_HeapSel);\
|
||||
strcpy(PTR_SEG_TO_LIN(dest),source);\
|
||||
}
|
||||
|
||||
DWORD mciOpen(DWORD dwParam, LPMCI_OPEN_PARMS lp16Parms)
|
||||
{
|
||||
char str[128];
|
||||
LPMCI_OPEN_PARMS lpParms;
|
||||
UINT uDevTyp = 0;
|
||||
UINT wDevID = 0;
|
||||
|
||||
lpParms = PTR_SEG_TO_LIN(lp16Parms);
|
||||
dprintf_mmsys(stddeb, "mciOpen(%08lX, %p (%p))\n", dwParam, lp16Parms, lpParms);
|
||||
if (lp16Parms == NULL) return MCIERR_INTERNAL;
|
||||
|
@ -560,46 +573,52 @@ DWORD mciOpen(DWORD dwParam, LPMCI_OPEN_PARMS lp16Parms)
|
|||
if (++wDevID >= MAXMCIDRIVERS) {
|
||||
dprintf_mmsys(stddeb, "MCI_OPEN // MAXMCIDRIVERS reached !\n");
|
||||
return MCIERR_INTERNAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
dprintf_mmsys(stddeb, "mciOpen // wDevID=%d \n", wDevID);
|
||||
|
||||
memcpy(&mciOpenDrv[wDevID],lpParms,sizeof(*lpParms));
|
||||
if (dwParam & MCI_OPEN_ALIAS) {
|
||||
dprintf_mmsys(stddeb, "MCI_OPEN // Alias='%s' !\n",
|
||||
(char*)PTR_SEG_TO_LIN(lpParms->lpstrAlias));
|
||||
uDevTyp = MCI_DEVTYPE_WAVEFORM_AUDIO;
|
||||
}
|
||||
_MCI_STRDUP_TO_SEG(
|
||||
mciOpenDrv[wDevID].lpstrAlias,
|
||||
(char*)PTR_SEG_TO_LIN(lpParms->lpstrAlias)
|
||||
);
|
||||
/* mplayer does allocate alias to CDAUDIO */
|
||||
}
|
||||
if (dwParam & MCI_OPEN_TYPE) {
|
||||
if (dwParam & MCI_OPEN_TYPE_ID) {
|
||||
dprintf_mmsys(stddeb, "MCI_OPEN // Dev=%p !\n", lpParms->lpstrDeviceType);
|
||||
uDevTyp = LOWORD((DWORD)lpParms->lpstrDeviceType);
|
||||
}
|
||||
else {
|
||||
mciOpenDrv[wDevID].lpstrDeviceType=lpParms->lpstrDeviceType;
|
||||
} else {
|
||||
if (lpParms->lpstrDeviceType == NULL) return MCIERR_INTERNAL;
|
||||
dprintf_mmsys(stddeb, "MCI_OPEN // Dev='%s' !\n",
|
||||
(char*)PTR_SEG_TO_LIN(lpParms->lpstrDeviceType));
|
||||
_MCI_STRDUP_TO_SEG(
|
||||
mciOpenDrv[wDevID].lpstrDeviceType,
|
||||
(char*)PTR_SEG_TO_LIN(lpParms->lpstrDeviceType)
|
||||
);
|
||||
strcpy(str, PTR_SEG_TO_LIN(lpParms->lpstrDeviceType));
|
||||
AnsiUpper(str);
|
||||
if (strcmp(str, "CDAUDIO") == 0) {
|
||||
uDevTyp = MCI_DEVTYPE_CD_AUDIO;
|
||||
}
|
||||
else
|
||||
} else
|
||||
if (strcmp(str, "WAVEAUDIO") == 0) {
|
||||
uDevTyp = MCI_DEVTYPE_WAVEFORM_AUDIO;
|
||||
}
|
||||
else
|
||||
} else
|
||||
if (strcmp(str, "SEQUENCER") == 0) {
|
||||
uDevTyp = MCI_DEVTYPE_SEQUENCER;
|
||||
}
|
||||
else
|
||||
} else
|
||||
if (strcmp(str, "ANIMATION1") == 0) {
|
||||
uDevTyp = MCI_DEVTYPE_ANIMATION;
|
||||
}
|
||||
else
|
||||
} else
|
||||
if (strcmp(str, "AVIVIDEO") == 0) {
|
||||
uDevTyp = MCI_DEVTYPE_DIGITAL_VIDEO;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
mciDrv[wDevID].wType = uDevTyp;
|
||||
mciDrv[wDevID].wDeviceID = wDevID;
|
||||
lpParms->wDeviceID = wDevID;
|
||||
|
|
|
@ -101,7 +101,7 @@ static XImage *DIB_DIBmpToImage( BITMAPINFOHEADER * bmp, void * bmpData )
|
|||
* Get the info from a bitmap header.
|
||||
* Return 1 for INFOHEADER, 0 for COREHEADER, -1 for error.
|
||||
*/
|
||||
static int DIB_GetBitmapInfo( BITMAPINFOHEADER *header, DWORD *width,
|
||||
static int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width,
|
||||
DWORD *height, WORD *bpp )
|
||||
{
|
||||
if (header->biSize == sizeof(BITMAPINFOHEADER))
|
||||
|
@ -639,10 +639,10 @@ int StretchDIBits( HDC hdc,
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* SetDIBits (GDI.440)
|
||||
* SetDIBits (GDI.440) (GDI32.312)
|
||||
*/
|
||||
int SetDIBits( HDC hdc, HBITMAP hbitmap, WORD startscan, WORD lines,
|
||||
LPSTR bits, BITMAPINFO * info, WORD coloruse )
|
||||
INT16 SetDIBits( HDC32 hdc, HBITMAP32 hbitmap, UINT32 startscan, UINT32 lines,
|
||||
LPCVOID bits, const BITMAPINFO *info, UINT32 coloruse )
|
||||
{
|
||||
DC * dc;
|
||||
BITMAPOBJ * bmp;
|
||||
|
@ -670,11 +670,12 @@ int SetDIBits( HDC hdc, HBITMAP hbitmap, WORD startscan, WORD lines,
|
|||
|
||||
|
||||
/***********************************************************************
|
||||
* SetDIBitsToDevice (GDI.443)
|
||||
* SetDIBitsToDevice (GDI.443) (GDI32.313)
|
||||
*/
|
||||
int SetDIBitsToDevice( HDC hdc, short xDest, short yDest, WORD cx, WORD cy,
|
||||
WORD xSrc, WORD ySrc, WORD startscan, WORD lines,
|
||||
LPSTR bits, BITMAPINFO * info, WORD coloruse )
|
||||
INT16 SetDIBitsToDevice( HDC32 hdc, INT32 xDest, INT32 yDest, DWORD cx,
|
||||
DWORD cy, INT32 xSrc, INT32 ySrc, UINT32 startscan,
|
||||
UINT32 lines, LPCVOID bits, const BITMAPINFO *info,
|
||||
UINT32 coloruse )
|
||||
{
|
||||
DC * dc;
|
||||
DWORD width, height, compression = 0;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue