mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 16:46:17 +00:00
0623a6f3cf
Sun Jan 18 17:05:58 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [include/stackframe.h] [tools/build.c] Some cleanups in stack frame building. * [misc/port.c] Implemented clone() wrapper for libc5 users. * [scheduler/mutex.c] [scheduler/synchro.c] Implemented abandoned mutexes. * [scheduler/process.c] [scheduler/thread.c] We now create a process and a thread structure as soon as possible during initialization. * [scheduler/thread.c] [scheduler/sysdeps.c] Moved system-specific thread handling to sysdeps.c. Fri Jan 16 10:45:15 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [graphics/ddraw.c][include/ddraw.h] Surface handling enhanced. Some stuff already works ;) * [multimedia/dsound.c][include/dsound.h] Implemented using the Open Sound System. Slowly starts to work (sounds terrible for some programs). * [configure.in][multimedia/audio.c][include/config.h.in] Added check for OpenSoundSystem, fixed -lXxf86dga check. Replaced OS #ifdefs by #ifdef HAVE_OSS in mm/audio.c. * [if1632/relay.c][relay32/relay386.c] Do not print control characters for 'str' or 'wstr' args. * [misc/registry.c] "" seems to equals NULL in keynames. Replace where needed. Seems to help the win95 regedit.exe... * [win32/newfns.c] Implemented QueryPerformance* using gettimeofday(2) (should be done using the pentium timers probably). * [tools/ipcl] Removed useless open_pipe construct. Sun Jan 11 17:10:02 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [objects/region.c] [include/region.h] [graphics/x11drv/clipping.c] Regions are now internal to Wine. The basis of this code is taken from the X11 distribution. GetRegionData() is implemented as is ExtCreateRegion() (without Xforms). CreatePolyPolygonRgn() should behave correctly now. * [objects/metafile.c] [graphics/metafiledrv/graphics.c] [graphics/metafiledrv/init.c] [include/metafile.h] [include/metafiledrv.h] Playback of META_CREATEREGION should now work. Implemented recording of META_CREATEREGION and META_PAINTREGION. * [graphics/x11drv/graphics.c] FillRgn() (and therefore its friends) respect logical co-ords. Wed Jan 7 01:21:45 1998 Steinar Hamre <steinarh@stud.fim.ntnu.no> * [configure.in] [include/acconfig.h] [tools/build.c] Now checking whether to use .string or .ascii. * [configure.in] [include/acconfig.h] [scheduler/critsection.c] Defining union semun if this is not available from header files. * [misc/lstr.c] Moved wine's own header files below <wctype.h> to avoid parse error on Solaris. Sun Jan 4 15:38:07 1998 Andrew Taylor <ataylor@cadvision.com> * [multimedia/mmsystem.c] [multimedia/mmio.c] Implemented mmioSendMessage and rearranged the mmio subsystem in terms of this function. Wed Dec 24 00:51:29 1997 Charles Duffy <cduffy@bigfoot.com> * [windows/clipboard.c] [relay32/user32.spec] GetPriorityClipboardFormat32 now has something other than just a stub. I have no idea if it works (can't test until SetClipboardData is finished) but HEdit likes things a lot more this way.
135 lines
3.7 KiB
C
135 lines
3.7 KiB
C
/*
|
|
* Win32 ordinal only exported functions that can't be stuffed somehwere else.
|
|
*
|
|
* Copyright 1997 Marcus Meissner
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "thread.h"
|
|
#include "winerror.h"
|
|
#include "heap.h"
|
|
#include "selectors.h"
|
|
#include "miscemu.h"
|
|
#include "winnt.h"
|
|
#include "process.h"
|
|
#include "module.h"
|
|
#include "callback.h"
|
|
#include "debug.h"
|
|
#include "stddebug.h"
|
|
|
|
static CRITICAL_SECTION Win16Mutex;
|
|
|
|
/***********************************************
|
|
* GetPWinLock (KERNEL32)
|
|
* Return the infamous Win16Mutex.
|
|
*/
|
|
VOID WINAPI GetPWinLock(CRITICAL_SECTION **lock)
|
|
{
|
|
fprintf(stderr,"GetPWinlock(%p)\n",lock);
|
|
*lock = &Win16Mutex;
|
|
}
|
|
|
|
/**********************************************************************
|
|
* _KERNEL32_88
|
|
*/
|
|
BOOL32 WINAPI WOW32_1(SEGPTR segptr,LPLDT_ENTRY ldtent)
|
|
{
|
|
return GetThreadSelectorEntry(GetCurrentThreadId(),segptr>>16,ldtent);
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* _KERNEL32_18 (KERNEL32.18)
|
|
* 'Of course you cannot directly access Windows internal structures'
|
|
*/
|
|
|
|
DWORD WINAPI _KERNEL32_18(DWORD processid,DWORD action)
|
|
{
|
|
PDB32 *process;
|
|
TDB *pTask;
|
|
|
|
action+=56;
|
|
fprintf(stderr,"KERNEL32_18(%ld,%ld+0x38)\n",processid,action);
|
|
if (action>56)
|
|
return 0;
|
|
if (!(process = PROCESS_IdToPDB( processid ))) return 0;
|
|
switch (action) {
|
|
case 0: /* return app compat flags */
|
|
pTask = (TDB*)GlobalLock16(process->task);
|
|
if (!pTask)
|
|
return 0;
|
|
return pTask->compat_flags;
|
|
case 4: /* returns offset 0xb8 of process struct... dunno what it is */
|
|
return 0;
|
|
case 8: /* return hinstance16 */
|
|
pTask = (TDB*)GlobalLock16(process->task);
|
|
if (!pTask)
|
|
return 0;
|
|
return pTask->hInstance;
|
|
case 12:/* return expected windows version */
|
|
pTask = (TDB*)GlobalLock16(process->task);
|
|
if (!pTask)
|
|
return 0;
|
|
return pTask->version;
|
|
case 16:/* return uncrypted pointer to current thread */
|
|
return (DWORD)THREAD_Current();
|
|
case 20:/* return uncrypted pointer to process */
|
|
return (DWORD)process;
|
|
case 24:/* return stdoutput handle from startupinfo */
|
|
return (DWORD)(process->env_db->startup_info->hStdOutput);
|
|
case 28:/* return stdinput handle from startupinfo */
|
|
return (DWORD)(process->env_db->startup_info->hStdInput);
|
|
case 32:/* get showwindow flag from startupinfo */
|
|
return (DWORD)(process->env_db->startup_info->wShowWindow);
|
|
case 36:{/* return startup x and y sizes */
|
|
LPSTARTUPINFO32A si = process->env_db->startup_info;
|
|
DWORD x,y;
|
|
|
|
x=si->dwXSize;if (x==0x80000000) x=0x8000;
|
|
y=si->dwYSize;if (y==0x80000000) y=0x8000;
|
|
return (y<<16)+x;
|
|
}
|
|
case 40:{/* return startup x and y */
|
|
LPSTARTUPINFO32A si = process->env_db->startup_info;
|
|
DWORD x,y;
|
|
|
|
x=si->dwX;if (x==0x80000000) x=0x8000;
|
|
y=si->dwY;if (y==0x80000000) y=0x8000;
|
|
return (y<<16)+x;
|
|
}
|
|
case 44:/* return startup flags */
|
|
return process->env_db->startup_info->dwFlags;
|
|
case 48:/* return uncrypted pointer to parent process (if any) */
|
|
return (DWORD)process->parent;
|
|
case 52:/* return process flags */
|
|
return process->flags;
|
|
case 56:/* unexplored */
|
|
return 0;
|
|
default:
|
|
fprintf(stderr,"_KERNEL32_18:unknown offset (%ld)\n",action);
|
|
return 0;
|
|
}
|
|
/* shouldn't come here */
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* (KERNEL32.33)
|
|
* Returns some internal value.... probably the default environment database?
|
|
*/
|
|
DWORD WINAPI _KERNEL32_34()
|
|
{
|
|
fprintf(stderr,"KERNEL32_34(), STUB returning 0\n");
|
|
return 0;
|
|
}
|
|
|
|
BOOL32 WINAPI _KERNEL32_99(HANDLE32 threadid,DWORD exitcode,DWORD x) {
|
|
fprintf(stderr,"KERNEL32_99(%d,%ld,0x%08lx),stub\n",threadid,exitcode,x);
|
|
return TRUE;
|
|
}
|
|
|
|
DWORD WINAPI _KERNEL32_98(DWORD x) {
|
|
fprintf(stderr,"KERNEL32_98(0x%08lx),stub\n",x);
|
|
return 1;
|
|
}
|