wine/include/task.h
Alexandre Julliard f1aa3030a6 Release 960805
Sun Aug  4 18:18:48 1996  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [controls/scroll.c]
	Attempted to implement undocumented scroll-bar messages.

	* [tools/build.c] [include/callback.h] [windows/winproc.c]
	CallTo16_* functions now get DS from the previous 16-bit stackframe.

	* [if1632/thunk.c] [include/callback.h]
	Added thunks to implement callbacks for the emulator. Now all the
	Enum* functions always take a real function pointer even in the
	emulator.
	
	* [loader/builtin.c]
	Removed binary search in BUILTIN_GetEntryPoint32(), as it didn't
 	work with NULL entry points. Using linear search now.

	* [loader/module.c]
	Implemented IsSharedSelector().

	* [loader/task.c]
	Changed SwitchStackTo/Back to use the instance data to store the
	previous stack instead of the TDB. Also copy the local variables
	onto the new stack.
	Added GetExeVersion() and SetTackSignalProc().
	Implemented SetSigHandler().

Sat Aug  3 22:19:00 1996  Thomas Sandford <t.d.g.sandford@prds-grn.demon.co.uk>

	* [controls/menu.c]
	"Fixed" problem in deleting menus where win32 could get into an
	endless loop when it crashed. I think I've fixed the symptoms, not
	the original problem so it might be worth further investigation.

	* [debugger/registers.c]
	Added missing #ifdefs on FS_REG and GS_REG, needed for FreeBSD to
	compile wine properly.

	* [files/dos_fs.c]
	Made DOSFS_Hash and DOSFS_Match non-static so they can be called
	from win32/findfile.c (q.v.).

	* [if1632/gdi32.spec]
	Added SetMapMode (call existing function)

	* [if1632/kernel32.spec]
	Added FindFirstFileA and SetFileAttributesA.

	* [if1632/user32.spec]
	Added BringWindowToTop, CreatePopupMenu, GetKeyState, GetParent,
	IsDlgButtonChecked (call existing functions) and IsDialogMessageA,
	UnhookWindowsHookEx.

	* [win32/file.c]
	Added stub function SetFileAttributes32A. It's a stub because I
	can't really work out what this function should do with most
	attributes in a Unix environment. Anyone care to expand it?

	* [win32/findfile.c]
	New file. Initial stab at FindFirstFile. This doesn't work as
	specified yet, though a lot of the groundwork is there. I haven't
	time to work on this for the next month, so if anyone wants to pick
	it up and run with it please do.

	* [win32/memory.c]
	Removed malloc.h from includes (covered by stdlib.h include, and
	gets rid of a warning in FreeBSD).

	* [win32/newfns.c]
	UnhookWindowsHookEx32A stub added.

	* [win32/user32.c]
	Added implementation of IsDialogMessage32A.

	* [windows/dialog.c]
	IsDlgButtonChecked now calls SendDlgItemMessage32A instead of
	SendDlgItemMessage16.

Sat Aug  3 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>

	* [windows/graphics.c]
	Removed rectangle checking (conflicted with nonstandard
	mapping modes). 

	* [windows/dialog.c]
	Added check for child-style dialogs to DS_ABSALIGN
	coordinate conversion.

	* [objects/color.c]
	Cleaned up misc. bits

Thu Aug  1 10:51:45 1996  Andrew Lewycky <plewycky@oise.utoronto.ca>

	* [windows/focus.c] [windows/event.c] [windows/win.c]
	  [windows/defdlg.c]
	Fixes to focusing and activation.

	* [windows/defdlg.c]
	Properly(?) handle DM_GETDEFID.

	* [controls/combo.c]
	Handle CB_FINDSTRINGEXACT, CB_SETEDITSEL, CB_GETEDITSEL.
	CBCheckSize: Adjust edit position.

Tue Jul 30 09:46:36 1996  Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>

	* [files/file.c] [include/file.h] [loader/module.c] [loader/ne_image.c]
	Pass HFILEs instead of unix-fds to self-loader code.

Mon Jul 29 21:48:25 1996  Albrecht Kleine  <kleine@ak.sax.de>

	* [include/metafile.h] [objects/metafile.c] [objects/text.c]
	Implemented handling of some new metafile records (META_...)
	in PlayMetaFileRecord(), rewrite of 'case META_EXTTEXTOUT'.
	Added functions like MF_StretchBlt() for usage in metafiles.
	Minor bugfix in CopyMetafile().

	* [objects/bitmap.c][objects/dib.c]
	Added check for metafile-DC in Bitmap and DIB functions:
	CreateCompatibleBitmap() etc.
1996-08-05 17:42:43 +00:00

118 lines
5.3 KiB
C

