mirror of
https://github.com/reactos/wine.git
synced 2025-02-19 04:18:09 +00:00
![Alexandre Julliard](/assets/img/avatar_default.png)
Tue Jun 11 15:20:43 1996 Alexandre Julliard <julliard@lrc.epfl.ch> * [debugger/break.c] [loader/signal.c] Fixed breakpoints in 32-bit code. * [include/windows.h] Added many more Win32 versions of standard structures. * [include/winreg.h] [misc/registry.c] Moved private types into registry.c. * [memory/string.c] (New file) Moved most string functions from misc/lstr.c; added Win32 version of all functions. * [misc/wsprintf.c] Implemented Win32 wsprintf functions. * [objects/bitmap.c] Implemented Win32 bitmap functions. * [windows/dialog.c] Don't set dialog procedure before the controls are created. This avoids a crash in Winhelp. Tue Jun 11 14:10:06 1996 Martin von Loewis <loewis@informatik.hu-berlin.de> * [controls/menu.c] [if1632/user.spec] [windows/message.c] Replace PeekMessage with PeekMessage16. * [if1632/kernel32.spec][misc/main.c] GetVersion32,GetVersionEx32A,GetVersionEx32W: new functions. MAIN_ParseVersion: new function, new command line option -winver. GetVersion: modified to take command line argument into account. * [if1632/kernel32.spec] [win32/process.c] FreeLibrary32: new function. TlsAlloc: initialize Tls to zero. InterlockedIncrement,InterlockedDecrement,InterlockedExchange: new functions. * [if1632/kernel32.spec] SetErrorMode,GetActiveWindow: new relays to existing functions. * [if1632/kernel32.spec][win32/user32.c] PeekMessage32A,PeekMessage32W: new functions. * [include/struct32.h][include/windows.h] Moved MSG32 to windows.h. Renamed MSG to MSG16. Modified prototypes to use MSG16 * [include/winbase.h] OSVERSIONINFO32A,OSVERSIONINFO32W: new structures. Sun Jun 9 20:53:30 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [if1632/Makefile.in] [loader/builtin.c] version.dll,lz32.dll added. * [include/lzexpand.h] [if1632/lz32.spec] [if1632/lzexpand.spec] [misc/lzexpand.c] lz32.dll added. Modified to new function naming standard. * [include/ver.h] [if1632/ver.spec] [if1632/version.spec] [misc/ver.c] version.dll added (win32 version of ver.dll). Modified to new function naming standard. Use registry to look up a LOCALE langids too. (VerInstallFile,VerFindFile still stubs) Fri Jun 7 20:40:20 1996 Albrecht Kleine <kleine@ak.sax.de> * [files/file.c] Added a warning if GetTempFileName() gets a bad drive parameter. * [misc/commdlg.c] Changed file listbox color to gray in SaveFile dialog (just like Windows does this).
171 lines
4.4 KiB
C
171 lines
4.4 KiB
C
/*
|
|
* Win32 kernel functions
|
|
*
|
|
* Copyright 1995 Martin von Loewis
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include "windows.h"
|
|
#include "winerror.h"
|
|
#include "kernel32.h"
|
|
#include "handle32.h"
|
|
#include "stddebug.h"
|
|
#include "debug.h"
|
|
|
|
static HANDLE32 ProcessHeap = 0; /* FIXME: should be in process database */
|
|
|
|
/***********************************************************************
|
|
* ExitProcess (KERNEL32.100)
|
|
*/
|
|
|
|
void ExitProcess(DWORD status)
|
|
{
|
|
exit(status);
|
|
}
|
|
|
|
/***********************************************************************
|
|
* CreateMutexA (KERNEL32.52)
|
|
*/
|
|
HANDLE32 CreateMutexA (SECURITY_ATTRIBUTES *sa, BOOL on, const char *a)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/***********************************************************************
|
|
* ReleaseMutex (KERNEL32.435)
|
|
*/
|
|
BOOL ReleaseMutex (HANDLE32 h)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/***********************************************************************
|
|
* CreateEventA (KERNEL32.43)
|
|
*/
|
|
HANDLE32 CreateEventA (SECURITY_ATTRIBUTES *sa, BOOL au, BOOL on, const char
|
|
*name)
|
|
{
|
|
return 0;
|
|
}
|
|
/***********************************************************************
|
|
* SetEvent (KERNEL32.487)
|
|
*/
|
|
BOOL SetEvent (HANDLE32 h)
|
|
{
|
|
return 0;
|
|
}
|
|
/***********************************************************************
|
|
* ResetEvent (KERNEL32.439)
|
|
*/
|
|
BOOL ResetEvent (HANDLE32 h)
|
|
{
|
|
return 0;
|
|
}
|
|
/***********************************************************************
|
|
* WaitForSingleObject (KERNEL32.561)
|
|
*/
|
|
DWORD WaitForSingleObject(HANDLE32 h, DWORD a)
|
|
{
|
|
return 0;
|
|
}
|
|
/***********************************************************************
|
|
* DuplicateHandle (KERNEL32.78)
|
|
*/
|
|
BOOL DuplicateHandle(HANDLE32 a, HANDLE32 b, HANDLE32 c, HANDLE32 * d, DWORD e, BOOL f, DWORD g)
|
|
{
|
|
*d = b;
|
|
return 1;
|
|
}
|
|
/***********************************************************************
|
|
* GetCurrentProcess (KERNEL32.198)
|
|
*/
|
|
HANDLE32 GetCurrentProcess(void)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
/***********************************************************************
|
|
* GetProcessHeap (KERNEL32.259)
|
|
*/
|
|
HANDLE32 GetProcessHeap(void)
|
|
{
|
|
if (!ProcessHeap) ProcessHeap = HeapCreate( 0, 0x10000, 0 );
|
|
return ProcessHeap;
|
|
}
|
|
|
|
/***********************************************************************
|
|
* LoadLibraryA (KERNEL32.365)
|
|
* copied from LoadLibrary
|
|
* This does not currently support built-in libraries
|
|
*/
|
|
HANDLE32 LoadLibraryA(char *libname)
|
|
{
|
|
HANDLE handle;
|
|
dprintf_module( stddeb, "LoadLibrary: (%08x) %s\n", (int)libname, libname);
|
|
handle = LoadModule( libname, (LPVOID)-1 );
|
|
if (handle == (HANDLE) -1)
|
|
{
|
|
char buffer[256];
|
|
strcpy( buffer, libname );
|
|
strcat( buffer, ".dll" );
|
|
handle = LoadModule( buffer, (LPVOID)-1 );
|
|
}
|
|
/* Obtain module handle and call initialization function */
|
|
#ifndef WINELIB
|
|
if (handle >= (HANDLE)32) PE_InitializeDLLs( GetExePtr(handle));
|
|
#endif
|
|
return handle;
|
|
}
|
|
|
|
/***********************************************************************
|
|
* FreeLibrary
|
|
*/
|
|
BOOL FreeLibrary32(HINSTANCE hLibModule)
|
|
{
|
|
fprintf(stderr,"FreeLibrary: empty stub\n");
|
|
return TRUE;
|
|
}
|
|
|
|
#ifndef WINELIB
|
|
/***********************************************************************
|
|
* WIN32_GetProcAddress
|
|
*/
|
|
void* WIN32_GetProcAddress(HANDLE32 hModule, char* function)
|
|
{
|
|
dprintf_module( stddeb, "WIN32_GetProcAddress(%08x,%s)\n",
|
|
hModule, function);
|
|
return PE_GetProcAddress(GetExePtr(hModule),function);
|
|
}
|
|
#endif /* WINELIB */
|
|
|
|
/**********************************************************************
|
|
* GetProcessAffinityMask
|
|
*/
|
|
BOOL GetProcessAffinityMask(HANDLE32 hProcess, LPDWORD lpProcessAffinityMask,
|
|
LPDWORD lpSystemAffinityMask)
|
|
{
|
|
dprintf_task(stddeb,"GetProcessAffinityMask(%x,%x,%x)\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
|
|
*/
|
|
BOOL SetThreadAffinityMask(HANDLE32 hThread, DWORD dwThreadAffinityMask)
|
|
{
|
|
dprintf_task(stddeb,"SetThreadAffinityMask(%x,%x)\n",hThread,
|
|
dwThreadAffinityMask);
|
|
/* FIXME: We let it fail */
|
|
return 1;
|
|
}
|