Release 951124
Tue Nov 21 18:49:10 1995 Alexandre Julliard <julliard@sunsite.unc.edu>
* [configure.in] [Makefile] [misc/dos_fs.c]
Got rid of autoconf.h file.
* [debugger/dbg.y]
More logical behavior upon syntax errors.
* [include/hook.h] [windows/hook.c]
Changed hook structure and rewrote most of the hook functions for
better compatibility, based on investigations by Alex Korobka.
* [include/message.h] [windows/message.c]
Added hooks to message queue structure and made the structure
layout Windows-compatible.
Added support for WH_MOUSE, WH_KEYBOARD, WH_HARDWARE and
WH_JOURNALRECORD hooks.
* [misc/main.c]
Added command-line option for changing the language at run-time
(not implemented yet), based on a suggestion from Michael Patra.
* [objects/cursoricon.c]
Fixed silly SEGPTR bug in DumpIcon().
Mon Nov 20 22:22:22 1995 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c] [controls/combo.c] [include/listbox.h]
Partial implementaion of LBS_EXTENDEDSEL style,
yet more updates for drag & drop support. Now works.
* [windows/defwnd.c]
More message handlers.
* [windows/win.c]
DragObject, DragDetect, AnyPopup functions.
* [controls/listbox.c]
More kludgy fixes (WM_...TOITEM, etc.).
* [objects/cursoricon.c] [objects/oembitmap.c]
IconToCursor skeleton, patch for OBM_LoadCursorIcon to handle new
cursor.
* [include/bitmaps/ocr*]
New OEM cursors.
Mon Nov 20 11:05:20 EST 1995 Jim Peterson <jspeter@birch.ee.vt.edu>
* [toolkit/heap.c]
Swapped flags and size arguments to LocalRealloc as per changes in
memory/local.c by William Magro in previous release.
* [include/wintypes.h]
Reinstated the #define's for 'min' and 'max', since they're part of
the Windows API. I really don't think it's a wise idea, so I put
a '#ifndef DONT_DEFINE_min_AND_max' around them. I think the actual
WINE code should never use these (it should use 'MIN' and 'MAX'
instead).
* [loader/*]
Put '#ifndef WINELIB' around many things that WINElib should not need.
* [controls/edit.c]
Took out many '#if defined(WINELIB)' sections with the associated
comment 'temporary fix, until Local memory is correctly implemented in
WINELIB', since the effective translations are now in
toolkit/miscstubs.c.
Took out the #ifndef's I put in EDIT_ClearText. Whoever modified this
file fixed (or at least postponed) the bug I had encountered.
* [loader/task.c]
Put an #ifdef in TASK_CreateTask() that hardwires the current drive to
C: This will probably cause a lot of trouble if this change is
forgotten in the future, but it will let things like the OpenFileName
dialog work for now.
* [toolkit/libres.c] [toolkit/Makefile.in] [toolkit/Makefile]
[include/libres.h]
Made new libres.c file, which will contain functions for supporting
accessing resources by name in WINElib. 'winerc' will need to be
changed.
* [toolkit/heap.c]
Refined memory routines to allow for differences between LocalAlloc
and GlobalAlloc and between LocalSize and GlobalSize.
* [windows/message.c] [include/windows.h]
Defined the GetCurrentTime routine in windows/message.c, and removed
the #define in windows.h.
Mon Nov 20 00:36:42 MET 1995 Sven Verdoolaege <skimo@dns.ufsia.ac.be>
* [*/*]
Added new debugging type DEBUG_WIN32 and DEBUG_ENV.
* [loader/module.c]
Added undocumented GetExpWinVer.
* [tools/build.c]
Previous code didn't pop possibly changed %esi, %edi and %edx
from the stack.
* [win32/advapi.c]
Added GetUserNameA.
* [win32/code_page.c]
Added stub for MultiByteToWideChar.
* [win32/console.c]
Added SetConsoleCtrlHandler stub.
* [win32/file.c]
Added ReadFile CreateFileA GetFileInformationByHandle stubs.
Added CloseHandle.
* [win32/memory.c]
Changed VirtualAlloc and VirtualFree.
* [win32/process.c]
Added ExitProcess.
Sun Nov 19 17:54:42 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [include/windows.h]
Fixed a few broken structure definitions.
* [loader/resource.c]
FindResource(): Need to check for '#xxx' strings here.
* [miscemu/int21.c]
FindNext(): Return MS-DOS filenames uppercase.
* [objects/cursoricon.c]
CreateIcon(), CreateCursor(): Added missing element to CURSORICONINFO
initializers.
* [misc/file.c]
_lopen(): Files opened in OF_WRITE mode are truncated.
OpenFile(): Ignore OF_READ/OF_WRITE/OF_READWRITE when files are
created; use read/write mode.
* [misc/profile.c]
load(): Rewritten.
* [misc/commdlg.c]
Fixed bad call to strncpy() that smashed the stack.
* [controls/combo.c] [windows/winpos.c] [memory/selector.c]
Operator precedence fixes. People who use gcc 2.7.1 don't need a
debugger :-)
* [if1632/gdi.spec] [objects/palette.c]
Add ResizePalette() and AnimatePalette() stubs. They don't do anything,
but sometimes that's good enough.
Fri Nov 17 09:10:35 GMT 1995 John Harvey <john@division.co.uk>
* [include/wine.h] [include/registers.h] [include/winsock.h]
Added definitions for Unixware.
* [loader/signal.c] [misc/comm.c] [misc/winsocket.c]
Misc. fixes for Unixware.
* [loader/task.c]
Made assignemts to context in InitTask for registers use the macros
from registers.h to make them more portable. (Needed for Unixware)
* [tools/build.c]
Fixed register acces routines to work on Unixware. Bit grubby but
it seems to work.
* [controls/edit.c]
EDIT_WM_NCCreate allocates local heap if hasn't been previously
allocated.
* [miscemu/int21.c]
mkdir now creates directory with permission to access it.
* [misc/dos_fs.c]
mkdir now creates directory with permission to access it.
DOS_opendir now uses linked list of dirents to avoid problems with
realloc changing address of malloced memory.
Thu Nov 16 12:47:13 1995 Michael Patra <patra@itp1.Physik.TU-Berlin.DE>
* [controls/menu.c]
MENU_CalcItemSize(): Fixed handling of empty menu items.
Sat Nov 11 21:46:54 1995 Hans de Graaff <graaff@twi72.twi.tudelft.nl>
* [misc/file.c]
In OpenFile, unlink should be done on the unix filename.
Sat Nov 11 16:43:29 1995 Cameron Heide (heide@ee.ualberta.ca)
* [include/handle32.h]
New header file containing internal Win32 kernel handle
information.
* [win32/file.c]
Added ReadFile, CreateFile, and CloseFileHandle, and did
some reorganizing to match the new handle allocation scheme.
* [win32/init.c]
Added CloseHandle and the creation of standard I/O handles.
* [win32/object_mgt.c]
New module for allocating and freeing Win32 kernel handles.
1995-11-26 13:59:11 +00:00
|
|
|
#ifndef WINELIB
|
1994-10-17 18:12:41 +00:00
|
|
|
/*
|
1996-07-17 20:02:21 +00:00
|
|
|
* PE (Portable Execute) File Resources
|
1994-10-17 18:12:41 +00:00
|
|
|
*
|
1996-07-17 20:02:21 +00:00
|
|
|
* Copyright 1995 Thomas Sandford
|
|
|
|
* Copyright 1996 Martin von Loewis
|
1994-10-17 18:12:41 +00:00
|
|
|
*
|
1996-07-17 20:02:21 +00:00
|
|
|
* Based on the Win16 resource handling code in loader/resource.c
|
|
|
|
* Copyright 1993 Robert J. Amstadt
|
|
|
|
* Copyright 1995 Alexandre Julliard
|
|
|
|
*
|
|
|
|
* This is not even at ALPHA level yet. Don't expect it to work!
|
1994-10-17 18:12:41 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
1996-07-17 20:02:21 +00:00
|
|
|
#include "wintypes.h"
|
1994-10-17 18:12:41 +00:00
|
|
|
#include "windows.h"
|
1994-12-10 13:02:28 +00:00
|
|
|
#include "pe_image.h"
|
1996-07-17 20:02:21 +00:00
|
|
|
#include "module.h"
|
|
|
|
#include "handle32.h"
|
|
|
|
#include "libres.h"
|
|
|
|
#include "resource32.h"
|
|
|
|
#include "stackframe.h"
|
|
|
|
#include "neexe.h"
|
|
|
|
#include "accel.h"
|
|
|
|
#include "xmalloc.h"
|
|
|
|
#include "string32.h"
|
Release 941030
Sun Oct 30 13:01:18 1994 Alexandre Julliard (julliard@lamisun.epfl.ch)
* [controls/static.c]
Bug fix for SS_ICON controls.
* [if1632/Imakefile]
Fixed call.o dependencies.
* [objects/clipping.c] [objects/dc.c]
Fixed visible region handling. hVisRgn is always non-null now.
* [windows/dce.c]
Bug fix in GetDCEx for CS_OWNDC windows.
* [windows/nonclient.c] [windows/painting.c]
Fixes to icon window drawing.
* [windows/winpos.c]
A few fixes in SetWindowPos().
Sun Oct 30 12:50:24 1994 Michael Patra <micky@marie.physik.tu-berlin.de>
* [objects/bitblt.c]
BitBlt(): BitBlt is now able to handle any raster operation. If
the request can't be passed to XWindows directly, it's quite
slow, though.
* [*/*.c]
[misc/main.c]
Improvements of the system for handling debug messages. Options are
now also loaded from /usr/lib/X11/app-defaults/Wine (insert
*debugoptions: +xxx there if you want to have turn messages xxx on).
* [controls/menu.c]
DestroyMenu(): The whole window won't be destroyed as a sideeffect
any longer.
* [misc/file.c]
OpenFile(): Fixed bug in searching in system/window-directory.
Sun Oct 30 12:25:53 1994 Jimmy Tirtawangsa <j0t2527@tam2000.tamu.edu>
* [include/windows.h]
Bug fix for window related structures.
DCB and COMSTAT are affected. They must be packed.
* [misc/comm.c]
Bug fix for COM ports:
Dial and dialog window in terminal.exe now works.
Non sequential COM assignments in wine.conf should not break now.
Baudrate can be specified in wine.conf to overcome baudrate limitation
in mswindow. See sample wine.ini
* [include/comm.h]
add baudrate field to DosDeviceStructre
* [object/font.c]
Bug fix for font assignment.
Use pairs of foundry and family fontnames in X11 to correspond with
window's fonts.
Put font assignment ini wine.ini.
* [wine.ini]
Adding optional baudrate after port name in "serialports" section
Add new section, "fonts".
"default" is special key in "fonts" to match any unmatch window font.
Oct 29, 94 (new address) wine@trgcorp.mksinfo.qc.ca (Martin Ayotte)
* [if1632/relay.c]
* [if1632/commdlg.spec] New file.
* [misc/commdlg.c] New file.
* [include/commdlg.h] New file.
Begin of an emulated COMMDLG DLL, built-in for now.
(BTW, if you want to switch between built-in & 16bits CommDlg, only
thing you need to do is to put the real/dummy name in file relay.c)
* [controls/scroll.c]
* [controls/combo.c]
* [controls/listbox.c]
Few bug fixes and/or cosmetic.
* [misc/audio.c]
* [misc/mmaux.c]
bug fixes and flags returned to emulate SB16.
* [misc/midi.c] New file.
skeleton for 'Midi' MMSYSTEM & MCI driver.
* [misc/mcianim.c] New file.
skeleton for 'Animation1' MCI driver.
* [windows/win.c]
Add new stub for GetLastActiveWindow().
Tue Oct 25 09:17:25 1994 Olaf Flebbe (flebbe@tat.physik.uni-tuebingen.de)
* [if1632/call.S] [tools/build.c]
Support for ELF format. (Not complete)
Sun Oct 23 00:51:50 1994 Paul Falstad (pf@zoof)
* [if1632/user.spec]
Add stubs for ArrangeIconicWindows(), etc.
* [if1632/kernel.spec]
Add IsBad*Ptr() functions.
* [loader/signal.c]
Add test_memory(), for use with IsBad*Ptr().
* [windows/winpos.c]
Add stubs for TileChildWindows(), etc.
* [windows/win.c]
IsWindow() shouldn't crash if it's given a bad handle.
Add stub for GetLastActivePopup().
* [memory/global.c]
Implement the IsBad*Ptr() functions.
* [controls/listbox.c]
Return the full longword of the item data in LB_GETITEMDATA.
* [controls/edit.c]
Don't let the user select an area past the end of the text.
* [objects/text.c]
In DrawText(), the code to delete crlfs also removed multiple
consecutive newlines. Also, using DT_CALCRECT didn't return
the right height, and the width wasn't returned at all.
This caused MessageBoxes to be missing much of their text.
* [windows/scroll.c]
ScrollWindow[Ex] didn't work right with null LPRECT arguments.
Fri Oct 21 21:47:19 1994 Paul Falstad (pf@zoof.cts.com)
* [miscemu/int21.c]
Fixed int21 0x42 handler to properly assemble 32-bit seek ptr.
* [misc/property.c]
Fixed inverted logic in EnumProps(), and changed CallBack16()
call to use new arg format.
* [windows/win.c]
Fixed CallBack16() call in Enum[Child]Windows to use new arg
format; this fixes crashes in enum procedures.
Wed Oct 19 21:30:00 PDT 1994 martin@cs.csufresno.edu
* [misc/clipboard.c]
[windows/event.c]
[windows/message.c]
Added cut and paste between Wine and other X clients via
the PRIMARY selection. Text only this time.
* [controls/edit.c]
EDIT_LineLength, EDIT_TextLine return 0 for lines after last one.
* [windows/defwnd.c]
Send WM_SYSCOMMAND to overlapped ancestor window,
not the receiver of WM_SYSKEYDOWN
Sat Oct 22 15:01:02 1994 Thomas Sandford <t.d.g.sandford@bradford.ac.uk>
* [controls/edit.c]
ClientWidth()/ClientHeight() macros: return 0 if size would
be negative
EDIT_StrLength(): takes unsigned char* instead of char*
* [controls/listbox.c]
ListBoxWndProc(): in "case WM_MOUSEMOVE" - set lphl at start of
case instead of in each place required (it was omitted in
some places causing problems!)
* [controls/menu.c]
MENU_CalcItemSize(): don't try to find size of a text item
if the pointer is NULL
* [include/heap.h]
added definition of HEAP_LocalInit()
* [include/msdos.h]
removed buggy pointer() macro (use SAFEMAKEPTR() from segmem.h
instead)
* [loader/selector.c]
IPCCopySelector(): added missing flags to shmget() call
? does this break linux - I added these flags in a previous
patch but they were missing in the corresponding release ?
* [loader/signal.c]
win_fault(): added missing definitions of i, dump for those
not running NetBSD or linux
* [misc/dos_fs.c]
DOS_GetCurrentDir(): made temp[] static so it can be safely
returned
* [miscemu/int21.c,int25.c,int26.c]
Changed all invocations of pointer() to SAFEMAKEPTR(). Included
segmem.h where necessary.
* [windows/dialog.c]
CreateDialogIndirectParam(): Changed HEAP_Init() call to
HEAP_LocalInit(), removed redundant variables
Sat Oct 22 00:29:41 MET 1994 Dag Asheim (dash@ifi.uio.no)
* [loader/library.c] [loader/main.c] [loader/ne_image.c]
[misc/exec.c] [miscemu/int10.c] [miscemu/int21.c]
[objects/bitblt.c] [objects/metafile.c]
Rewritten more printf's to use the new debugging system, and
made wine less verbose per default. Use "-debugmsg +module"
to get (almost) the same behavior as before.
1994-10-30 16:25:19 +00:00
|
|
|
#include "stddebug.h"
|
|
|
|
#include "debug.h"
|
1994-10-17 18:12:41 +00:00
|
|
|
|
1996-07-17 20:02:21 +00:00
|
|
|
#define PrintIdA(name) \
|
|
|
|
if (HIWORD((DWORD)name)) \
|
|
|
|
dprintf_resource( stddeb, "'%s'", name); \
|
|
|
|
else \
|
|
|
|
dprintf_resource( stddeb, "#%04x", LOWORD(name));
|
|
|
|
#define PrintIdW(name)
|
|
|
|
#define PrintId(name)
|
1994-10-17 18:12:41 +00:00
|
|
|
|
1996-07-17 20:02:21 +00:00
|
|
|
/**********************************************************************
|
|
|
|
* GetResDirEntryW
|
|
|
|
*
|
|
|
|
* Helper function - goes down one level of PE resource tree
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
PIMAGE_RESOURCE_DIRECTORY GetResDirEntryW(PIMAGE_RESOURCE_DIRECTORY resdirptr,
|
|
|
|
LPCWSTR name,
|
|
|
|
DWORD root)
|
|
|
|
{
|
|
|
|
int entrynum;
|
|
|
|
PIMAGE_RESOURCE_DIRECTORY_ENTRY entryTable;
|
|
|
|
int namelen;
|
1994-10-17 18:12:41 +00:00
|
|
|
|
1996-07-17 20:02:21 +00:00
|
|
|
if (HIWORD(name)) {
|
|
|
|
/* FIXME: what about #xxx names? */
|
|
|
|
entryTable = (PIMAGE_RESOURCE_DIRECTORY_ENTRY) (
|
|
|
|
(BYTE *) resdirptr +
|
|
|
|
sizeof(IMAGE_RESOURCE_DIRECTORY));
|
|
|
|
namelen = lstrlen32W(name);
|
|
|
|
for (entrynum = 0; entrynum < resdirptr->NumberOfNamedEntries; entrynum++)
|
|
|
|
{
|
|
|
|
PIMAGE_RESOURCE_DIR_STRING_U str =
|
|
|
|
(PIMAGE_RESOURCE_DIR_STRING_U) (root +
|
|
|
|
(entryTable[entrynum].Name & 0x7fffffff));
|
|
|
|
if(namelen != str->Length)
|
|
|
|
continue;
|
|
|
|
if(lstrncmpi32W(name,str->NameString,str->Length)==0)
|
|
|
|
return (PIMAGE_RESOURCE_DIRECTORY) (
|
|
|
|
root +
|
|
|
|
(entryTable[entrynum].OffsetToData & 0x7fffffff));
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
} else {
|
|
|
|
entryTable = (PIMAGE_RESOURCE_DIRECTORY_ENTRY) (
|
|
|
|
(BYTE *) resdirptr +
|
|
|
|
sizeof(IMAGE_RESOURCE_DIRECTORY) +
|
|
|
|
resdirptr->NumberOfNamedEntries * sizeof(IMAGE_RESOURCE_DIRECTORY_ENTRY));
|
|
|
|
for (entrynum = 0; entrynum < resdirptr->NumberOfIdEntries; entrynum++)
|
|
|
|
if ((DWORD)entryTable[entrynum].Name == (DWORD)name)
|
|
|
|
return (PIMAGE_RESOURCE_DIRECTORY) (
|
|
|
|
root +
|
|
|
|
(entryTable[entrynum].OffsetToData & 0x7fffffff));
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 18:50:11 +00:00
|
|
|
/* just use first entry if no default can be found */
|
|
|
|
if (!name && resdirptr->NumberOfIdEntries)
|
|
|
|
return (PIMAGE_RESOURCE_DIRECTORY) (
|
|
|
|
root +
|
|
|
|
(entryTable[0].OffsetToData & 0x7fffffff));
|
1996-07-17 20:02:21 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
1994-10-17 18:12:41 +00:00
|
|
|
}
|
|
|
|
|
1996-07-17 20:02:21 +00:00
|
|
|
/**********************************************************************
|
|
|
|
* GetResDirEntryA
|
|
|
|
*
|
|
|
|
* Helper function - goes down one level of PE resource tree
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
PIMAGE_RESOURCE_DIRECTORY GetResDirEntryA(PIMAGE_RESOURCE_DIRECTORY resdirptr,
|
|
|
|
LPCSTR name,
|
|
|
|
DWORD root)
|
1994-10-17 18:12:41 +00:00
|
|
|
{
|
1996-07-17 20:02:21 +00:00
|
|
|
LPWSTR xname;
|
|
|
|
PIMAGE_RESOURCE_DIRECTORY ret;
|
1994-10-17 18:12:41 +00:00
|
|
|
|
1996-07-17 20:02:21 +00:00
|
|
|
if (HIWORD((DWORD)name))
|
|
|
|
xname = STRING32_DupAnsiToUni(name);
|
|
|
|
else
|
|
|
|
xname = (LPWSTR)name;
|
|
|
|
|
|
|
|
ret=GetResDirEntryW(resdirptr,xname,root);
|
|
|
|
if (HIWORD((DWORD)name))
|
|
|
|
free(xname);
|
|
|
|
return ret;
|
1994-10-17 18:12:41 +00:00
|
|
|
}
|
|
|
|
|
1996-07-17 20:02:21 +00:00
|
|
|
/**********************************************************************
|
1996-08-11 15:49:51 +00:00
|
|
|
* PE_FindResourceEx32W
|
1996-07-17 20:02:21 +00:00
|
|
|
*/
|
1996-08-11 15:49:51 +00:00
|
|
|
HANDLE32 PE_FindResourceEx32W(
|
|
|
|
HINSTANCE hModule, LPCWSTR name, LPCWSTR type, WORD lang
|
|
|
|
)
|
1994-10-17 18:12:41 +00:00
|
|
|
{
|
1996-07-17 20:02:21 +00:00
|
|
|
PE_MODULE *pe;
|
|
|
|
NE_MODULE *pModule;
|
|
|
|
PIMAGE_RESOURCE_DIRECTORY resdirptr;
|
|
|
|
DWORD root;
|
|
|
|
HANDLE32 result;
|
1994-10-17 18:12:41 +00:00
|
|
|
|
1996-07-17 20:02:21 +00:00
|
|
|
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
|
|
|
|
dprintf_resource(stddeb, "FindResource: module=%08x type=", hModule );
|
|
|
|
PrintId( type );
|
|
|
|
dprintf_resource( stddeb, " name=" );
|
|
|
|
PrintId( name );
|
|
|
|
dprintf_resource( stddeb, "\n" );
|
|
|
|
if (!(pModule = MODULE_GetPtr( hModule ))) return 0;
|
|
|
|
if (!(pModule->flags & NE_FFLAGS_WIN32)) return 0; /* FIXME? */
|
|
|
|
if (!(pe = pModule->pe_module) || !pe->pe_resource) return 0;
|
|
|
|
|
|
|
|
resdirptr = (PIMAGE_RESOURCE_DIRECTORY) pe->pe_resource;
|
|
|
|
root = (DWORD) resdirptr;
|
|
|
|
if ((resdirptr = GetResDirEntryW(resdirptr, type, root)) == NULL)
|
|
|
|
return 0;
|
|
|
|
if ((resdirptr = GetResDirEntryW(resdirptr, name, root)) == NULL)
|
1994-10-17 18:12:41 +00:00
|
|
|
return 0;
|
1996-08-11 15:49:51 +00:00
|
|
|
result = (HANDLE32)GetResDirEntryW(resdirptr, (LPCWSTR)(UINT32)lang, root);
|
1996-07-17 20:02:21 +00:00
|
|
|
/* Try LANG_NEUTRAL, too */
|
|
|
|
if(!result)
|
|
|
|
return (HANDLE32)GetResDirEntryW(resdirptr, (LPCWSTR)0, root);
|
|
|
|
return result;
|
1994-10-17 18:12:41 +00:00
|
|
|
}
|
|
|
|
|
1996-07-17 20:02:21 +00:00
|
|
|
|
1994-10-17 18:12:41 +00:00
|
|
|
/**********************************************************************
|
1996-07-17 20:02:21 +00:00
|
|
|
* PE_LoadResource32
|
1994-10-17 18:12:41 +00:00
|
|
|
*/
|
1996-07-17 20:02:21 +00:00
|
|
|
HANDLE32 PE_LoadResource32( HINSTANCE hModule, HANDLE32 hRsrc )
|
1994-10-17 18:12:41 +00:00
|
|
|
{
|
1996-07-17 20:02:21 +00:00
|
|
|
NE_MODULE *pModule;
|
|
|
|
PE_MODULE *pe;
|
|
|
|
|
|
|
|
if (!hModule) hModule = GetTaskDS(); /* FIXME: see FindResource32W */
|
|
|
|
hModule = GetExePtr( hModule ); /* In case we were passed an hInstance */
|
|
|
|
dprintf_resource(stddeb, "PE_LoadResource32: module=%04x res=%04x\n",
|
|
|
|
hModule, hRsrc );
|
|
|
|
if (!hRsrc) return 0;
|
|
|
|
|
|
|
|
if (!(pModule = MODULE_GetPtr( hModule ))) return 0;
|
|
|
|
if (!(pModule->flags & NE_FFLAGS_WIN32)) return 0; /* FIXME? */
|
|
|
|
if (!(pe = pModule->pe_module) || !pe->pe_resource) return 0;
|
|
|
|
return (HANDLE32) (pe->load_addr+((PIMAGE_RESOURCE_DATA_ENTRY)hRsrc)->OffsetToData);
|
1994-10-17 18:12:41 +00:00
|
|
|
}
|
Release 950430
Sat Apr 29 20:42:01 1995 Alexandre Julliard (julliard@sunsite.unc.edu)
* [controls/static.c]
Fixed painting of SS_*FRAME controls.
* [if1632/callback.c]
Pass the window instance as DS to the 16-bit window procedure.
Rewrote Catch() and Throw() to make them work with multiple tasks.
* [loader/main.c]
New function MAIN_Init() to perform initializations before the
first task is started instead of doing them in InitApp().
Temporary hack to command-line parsing to load one program per
command-line argument, to make testing task-switching easier.
* [loader/*.c]
Reimplemented modules to use a Windows-compatible layout and to
allow multiple tasks and multiple module instances. Not really
finished yet.
* [loader/task.c] [misc/exec.c]
Reimplemented tasks to use a common address space, and implemented
preliminary task-switching capabilities.
* [memory/global.c]
Fixed bug in GlobalNext().
* [misc/main.c]
Updated the list of contributors. Let me know if I forgot someone.
* [miscemu/int21.c]
Use one DTA per task instead of a global one.
* [objects/bitblt.c]
Fixed bug in BitBlt() that could cause BadMatch errors.
* [tools/build.c]
Added new function type 'stub', that makes possible to export an
unimplemented function by name as well as by ordinal. This will
avoid loading errors for unimplemented functions.
Generate an in-memory module layout for built-in DLLs so that the
same code can be used for built-in and loaded modules.
Changed relay code to make it unnecessary to save the value of the
BP register.
* [windows/message.c]
Implemented multiple message queues and preliminary task-switching
capabilities. Inter-task SendMessage() calls are not implemented
yet and will probably cause crashes if used.
* [windows/property.c]
Reimplemented properties and allocate them on the USER heap.
* [windows/win.c]
Fixed bug in SetWindowWord().
Reimplemented EnumWindows() and EnumTaskWindows().
Tue Apr 18 09:48:38 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [misc/main.c]
GetSystemParametersInfo(): Additional action SPI_GETICONTITLEFONT.
* [loader/resource.c]
Removed the check for NE_SEGFLAGS_EXECUTEONLY, since it broke
control.exe.
Fixed icon loading.
* [objects/font.c] [include/windows.h]
Fixed a bug in InitFontsList() and worked on the EnumFonts()
functions to make them comprehensible.
* [controls/button.c]
Fixed my previous patch to handle LBUTTONUP messages.
Fri Apr 14 11:41:28 1995 Cameron Heide (heide@ee.ualberta.ca)
* [misc/network.c, misc/dos_fs.c]
Implemented WNetGetConnection. All that is currently
supported are drives, for which the remote name is simply
the redirected UNIX directory name.
* [miscemu/int2?.c]
More drive number validity checking.
Wed Apr 12 11:28:37 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [controls/listbox.c]
Oops, my previous change to ListBoxDirectory broke the Borland
file open dialog. Fixed.
Mon Apr 10 23:17:12 1995 Martin von Loewis <loewis@informatik.hu-berlin.de>
* [if1632/ole2nls.spec] [misc/ole2nls.c] [misc/Imakefile]
New file ole2nls.c. Added stubs for GetUserDefaultLCID,
GetSystemDefaultLCID, GetUserDefaultLangID, GetSystemDefaultLangID.
Mon Apr 10 10:05:18 1995 Bernd Schmidt <crux@pool.informatik.rwth-aachen.de>
* [memory/global.c] [memory/local.c] [include/windows.h]
GlobalReAlloc(): If GMEM_MODIFY is set, don't resize the block.
LocalReAlloc(): Same for LMEM_MODIFY.
* [controls/listbox.c]
Fixed a bug in ListBoxDirectory that prevented commdlg from working.
Check for errors in some more places.
* [if1632/gdi.spec] [if1632/user.spec]
16 bit callback functions should be passed as segptrs.
* [include/dlls.h] [loader/ne_image.c] [loader/selector.c]
[loader/library.c]
Prevent a DLL from being initialized twice (Borlands Resource
Workshop used to do this).
Provide an additional flag for each w_file that indicates whether
it's an EXE or a DLL, for combinations like pbrush.exe/.dll.
* [controls/button.c]
Handle LBUTTONUP messages even if the button no longer has the
capture (for WinHelp).
* [include/wintypes.h]
FARPROC is now a segptr for the emulator and a function
pointer for the library.
* [misc/commdlg.c] [misc/commdlg.h]
Cleaned the file dialogs up a little. They now work reasonably well,
although there are still some problems (e.g. files are initially
invisible).
* [windows/class.c] [if1632/user.spec] [include/windows.h]
GetClassInfo() must take a segptr, as it checks whether the
highword is zero.
GetClassName() called the wrong atom function. No surprise it didn't
find anything.
* [misc/lstr.c]
AnsiToOem() and OemToAnsi() didn't terminate the strings. Fixed.
Removed some warnings.
* [if1632/relay.c] [if1632/ddeml.spec] [include/dlls.h]
New spec file for the 3.1 DDEML DDL.
* [controls/menu.c]
Small fix to ChangeMenu - mask out the obsolete flags
(MF_APPEND == MF_OWNERDRAW, this led to problems). It also had
problems with the MF_BYPOSITION flag.
* [windows/message.c]
SendMessage(): call the WH_CALLWNDPROC hook function. This is rather
ugly, I'm afraid. Windows probably passes a pointer to the 16 bit
stack for speed reasons.
* [windows/hook.c] [include/windows.h]
Set/HookWindowsHook() shouldn't just call their *Ex counterparts, as
they have slightly different semantics.
MS Hearts now works somewhat, if you disable the new builtin DDEML.
The graphics are completely messed up, though.
1995-04-30 10:05:20 +00:00
|
|
|
#endif
|