Release 980628
Sun Jun 28 18:37:02 1998 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/signal.c] [miscemu/instr.c] [memory/virtual.c]
Moved page-fault handling to INSTR_EmulateInstruction.
* [scheduler/thread.c]
Added locking and check for own thread in Suspend/ResumeThread.
Sat Jun 27 21:25:21 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de>
* [objects/dib.c] [objects/bitmap.c] [objects/oembitmap.c]
[graphics/x11drv/bitblt.c] [include/bitmap.h]
Improved DIB section handling using page fault handlers.
(Note: This patch includes code contributed by Matthew J. Francis.)
* [memory/virtual.c] [if1632/signal.c] [include/global.h]
Page Fault handler support added.
* [if1632/signal.c] [loader/signal.c] [tools/build.c] [misc/system.c]
[misc/winsock_dns.c] [include/sig_context.h] [include/thread.h]
16-bit %fs handling improved: Always preserve 16-bit %fs value,
always restore 32-bit %fs value for signal handlers.
* [if1632/thunk.c] [loader/module.c] [misc/callback.c] [windows/user.c]
[loader/ne/resource.c] [include/callback.h] [include/module.h]
[if1632/kernel.spec] [if1632/wprocs.spec]
Resource Handler function pointer stored as 16-bit SEGPTR.
* [loader/task.c] [windows/win.c] [windows/winpos.c] [if1632/user.spec]
[if1632/kernel.spec] [loader/ne/module.c]
Some minor incompatibilities fixed (Win32s relies on those):
GetExePtr, IsWindow16 should set ES on return; WINPOS_SendNCCalcSize
should cope with having the WINDOWPOS structure trashed;
the OFSTRUCT in the NE module image should be placed *last*.
* [include/windows.h]
Missing prototype for FlushViewOfFile.
* [loader/task.c]
Bugfix: Command line should *not* start with a blank.
* [loader/ne/segment.c]
Bugfix: Fixups to offset 0 were never applied.
* [misc/lstr.c]
Use debugstr_a in OutputDebugString16.
* [msdos/dpmi.c]
Stub for int 31 BL=2f AX=7a20 (NetWare: Get VLM Call Address) added.
* [msdos/int21.c]
Stub for int 21 AX=440d CL=6f (get drive map information) added.
Fri Jun 26 18:08:30 1998 Rein Klazes <rklazes@casema.net>
* [windows/winpos.c]
Fix small buglet that mixed up maximized and minimized windows.
* [include/x11drv.h] [objects/dc.c] [graphics/x11drv/pen.c]
[graphics/x11drv/graphics.c]
Fix some bugs with lines joining styles. Draws rectangles
with thick pens now correctly.
Fri Jun 26 16:22:23 1998 James Juran <jrj120@psu.edu>
* [misc/shell.c]
Fixed bug I introduced last release in InternalExtractIcon.
* [win32/file.c]
Added documentation for CreateFile32A.
* [documentation/wine.man]
Updated manpage.
* [ChangeLog]
Added my entry from last release.
Fri Jun 26 13:33:30 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>
* [graphics/psdrv/*] [if1632/wineps.spec] [include/psdrv.h]
[include/print.h] [objects/gdiobj.c]
First stages of an internal Postscript driver. See
graphics/psdrv/README . Should print text (badly) from win3.1 notepad,
write and winword6.
* [documentation/printing]
Some notes on printing.
* [controls/edit.c]
Strip off WS_BORDER in WM_NCREATE, edit draws its own rectangle.
EC_USEFONTINFO seems to be used as a left/right value for EM_SETMARGINS
and not as an action as the docs say. This actually makes more sense.
Scroll the caret back to zero after a WM_SETTEXT.
Fri Jun 26 10:56:25 1998 Marcus Meissner <marcus@jet.franken.de>
* [if1632/snoop.c]
Added win16 inter-dll snooping.
* [win32/ordinals.c]
KERNEL_485 is GetProcessDword.
* [include/xmalloc.h][include/bitmap.h][misc/xmalloc.c]
Added xcalloc so we 0 initialize XImages.
Fixes/Hides the 'junk around MOPYFish'.
* [misc/ntdll.c]
Some stubs added.
Thu Jun 25 15:22:43 1998 Adrian Harvey <adrian@select.com.au>
* [scheduler/thread.c]
Implemented SuspendThread and ResumeThread.
Thu Jun 25 00:55:03 1998 Peter Hunnisett <hunnise@nortel.ca>
* [include/debug.h,dplay.h,dsound.h][multimedia/dsound.c,dplay.c]
[relay32/dplayx.spec,dplay.spec][multimedia/Makefile.in]
[documentation/status/directplay]
Added preliminary support for DirectPlay & DirectPlayLobby. Moved the
preliminary stubs put in the dsound files into two new files
dplay.h and dplay.c.
Added new debug channel (dplay) for this.
Created new document to keep track of implementation.
* [include/winioctl.h][win32/device.c]
Added some framework in DeviceIoControl to, in the future, support
the "builtin" windows dwIoControlCodes. Added new header file
winioctl.h .
* [multimedia/mmsystem.c]
Added slightly improved debugging information for PlaySound.
Wed Jun 24 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de>
* [files/profile.c][graphics/x11drv/xfont.c][loader/module.c]
Changed lstrcmpi32A to strcasecmp, lstrncmpi32A to strncasecmp,
lstrcpy32A to strcpy, lstrlen32A to strlen, lstrcmp32A to strcmp
because it's not necessary to support locale on such places.
It causes a huge overhead and even fails sometimes
* [include/oleauto.h][include/winerror.h]
Added some ole-related constants.
* [misc/shell.c]
SHELL32_DllGetClassObject, SHGetSpecialFolderLocation,
SHGetPathFromIDList improved the stubs
* [ole/folders.c]
IShellFolder* functions rewrote the stubs so don't crash and give
something sensible back, started implementation of.
* [ole/typelib.c][relay32/oleaut32.spec]
LoadTypeLib32, RegisterTypeLib stub.
* [ole/ole2nls.c]
Fixed a buffer overrun in CompareString32A.
Test for a bad pointer in LCMapString32A (happens
in winhlp32 while building a index for searching).
* [relay32/oleaut32.spec] [ole/typelib.c]
Added stub for LoadTypeLib (ole32) to make excel95 happy.
Tue Jun 23 22:47:09 1998 Alex Priem <alexp@sci.kun.nl>
* [files/profile.c] [relay32/kernel32.spec]
Added WritePrivateProfileStructA, GetPrivateProfileStructA,
GetPrivateProfileSectionNames16.
Tue Jun 23 01:34:43 1998 Pascal Cuoq <pcuoq@ens-lyon.fr>
* [ole/ole2nls.c]
GetStringTypeEx32A: Implemented CT_CTYPE2 and CT_CTYPE3 cases.
LCMapString32A: Map final '\0' for '\0'-terminated strings.
* [misc/shellord.c] [files/profile.c] [graphics/driver.c]
[loader/module.c] [msdos/int21.c] [windows/driver.c] [files/drive.c]
Changed lstrcmpi32A -> strcasecmp. Should be OK in these places.
Sat Jun 20 23:40:00 1998 Bertho Stultiens <bertho@akhphd.au.dk>
* [tools/wrc/]
Wrc version 1.0.2 (20-Jun-1998). Please revert to
the file tools/wrc/CHANGES for details.
Sat Jun 20 14:58:00 1998 Marcel Baur <mbaur@g26.ethz.ch>
* [ole/ole2nls.c] [ole/nls/*]
Added the first 57 nls files, most are not yet complete.
Wed Jun 17 11:16:54 1998 David Luyer <luyer@ucs.uwa.edu.au>
* [relay32/relay386.c] [if1632/relay.c]
Move debug_relay_(include|exclude)_list handling into
seperate function RELAY_ShowDebugmsgsRelay(). Include
checking of this for 16 bit calls (originally only
32-bit calls).
* [relay32/snoop.c] [misc/main.c]
Add debug_snoop_(include|exclude)_list as per the relay stuff.
Fix typo and add information on -debugmsg +/-relay=... in
help on -debugmsg. Refer to availability of snoop too.
Tue Jun 10 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de>
* [controls/header.c][include/header.h][include/commctrl.h]
Added owner draw support.
* [windows/nonclient.c][windows/sysmetics.c]
Fixed menu bar height for Win95 look.
Split NC_AdjustRect95() into NC_AdjustRectOuter95() and
NC_AdjustRectInner95 to fix a menu bar bug.
Improved Win95 look.
* [controls/progress.c]
Improved drawing code. Borders will be drawn by non-client code.
* [controls/updown.c]
Changed memory allocation and fixed some bugs.
* [controls/toolbar.c]
Fixed TB_BUTTONSTRUCTSIZE bug in MFC programs.
Several improvements.
* [misc/shell.c]
Added stub for BrowseForFoldersA().
* [misc/shellord.c]
Added stub for SHELL32_147().
* [controls/comctl32undoc.c]
Minor changes.
* [documentation/common_controls]
New File: Documentation about development status, undocumented
features and functions of the common controls.
diff --git a/misc/callback.c b/misc/callback.c
index a39119a..3907fc3 100644
--- a/misc/callback.c
+++ b/misc/callback.c
@@ -116,6 +116,17 @@
proc();
}
+/**********************************************************************
+ * CALLBACK_CallResourceHandlerProc
+ */
+static HGLOBAL16 WINAPI CALLBACK_CallResourceHandlerProc( FARPROC16 proc,
+ HGLOBAL16 hMemObj,
+ HMODULE16 hModule,
+ HRSRC16 hRsrc )
+{
+ return proc( hMemObj, hModule, hRsrc );
+}
+
/**********************************************************************
* CALLBACK_CallASPIPostProc
@@ -227,32 +238,33 @@
*/
static const CALLBACKS_TABLE CALLBACK_WinelibTable =
{
- CALLBACK_CallRegisterProc, /* CallRegisterShortProc */
- CALLBACK_CallRegisterProc, /* CallRegisterLongProc */
- TASK_Reschedule, /* CallTaskRescheduleProc */
- NULL, /* CallFrom16WndProc */
- CALLBACK_CallWndProc, /* CallWndProc */
- CALLBACK_CallDriverProc, /* CallDriverProc */
- CALLBACK_CallDriverCallback, /* CallDriverCallback */
- CALLBACK_CallTimeFuncProc, /* CallTimeFuncProc */
- CALLBACK_CallWindowsExitProc, /* CallWindowsExitProc */
- CALLBACK_CallWordBreakProc, /* CallWordBreakProc */
- CALLBACK_CallBootAppProc, /* CallBootAppProc */
- CALLBACK_CallLoadAppSegProc, /* CallLoadAppSegProc */
- CALLBACK_CallSystemTimerProc, /* CallSystemTimerProc */
- CALLBACK_CallWOWCallbackProc, /* CallWOWCallbackProc */
- CALLBACK_CallWOWCallback16Ex, /* CallWOWCallback16Ex */
- CALLBACK_CallASPIPostProc, /* CallASPIPostProc */
+ CALLBACK_CallRegisterProc, /* CallRegisterShortProc */
+ CALLBACK_CallRegisterProc, /* CallRegisterLongProc */
+ TASK_Reschedule, /* CallTaskRescheduleProc */
+ NULL, /* CallFrom16WndProc */
+ CALLBACK_CallWndProc, /* CallWndProc */
+ CALLBACK_CallDriverProc, /* CallDriverProc */
+ CALLBACK_CallDriverCallback, /* CallDriverCallback */
+ CALLBACK_CallTimeFuncProc, /* CallTimeFuncProc */
+ CALLBACK_CallWindowsExitProc, /* CallWindowsExitProc */
+ CALLBACK_CallWordBreakProc, /* CallWordBreakProc */
+ CALLBACK_CallBootAppProc, /* CallBootAppProc */
+ CALLBACK_CallLoadAppSegProc, /* CallLoadAppSegProc */
+ CALLBACK_CallSystemTimerProc, /* CallSystemTimerProc */
+ CALLBACK_CallResourceHandlerProc, /* CallResourceHandlerProc */
+ CALLBACK_CallWOWCallbackProc, /* CallWOWCallbackProc */
+ CALLBACK_CallWOWCallback16Ex, /* CallWOWCallback16Ex */
+ CALLBACK_CallASPIPostProc, /* CallASPIPostProc */
/* The graphics driver callbacks are never used in Winelib */
- NULL, /* CallDrvControlProc */
- NULL, /* CallDrvEnableProc */
- NULL, /* CallDrvEnumDFontsProc */
- NULL, /* CallDrvEnumObjProc */
- NULL, /* CallDrvOutputProc */
- NULL, /* CallDrvRealizeProc */
- NULL, /* CallDrvStretchBltProc */
- NULL, /* CallDrvExtTextOutProc */
- NULL /* CallDrvGetCharWidth */
+ NULL, /* CallDrvControlProc */
+ NULL, /* CallDrvEnableProc */
+ NULL, /* CallDrvEnumDFontsProc */
+ NULL, /* CallDrvEnumObjProc */
+ NULL, /* CallDrvOutputProc */
+ NULL, /* CallDrvRealizeProc */
+ NULL, /* CallDrvStretchBltProc */
+ NULL, /* CallDrvExtTextOutProc */
+ NULL /* CallDrvGetCharWidth */
};
const CALLBACKS_TABLE *Callbacks = &CALLBACK_WinelibTable;
diff --git a/misc/crtdll.c b/misc/crtdll.c
index 3b88c3f..c2f3750 100644
--- a/misc/crtdll.c
+++ b/misc/crtdll.c
@@ -306,7 +306,9 @@
INT32 res;
va_start( valist, format );
+#ifdef HAVE_VFSCANF
res = vfscanf( xlat_file_ptr(stream), format, valist );
+#endif
va_end( valist );
return res;
}
diff --git a/misc/imagelist.c b/misc/imagelist.c
index ecd6d31..5ca6e24 100644
--- a/misc/imagelist.c
+++ b/misc/imagelist.c
@@ -4,7 +4,7 @@
* Copyright 1998 Eric Kohl
*
* TODO:
- * - Fix offsets in ImageList_DrawIndirect.
+ * - Fix xBitmap and yBitmap in ImageList_DrawIndirect.
* - Fix ILD_TRANSPARENT error in ImageList_DrawIndirect.
* - Fix ImageList_GetIcon (might be a result of the
* ILD_TRANSPARENT error in ImageList_DrawIndirect).
@@ -115,7 +115,7 @@
if (himl->hbmMask) {
hbmNewBitmap =
- CreateBitmap32 (nNewWidth, himl->cy, 1, 1, NULL);
+ CreateBitmap32 (nNewWidth, himl->cy, 1, himl->uBitsPixel, NULL);
if (hbmNewBitmap == 0)
ERR (imagelist, "creating new mask bitmap!");
@@ -274,10 +274,13 @@
INT32 nIndex, nImageCount;
BITMAP32 bmp;
INT32 nStartX, nRunX, nRunY;
+ COLORREF bkColor;
if (himl == NULL)
return (-1);
+ bkColor = (clrMask == CLR_NONE) ? himl->clrBk : clrMask;
+
GetObject32A (hbmImage, sizeof(BITMAP32), &bmp);
nImageCount = bmp.bmWidth / himl->cx;
@@ -303,8 +306,7 @@
for (nRunY = 0; nRunY < himl->cy; nRunY++) {
for (nRunX = 0; nRunX < bmp.bmWidth; nRunX++) {
if (GetPixel32 (hdcImageList, nStartX + nRunX, nRunY) ==
- clrMask)
- {
+ bkColor) {
SetPixel32 (hdcImageList, nStartX + nRunX, nRunY,
RGB(0, 0, 0));
SetPixel32 (hdcMask, nStartX + nRunX, nRunY,
@@ -438,7 +440,8 @@
/* create temporary bitmaps */
hbmTempImage = CreateBitmap32 (himlSrc->cx, himlSrc->cy, 1,
himlSrc->uBitsPixel, NULL);
- hbmTempMask = CreateBitmap32 (himlSrc->cx, himlSrc->cy, 1, 1, NULL);
+ hbmTempMask = CreateBitmap32 (himlSrc->cx, himlSrc->cy, 1,
+ himlSrc->uBitsPixel, NULL);
/* copy (and stretch) destination to temporary bitmaps.(save) */
/* image */
@@ -578,8 +581,8 @@
}
if (himl->flags & ILC_MASK) {
- himl->hbmMask =
- CreateBitmap32 (himl->cx * himl->cMaxImage, himl->cy, 1, 1, NULL);
+ himl->hbmMask = CreateBitmap32 (himl->cx * himl->cMaxImage, himl->cy,
+ 1, himl->uBitsPixel, NULL);
if (himl->hbmMask == 0) {
ERR(imagelist, "Error creating mask bitmap!\n");
if (himl->hbmImage)
@@ -860,7 +863,7 @@
BOOL32 WINAPI
ImageList_DrawEx (HIMAGELIST himl, INT32 i, HDC32 hdc, INT32 x, INT32 y,
- INT32 xOffs, INT32 yOffs, COLORREF rgbBk, COLORREF rgbFg,
+ INT32 dx, INT32 dy, COLORREF rgbBk, COLORREF rgbFg,
UINT32 fStyle)
{
IMAGELISTDRAWPARAMS imldp;
@@ -871,8 +874,8 @@
imldp.hdcDst = hdc,
imldp.x = x;
imldp.y = y;
- imldp.cx = xOffs;
- imldp.cy = yOffs;
+ imldp.cx = dx;
+ imldp.cy = dy;
imldp.xBitmap = 0;
imldp.yBitmap = 0;
imldp.rgbBk = rgbBk;
@@ -904,6 +907,7 @@
HDC32 hdcImageList, hdcTempImage;
HBITMAP32 hbmTempImage;
HBRUSH32 hBrush, hOldBrush;
+ INT32 cx, cy;
INT32 nOvlIdx;
COLORREF clrBlend;
BOOL32 bImage; /* draw image ? */
@@ -920,7 +924,10 @@
return (FALSE);
himlLocal = pimldp->himl;
-
+
+ cx = (pimldp->cx == 0) ? himlLocal->cx : pimldp->cx;
+ cy = (pimldp->cy == 0) ? himlLocal->cy : pimldp->cy;
+
/* ILD_NORMAL state */
bImage = TRUE;
bImageTrans = FALSE;
@@ -967,31 +974,29 @@
if (bMask)
{
- /* draw the mask */
- SelectObject32 (hdcImageList, himlLocal->hbmMask);
-
- BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y,
- himlLocal->cx, himlLocal->cy, hdcImageList,
- himlLocal->cx * pimldp->i, 0,
- bMaskTrans ? SRCAND : SRCCOPY);
+ /* draw the mask */
+ SelectObject32 (hdcImageList, himlLocal->hbmMask);
+ BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy,
+ hdcImageList, himlLocal->cx * pimldp->i, 0,
+ bMaskTrans ? SRCAND : SRCCOPY);
}
if (bImage)
{
- /* draw the image */
- SelectObject32 (hdcImageList, himlLocal->hbmImage);
+ /* draw the image */
+ SelectObject32 (hdcImageList, himlLocal->hbmImage);
if (!bImageTrans)
{
hBrush = CreateSolidBrush32 (himlLocal->clrBk);
hOldBrush = SelectObject32 (pimldp->hdcDst, hBrush);
PatBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y,
- himlLocal->cx, himlLocal->cy, PATCOPY);
+ cx, cy, PATCOPY);
DeleteObject32 (SelectObject32 (pimldp->hdcDst, hOldBrush));
}
- BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, himlLocal->cx,
- himlLocal->cy, hdcImageList, himlLocal->cx * pimldp->i, 0,
+ BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy,
+ hdcImageList, himlLocal->cx * pimldp->i, 0,
SRCPAINT);
if (bBlend25 || bBlend50)
@@ -1017,8 +1022,8 @@
himlLocal->cy, hdcImageList,
pimldp->i * himlLocal->cx, 0, SRCPAINT);
- BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, himlLocal->cx,
- himlLocal->cy, hdcTempImage, 0, 0, SRCAND);
+ BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy,
+ hdcTempImage, 0, 0, SRCAND);
/* fill */
hBrush = CreateSolidBrush32 (clrBlend);
@@ -1035,8 +1040,8 @@
himlLocal->cy, hdcImageList,
pimldp->i * himlLocal->cx, 0, SRCPAINT);
- BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, himlLocal->cx,
- himlLocal->cy, hdcTempImage, 0, 0, SRCPAINT);
+ BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy,
+ hdcTempImage, 0, 0, SRCPAINT);
DeleteObject32 (hbmTempImage);
DeleteDC32 (hdcTempImage);
@@ -1044,24 +1049,20 @@
}
/* Draw overlay image */
- if (pimldp->fStyle & 0x0700)
- {
- nOvlIdx = (pimldp->fStyle & 0x0700) >> 8;
- if ((nOvlIdx >= 1) && (nOvlIdx <= MAX_OVERLAYIMAGE))
- {
- nOvlIdx = pimldp->himl->nOvlIdx[nOvlIdx - 1];
- if ((nOvlIdx >= 0) && (nOvlIdx <= pimldp->himl->cCurImage))
- {
- if (pimldp->himl->hbmMask)
- {
+ if (pimldp->fStyle & 0x0700) {
+ nOvlIdx = (pimldp->fStyle & 0x0700) >> 8;
+ if ((nOvlIdx >= 1) && (nOvlIdx <= MAX_OVERLAYIMAGE)) {
+ nOvlIdx = pimldp->himl->nOvlIdx[nOvlIdx - 1];
+ if ((nOvlIdx >= 0) && (nOvlIdx <= pimldp->himl->cCurImage)) {
+ if (pimldp->himl->hbmMask) {
SelectObject32 (hdcImageList, pimldp->himl->hbmMask);
- BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y,
- pimldp->himl->cx, pimldp->himl->cy, hdcImageList,
- pimldp->himl->cx * nOvlIdx, 0, SRCAND);
- }
+ BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y, cx, cy,
+ hdcImageList, pimldp->himl->cx * nOvlIdx, 0,
+ SRCAND);
+ }
SelectObject32 (hdcImageList, pimldp->himl->hbmImage);
- BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y,
- pimldp->himl->cx, pimldp->himl->cy, hdcImageList,
+ BitBlt32 (pimldp->hdcDst, pimldp->x, pimldp->y,
+ cx, cy, hdcImageList,
pimldp->himl->cx * nOvlIdx, 0, SRCPAINT);
}
}
@@ -1745,7 +1746,7 @@
DeleteObject32 (himl->hbmMask);
himl->hbmMask =
CreateBitmap32 (himl->cMaxImage * himl->cx, himl->cy,
- 1, 1, NULL);
+ 1, himl->uBitsPixel, NULL);
}
}
else {
@@ -1764,7 +1765,7 @@
CreateBitmap32 (cxNew, himl->cy, 1, himl->uBitsPixel, NULL);
if (himl->hbmMask)
- hbmNewMask = CreateBitmap32 (cxNew, himl->cy, 1, 1, NULL);
+ hbmNewMask = CreateBitmap32 (cxNew, himl->cy, 1, himl->uBitsPixel, NULL);
else
hbmNewMask = 0; /* Just to keep compiler happy! */
@@ -2122,7 +2123,7 @@
DeleteObject32 (himl->hbmMask);
himl->hbmMask =
CreateBitmap32 (himl->cMaxImage * himl->cx, himl->cy,
- 1, 1, NULL);
+ 1, himl->uBitsPixel, NULL);
}
return (TRUE);
@@ -2179,7 +2180,7 @@
if (himl->hbmMask)
{
hbmNewBitmap = CreateBitmap32 (nNewCount * himl->cx, himl->cy,
- 1, 1, NULL);
+ 1, himl->uBitsPixel, NULL);
if (hbmNewBitmap != 0)
{
SelectObject32 (hdcImageList, himl->hbmMask);
diff --git a/misc/lstr.c b/misc/lstr.c
index 043a778..0255049 100644
--- a/misc/lstr.c
+++ b/misc/lstr.c
@@ -43,13 +43,13 @@
/* FIXME: should probably get rid of wctype.h altogether */
#include "casemap.h"
-WCHAR _towupper(WCHAR code)
+WCHAR towupper(WCHAR code)
{
const WCHAR * ptr = uprtable[HIBYTE(code)];
return ptr ? ptr[LOBYTE(code)] : code;
}
-WCHAR _towlower(WCHAR code)
+WCHAR towlower(WCHAR code)
{
const WCHAR * ptr = lwrtable[HIBYTE(code)];
return ptr ? ptr[LOBYTE(code)] : code;
@@ -171,15 +171,10 @@
void WINAPI OutputDebugString16( LPCSTR str )
{
char module[10];
- char *p, *buffer = HeapAlloc( GetProcessHeap(), 0, strlen(str)+2 );
- /* Remove CRs */
- for (p = buffer; *str; str++) if (*str != '\r') *p++ = *str;
- *p = '\0';
- if ((p > buffer) && (p[-1] == '\n')) p[1] = '\0'; /* Remove trailing \n */
if (!GetModuleName( GetCurrentTask(), module, sizeof(module) ))
strcpy( module, "???" );
- DUMP("%s says '%s'\n", module, buffer );
- HeapFree( GetProcessHeap(), 0, buffer );
+
+ DUMP( "%s says %s\n", module, debugstr_a(str) );
}
diff --git a/misc/main.c b/misc/main.c
index 8db0f9d..9819e55 100644
--- a/misc/main.c
+++ b/misc/main.c
@@ -212,6 +212,9 @@
/* defined in relay32/relay386.c */
extern char **debug_relay_includelist;
extern char **debug_relay_excludelist;
+ /* defined in relay32/snoop.c */
+ extern char **debug_snoop_includelist;
+ extern char **debug_snoop_excludelist;
int l, cls;
if (strlen(options)<3)
@@ -247,13 +250,14 @@
if(cls == -1 || cls == j)
debug_msg_enabled[i][j]=(*options=='+');
}
- else if (!lstrncmpi32A(options+1, "relay=", 6))
+ else if (!lstrncmpi32A(options+1, "relay=", 6) ||
+ !lstrncmpi32A(options+1, "snoop=", 6))
{
int i, j;
char *s, *s2, ***output, c;
for (i=0; i<DEBUG_CHANNEL_COUNT; i++)
- if (debug_ch_name && (!lstrncmpi32A(debug_ch_name[i],"relay",5))){
+ if (debug_ch_name && (!lstrncmpi32A(debug_ch_name[i],options+1,5))){
for(j=0; j<DEBUG_CLASS_COUNT; j++)
if(cls == -1 || cls == j)
debug_msg_enabled[i][j]=TRUE;
@@ -262,10 +266,13 @@
/* should never happen, maybe assert(i!=DEBUG_CHANNEL_COUNT)? */
if (i==DEBUG_CHANNEL_COUNT)
return FALSE;
- if (*options == '+')
- output = &debug_relay_includelist;
- else
- output = &debug_relay_excludelist;
+ output = (*options == '+') ?
+ ((*(options+1) == 'r') ?
+ &debug_relay_includelist :
+ &debug_snoop_includelist) :
+ ((*(options+1) == 'r') ?
+ &debug_relay_excludelist :
+ &debug_snoop_excludelist);
s = options + 7;
i = 1;
while((s = strchr(s, ':'))) i++, s++;
@@ -448,8 +455,13 @@
int i;
MSG("%s: Syntax: -debugmsg [class]+xxx,... or "
"-debugmsg [class]-xxx,...\n",argv[0]);
- MSG("Example: -debugmsg +all,warn-heap"
- "turn on all messages except warning heap messages\n");
+ MSG("Example: -debugmsg +all,warn-heap\n"
+ " turn on all messages except warning heap messages\n");
+ MSG("Special case: -debugmsg +relay=DLL:DLL.###:FuncName\n"
+ " turn on -debugmsg +relay only as specified\n"
+ "Special case: -debugmsg -relay=DLL:DLL.###:FuncName\n"
+ " turn on -debugmsg +relay except as specified\n"
+ "Also permitted, +snoop=..., -snoop=... as with relay.\n\n");
MSG("Available message classes:\n");
for(i=0;i<DEBUG_CLASS_COUNT;i++)
diff --git a/misc/ntdll.c b/misc/ntdll.c
index d265d92..169cf45 100644
--- a/misc/ntdll.c
+++ b/misc/ntdll.c
@@ -17,6 +17,7 @@
#include "debug.h"
#include "module.h"
#include "heap.h"
+#include "debugstr.h"
/**************************************************************************
* RtlLengthRequiredSid [NTDLL]
@@ -680,3 +681,34 @@
return 0;
#endif
}
+
+DWORD WINAPI NtOpenKey(DWORD x1,DWORD x2,DWORD x3) {
+ FIXME(ntdll,"(0x%08lx(%s),0x%08lx,0x%08lx),stub!\n",x1,
+ debugstr_w(*(LPWSTR*)x1),x2,x3);
+ /* hmm... */
+ return RegOpenKey32W(x2,*(LPWSTR*)x1,x3);
+}
+
+DWORD WINAPI NtQueryValueKey(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) {
+ FIXME(ntdll,"(%08lx,%08lx,%08lx,%08lx,%08lx,%08lx),stub!\n",
+ x1,x2,x3,x4,x5,x6
+ );
+ return 0;
+}
+
+DWORD WINAPI NtQueryTimerResolution(DWORD x1,DWORD x2,DWORD x3) {
+ FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx), stub!\n",x1,x2,x3);
+ return 1;
+}
+
+DWORD WINAPI NtClose(DWORD x1) {
+ FIXME(ntdll,"(0x%08lx),stub!\n",x1);
+ return 1;
+}
+
+DWORD WINAPI NtQueryInformationProcess(DWORD x1,DWORD x2,DWORD x3,DWORD x4,DWORD x5) {
+ FIXME(ntdll,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx),stub!\n",
+ x1,x2,x3,x4,x5
+ );
+ return 0;
+}
diff --git a/misc/shell.c b/misc/shell.c
index 40a8084..b140083 100644
--- a/misc/shell.c
+++ b/misc/shell.c
@@ -1,5 +1,8 @@
/*
* Shell Library Functions
+ *
+ * currently work in progress on SH* and SHELL32_DllGetClassObject functions
+ * <contact juergen.schmied@metronet.de 980624>
*/
#include <assert.h>
#include <stdlib.h>
@@ -1172,7 +1175,7 @@
for (i=0;i<n;i++) {
LPIMAGE_RESOURCE_DIRECTORY xresdir;
- xresdir = GetResDirEntryW(iconresdir,(LPWSTR)&(RetPtr[i]),(DWORD)rootresdir,FALSE);
+ xresdir = GetResDirEntryW(iconresdir,(LPWSTR)RetPtr[i],(DWORD)rootresdir,FALSE);
xresdir = GetResDirEntryW(xresdir,(LPWSTR)0,(DWORD)rootresdir,TRUE);
idataent = (LPIMAGE_RESOURCE_DATA_ENTRY)xresdir;
@@ -1580,6 +1583,7 @@
char xclsid[50],xiid[50];
HRESULT hres = E_OUTOFMEMORY;
+
WINE_StringFromCLSID((LPCLSID)rclsid,xclsid);
WINE_StringFromCLSID((LPCLSID)iid,xiid);
TRACE(shell,"(%s,%s,%p)\n",xclsid,xiid,ppv);
@@ -1594,23 +1598,24 @@
if (pClassFactory) {
hRes = pClassFactory->QueryInterface(riid,ppv);
- pClassFactory->Release();
+ pClassFactory->Release();
}
return hRes;
*
* The magic of the whole stuff is still unclear to me, so just hack together
- * something.
+ * something.
*/
- if (!memcmp(rclsid,&CLSID_ShellDesktop,sizeof(CLSID_ShellDesktop))) {
- TRACE(shell," requested CLSID_ShellDesktop, creating it.\n");
- *ppv = IShellFolder_Constructor();
- FIXME(shell,"Initialize this folder to be the shell desktop folder\n");
- return 0;
- }
+ if (!memcmp(rclsid,&CLSID_ShellDesktop,sizeof(CLSID_ShellDesktop)))
+ { TRACE(shell," requested CLSID_ShellDesktop, creating it.\n");
+ *ppv = IShellFolder_Constructor();
+/* FIXME(shell,"Initialize this folder to be the shell desktop folder\n")*/
+ return S_OK;
+ }
- FIXME(shell, "clsid(%s) not found. Returning E_OUTOFMEMORY.\n",xclsid);
- return hres;
+ FIXME(shell, "clsid(%s) not found, return CLASS_E_CLASSNOTAVAILABLE.\n",xclsid);
+ *ppv=NULL;
+ return CLASS_E_CLASSNOTAVAILABLE;
}
/*************************************************************************
@@ -1651,11 +1656,51 @@
*
* nFolder is a CSIDL_xxxxx.
*/
-HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITEMIDLIST * ppidl) {
- FIXME(shell,"(%04x,%d,%p),stub!\n", hwndOwner,nFolder,ppidl);
- *ppidl = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,2*sizeof(ITEMIDLIST));
- FIXME(shell, "we return only the empty ITEMIDLIST currently.\n");
- (*ppidl)->mkid.cb = 0;
+HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITEMIDLIST * ppidl)
+{ FIXME(shell,"(%04x,%d,%p),stub!\n", hwndOwner,nFolder,ppidl);
+
+ switch (nFolder)
+ { case CSIDL_BITBUCKET: TRACE (shell,"looking for Recyceler\n");
+ break;
+ case CSIDL_CONTROLS: TRACE (shell,"looking for Control\n");
+ break;
+ case CSIDL_DESKTOP: TRACE (shell,"looking for Desktop\n");
+ break;
+ case CSIDL_DESKTOPDIRECTORY: TRACE (shell,"looking for DeskDir\n");
+ break;
+ case CSIDL_DRIVES: TRACE (shell,"looking for Drives\n");
+ break;
+ case CSIDL_FONTS: TRACE (shell,"looking for Fonts\n");
+ break;
+ case CSIDL_NETHOOD: TRACE (shell,"looking for Nethood\n");
+ break;
+ case CSIDL_NETWORK: TRACE (shell,"looking for Network\n");
+ break;
+ case CSIDL_PERSONAL: TRACE (shell,"looking for Personal\n");
+ break;
+ case CSIDL_PRINTERS: TRACE (shell,"looking for Printers\n");
+ break;
+ case CSIDL_PROGRAMS: TRACE (shell,"looking for Programms\n");
+ break;
+ case CSIDL_RECENT: TRACE (shell,"looking for Recent\n");
+ break;
+ case CSIDL_SENDTO: TRACE (shell,"looking for Sendto\n");
+ break;
+ case CSIDL_STARTMENU: TRACE (shell,"looking for Startmenu\n");
+ break;
+ case CSIDL_STARTUP: TRACE (shell,"looking for Startup\n");
+ break;
+ case CSIDL_TEMPLATES: TRACE (shell,"looking for Templates\n");
+ break;
+ default: ERR (shell,"unknown CSIDL\n");
+ break;
+ }
+
+ *ppidl = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,sizeof(ITEMIDLIST));
+ (*ppidl)->mkid.cb = 0; /*the first ITEMIDLIST*/
+
+ FIXME(shell, "return empty ITEMIDLIST only (pidl %p)\n",*ppidl);
+
return NOERROR;
}
@@ -1663,9 +1708,9 @@
* SHGetPathFromIDList [SHELL32.221]
* returns the path from a passed PIDL.
*/
-BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath) {
- FIXME(shell,"(%p,%p),stub!\n",pidl,pszPath);
- lstrcpy32A(pszPath,"E:\\"); /* FIXME */
+BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath)
+{ FIXME(shell,"(pidl %p,%p),stub, returning E:\\\\ \n",pidl,pszPath);
+ strcpy(pszPath,"E:\\"); /* FIXME */
return NOERROR;
}
@@ -1683,3 +1728,18 @@
return 0;
}
+
+/*************************************************************************
+ * SHBrowseForFolderA [SHELL32.209]
+ *
+ */
+
+LPITEMIDLIST WINAPI
+SHBrowseForFolder32A (LPBROWSEINFO32A lpbi)
+{
+ FIXME (exec, "(%lx) empty stub!\n", (DWORD)lpbi);
+ FIXME (exec, "(%s) empty stub!\n", lpbi->lpszTitle);
+
+ return NULL;
+}
+
diff --git a/misc/shellord.c b/misc/shellord.c
index 62de68b..432e5ca 100644
--- a/misc/shellord.c
+++ b/misc/shellord.c
@@ -68,9 +68,9 @@
* Original Name: PathIsRoot
*/
BOOL32 WINAPI SHELL32_29(LPCSTR x) {
- if (!lstrcmp32A(x+1,":\\")) /* "X:\" */
+ if (!strcmp(x+1,":\\")) /* "X:\" */
return 1;
- if (!lstrcmp32A(x,"\\")) /* "\" */
+ if (!strcmp(x,"\\")) /* "\" */
return 1;
if (x[0]=='\\' && x[1]=='\\') { /* UNC "\\<xx>\" */
int foundbackslash = 0;
@@ -400,7 +400,7 @@
* Original name: RegisterShellHook (exported by ordinal)
*/
void WINAPI SHELL32_181(HWND32 hwnd, DWORD y) {
- FIXME(shell,"(0x%08lx,0x%08lx):stub.\n",hwnd,y);
+ FIXME(shell,"(0x%08lx,0x%08x):stub.\n",hwnd,y);
}
/*************************************************************************
@@ -441,7 +441,7 @@
FARPROC32 dllunload,nameproc;
if (xhmod) *xhmod = 0;
- if (!lstrcmpi32A(SHELL32_34(dllname),"shell32.dll"))
+ if (!strcasecmp(SHELL32_34(dllname),"shell32.dll"))
return (GetClassPtr)SHELL32_DllGetClassObject;
hmod = LoadLibraryEx32A(dllname,0,LOAD_WITH_ALTERED_SEARCH_PATH);
@@ -607,6 +607,8 @@
LPSHITEMID si;
DWORD len;
+ if (!iil)
+ return 0;
si = &(iil->mkid);
len = 2;
while (si->cb) {
@@ -639,6 +641,9 @@
/*************************************************************************
* SHELL32_195 [SHELL32.195]
* free_ptr() - frees memory using IMalloc
+ *
+ * NOTES
+ * Original name: SHFree (exported by ordinal)
*/
DWORD WINAPI SHELL32_195(LPVOID x) {
return LocalFree32((HANDLE32)x);
@@ -662,7 +667,8 @@
len = SHELL32_152(iil);
newiil = (LPITEMIDLIST)SHELL32_196(len);
- memcpy(newiil,iil,len);
+ if (newiil)
+ memcpy(newiil,iil,len);
return newiil;
}
@@ -685,16 +691,22 @@
/*************************************************************************
* SHELL32_155 [SHELL32.155]
* free_check_ptr - frees memory (if not NULL) allocated by SHMalloc allocator
+ *
+ * NOTES
+ * Original name: ILFree (exported by ordinal)
*/
DWORD WINAPI SHELL32_155(LPVOID x) {
- if (!x)
+ FIXME (shell,"(0x%08lx):stub.\n", (DWORD)x);
+// if (!x)
return 0;
- return SHELL32_195(x);
+// return SHELL32_195(x);
}
/*************************************************************************
* SHELL32_85 [SHELL32.85]
- * unknown
+ *
+ * NOTES
+ * Original name: OpenRegStream (exported by ordinal)
*/
DWORD WINAPI SHELL32_85(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n",
@@ -706,15 +718,21 @@
/*************************************************************************
* SHELL32_86 [SHELL32.86]
* unknown
+ *
+ * NOTES
+ * Original name: SHRegisterDragDrop (exported by ordinal)
*/
DWORD WINAPI SHELL32_86(HWND32 hwnd,DWORD x2) {
- FIXME(shell,"(0x%08lx,0x%08lx):stub.\n",hwnd,x2);
+ FIXME (shell, "(0x%08lx,0x%08x):stub.\n", hwnd, x2);
return 0;
}
/*************************************************************************
* SHELL32_87 [SHELL32.87]
* unknown
+ *
+ * NOTES
+ * Original name: SHRevokeDragDrop (exported by ordinal)
*/
DWORD WINAPI SHELL32_87(DWORD x) {
FIXME(shell,"(0x%08lx):stub.\n",x);
@@ -724,13 +742,15 @@
/*************************************************************************
* SHELL32_61 [SHELL32.61]
- * Shell/Run-Dialog
+ *
+ * NOTES
+ * Original name: RunFileDlg (exported by ordinal)
*/
DWORD WINAPI
SHELL32_61 (HWND32 hwndOwner, DWORD dwParam1, DWORD dwParam2,
LPSTR lpszTitle, LPSTR lpszPrompt, UINT32 uFlags)
{
- FIXME (shell,"(0x%08x 0x%lx 0x%lx \"%s\" \"%s\" 0x%lx):stub.\n",
+ FIXME (shell,"(0x%08x 0x%lx 0x%lx \"%s\" \"%s\" 0x%x):stub.\n",
hwndOwner, dwParam1, dwParam2, lpszTitle, lpszPrompt, uFlags);
return 0;
}
@@ -761,3 +781,17 @@
return 0;
}
+
+/*************************************************************************
+ * SHELL32_147 [SHELL32.147]
+ *
+ * NOTES
+ * Original name: SHCLSIDFromString (exported by ordinal)
+ */
+DWORD WINAPI
+SHELL32_147 (DWORD dwParam1, DWORD dwParam2)
+{
+ FIXME (shell,"(0x%lx 0x%lx):stub.\n", dwParam1, dwParam2);
+ return 0;
+}
+
diff --git a/misc/toolhelp.c b/misc/toolhelp.c
index 606416b..c3cb60a 100644
--- a/misc/toolhelp.c
+++ b/misc/toolhelp.c
@@ -101,3 +101,12 @@
/* just return previously installed notification function */
return tmp;
}
+
+/***********************************************************************
+ * CreateToolHelp32Snapshot (KERNEL32.179)
+ * see "Undocumented Windows"
+ */
+HANDLE32 WINAPI CreateToolhelp32Snapshot(DWORD dwFlags, DWORD th32ProcessID) {
+ FIXME(toolhelp,"(0x%08lx,0x%08lx), stub!\n",dwFlags,th32ProcessID);
+ return INVALID_HANDLE_VALUE32;
+}
diff --git a/misc/winsock.c b/misc/winsock.c
index 44c1ecd..5eb67d5 100644
--- a/misc/winsock.c
+++ b/misc/winsock.c
@@ -65,8 +65,6 @@
/* ----------------------------------- internal data */
-extern int h_errno;
-
static HANDLE32 _WSHeap = 0;
static unsigned char* _ws_stub = NULL;
static LPWSINFO _wsi_list = NULL;
@@ -2570,9 +2568,9 @@
{
int loc_errno = errno;
#ifdef HAVE_STRERROR
- WARN(winsock, "errno %d, (%s).\n", errno, strerror(errno));
+ WARN(winsock, "errno %d, (%s).\n", loc_errno, strerror(loc_errno));
#else
- WARN(winsock, "errno %d\n", errno);
+ WARN(winsock, "errno %d\n", loc_errno);
#endif
switch(loc_errno)
@@ -2635,7 +2633,7 @@
/* just in case we ever get here and there are no problems */
case 0: return 0;
default:
- WARN(winsock, "Unknown errno %d!\n", errno);
+ WARN(winsock, "Unknown errno %d!\n", loc_errno);
return WSAEOPNOTSUPP;
}
}
@@ -2644,11 +2642,7 @@
{
int loc_errno = h_errno;
-#ifdef HAVE_STRERROR
- WARN(winsock, "h_errno %d, (%s).\n", h_errno, strerror(h_errno));
-#else
- WARN(winsock, "h_errno %d.\n", h_errno);
-#endif
+ WARN(winsock, "h_errno %d.\n", loc_errno);
switch(loc_errno)
{
@@ -2659,7 +2653,7 @@
case 0: return 0;
default:
- WARN(winsock,"Unknown h_errno %d!\n", h_errno);
+ WARN(winsock,"Unknown h_errno %d!\n", loc_errno);
return WSAEOPNOTSUPP;
}
}
diff --git a/misc/winsock_dns.c b/misc/winsock_dns.c
index 3cb1fe0..baf9b9f 100644
--- a/misc/winsock_dns.c
+++ b/misc/winsock_dns.c
@@ -33,8 +33,6 @@
# include <sys/file.h>
#endif
-extern int h_errno;
-
#include "winsock.h"
#include "windows.h"
#include "heap.h"
diff --git a/misc/xmalloc.c b/misc/xmalloc.c
index 3faa6a8..0e757e8 100644
--- a/misc/xmalloc.c
+++ b/misc/xmalloc.c
@@ -28,6 +28,16 @@
MSG("Virtual memory exhausted.\n");
exit (1);
}
+ memset(res,0,size);
+ return res;
+}
+
+void *xcalloc( int size )
+{
+ void *res;
+
+ res = xmalloc (size);
+ memset(res,0,size);
return res;
}