Tue Jun 6 12:11:41 1995 Alexandre Julliard (julliard@sunsite.unc.edu) * [controls/menu.c] Fixed bug with drawing multi-column menus with vertical separator. * [debugger/debug.l] Fixed NULL-pointer reference after readline(). * [if1632/winprocs.spec] [miscemu/int21.c] [miscemu/interrupts.c] Added interrupt vector emulation. Allows to retrieve an interrupt vector and jump to it without crashing. * [loader/ldt.c] Moved ldt.c to memory directory. * [loader/task.c] Implemented LockCurrentTask() and GetInstanceData(). * [objects/bitblt.c] Fixed a bug that caused StretchBlt() to use wrong colors when stretching a monochrome bitmap to a color display. * [objects/bitmap.c] Fixed a segmented pointer bug in CreateBitmapIndirect(). * [tools/build.c] Added possibility to have arguments for register functions; used by interrupt vectors to remove the flags from the stack. Generate a new function CallTo32_LargeStack(), that allows calling a 32-bit function using the original 32-bit stack, for functions that need more that 64k of stack. Tue May 30 10:29:56 1995 Martin von Loewis <martin@informatik.hu-berlin.de> * [if1632/shell.spec] [misc/shell.c] DoEnvironmentSubst: fixed prototype * [if1632/gdi.spec] [objects/palette.c] SetSystemPaletteUse: new function * [if1632/kernel.spec] [loader/resource.c] DirectResAlloc: new function * [if1632/user.spec] [windows/keyboard.c] SetKeyboardState: new function Mon May 29 12:58:28 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [tools/build.c] Prevent interrupts from destroying the args for a 32 bit function by loading the correct value into %esp directly after %ss. * [loader/ne_image.c] [loader/module.c] The new instance must be created earlier in LoadModule(), so that fixups referencing it will be handled correctly. Initialize the local heap for a DGROUP in NE_LoadSegment(). * [objects/dib.c] Like RLE8 bitmaps, RLE4 bitmaps don't always end with a proper code. This used to crash Wine. Fixed. * [objects/text.c] Fix possible null pointer dereference in debugging output. * [misc/commdlg.c] Handle user input in the edit control better. Some bugs fixed. * [memory/local.c] Started implementing moveable blocks. This is unfinished (!), but at least it does not seem to break things. Wed May 24 13:26:36 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de> * [loader/module.c] LoadModule(): DLLs occasionally have a data segment, and they work much better if it is loaded :-) LoadLibrary(): pass HMODULE instead of HINSTANCE to NE_InitializeDLLs. FindModule(): also strip off the last backslash of the pathnames (Winhelp tried to load C:\WINDOWS\SYSTEM\COMMDLG.DLL). GetModuleHandle(): just call MODULE_FindModule, it does the same job, only better. * [loader/ne_image.c] LocalInit() the heap of a DLL in NE_InitDLL. (This is probably not really correct, it seems that all programs and DLLs try to do this themselves. But they pass weird parameters.) NE_InitializeDLLs should also call NE_InitDLL for the passed hModule. * [loader/task.c] [misc/user.c] Finish global initializations in InitTask instead of InitApp, or all the DLLs will be initialized in InitTask without any available window classes!
118 lines
4.8 KiB
C
118 lines
4.8 KiB
C
/*
|
|
* Task definitions
|
|
*
|
|
* Copyright 1995 Alexandre Julliard
|
|
*/
|
|
|
|
#ifndef _WINE_TASK_H
|
|
#define _WINE_TASK_H
|
|
|
|
#include "wintypes.h"
|
|
|
|
#ifndef WINELIB
|
|
#pragma pack(1)
|
|
#endif
|
|
|
|
/* Process database (i.e. a normal DOS PSP) */
|
|
|
|
typedef struct
|
|
{
|
|
WORD int20; /* int 20h instruction */
|
|
WORD nextParagraph; /* Segment of next paragraph */
|
|
BYTE reserved1;
|
|
BYTE dispatcher[5]; /* Long call to DOS */
|
|
SEGPTR savedint22; /* Saved int 22h handler */
|
|
SEGPTR savedint23; /* Saved int 23h handler */
|
|
SEGPTR savedint24; /* Saved int 24h handler */
|
|
WORD parentPSP; /* Selector of parent PSP */
|
|
BYTE fileHandles[20]; /* Open file handles */
|
|
HANDLE environment; /* Selector of environment */
|
|
WORD reserved2[23];
|
|
BYTE fcb1[16]; /* First FCB */
|
|
BYTE fcb2[20]; /* Second FCB */
|
|
BYTE cmdLine[128]; /* Command-line (first byte is length) */
|
|
} 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
|
|
{
|
|
HTASK hNext; /* Selector of next TDB */
|
|
WORD sp; /* Stack pointer of task */
|
|
WORD ss; /* Stack segment of task */
|
|
WORD nEvents; /* Events for this task */
|
|
char priority; /* Task priority, between -32 and 15 */
|
|
BYTE unused1;
|
|
HGLOBAL hStack32; /* Handle to 32-bit stack */
|
|
WORD hSelf; /* Selector of this TDB */
|
|
HANDLE hPrevInstance; /* Previous instance of the module */
|
|
DWORD esp; /* 32-bit stack pointer */
|
|
WORD ctrlword8087; /* 80x87 control word */
|
|
WORD flags; /* Task flags */
|
|
WORD error_flags; /* Error handling flags */
|
|
WORD version; /* Expected Windows version */
|
|
HANDLE hInstance; /* Instance handle for this task */
|
|
HMODULE hModule; /* Module handle */
|
|
HANDLE hQueue; /* Selector of task message queue */
|
|
HTASK hParent; /* Selector of TDB of parent task */
|
|
WORD signal_flags; /* Flags related to signal handler */
|
|
DWORD sighandler WINE_PACKED; /* Signal handler */
|
|
DWORD userhandler WINE_PACKED; /* USER signal handler */
|
|
DWORD discardhandler WINE_PACKED; /* Handler for GlobalDiscard() */
|
|
DWORD int0 WINE_PACKED; /* int 0 (divide by zero) handler */
|
|
DWORD int2 WINE_PACKED; /* int 2 (NMI) handler */
|
|
DWORD int4 WINE_PACKED; /* int 4 (INTO) handler */
|
|
DWORD int6 WINE_PACKED; /* int 6 (invalid opcode) handler */
|
|
DWORD int7 WINE_PACKED; /* int 7 (coprocessor) handler */
|
|
DWORD int3e WINE_PACKED; /* int 3e (80x87 emulator) handler */
|
|
DWORD int75 WINE_PACKED; /* int 75 (80x87 error) handler */
|
|
DWORD compat_flags WINE_PACKED; /* Compatibility flags */
|
|
BYTE unused4[14];
|
|
HANDLE hPDB; /* Selector of PDB (i.e. PSP) */
|
|
DWORD dta WINE_PACKED; /* Current DTA */
|
|
BYTE curdrive; /* Current drive */
|
|
BYTE curdir[65]; /* Current directory */
|
|
WORD nCmdShow; /* cmdShow parameter to WinMain */
|
|
HTASK hYieldTo; /* Next task to schedule */
|
|
DWORD dlls_to_init; /* Ptr to list of DLL to initialize */
|
|
HANDLE hCSAlias; /* Code segment alias for this TDB */
|
|
THUNKS thunks WINE_PACKED; /* Make proc instance thunks */
|
|
WORD more_thunks[6*4]; /* Space for 6 more thunks */
|
|
BYTE module_name[8]; /* Module name for task */
|
|
WORD magic; /* TDB signature */
|
|
DWORD unused7;
|
|
PDB pdb; /* 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
|
|
|
|
#ifndef WINELIB
|
|
#pragma pack(4)
|
|
#endif
|
|
|
|
extern HTASK TASK_CreateTask( HMODULE hModule, HANDLE hInstance,
|
|
HANDLE hPrevInstance, HANDLE hEnvironment,
|
|
char *cmdLine, WORD cmdShow );
|
|
|
|
/* TASK_Reschedule() 16-bit entry point */
|
|
extern FARPROC RELAY_RescheduleProcAddr;
|
|
|
|
#endif /* _WINE_TASK_H */
|