/*
* Task definitions
*
* Copyright 1995 Alexandre Julliard
*/
#ifndef _WINE_TASK_H
#define _WINE_TASK_H
#include "wintypes.h"
#pragma pack(1)
/* Process database (i.e. a normal DOS PSP) */
typedef struct
{
WORD int20; /* 00 int 20h instruction */
WORD nextParagraph; /* 02 Segment of next paragraph */
BYTE reserved1;
BYTE dispatcher[5]; /* 05 Long call to DOS */
FARPROC16 savedint22 WINE_PACKED; /* 0a Saved int 22h handler */
FARPROC16 savedint23 WINE_PACKED; /* 0e Saved int 23h handler */
FARPROC16 savedint24 WINE_PACKED; /* 12 Saved int 24h handler */
WORD parentPSP; /* 16 Selector of parent PSP */
BYTE fileHandles[20]; /* 18 Open file handles */
HANDLE16 environment; /* 2c Selector of environment */
WORD reserved2[2];
WORD nbFiles; /* 32 Number of file handles */
SEGPTR fileHandlesPtr; /* 34 Pointer to file handle table */
WORD reserved3[18];
BYTE fcb1[16]; /* 5c First FCB */
BYTE fcb2[20]; /* 6c Second FCB */
BYTE cmdLine[128]; /* 80 Command-line (first byte is len)*/
} PDB;
/* Segment containing MakeProcInstance() thunks */
typedef struct
{
WORD next; /* Selector of next segment */
WORD magic; /* Thunks signature */
WORD unused;
WORD free; /* Head of the free list */
WORD thunks[4]; /* Each thunk is 4 words long */
} THUNKS;
#define THUNK_MAGIC ('P' | ('T' << 8))
/* Task database. See 'Windows Internals' p. 226 */
typedef struct
{
HTASK16 hNext; /* 00 Selector of next TDB */
WORD sp; /* 02 Stack pointer of task */
WORD ss; /* 04 Stack segment of task */
WORD nEvents; /* 06 Events for this task */
char priority; /* 08 Task priority, -32..15 */
BYTE unused1; /* 09 */
HGLOBAL16 hStack32; /* 0a Handle to 32-bit stack */
HTASK16 hSelf; /* 0c Selector of this TDB */
HANDLE16 hPrevInstance; /* 0e Previous instance of module */
DWORD esp; /* 10 32-bit stack pointer */
WORD ctrlword8087; /* 14 80x87 control word */
WORD flags; /* 16 Task flags */
UINT16 error_mode; /* 18 Error mode (see SetErrorMode)*/
WORD version; /* 1a Expected Windows version */
HANDLE16 hInstance; /* 1c Instance handle for task */
HMODULE16 hModule; /* 1e Module handle */
HQUEUE16 hQueue; /* 20 Selector of task queue */
HTASK16 hParent; /* 22 Selector of TDB of parent */
WORD signal_flags; /* 24 Flags for signal handler */
FARPROC16 sighandler WINE_PACKED; /* 26 Signal handler */
FARPROC16 userhandler WINE_PACKED; /* 2a USER signal handler */
DWORD discardhandler WINE_PACKED; /* 2e Handler for GlobalDiscard() */
DWORD int0 WINE_PACKED; /* 32 int 0 (divide by 0) handler */
DWORD int2 WINE_PACKED; /* 36 int 2 (NMI) handler */
DWORD int4 WINE_PACKED; /* 3a int 4 (INTO) handler */
DWORD int6 WINE_PACKED; /* 3e int 6 (invalid opc) handler */
DWORD int7 WINE_PACKED; /* 42 int 7 (coprocessor) handler */
DWORD int3e WINE_PACKED; /* 46 int 3e (80x87 emu) handler */
DWORD int75 WINE_PACKED; /* 4a int 75 (80x87 error) handler */
DWORD compat_flags WINE_PACKED; /* 4e Compatibility flags */
BYTE unused4[14]; /* 52 */
HANDLE16 hPDB; /* 60 Selector of PDB (i.e. PSP) */
SEGPTR dta WINE_PACKED; /* 62 Current DTA */
BYTE curdrive; /* 66 Current drive */
BYTE curdir[65]; /* 67 Current directory */
WORD nCmdShow; /* a8 cmdShow parameter to WinMain */
HTASK16 hYieldTo; /* aa Next task to schedule */
DWORD dlls_to_init; /* ac Ptr to DLLs to initialize */
HANDLE16 hCSAlias; /* b0 Code segment for this TDB */
THUNKS thunks WINE_PACKED; /* b2 Make proc instance thunks */
WORD more_thunks[6*4]; /* c2 Space for 6 more thunks */
BYTE module_name[8]; /* f2 Module name for task */
WORD magic; /* fa TDB signature */
DWORD unused7; /* fc */
PDB pdb; /* 100 PDB for this task */
} TDB;
#define TDB_MAGIC ('T' | ('D' << 8))
/* TDB flags */
#define TDBF_WINOLDAP 0x0001
#define TDBF_OS2APP 0x0008
#define TDBF_WIN32S 0x0010
#pragma pack(4)
extern BOOL32 TASK_Init(void);
extern HTASK16 TASK_CreateTask( HMODULE16 hModule, HINSTANCE16 hInstance,
HINSTANCE16 hPrevInstance,
HANDLE16 hEnvironment, LPCSTR cmdLine,
UINT16 cmdShow );
extern void TASK_KillCurrentTask( INT16 exitCode );
#endif /* _WINE_TASK_H */