mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-14 16:46:17 +00:00
03468f7d4b
Sun Feb 15 12:02:59 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [graphics/x11drv/*.c] [objects/*.c] A few X11 critical section optimizations, mostly with XGet/PutPixel. * [scheduler/sysdeps.c] [misc/main.c] Make sure X11 critical section is available before any Xlib call. * [if1632/relay.c] [tools/build.c] Yet another attempt at fixing Catch/Throw. * [loader/pe_image.c] Fixed broken PE DLL loading. * [include/winnt.h] [scheduler/handle.c] [scheduler/*.c] Implemented handle access rights. Added Get/SetHandleInformation. Sun Feb 15 09:45:23 1997 Andreas Mohr <100.30936@germany.net> * [misc/winsock.c] Fixed bug in WSACleanup which lead to crashes in WINSOCK_HandleIO. * [graphics/fontengine.c] [include/font.h] Minor improvements. * [memory/global.c] Implemented GlobalEntryHandle. * [misc/toolhelp.c] Fixed a memory bug in Notify*register. * [misc/w32scomb.c] Improved Get16DLLAddress. * [objects/gdiobj.c] Implemented GdiSeeGdiDo. Sat Feb 14 14:57:39 1998 John Richardson <jrichard@zko.dec.com> * [win32/console.c] Added the console implementation, AllocConsole, FreeConsole, CONSOLE_InheritConsole. * [documentation/console] Some documentation on the console. * [include/winerror.h] Added some error defines. * [scheduler/k32obj.c] Registered the scheduler ops. Fri Feb 13 19:35:35 1998 James Moody <013263m@dragon.acadiau.ca> * [ole/ole2nls.c] Some English language fixes for missing values. * [controls/listbox.c] Fix to allow an empty listbox to deselect all items. * [relay32/user32.spec] [windows/keyboard.c] CreateAcceleratorTableA stub method. * [windows/sysmetrics.c] Added missing SM_CXCURSOR & SM_CYCURSOR initializers. * [windows/message.c] PostThreadMessage32A stub method. Fri Feb 13 17:12:24 1998 Jim Peterson <jspeter@roanoke.infi.net> * [libtest/hello3res.rc] [libtest/hello3.c] [libtest/Makefile.in] Updated the 'hello3' test so that it functions properly again. Fri Feb 13 14:08:07 1998 Martin Boehme <boehme@informatik.mu-luebeck.de> * [graphics/mapping.c] Fixed the embarrassing bugs I introduced into DPtoLP and LPtoDP. * [windows/scroll.c] Prevent ScrollWindow32 from sending WM_ERASEBKGND. Thu Feb 12 22:46:53 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [objects/metafile] [include/ldt.h] Fix to cope with records longer than 64K. * [windows/clipboard.c] Clean up bitmaps and metapicts properly. Mon Feb 3 21:52:18 1998 Karl Backström <karl_b@geocities.com> * [programs/winhelp/Sw.rc] [resources/sysres_Sw.rc] Minor update of Swedish language support.
136 lines
4.2 KiB
C
136 lines
4.2 KiB
C
/*
|
|
* Win32 kernel functions
|
|
*
|
|
* Copyright 1995 Martin von Loewis
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include <sys/times.h>
|
|
#include "windows.h"
|
|
#include "winerror.h"
|
|
#include "heap.h"
|
|
#include "thread.h"
|
|
#include "process.h"
|
|
#include "pe_image.h"
|
|
#include "file.h"
|
|
#include "stddebug.h"
|
|
#include "debug.h"
|
|
|
|
|
|
/***********************************************************************
|
|
* MsgWaitForMultipleObjects (USER32.399)
|
|
*/
|
|
DWORD WINAPI MsgWaitForMultipleObjects(
|
|
DWORD nCount,HANDLE32 *pHandles,BOOL32 fWaitAll,DWORD dwMilliseconds,
|
|
DWORD dwWakeMask
|
|
) {
|
|
int i;
|
|
fprintf(stderr,"MsgWaitForMultipleObjects(%ld,[",nCount);
|
|
for (i=0;i<nCount;i++)
|
|
fprintf(stderr,"%ld,",(DWORD)pHandles[i]);
|
|
fprintf(stderr,"],%d,%ld,0x%08lx)\n",fWaitAll,dwMilliseconds,dwWakeMask);
|
|
return 0;
|
|
}
|
|
|
|
/***********************************************************************
|
|
* DuplicateHandle (KERNEL32.78)
|
|
*/
|
|
BOOL32 WINAPI DuplicateHandle(HANDLE32 a, HANDLE32 b, HANDLE32 c, HANDLE32 * d, DWORD e, BOOL32 f, DWORD g)
|
|
{
|
|
fprintf(stderr,"DuplicateHandle(%d,%d,%d,%p,%ld,%d,%ld) stub\n",a,b,c,d,e,f,g);
|
|
*d = b;
|
|
return TRUE;
|
|
}
|
|
|
|
/**********************************************************************
|
|
* GetProcessAffinityMask
|
|
*/
|
|
BOOL32 WINAPI GetProcessAffinityMask(HANDLE32 hProcess,
|
|
LPDWORD lpProcessAffinityMask,
|
|
LPDWORD lpSystemAffinityMask)
|
|
{
|
|
dprintf_task(stddeb,"GetProcessAffinityMask(%x,%lx,%lx)\n",
|
|
hProcess,(lpProcessAffinityMask?*lpProcessAffinityMask:0),
|
|
(lpSystemAffinityMask?*lpSystemAffinityMask:0));
|
|
/* It is definitely important for a process to know on what processor
|
|
it is running :-) */
|
|
if(lpProcessAffinityMask)
|
|
*lpProcessAffinityMask=1;
|
|
if(lpSystemAffinityMask)
|
|
*lpSystemAffinityMask=1;
|
|
return TRUE;
|
|
}
|
|
|
|
/**********************************************************************
|
|
* SetThreadAffinityMask
|
|
* Works now like the Windows95 (no MP support) version
|
|
*/
|
|
BOOL32 WINAPI SetThreadAffinityMask(HANDLE32 hThread, DWORD dwThreadAffinityMask)
|
|
{
|
|
THDB *thdb = THREAD_GetPtr( hThread, THREAD_SET_INFORMATION );
|
|
|
|
if (!thdb)
|
|
return FALSE;
|
|
if (dwThreadAffinityMask!=1) {
|
|
fprintf(stderr,"SetThreadAffinityMask(%d,%ld), only 1 processor supported.\n",(int)hThread,dwThreadAffinityMask);
|
|
K32OBJ_DecCount((K32OBJ*)thdb);
|
|
return FALSE;
|
|
}
|
|
K32OBJ_DecCount((K32OBJ*)thdb);
|
|
return TRUE;
|
|
}
|
|
|
|
BOOL32 WINAPI CreateProcess32A(
|
|
LPCSTR appname,LPSTR cmdline,LPSECURITY_ATTRIBUTES processattributes,
|
|
LPSECURITY_ATTRIBUTES threadattributes,BOOL32 inherithandles,
|
|
DWORD creationflags,LPVOID env,LPCSTR curdir,
|
|
LPSTARTUPINFO32A startupinfo,LPPROCESS_INFORMATION processinfo
|
|
) {
|
|
fprintf(stderr,"CreateProcessA(%s,%s,%p,%p,%d,%08lx,%p,%s,%p,%p), stub\n",
|
|
appname,cmdline,processattributes,threadattributes,
|
|
inherithandles,creationflags,env,curdir,startupinfo,processinfo
|
|
);
|
|
/* make from lcc uses system as fallback if CreateProcess returns
|
|
FALSE, so return false */
|
|
return FALSE;
|
|
}
|
|
|
|
BOOL32 WINAPI CreateProcess32W(
|
|
LPCWSTR appname,LPWSTR cmdline,LPSECURITY_ATTRIBUTES processattributes,
|
|
LPSECURITY_ATTRIBUTES threadattributes,BOOL32 inherithandles,
|
|
DWORD creationflags,LPVOID env,LPCWSTR curdir,
|
|
LPSTARTUPINFO32W startupinfo,LPPROCESS_INFORMATION processinfo)
|
|
{
|
|
fprintf(stderr,"CreateProcessW(%p,%p,%p,%p,%d,%08lx,%p,%p,%p,%p) stub\n",
|
|
appname,cmdline,processattributes,threadattributes,
|
|
inherithandles,creationflags,env,curdir,startupinfo,processinfo );
|
|
/* make from lcc uses system as fallback if CreateProcess returns
|
|
FALSE, so return false */
|
|
return FALSE;
|
|
}
|
|
|
|
BOOL32 WINAPI ContinueDebugEvent(DWORD pid,DWORD tid,DWORD contstatus) {
|
|
fprintf(stderr,"ContinueDebugEvent(%ld,%ld,%ld) stub\n",pid,tid,contstatus);
|
|
return TRUE;
|
|
}
|
|
|
|
/*********************************************************************
|
|
* GetProcessTimes [KERNEL32.262]
|
|
*
|
|
* FIXME: implement this better ...
|
|
*/
|
|
BOOL32 WINAPI GetProcessTimes(
|
|
HANDLE32 hprocess,LPFILETIME lpCreationTime,LPFILETIME lpExitTime,
|
|
LPFILETIME lpKernelTime, LPFILETIME lpUserTime
|
|
) {
|
|
struct tms tms;
|
|
|
|
times(&tms);
|
|
DOSFS_UnixTimeToFileTime(tms.tms_utime,lpUserTime,0);
|
|
DOSFS_UnixTimeToFileTime(tms.tms_stime,lpKernelTime,0);
|
|
return TRUE;
|
|
}
|
|
|